:root {
    --sidebar-width: 250px;
    --topbar-height: 72px;
    --app-bg: #f5f7fb;
    --sidebar-bg: #0f172a;
    --sidebar-text: #cbd5e1;
    --border-soft: #e7ebf2;
    --text-main: #172033;
    --text-muted: #667085;
    --card-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    background: radial-gradient(circle at 80% 0%, rgba(99,102,241,.05), transparent 24%), var(--app-bg);
    color: var(--text-main);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { text-decoration: none; }
.min-w-0 { min-width: 0; }

.btn { border-radius: 10px; }
.btn-brand {
    color: #fff;
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    box-shadow: 0 8px 18px color-mix(in srgb, var(--brand-primary) 24%, transparent);
}
.btn-brand:hover,
.btn-brand:focus {
    color: #fff;
    background: color-mix(in srgb, var(--brand-primary) 88%, black);
    border-color: color-mix(in srgb, var(--brand-primary) 88%, black);
}
.action-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: radial-gradient(circle at top left, color-mix(in srgb, var(--brand-primary) 16%, transparent), transparent 36%), #f4f6f9;
}
.login-card { width: 100%; max-width: 440px; border: 0; border-radius: 22px; box-shadow: 0 24px 70px rgba(17,24,39,.12); }
.login-logo { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 18px; display: grid; place-items: center; font-size: 26px; font-weight: 700; color: #fff; background: var(--brand-primary); }
.login-logo-image { width: 88px; height: 88px; object-fit: contain; display: block; margin: 0 auto 16px; }

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    color: var(--sidebar-text);
    background: linear-gradient(180deg, #111b31 0%, #0f172a 48%, #0c1425 100%);
    transition: transform .25s ease;
}
.sidebar-brand { min-height: var(--topbar-height); display: flex; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid rgba(255,255,255,.07); }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; flex: 0 0 40px; border-radius: 12px; background: linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-primary) 65%, white)); color: #fff; font-size: 20px; box-shadow: 0 8px 18px color-mix(in srgb, var(--brand-primary) 30%, transparent); }
.brand-logo-image { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 11px; object-fit: contain; background: #fff; padding: 3px; }
.brand-copy { min-width: 0; }
.brand-title { color: #fff; font-size: 14px; font-weight: 800; letter-spacing: .02em; }
.brand-subtitle { max-width: 155px; margin-top: 2px; overflow: hidden; color: #94a3b8; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 16px 10px; }
.sidebar-section { padding: 18px 11px 7px; color: #64748b; font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.sidebar-link { position: relative; display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 9px 11px; margin-bottom: 3px; border-radius: 11px; color: var(--sidebar-text); font-size: 13px; transition: .18s ease; }
.sidebar-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.sidebar-link.active { color: #fff; background: linear-gradient(90deg, color-mix(in srgb, var(--brand-primary) 24%, transparent), rgba(255,255,255,.04)); box-shadow: inset 3px 0 0 var(--brand-primary); }
.sidebar-icon { width: 22px; display: inline-grid; place-items: center; flex: 0 0 22px; font-size: 19px; }
.sidebar-link.disabled { cursor: default; opacity: .54; }
.sidebar-link.disabled:hover { color: var(--sidebar-text); background: transparent; }
.sidebar-soon { margin-left: auto; padding: 2px 6px; border-radius: 999px; background: rgba(255,255,255,.06); color: #64748b; font-size: 11px; }
.sidebar-footer { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.07); }
.sidebar-version { display: flex; align-items: center; gap: 7px; color: #64748b; font-size: 12px; }

.topbar { position: fixed; top: 0; right: 0; left: var(--sidebar-width); height: var(--topbar-height); z-index: 1030; padding: 0 24px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--border-soft); backdrop-filter: blur(12px); }
.topbar-title { margin-bottom: 1px; font-size: 14px; font-weight: 700; }
.user-chip { display: flex; align-items: center; gap: 9px; }
.user-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: color-mix(in srgb, var(--brand-primary) 12%, white); color: var(--brand-primary); font-size: 13px; font-weight: 800; }
.user-role { color: var(--text-muted); font-size: 12px; }

.app-main { min-height: 100vh; padding-top: var(--topbar-height); padding-left: var(--sidebar-width); }
.app-content { width: 100%; max-width: 1600px; margin: 0 auto; padding: 28px; }
.app-alert { border: 0; border-radius: 14px; box-shadow: var(--card-shadow); }
.app-breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; color: #98a2b3; font-size: 12px; }
.app-breadcrumb a { color: #667085; }
.app-breadcrumb a:hover { color: var(--brand-primary); }
.page-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.page-heading-actions { justify-content: space-between; }
.page-heading h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.page-heading p { margin: 4px 0 0; color: var(--text-muted); font-size: 13px; }
.page-heading-icon { width: 52px; height: 52px; display: grid; place-items: center; flex: 0 0 52px; border-radius: 15px; font-size: 27px; }

.welcome-panel { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 28px 30px; border-radius: 20px; color: #fff; background: radial-gradient(circle at 86% 20%, rgba(255,255,255,.18), transparent 24%), linear-gradient(135deg, var(--brand-primary), color-mix(in srgb, var(--brand-primary) 65%, #111827)); box-shadow: 0 18px 40px color-mix(in srgb, var(--brand-primary) 20%, transparent); }
.welcome-panel::after { content: ""; position: absolute; width: 200px; height: 200px; right: -60px; bottom: -100px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .86; }
.welcome-title { margin: 0; font-size: 35px; font-weight: 800; letter-spacing: -.03em; }
.welcome-copy { max-width: 700px; margin: 8px 0 0; font-size: 13px; line-height: 1.6; opacity: .88; }
.welcome-status { position: relative; z-index: 2; display: flex; align-items: center; gap: 11px; min-width: 190px; padding: 13px 15px; border: 1px solid rgba(255,255,255,.18); border-radius: 14px; background: rgba(255,255,255,.10); backdrop-filter: blur(8px); }
.status-orb { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: rgba(255,255,255,.15); font-size: 21px; }

.metric-card { display: flex; align-items: center; gap: 16px; height: 100%; padding: 20px; border: 1px solid rgba(17,24,39,.03); border-radius: 17px; background: #fff; box-shadow: var(--card-shadow); transition: transform .18s ease, box-shadow .18s ease; }
.metric-card:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(15,23,42,.09); }
.metric-icon { width: 48px; height: 48px; display: grid; place-items: center; flex: 0 0 48px; border-radius: 14px; font-size: 24px; }
.metric-primary .metric-icon { color: var(--brand-primary); background: color-mix(in srgb, var(--brand-primary) 12%, white); }
.metric-info .metric-icon { color: #0ea5e9; background: #e0f2fe; }
.metric-success .metric-icon { color: #16a34a; background: #dcfce7; }
.metric-warning .metric-icon { color: #d97706; background: #fef3c7; }
.metric-label { color: var(--text-muted); font-size: 11px; font-weight: 600; }
.metric-value { margin-top: 2px; font-size: 31px; font-weight: 800; line-height: 1.1; }
.metric-hint { margin-top: 4px; color: #98a2b3; font-size: 12px; }

.section-card { border: 1px solid rgba(17,24,39,.03); border-radius: 18px; box-shadow: var(--card-shadow); }
.section-heading { display: flex; align-items: center; gap: 12px; }
.section-icon, .quick-icon, .detail-icon, .contact-icon { display: grid; place-items: center; flex: 0 0 auto; }
.section-icon { width: 38px; height: 38px; border-radius: 11px; font-size: 20px; }
.section-description { color: var(--text-muted); font-size: 11px; }
.soft-primary { color: var(--brand-primary); background: color-mix(in srgb, var(--brand-primary) 11%, white); }
.soft-success { color: #16a34a; background: #dcfce7; }
.soft-info { color: #0284c7; background: #e0f2fe; }
.soft-warning { color: #d97706; background: #fef3c7; }
.soft-purple { color: #7c3aed; background: #ede9fe; }
.soft-dark { color: #475569; background: #eef2f7; }

.modern-list .list-group-item { border-color: #eef1f5; }
.list-avatar, .client-avatar { display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; }
.list-avatar { width: 40px; height: 40px; }
.client-avatar { width: 42px; height: 42px; }
.avatar-company { color: #0284c7; background: #e0f2fe; }
.avatar-person { color: #7c3aed; background: #ede9fe; }
.mini-empty-state { display: flex; align-items: center; gap: 13px; margin-top: 18px; padding: 18px; border-radius: 14px; background: #f8fafc; }
.mini-empty-state > i { color: var(--brand-primary); font-size: 27px; }

.quick-actions { display: grid; gap: 10px; }
.quick-action { display: flex; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--border-soft); border-radius: 13px; color: var(--text-main); transition: .18s ease; }
.quick-action:hover { border-color: color-mix(in srgb, var(--brand-primary) 28%, white); color: var(--text-main); transform: translateX(2px); }
.quick-action .quick-icon { width: 38px; height: 38px; border-radius: 10px; }
.quick-action span:nth-child(2) { display: grid; flex: 1; }
.quick-action small { color: var(--text-muted); font-size: 12px; }
.system-info { display: grid; gap: 12px; }
.system-info > div { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px dashed #e5e7eb; }
.system-info > div:last-child { padding-bottom: 0; border-bottom: 0; }
.system-info span { color: var(--text-muted); font-size: 11px; }
.system-info strong { max-width: 60%; text-align: right; font-size: 11px; }

.mini-stat { display: flex; align-items: center; gap: 12px; min-height: 94px; padding: 16px; border: 1px solid rgba(17,24,39,.03); border-radius: 16px; background: #fff; box-shadow: var(--card-shadow); }
.mini-stat-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 42px; border-radius: 12px; font-size: 19px; }
.mini-stat span { display: block; color: var(--text-muted); font-size: 12px; font-weight: 600; }
.mini-stat strong { display: block; margin-top: 2px; font-size: 27px; }
.soft-primary-stat .mini-stat-icon { color: var(--brand-primary); background: color-mix(in srgb, var(--brand-primary) 11%, white); }
.soft-info-stat .mini-stat-icon { color: #0284c7; background: #e0f2fe; }
.soft-purple-stat .mini-stat-icon { color: #7c3aed; background: #ede9fe; }
.soft-success-stat .mini-stat-icon { color: #16a34a; background: #dcfce7; }

.field-label { display: flex; align-items: center; gap: 7px; color: #344054; font-size: 11px; font-weight: 700; }
.field-label i { color: var(--brand-primary); }
.required-dot { color: #ef4444; }
.modern-control, .modern-input-group .form-control, .modern-input-group .input-group-text { min-height: 44px; border-color: #dfe4ec; }
.modern-control:focus, .modern-input-group .form-control:focus { border-color: color-mix(in srgb, var(--brand-primary) 45%, white); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--brand-primary) 10%, transparent); }
.modern-input-group .input-group-text { color: #98a2b3; background: #fff; }
.field-help { margin-top: 6px; color: #98a2b3; font-size: 12px; line-height: 1.4; }
.form-section { overflow: hidden; }
.form-step-header { display: flex; gap: 12px; align-items: flex-start; }
.form-step-number { width: 34px; height: 34px; display: grid; place-items: center; flex: 0 0 34px; border-radius: 10px; color: #fff; background: var(--brand-primary); font-size: 12px; font-weight: 800; box-shadow: 0 7px 14px color-mix(in srgb, var(--brand-primary) 20%, transparent); }
.form-step-header h2 { margin: 0; font-size: 20px; font-weight: 800; }
.form-step-header p { margin: 4px 0 0; color: var(--text-muted); font-size: 11px; }

.client-type-selector { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.client-type-card { position: relative; cursor: pointer; }
.client-type-card input { position: absolute; opacity: 0; pointer-events: none; }
.client-type-content { display: flex; align-items: center; gap: 12px; min-height: 88px; padding: 14px; border: 1px solid #e1e6ee; border-radius: 15px; background: #fff; transition: .18s ease; }
.client-type-card:hover .client-type-content { border-color: color-mix(in srgb, var(--brand-primary) 28%, white); transform: translateY(-1px); }
.client-type-card input:checked + .client-type-content { border-color: var(--brand-primary); background: color-mix(in srgb, var(--brand-primary) 4%, white); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 7%, transparent); }
.client-type-icon { width: 44px; height: 44px; display: grid; place-items: center; flex: 0 0 44px; border-radius: 13px; font-size: 20px; }
.client-type-content > span:nth-child(2) { display: grid; flex: 1; }
.client-type-content strong { font-size: 13px; }
.client-type-content small { margin-top: 3px; color: var(--text-muted); font-size: 12px; }
.type-check { color: #cbd5e1; font-size: 20px; }
.client-type-card input:checked + .client-type-content .type-check { color: var(--brand-primary); }

.sticky-card { position: sticky; top: calc(var(--topbar-height) + 22px); }
.client-summary { padding: 18px; border-radius: 16px; background: linear-gradient(180deg, #f8fafc, #fff); border: 1px solid #edf1f5; text-align: center; }
.summary-avatar { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 11px; border-radius: 17px; color: var(--brand-primary); background: color-mix(in srgb, var(--brand-primary) 10%, white); font-size: 26px; }
.client-summary h3 { margin: 0; font-size: 19px; font-weight: 800; }
.summary-type { margin-top: 3px; color: var(--text-muted); font-size: 12px; }
.summary-list { display: grid; gap: 10px; text-align: left; }
.summary-list > div { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px dashed #e4e7ec; }
.summary-list span { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 12px; }
.summary-list strong { max-width: 56%; overflow-wrap: anywhere; text-align: right; font-size: 12px; }
.info-note { display: flex; gap: 9px; padding: 11px; border-radius: 11px; color: #475467; background: #f8fafc; font-size: 12px; line-height: 1.45; }
.info-note i { color: var(--brand-primary); }
.info-banner { display: flex; gap: 13px; padding: 16px; border: 1px solid #fde68a; border-radius: 15px; background: #fffbeb; color: #854d0e; }
.info-banner-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 38px; border-radius: 10px; background: #fef3c7; }
.info-banner strong { font-size: 12px; }
.info-banner p { margin-top: 2px; font-size: 12px; line-height: 1.5; }

.modern-table thead th { padding: 12px 16px; border-bottom: 1px solid #e9edf3; color: #667085; background: #fafbfc; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.modern-table tbody td { padding: 13px 16px; border-color: #eef1f5; font-size: 11px; }
.modern-table tbody tr:hover { background: #fbfcfe; }
.document-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border-radius: 9px; background: #f8fafc; }
.document-chip span { color: #98a2b3; font-size: 11px; font-weight: 700; }
.document-chip strong { font-size: 12px; }
.table-actions { display: inline-flex; gap: 6px; }
.empty-state { padding: 58px 24px; text-align: center; }
.empty-state-icon { width: 56px; height: 56px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 17px; font-size: 24px; }

.client-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px; border: 1px solid rgba(17,24,39,.03); border-radius: 18px; background: #fff; box-shadow: var(--card-shadow); }
.client-hero-main { display: flex; align-items: center; gap: 14px; }
.client-hero-avatar { width: 58px; height: 58px; display: grid; place-items: center; flex: 0 0 58px; border-radius: 17px; font-size: 27px; }
.client-hero h1 { margin: 0; font-size: 27px; font-weight: 800; }
.client-meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--text-muted); font-size: 12px; }
.client-meta span { display: flex; align-items: center; gap: 5px; }
.client-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.detail-box { display: flex; align-items: center; gap: 11px; padding: 13px; border: 1px solid #edf1f5; border-radius: 13px; background: #fbfcfe; }
.detail-icon { width: 38px; height: 38px; border-radius: 10px; }
.detail-label { color: var(--text-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.detail-value { margin-top: 2px; overflow-wrap: anywhere; font-size: 11px; font-weight: 600; }
.contact-cards { display: grid; gap: 11px; }
.contact-row { display: flex; align-items: center; gap: 11px; padding: 11px; border: 1px solid #edf1f5; border-radius: 12px; }
.contact-icon { width: 38px; height: 38px; border-radius: 10px; }
.contact-row > div { display: grid; min-width: 0; }
.contact-row small { color: var(--text-muted); font-size: 11px; }
.contact-row strong { overflow-wrap: anywhere; font-size: 11px; }
.notes-box { min-height: 82px; padding: 14px; border-radius: 12px; color: #475467; background: #f8fafc; font-size: 11px; line-height: 1.6; white-space: pre-line; }

.logo-preview-box { min-height: 190px; display: flex; align-items: center; justify-content: center; padding: 20px; overflow: hidden; border: 1px dashed #cbd5e1; border-radius: 15px; background: #f8fafc; }
.logo-preview-box img { max-width: 100%; max-height: 150px; object-fit: contain; }
.logo-placeholder { display: grid; justify-items: center; gap: 7px; color: #98a2b3; font-size: 11px; }
.logo-placeholder i { font-size: 30px; }
.color-field { display: flex; gap: 8px; }
.color-field .form-control-color { width: 52px; height: 44px; padding: 5px; border-color: #dfe4ec; border-radius: 10px; }
.save-panel { display: flex; gap: 10px; padding: 12px; border-radius: 12px; background: #f8fafc; }
.save-panel > i { color: #16a34a; font-size: 20px; }
.save-panel div { display: grid; }
.save-panel strong { font-size: 12px; }
.save-panel small { margin-top: 2px; color: var(--text-muted); font-size: 11px; }

.sidebar-overlay { display: none; }
@media (max-width: 1199.98px) { .sticky-card { position: static; } }
@media (max-width: 991.98px) {
    .app-sidebar { transform: translateX(-100%); }
    body.sidebar-open .app-sidebar { transform: translateX(0); }
    .sidebar-overlay { position: fixed; inset: 0; z-index: 1035; background: rgba(15,23,42,.58); backdrop-filter: blur(2px); }
    body.sidebar-open .sidebar-overlay { display: block; }
    .topbar { left: 0; padding: 0 16px; }
    .app-main { padding-left: 0; }
    .app-content { padding: 20px 16px; }
    .welcome-panel { align-items: flex-start; flex-direction: column; }
    .welcome-status { min-width: 0; }
}
@media (max-width: 767.98px) {
    .page-heading, .page-heading-actions { align-items: flex-start; flex-direction: column; }
    .page-heading-actions > .btn { width: 100%; }
    .client-type-selector { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .client-hero { align-items: flex-start; flex-direction: column; }
    .client-hero-actions { width: 100%; }
    .client-hero-actions .btn, .client-hero-actions form { flex: 1; }
    .client-hero-actions form .btn { width: 100%; }
    .welcome-title { font-size: 30px; }
}


/* ============================================================
   GCI-INVESTMENT v0.0.5 - AJUSTE GLOBAL DE LEGIBILIDAD
   ============================================================ */

body {
    font-size: 15px;
}

.form-control,
.form-select,
.input-group-text,
.btn {
    font-size: 14px;
}

.form-control,
.form-select {
    min-height: 46px;
}

.btn-sm {
    font-size: 13px;
}

.badge {
    font-size: 11px;
    font-weight: 700;
}

.topbar small {
    font-size: 12px;
}

.sidebar-link {
    font-size: 15px;
}

.sidebar-section {
    font-size: 12px;
}

.brand-title {
    font-size: 16px;
}

.brand-subtitle {
    font-size: 13px;
}

.app-breadcrumb {
    font-size: 14px;
}

.page-heading h1 {
    font-size: 30px;
}

.page-heading p {
    font-size: 15px;
}

.metric-label {
    font-size: 13px;
}

.metric-value {
    font-size: 31px;
}

.metric-hint {
    font-size: 12px;
}

.mini-stat span {
    font-size: 12px;
}

.mini-stat strong {
    font-size: 27px;
}

.section-description {
    font-size: 13px;
}

.field-label {
    font-size: 13px;
}

.field-help {
    font-size: 12px;
}

.form-step-header h2 {
    font-size: 18px;
}

.form-step-header p {
    font-size: 13px;
}

.client-type-content strong {
    font-size: 15px;
}

.client-type-content small {
    font-size: 12px;
}

.summary-type,
.summary-list span,
.summary-list strong {
    font-size: 12px;
}

.modern-table thead th {
    font-size: 12px;
}

.modern-table tbody td {
    font-size: 13px;
}

.document-chip span {
    font-size: 11px;
}

.document-chip strong {
    font-size: 12px;
}

.detail-label {
    font-size: 11px;
}

.detail-value {
    font-size: 13px;
}

.contact-row small,
.contact-row span:not(.contact-icon) {
    font-size: 11px;
}

.contact-row strong {
    font-size: 13px;
}

.system-info span,
.system-info strong {
    font-size: 13px;
}

.quick-action strong {
    font-size: 13px;
}

.quick-action small {
    font-size: 12px;
}

.info-note,
.info-banner p {
    font-size: 12px;
}

.save-panel strong {
    font-size: 12px;
}

.save-panel small {
    font-size: 11px;
}

@media (max-width: 767.98px) {
    body {
        font-size: 14px;
    }

    .page-heading h1 {
        font-size: 26px;
    }

    .welcome-title {
        font-size: 28px;
    }

    .modern-table tbody td {
        font-size: 12px;
    }
}


/* ============================================================
   GCI-INVESTMENT v0.0.6 - PARTICIPANTES
   ============================================================ */

.participant-helper-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid #c7d2fe;
    border-radius: 14px;
    background: #eef2ff;
}

.participant-helper-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    border-radius: 12px;
    color: #4f46e5;
    background: #e0e7ff;
    font-size: 20px;
}

.participant-helper-card strong {
    display: block;
    color: #3730a3;
    font-size: 14px;
}

.participant-helper-card p {
    margin-top: 3px;
    color: #6366f1;
    font-size: 12px;
    line-height: 1.45;
}

.participant-summary {
    padding: 18px;
    border: 1px solid #ede9fe;
    border-radius: 16px;
    background:
        linear-gradient(
            180deg,
            #faf7ff 0%,
            #ffffff 100%
        );
    text-align: center;
}

.participant-summary-avatar {
    color: #7c3aed;
    background: #ede9fe;
}

.participant-summary h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
}

.linked-client-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
}

.linked-client-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    border-radius: 12px;
    color: var(--brand-primary);
    background:
        color-mix(
            in srgb,
            var(--brand-primary) 10%,
            white
        );
    font-size: 19px;
}

.linked-client-card > div {
    display: grid;
    min-width: 0;
}

.linked-client-card small {
    color: var(--text-muted);
    font-size: 12px;
}

.linked-client-card strong {
    overflow-wrap: anywhere;
    font-size: 14px;
}

.linked-client-card span {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 12px;
}

@media (max-width: 767.98px) {
    .participant-helper-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .participant-helper-card .btn {
        width: 100%;
    }
}


/* ============================================================
   GCI-INVESTMENT v0.0.7 - INSTRUCTORES
   ============================================================ */

.instructor-type-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.instructor-avatar {
    color: #0369a1;
    background: #e0f2fe;
}

.instructor-summary {
    padding: 18px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background:
        linear-gradient(
            180deg,
            #f0f9ff 0%,
            #ffffff 100%
        );
    text-align: center;
}

.instructor-summary-avatar {
    color: #0369a1;
    background: #e0f2fe;
}

.instructor-summary h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
}

@media (max-width: 767.98px) {
    .instructor-type-selector {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   GCI-INVESTMENT v0.0.8 - CURSOS
   ============================================================ */

.course-avatar {
    color: #1d4ed8;
    background: #dbeafe;
}

.course-summary {
    padding: 18px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background:
        linear-gradient(
            180deg,
            #eff6ff 0%,
            #ffffff 100%
        );
    text-align: center;
}

.course-summary-avatar {
    color: #1d4ed8;
    background: #dbeafe;
}

.course-summary h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
}

.course-certificate-switch {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid #bbf7d0;
    border-radius: 15px;
    background: #f0fdf4;
}

.course-certificate-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    flex: 0 0 46px;
    border-radius: 13px;
    color: #15803d;
    background: #dcfce7;
    font-size: 21px;
}

.course-certificate-switch strong {
    display: block;
    color: #166534;
    font-size: 14px;
}

.course-certificate-switch p {
    margin-top: 3px;
    color: #4b5563;
    font-size: 12px;
    line-height: 1.45;
}

.course-switch {
    width: 3rem !important;
    height: 1.6rem;
    cursor: pointer;
}

.course-mode-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #f8fafc;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.course-mode-chip i {
    color: #2563eb;
}

.course-text-box {
    white-space: normal;
    line-height: 1.75;
}

@media (max-width: 767.98px) {
    .course-certificate-switch {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .course-certificate-switch .form-check {
        width: 100%;
        margin-left: 60px;
    }
}


/* ============================================================
   GCI-INVESTMENT v0.0.9 - EDICIONES
   ============================================================ */

.edition-avatar {
    color: #7c3aed;
    background: #ede9fe;
}

.edition-summary {
    padding: 18px;
    border: 1px solid #ddd6fe;
    border-radius: 16px;
    background:
        linear-gradient(
            180deg,
            #f5f3ff 0%,
            #ffffff 100%
        );
    text-align: center;
}

.edition-summary-avatar {
    color: #7c3aed;
    background: #ede9fe;
}

.edition-summary h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
}

.edition-course-reference {
    padding: 15px;
    border: 1px solid #dbeafe;
    border-radius: 14px;
    background: #eff6ff;
}

.edition-reference-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #1e40af;
    font-size: 13px;
    font-weight: 800;
}

.edition-reference-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.edition-reference-grid span {
    display: grid;
    gap: 2px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 11px;
    background: #ffffff;
    color: var(--text-muted);
    font-size: 11px;
}

.edition-reference-grid strong {
    color: var(--text-main);
    font-size: 13px;
}

.edition-status-flow {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #ffffff;
}

.edition-flow-step {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 150px;
    opacity: .52;
}

.edition-flow-step.current {
    opacity: 1;
}

.edition-flow-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    border-radius: 50%;
    color: #64748b;
    background: #f1f5f9;
    font-size: 17px;
}

.edition-flow-step.current .edition-flow-icon {
    color: #ffffff;
    background: var(--brand-primary);
    box-shadow:
        0 8px 18px
        color-mix(
            in srgb,
            var(--brand-primary) 22%,
            transparent
        );
}

.edition-flow-step strong,
.edition-flow-step small {
    display: block;
}

.edition-flow-step strong {
    color: var(--text-main);
    font-size: 13px;
}

.edition-flow-step small {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 11px;
}

.edition-flow-line {
    width: 34px;
    height: 2px;
    flex: 0 0 34px;
    margin: 0 7px;
    background: #e5e7eb;
}

.compact-empty-state {
    min-height: 220px;
}

.soft-warning-stat {
    background:
        linear-gradient(
            135deg,
            #fff7ed 0%,
            #ffffff 100%
        );
}

@media (max-width: 767.98px) {
    .edition-reference-grid {
        grid-template-columns: 1fr;
    }

    .edition-status-flow {
        padding: 14px;
    }

    .edition-flow-step {
        min-width: 132px;
    }
}


/* ============================================================
   GCI-INVESTMENT v0.0.10 - INSCRIPCIONES
   ============================================================ */

.enrollment-flow-note {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid #bbf7d0;
    border-radius: 15px;
    background: #f0fdf4;
}

.enrollment-flow-note > i {
    color: #15803d;
    font-size: 24px;
}

.enrollment-flow-note strong,
.enrollment-flow-note span {
    display: block;
}

.enrollment-flow-note strong {
    color: #166534;
}

.enrollment-flow-note span {
    margin-top: 3px;
    color: #4b5563;
    font-size: 13px;
}

.enrollment-candidate-list {
    display: grid;
    gap: 10px;
    max-height: 620px;
    overflow-y: auto;
    padding-right: 4px;
}

.enrollment-candidate-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.enrollment-candidate-card:hover {
    border-color: #bfdbfe;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
    transform: translateY(-1px);
}

.enrollment-candidate-card.is-enrolled {
    background: #f0fdf4;
    cursor: default;
}

.enrollment-candidate-card > .form-check-input {
    flex: 0 0 auto;
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
}

.enrollment-candidate-main {
    display: grid;
    min-width: 0;
    flex: 1;
}

.enrollment-candidate-main strong {
    font-size: 14px;
}

.enrollment-candidate-main small {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 12px;
}

.enrollment-candidate-status {
    flex: 0 0 auto;
}

.enrolled-list,
.enrolled-preview-list {
    display: grid;
    gap: 10px;
}

.enrolled-person-row,
.enrolled-preview-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 13px;
    background: #ffffff;
}

.enrolled-preview-row {
    color: inherit;
    text-decoration: none;
}

.enrolled-preview-row:hover {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.enrolled-person-row small,
.enrolled-preview-row small {
    color: var(--text-muted);
    font-size: 12px;
}

@media (max-width: 767.98px) {
    .enrollment-candidate-card {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .enrollment-candidate-status {
        width: 100%;
        padding-left: 78px;
    }
}


/* ============================================================
   GCI-INVESTMENT v0.0.11 - ASISTENCIA / EVALUACION
   ============================================================ */

.soft-danger-stat {
    background:
        linear-gradient(
            135deg,
            #fef2f2 0%,
            #ffffff 100%
        );
}

.evaluation-avatar {
    color: #15803d;
    background: #dcfce7;
}

.evaluation-counts {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 800;
}

.evaluation-counts span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.evaluation-rules-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.evaluation-rule-card {
    display: grid;
    gap: 7px;
    padding: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #f8fafc;
}

.evaluation-rule-card span {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
}

.evaluation-rule-card strong {
    color: var(--text-main);
    font-size: 18px;
}

.evaluation-table td {
    vertical-align: middle;
}

.evaluation-reason {
    max-width: 360px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.evaluation-save-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    border: 1px solid #bbf7d0;
    border-radius: 16px;
    background: #f0fdf4;
}

.evaluation-save-panel strong {
    color: #166534;
    font-size: 14px;
}

.evaluation-save-panel p {
    margin-top: 4px;
    color: #4b5563;
    font-size: 12px;
}

.training-history-list {
    display: grid;
    gap: 10px;
}

.training-history-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    color: inherit;
    background: #ffffff;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}

.training-history-row:hover {
    color: inherit;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .07);
}

.training-history-row small {
    color: var(--text-muted);
    font-size: 12px;
}

@media (max-width: 991.98px) {
    .evaluation-rules-grid {
        grid-template-columns: 1fr;
    }

    .evaluation-save-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .evaluation-save-panel .btn {
        width: 100%;
    }
}


/* ============================================================
   GCI-INVESTMENT v0.0.12 - CERTIFICADOS
   ============================================================ */

.certificate-avatar {
    color: #15803d;
    background: #dcfce7;
}

.certificate-file-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 15px;
    background: #fafafa;
}

.certificate-file-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    flex: 0 0 52px;
    border-radius: 14px;
    color: #b91c1c;
    background: #fee2e2;
    font-size: 24px;
}

.certificate-file-card strong,
.certificate-file-card small {
    display: block;
}

.certificate-file-card strong {
    color: var(--text-main);
    word-break: break-word;
}

.certificate-file-card small {
    margin-top: 3px;
    color: var(--text-muted);
}

.certificate-verification-link {
    display: grid;
    gap: 14px;
}

.certificate-verification-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
}

.certificate-url {
    padding: 13px 15px;
    overflow-wrap: anywhere;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    color: #475569;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    line-height: 1.55;
}

@media (max-width: 767.98px) {
    .certificate-file-card {
        align-items: flex-start;
    }
}


/* ============================================================
   GCI-INVESTMENT v0.0.13 - TEMPLATES, QR AND DELIVERY
   ============================================================ */

.template-list {
    display: grid;
    gap: 14px;
}

.template-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px;
    border: 1px solid #e5e7eb;
    border-radius: 15px;
    background: #fff;
}

.template-thumb {
    width: 118px;
    aspect-ratio: 1.414 / 1;
    object-fit: cover;
    flex: 0 0 118px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafc;
}

.template-editor-preview {
    position: relative;
    width: 100%;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .08);
}

.template-editor-preview > img {
    display: block;
    width: 100%;
    height: auto;
}

.template-overlay {
    position: absolute;
    z-index: 2;
    padding: 2px 4px;
    max-width: 70%;
    white-space: nowrap;
    border: 1px dashed rgba(37, 99, 235, .65);
    border-radius: 4px;
    background: rgba(255,255,255,.30);
    /* v056: no forzar negrita sintética. La apariencia debe venir del archivo TTF
       seleccionado (Regular/Bold/Italic/BoldItalic), igual que en el PDF. */
    font-weight: normal;
    line-height: 1.05;
    pointer-events: none;
}

.template-qr-guide {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    border: 2px dashed #0f172a;
    background: rgba(255,255,255,.85);
    color: #0f172a;
    pointer-events: none;
}

.template-qr-guide i {
    font-size: clamp(16px, 4vw, 44px);
}

.template-qr-guide small {
    position: absolute;
    bottom: 2px;
    font-size: 8px;
    font-weight: 800;
}

.certificate-delivery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.certificate-delivery-grid form {
    display: contents;
}

.certificate-delivery-card {
    width: 100%;
    min-height: 86px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px;
    border: 1px solid #e5e7eb;
    border-radius: 15px;
    background: #fff;
    color: #172033;
    text-align: left;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.certificate-delivery-card:not(:disabled):hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.certificate-delivery-card:disabled {
    opacity: .48;
    cursor: not-allowed;
}

.certificate-delivery-card > i {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    border-radius: 12px;
    font-size: 20px;
}

.certificate-delivery-card strong,
.certificate-delivery-card small {
    display: block;
}

.certificate-delivery-card small {
    margin-top: 3px;
    overflow-wrap: anywhere;
    color: #64748b;
    font-size: 11px;
}

.delivery-whatsapp > i {
    color: #15803d;
    background: #dcfce7;
}

.delivery-email > i {
    color: #1d4ed8;
    background: #dbeafe;
}

.delivery-share > i {
    color: #7c3aed;
    background: #ede9fe;
}

.delivery-link > i {
    color: #475569;
    background: #e2e8f0;
}

@media (max-width: 767.98px) {
    .template-list-item {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .template-thumb {
        width: 100%;
        flex-basis: 100%;
    }

    .certificate-delivery-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   GCI Investment - Login v029 elegante
   Diseño aplicado según referencia aprobada
   ============================================================ */

body:has(.gci29-login){
    margin:0;
    overflow:hidden;
    background:#f5f6f8;
}

.gci29-login{
    --gci-red:#ED3237;
    --gci-dark:#171719;
    --gci-muted:#7a8290;
    width:100%;
    height:100dvh;
    min-height:620px;
    font-family:Arial,Helvetica,sans-serif;
}

.gci29-layout{
    width:100%;
    height:100%;
    display:grid;
    grid-template-columns:62% 38%;
    background:#fff;
}

/* IZQUIERDA */
.gci29-left{
    position:relative;
    overflow:hidden;
    min-width:0;
    background:#111;
}

.gci29-bg{
    position:absolute;
    inset:0;
    background:
        linear-gradient(90deg,rgba(0,0,0,.08),rgba(0,0,0,.03) 45%,rgba(0,0,0,.05)),
        linear-gradient(0deg,rgba(0,0,0,.34),rgba(0,0,0,.02) 58%),
        url('../img/gci-bg-v029.webp') center center / cover no-repeat;
}

.gci29-left-content{
    position:relative;
    z-index:2;
    height:100%;
    padding:clamp(34px,4.3vw,72px) clamp(44px,5vw,88px);
    display:flex;
    flex-direction:column;
}

.gci29-left-logo{
    width:min(390px,50%);
    max-height:125px;
    object-fit:contain;
    object-position:left center;
}

.gci29-copy{
    margin-top:auto;
    max-width:660px;
    margin-bottom:clamp(22px,3vh,38px);
}

.gci29-kicker{
    display:flex;
    align-items:center;
    gap:12px;
    color:#fff;
    font-size:clamp(11px,.82vw,14px);
    font-weight:650;
    letter-spacing:.22em;
    text-shadow:0 2px 6px rgba(0,0,0,.28);
}

.gci29-kicker span{
    width:54px;
    height:4px;
    background:var(--gci-red);
}

.gci29-copy h1{
    margin:12px 0 0;
    color:#fff;
    font-size:clamp(36px,3.55vw,60px);
    line-height:.98;
    font-weight:900;
    letter-spacing:-.025em;
    text-shadow:0 3px 12px rgba(0,0,0,.28);
}

.gci29-copy h2{
    margin:10px 0 0;
    color:#fff;
    font-size:clamp(25px,2.2vw,36px);
    font-weight:350;
    text-shadow:0 3px 10px rgba(0,0,0,.26);
}

.gci29-copy p{
    margin:15px 0 0;
    max-width:430px;
    color:#fff;
    font-size:clamp(15px,1.1vw,19px);
    line-height:1.35;
    font-weight:550;
    text-shadow:0 2px 8px rgba(0,0,0,.30);
}

.gci29-features{
    margin-top:clamp(22px,2.7vh,32px);
    max-width:580px;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:clamp(12px,1.5vw,22px);
}

.gci29-feature{
    color:#fff;
    text-align:center;
    font-size:clamp(9px,.72vw,12px);
    line-height:1.25;
    font-weight:600;
    text-shadow:0 2px 6px rgba(0,0,0,.36);
}

.gci29-icon{
    width:clamp(48px,3.5vw,60px);
    height:clamp(48px,3.5vw,60px);
    margin:0 auto 8px;
    display:grid;
    place-items:center;
    border-radius:12px;
    background:rgba(30,30,32,.72);
    color:#fff;
    font-size:clamp(22px,1.75vw,29px);
    border:1px solid rgba(255,255,255,.10);
    box-shadow:0 8px 18px rgba(0,0,0,.18);
    backdrop-filter:blur(4px);
}

.gci29-bottom{
    display:flex;
    align-items:center;
    gap:14px;
    color:#fff;
    font-size:clamp(10px,.76vw,13px);
    line-height:1.45;
    letter-spacing:.18em;
    text-shadow:0 2px 7px rgba(0,0,0,.45);
}

.gci29-redline{
    width:4px;
    height:50px;
    background:var(--gci-red);
}

/* DERECHA */
.gci29-right{
    min-width:0;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:clamp(28px,3.3vw,54px);
    background:linear-gradient(145deg,#fff 0%,#f7f8fa 100%);
}

.gci29-card{
    width:min(560px,100%);
    padding:clamp(34px,3vw,50px);
    border-radius:28px;
    background:#fff;
    box-shadow:0 24px 60px rgba(32,37,46,.11);
}

.gci29-card-logo{
    display:block;
    width:min(320px,76%);
    max-height:100px;
    margin:0 auto 26px;
    object-fit:contain;
}

.gci29-card h2{
    margin:0;
    color:#1d1c1e;
    font-size:clamp(34px,2.8vw,46px);
    line-height:1;
    font-weight:850;
    letter-spacing:-.03em;
}

.gci29-subtitle{
    margin:10px 0 24px;
    color:#7d8491;
    font-size:clamp(13px,.95vw,16px);
    line-height:1.4;
}

.gci29-field{
    margin-bottom:16px;
}

.gci29-field label{
    display:block;
    margin-bottom:8px;
    color:#242225;
    font-size:clamp(12px,.82vw,14px);
    font-weight:700;
}

.gci29-control{
    position:relative;
}

.gci29-control>i{
    position:absolute;
    left:16px;
    top:50%;
    transform:translateY(-50%);
    color:#68717e;
    font-size:18px;
}

.gci29-control input{
    width:100%;
    height:54px;
    padding:0 50px 0 47px;
    border:1px solid #ced4dd;
    border-radius:11px;
    outline:none;
    background:#fff;
    color:#262428;
    font-size:15px;
}

.gci29-control input:focus{
    border-color:var(--gci-red);
    box-shadow:0 0 0 4px rgba(237,50,55,.08);
}

.gci29-toggle{
    position:absolute;
    right:9px;
    top:50%;
    width:38px;
    height:38px;
    transform:translateY(-50%);
    display:grid;
    place-items:center;
    border:0;
    border-radius:9px;
    background:transparent;
    color:#5f6875;
    cursor:pointer;
}

.gci29-forgot{
    display:block;
    width:max-content;
    margin:-2px 0 19px auto;
    color:var(--gci-red);
    font-size:13px;
    text-decoration:underline;
    text-underline-offset:2px;
}

.gci29-submit{
    width:100%;
    height:54px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:14px;
    border:0;
    border-radius:11px;
    background:linear-gradient(90deg,#e81621,#f21f29);
    color:#fff;
    font-size:17px;
    font-weight:800;
    box-shadow:0 12px 26px rgba(237,50,55,.22);
    cursor:pointer;
}

.gci29-version{
    margin-top:21px;
    color:#7b8492;
    font-size:12px;
    line-height:1.45;
    text-align:center;
}

.gci29-security{
    margin-top:18px;
    padding-top:18px;
    border-top:1px solid #e2e6eb;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    color:#657080;
    font-size:12px;
}

.gci29-security i{
    font-size:18px;
}

/* 1366x768 / 19-20 pulgadas */
@media (max-height:800px) and (min-width:1001px){
    .gci29-left-content{
        padding-top:24px;
        padding-bottom:22px;
    }

    .gci29-left-logo{
        width:290px;
        max-height:88px;
    }

    .gci29-copy{
        margin-bottom:16px;
    }

    .gci29-copy h1{
        font-size:40px;
    }

    .gci29-copy h2{
        font-size:25px;
    }

    .gci29-copy p{
        margin-top:9px;
        font-size:15px;
    }

    .gci29-features{
        margin-top:16px;
    }

    .gci29-icon{
        width:44px;
        height:44px;
        font-size:20px;
    }

    .gci29-card{
        padding:27px 36px;
    }

    .gci29-card-logo{
        width:255px;
        max-height:76px;
        margin-bottom:15px;
    }

    .gci29-card h2{
        font-size:32px;
    }

    .gci29-subtitle{
        margin:7px 0 14px;
        font-size:13px;
    }

    .gci29-field{
        margin-bottom:11px;
    }

    .gci29-control input{
        height:47px;
    }

    .gci29-forgot{
        margin-bottom:12px;
        font-size:11px;
    }

    .gci29-submit{
        height:47px;
        font-size:14px;
    }

    .gci29-version{
        margin-top:13px;
        font-size:10px;
    }

    .gci29-security{
        margin-top:12px;
        padding-top:12px;
        font-size:10px;
    }
}

/* Tablet */
@media (max-width:1000px){
    body:has(.gci29-login){overflow:auto}

    .gci29-login{
        height:auto;
        min-height:100dvh;
    }

    .gci29-layout{
        display:block;
        height:auto;
    }

    .gci29-left{
        min-height:390px;
    }

    .gci29-left-content{
        min-height:390px;
        padding:26px;
        justify-content:flex-end;
    }

    .gci29-left-logo{
        position:absolute;
        top:20px;
        left:24px;
        width:min(310px,calc(100% - 48px));
        max-height:100px;
    }

    .gci29-copy{
        margin:0;
    }

    .gci29-kicker,
    .gci29-features,
    .gci29-bottom{
        display:none;
    }

    .gci29-copy h1{
        font-size:clamp(36px,9vw,50px);
    }

    .gci29-copy h2{
        font-size:27px;
    }

    .gci29-copy p{
        font-size:15px;
    }

    .gci29-right{
        min-height:650px;
        padding:28px 18px;
    }

    .gci29-card{
        width:min(580px,100%);
        padding:29px 23px;
        border-radius:22px;
    }
}

/* Mobile */
@media (max-width:560px){
    .gci29-left{
        min-height:290px;
    }

    .gci29-left-content{
        min-height:290px;
        padding:18px;
    }

    .gci29-copy h1{
        font-size:34px;
    }

    .gci29-copy h2{
        font-size:23px;
    }

    .gci29-copy p{
        display:none;
    }

    .gci29-right{
        padding-inline:10px;
    }

    .gci29-card{
        padding:24px 17px;
    }

    .gci29-card h2{
        font-size:29px;
    }
}


/* ============================================================
   GCI Investment - Login v030
   Ajuste solicitado: elevar el bloque principal izquierdo
   para acercarlo a la posición visual de la referencia.
   ============================================================ */

/* En escritorio: el bloque de contenido queda centrado más arriba */
.gci29-left-content{
    justify-content:flex-start;
}

.gci29-copy{
    margin-top:clamp(18vh,21vh,24vh);
    margin-bottom:clamp(18px,2.4vh,30px);
}

/* Logo ligeramente más integrado con la composición */
.gci29-left-logo{
    width:min(380px,48%);
}

/* Compromiso inferior permanece abajo, separado del bloque principal */
.gci29-bottom{
    margin-top:auto;
}

/* Ajustes para pantallas grandes */
@media (min-width:1600px) and (min-height:850px){
    .gci29-copy{
        margin-top:19vh;
    }

    .gci29-left-logo{
        width:370px;
    }
}

/* 1366x768 / 19"-20": subir contenido sin provocar overflow */
@media (max-height:800px) and (min-width:1001px){
    .gci29-copy{
        margin-top:12vh;
        margin-bottom:14px;
    }

    .gci29-left-logo{
        width:285px;
    }
}

/* Tablet: mantener comportamiento anterior */
@media (max-width:1000px){
    .gci29-left-content{
        justify-content:flex-end;
    }

    .gci29-copy{
        margin-top:0;
        margin-bottom:0;
    }
}

/* ============================================================
   GCI-INVESTMENT v035 - Redimensionado visual del QR
   ============================================================ */
.template-qr-guide {
    pointer-events: auto;
    box-sizing: border-box;
}

.template-qr-resize-handle {
    position: absolute;
    right: -7px;
    bottom: -7px;
    width: 15px;
    height: 15px;
    border: 2px solid #fff;
    border-radius: 4px;
    background: #ed3237;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .28);
    cursor: nwse-resize;
    z-index: 4;
    touch-action: none;
}

.template-qr-guide.is-resizing {
    border-color: #ed3237;
    box-shadow: 0 0 0 3px rgba(237, 50, 55, .12);
}


/* GCI v036 - Sellos y textos personalizados */
.template-seal-guide{position:absolute;z-index:5;object-fit:contain;max-height:35%;pointer-events:none;filter:drop-shadow(0 1px 2px rgba(15,23,42,.2));}
.template-custom-text{white-space:pre-wrap;max-width:80%;line-height:1.15;}


/* ============================================================
   GCI v039 - Editor visual de plantillas Drag & Drop
   ============================================================ */
.template-editor-toolbar{display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:wrap;padding:.65rem .75rem;border:1px solid #e5e7eb;border-radius:12px;background:#f8fafc}
.template-editor-selected{font-size:.82rem;font-weight:700;color:#475569;background:#fff;border:1px solid #e2e8f0;border-radius:999px;padding:.38rem .7rem}
.template-editor-preview{user-select:none;touch-action:none;overflow:hidden}
.template-editor-preview.show-grid::after{content:"";position:absolute;inset:0;pointer-events:none;z-index:2;background-image:linear-gradient(to right,rgba(237,50,55,.12) 1px,transparent 1px),linear-gradient(to bottom,rgba(55,52,53,.10) 1px,transparent 1px);background-size:2.5% 2.5%}
.template-draggable{cursor:grab;touch-action:none;transition:box-shadow .12s ease,outline-color .12s ease}
.template-draggable:active{cursor:grabbing}
.template-draggable.is-selected{outline:2px solid #ED3237!important;outline-offset:3px;box-shadow:0 0 0 5px rgba(237,50,55,.12);z-index:20!important}
.template-resource-guide{position:absolute;z-index:6;object-fit:contain;max-height:40%;pointer-events:auto!important}
.template-signature-guide{filter:drop-shadow(0 1px 2px rgba(15,23,42,.18))}
.template-seal-guide{pointer-events:auto!important}
.template-overlay,.template-qr-guide{pointer-events:auto!important}
.template-qr-resize-handle{pointer-events:auto!important;cursor:nwse-resize}
@media (max-width:1199.98px){.sticky-card{position:static!important}.template-editor-preview{max-height:none}}


/* ============================================================
   GCI v040 - QR alta compatibilidad
   ============================================================ */
.qr-compat-note{
    display:flex;align-items:flex-start;gap:.5rem;padding:.65rem .75rem;
    border:1px solid #dbe7df;border-radius:.65rem;background:#f4fbf6;
    color:#23643a;font-size:.78rem;line-height:1.35;
}
.qr-compat-note i{font-size:1rem;line-height:1.15}
.template-qr-guide{image-rendering:pixelated}

/* GCI v042 - editor por etapas */
.gci-editor-shell{display:grid;grid-template-columns:minmax(360px,520px) minmax(0,1fr);gap:1.25rem;align-items:start}.gci-editor-left{overflow:hidden}.gci-editor-steps{display:flex;gap:.4rem;padding:1rem 1rem 0;overflow-x:auto;background:#fff;border-bottom:1px solid #eef0f3}.gci-step{border:0;background:#f5f6f8;color:#555;border-radius:10px 10px 0 0;padding:.65rem .8rem;white-space:nowrap;font-size:.86rem;font-weight:600}.gci-step span{display:inline-flex;width:22px;height:22px;border-radius:50%;align-items:center;justify-content:center;background:#fff;border:1px solid #d8dce2;margin-right:.35rem}.gci-step.active{background:#ed3237;color:#fff}.gci-step.active span{color:#ed3237;border-color:#fff}.gci-editor-panel{display:none}.gci-editor-panel.active{display:block}.gci-editor-footer{display:flex;gap:.5rem;align-items:center;border-top:1px solid #eee;margin-top:1.25rem;padding-top:1rem}.gci-editor-preview-card{position:sticky;top:1rem}.gci-element-list,.gci-dynamic-list{display:grid;gap:.75rem}.gci-element-card,.gci-dynamic-card{border:1px solid #e5e7eb;border-radius:12px;padding:.85rem;background:#fff}.gci-element-card{display:flex;align-items:center;justify-content:space-between;gap:.75rem}.gci-element-card small{display:block;color:#8a9099}.gci-dynamic-card-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:.7rem}.gci-empty-state{padding:1rem;border:1px dashed #d7dbe1;border-radius:12px;color:#707782;text-align:center;background:#fafbfc}.gci-dyn-overlay{z-index:8}.gci-dyn-overlay.is-selected{outline:2px dashed #ed3237;outline-offset:3px}.template-editor-preview [data-dynamic-preview-layer]{position:absolute;inset:0;pointer-events:none}.template-editor-preview [data-dynamic-preview-layer]>*{pointer-events:auto}.gci-editor-panel .input-group .btn{white-space:nowrap}
@media(max-width:1199.98px){.gci-editor-shell{grid-template-columns:1fr}.gci-editor-preview-card{position:relative;top:auto}.gci-editor-preview-card{order:-1}.gci-editor-steps{position:sticky;top:0;z-index:4}.gci-editor-preview{max-height:70vh}}
@media(max-width:575.98px){.gci-editor-steps{padding:.65rem .65rem 0}.gci-step{padding:.55rem .65rem;font-size:.8rem}.gci-editor-panel-wrap{padding:1rem!important}.gci-element-card{align-items:flex-start;flex-direction:column}.gci-element-card>.d-flex{width:100%}.gci-element-card select{flex:1}}

/* ============================================================
   GCI v043 - Editor visual en dos paneles
   ============================================================ */
@media (min-width: 900px){
  #templateEditorForm .gci-editor-shell{
    display:grid;
    grid-template-columns:minmax(330px,36%) minmax(0,64%);
    gap:1rem;
    align-items:start;
    min-height:calc(100vh - 230px);
  }
  #templateEditorForm .gci-editor-left,
  #templateEditorForm .gci-editor-preview-card{
    height:calc(100vh - 230px);
    min-height:620px;
    margin-bottom:0;
  }
  #templateEditorForm .gci-editor-left{
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }
  #templateEditorForm .gci-editor-panel-wrap{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto;
    overscroll-behavior:contain;
    scrollbar-width:thin;
  }
  #templateEditorForm .gci-editor-preview-card{
    position:sticky;
    top:.75rem;
    overflow:hidden;
  }
  #templateEditorForm .gci-editor-preview-card>.card-body{
    height:100%;
    display:flex;
    min-height:0;
    flex-direction:column;
  }
  #templateEditorForm .template-editor-preview{
    flex:1 1 auto;
    min-height:0;
    width:100%;
    max-height:calc(100vh - 315px);
    display:block;
    margin:auto;
  }
}

/* Pestañas modernas y compactas */
#templateEditorForm .gci-editor-steps{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:.45rem;
  padding:.8rem;
  background:#fff;
  border-bottom:1px solid #eceff3;
  overflow:visible;
}
#templateEditorForm .gci-step{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:.22rem;
  min-height:58px;
  padding:.5rem .35rem;
  border:1px solid #e3e6eb;
  border-radius:11px;
  background:#f8f9fb;
  color:#4a4f57;
  font-size:.73rem;
  font-weight:700;
  line-height:1.1;
  text-align:center;
  transition:.15s ease;
}
#templateEditorForm .gci-step i{font-size:1.05rem;line-height:1;color:#747b85}
#templateEditorForm .gci-step span{display:block;width:auto;height:auto;margin:0;border:0;background:transparent;color:inherit}
#templateEditorForm .gci-step:hover{border-color:#ed3237;color:#c82328;background:#fff7f7}
#templateEditorForm .gci-step.active{border-color:#ed3237;background:#ed3237;color:#fff;box-shadow:0 5px 14px rgba(237,50,55,.18)}
#templateEditorForm .gci-step.active i{color:#fff}

/* Pie del panel de configuración siempre accesible */
#templateEditorForm .gci-editor-footer{
  position:sticky;
  bottom:0;
  z-index:6;
  margin:1rem -1.5rem -1.5rem;
  padding:.8rem 1.5rem;
  background:rgba(255,255,255,.96);
  backdrop-filter:blur(8px);
  border-top:1px solid #e9ebef;
}

/* Barra de herramientas de la vista previa */
#templateEditorForm .gci-preview-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  flex-wrap:wrap;
  flex:0 0 auto;
}
#templateEditorForm .gci-preview-tools{display:flex;gap:.4rem;flex-wrap:wrap}
#templateEditorForm .template-editor-selected{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  padding:.38rem .65rem;
  border-radius:999px;
  background:#f5f6f8;
  border:1px solid #e1e4e8;
  color:#656b74;
  font-size:.76rem;
  white-space:nowrap;
}

/* Vista previa: priorizar el certificado completo dentro del panel */
#templateEditorForm .template-editor-preview{
  transform-origin:top center;
  overflow:hidden;
  border-radius:10px;
  box-shadow:0 8px 24px rgba(22,30,40,.09);
}
#templateEditorForm .template-editor-preview>img{width:100%;height:auto;display:block}

/* En tablets estrechas recién se apila */
@media (max-width:899.98px){
  #templateEditorForm .gci-editor-shell{grid-template-columns:1fr}
  #templateEditorForm .gci-editor-preview-card{position:relative;top:auto;order:-1}
  #templateEditorForm .gci-editor-steps{position:static;grid-template-columns:repeat(5,minmax(72px,1fr));overflow-x:auto}
  #templateEditorForm .gci-editor-panel-wrap{max-height:none;overflow:visible}
}
@media (max-width:575.98px){
  #templateEditorForm .gci-editor-steps{grid-template-columns:repeat(5,92px)}
  #templateEditorForm .gci-step{min-height:52px;font-size:.68rem}
  #templateEditorForm .gci-preview-tools .btn span{display:none}
}

/* ============================================================
   GCI-INVESTMENT v047 - Campos dinamicos en acordeon
   ============================================================ */
.gci-element-card.gci-field-accordion{
  display:block;
  padding:0;
  overflow:hidden;
  border:1px solid #e4e7ec;
  border-radius:14px;
  background:#fff;
  transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.gci-field-accordion.is-open,
.gci-field-accordion.is-active{
  border-color:rgba(237,50,55,.5);
  box-shadow:0 5px 18px rgba(23,32,51,.07);
}
.gci-field-accordion-toggle{
  width:100%;
  border:0;
  background:#fff;
  color:#172033;
  padding:.85rem .95rem;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  text-align:left;
  cursor:pointer;
}
.gci-field-accordion-toggle:hover{background:#fafafa}
.gci-field-accordion.is-open .gci-field-accordion-toggle{background:#fff7f7}
.gci-field-accordion-toggle span{min-width:0}
.gci-field-accordion-toggle strong{display:block;font-size:.94rem;line-height:1.2}
.gci-field-accordion-toggle small{display:block;margin-top:.2rem;color:#8a9099;font-size:.76rem}
.gci-field-accordion-toggle i{flex:0 0 auto;color:#747b86;transition:transform .2s ease,color .2s ease}
.gci-field-accordion.is-open .gci-field-accordion-toggle i{transform:rotate(180deg);color:#ed3237}
.gci-field-accordion-body{padding:.15rem .95rem 1rem;border-top:1px solid #f0f1f3}
.gci-field-accordion-body[hidden]{display:none!important}
.gci-field-accordion.is-selected{outline:2px solid rgba(237,50,55,.12);outline-offset:1px}

/* ============================================================
   GCI-INVESTMENT v048 - Seleccion visual y acordeones unificados
   ============================================================ */
#templateEditorForm .gci-dynamic-card.gci-dyn-accordion{
  display:block;padding:0;overflow:hidden;border:1px solid #e4e7ec;border-radius:14px;background:#fff;
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease;
}
#templateEditorForm .gci-dyn-accordion.is-open,
#templateEditorForm .gci-dyn-accordion.is-active{
  border-color:rgba(237,50,55,.55);box-shadow:0 5px 18px rgba(23,32,51,.08);
}
#templateEditorForm .gci-dyn-accordion-toggle{
  width:100%;border:0;background:#fff;color:#172033;padding:.85rem .95rem;display:flex;align-items:center;
  justify-content:space-between;gap:.75rem;text-align:left;cursor:pointer;
}
#templateEditorForm .gci-dyn-accordion-toggle:hover{background:#fafafa}
#templateEditorForm .gci-dyn-accordion.is-open .gci-dyn-accordion-toggle{background:#fff7f7}
#templateEditorForm .gci-dyn-accordion-toggle span{min-width:0}
#templateEditorForm .gci-dyn-accordion-toggle strong{display:block;font-size:.94rem;line-height:1.2}
#templateEditorForm .gci-dyn-accordion-toggle small{display:block;margin-top:.2rem;color:#8a9099;font-size:.76rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:260px}
#templateEditorForm .gci-dyn-accordion-toggle>i{flex:0 0 auto;color:#747b86;transition:transform .2s ease,color .2s ease}
#templateEditorForm .gci-dyn-accordion.is-open .gci-dyn-accordion-toggle>i{transform:rotate(180deg);color:#ed3237}
#templateEditorForm .gci-dyn-accordion-body{padding:.75rem .95rem 1rem;border-top:1px solid #f0f1f3}
#templateEditorForm .gci-dyn-accordion-body[hidden]{display:none!important}

/* Un solo elemento activo en la vista previa. */
#templateEditorForm .template-editor-preview .gci-editor-active-overlay{
  outline:3px solid #ed3237!important;
  outline-offset:4px!important;
  box-shadow:0 0 0 2px rgba(255,255,255,.9),0 0 0 6px rgba(237,50,55,.18)!important;
  z-index:30!important;
}
#templateEditorForm .template-editor-preview .gci-selection-chip{
  position:absolute;z-index:60;display:inline-flex;align-items:center;max-width:220px;padding:.22rem .48rem;
  border-radius:6px;background:#ed3237;color:#fff;font-size:.68rem;font-weight:700;line-height:1.15;
  box-shadow:0 3px 10px rgba(0,0,0,.18);pointer-events:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
#templateEditorForm .template-editor-preview .gci-selection-chip[hidden]{display:none!important}
#templateEditorForm .template-editor-selected:has(.bi-cursor-fill){background:#fff1f1;border-color:rgba(237,50,55,.35);color:#c52328;font-weight:700}

/* ============================================================
   GCI-INVESTMENT v049 - Vista previa completa sin recorte
   ============================================================ */
@media (min-width: 900px){
  #templateEditorForm .gci-editor-preview-card{
    height:auto;
    min-height:620px;
    overflow:visible;
  }
  #templateEditorForm .gci-editor-preview-card>.card-body{
    height:auto;
    min-height:0;
  }
  #templateEditorForm .template-editor-preview{
    flex:0 0 auto;
    width:100%;
    max-height:none;
    height:auto;
    overflow:hidden;
    margin:0 auto;
  }
  #templateEditorForm .template-editor-preview>img{
    width:100%;
    height:auto;
    max-height:none;
    object-fit:contain;
    display:block;
  }
}
