:root {
    --green:      #008b50;
    --dark-green: #024426;
    --yellow:     #ffca00;
    --yellow-soft:#fff5cc;
    --red:        #c0392b;
    --red-soft:   #fdf0ef;
    --blue:       #0056b3;
    --gray-100:   #f5f6f8;
    --gray-200:   #e8eaed;
    --gray-400:   #9aa3ae;
    --gray-700:   #3d4451;
    --white:      #ffffff;
    --shadow-sm:  0 2px 8px rgba(0,0,0,.07);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Source Sans 3', sans-serif; background: var(--gray-100); color: var(--gray-700); min-height: 100vh; }

/* ─── HEADER ─── */
.site-header { background: var(--white); padding: 0 32px; display: flex; align-items: center; height: 70px; position: sticky; top: 0; z-index: 200; box-shadow: 0 2px 16px rgba(0,0,0,.25); }
.site-header img { height: 76px; }
.accent-bar { height: 5px; background: linear-gradient(90deg, var(--yellow) 0%, var(--green) 50%, var(--yellow) 100%); }

/* ─── HERO ─── */
.hero { background: var(--dark-green); padding: 50px 20px 60px; text-align: center; }
.hero h1 { font-family: 'Playfair Display', serif; font-size: clamp(34px, 5vw, 48px); color: var(--white); line-height: 1.1; margin-bottom: 16px; }
.hero p { color: rgba(255,255,255,.8); font-size: 17px; font-weight: 300; max-width: 600px; margin: 0 auto 24px; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,202,0,.15); border: 1px solid rgba(255,202,0,.35); color: var(--yellow); font-size: 12px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; padding: 6px 18px; border-radius: 20px; }
.pulse-dot { width: 8px; height: 8px; background-color: var(--yellow); border-radius: 50%; animation: pulse-anim 2s infinite; }
@keyframes pulse-anim { 0% { box-shadow: 0 0 0 0 rgba(255,202,0,.7); } 70% { box-shadow: 0 0 0 6px rgba(255,202,0,0); } 100% { box-shadow: 0 0 0 0 rgba(255,202,0,0); } }

/* ─── STEPPER ─── */
.stepper { display: flex; justify-content: center; align-items: flex-start; padding: 30px 20px 10px; max-width: 720px; margin: 0 auto; gap: 0; }
.step-item { display: flex; flex-direction: column; align-items: center; flex: 0 0 auto; position: relative; }
.step-circle { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700; border: 2.5px solid var(--gray-200); color: var(--gray-400); background: var(--white); transition: .3s; }
.step-item.active .step-circle, .step-item.done .step-circle { border-color: var(--green); color: var(--white); background: var(--green); }
.step-label { font-size: 11px; color: var(--gray-400); margin-top: 6px; text-align: center; font-weight: 500; max-width: 80px; }
.step-item.active .step-label { color: var(--green); font-weight: 700; }
.step-item.done .step-label { color: var(--green); }
.step-line { flex: 1; height: 2.5px; background: var(--gray-200); min-width: 40px; margin-top: 19px; }
.step-line.done { background: var(--green); }
@media (max-width: 560px) { .step-label { display: none; } .step-line { min-width: 24px; } }

/* ─── LAYOUT & CARDS ─── */
.page-body { max-width: 800px; margin: 0 auto; padding: 30px 20px 80px; }
.card { background: var(--white); border-radius: 14px; box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 24px; }
.card-header { background: var(--dark-green); padding: 16px 24px; display: flex; align-items: center; gap: 10px; }
.card-header-icon { width: 32px; height: 32px; background: rgba(255,202,0,.2); border-radius: 8px; display: grid; place-items: center; font-size: 16px; flex-shrink: 0; }
.card-header h2 { font-size: 16px; font-weight: 600; color: var(--white); }
.card-body { padding: 28px 24px; }

/* ─── FIELDS ─── */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 560px) { .info-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 7px; }
label { font-size: 13px; font-weight: 600; color: var(--gray-700); }
.field input, .field select, .field textarea { width: 100%; padding: 11px 14px; border: 1.5px solid var(--gray-200); border-radius: 8px; font-family: inherit; font-size: 15px; transition: .2s; }
.field input:focus, .field select:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,139,80,.12); }
.field input[readonly] { background-color: var(--gray-200); cursor: not-allowed; color: #555; }
.field input.invalid, .field select.invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(192,57,43,.12); }
.req-badge { font-size: 10px; font-weight: 700; color: var(--red); background: var(--red-soft); padding: 2px 6px; border-radius: 4px; margin-left: 6px; vertical-align: middle; }
.opt-badge { font-size: 10px; font-weight: 700; color: var(--gray-700); background: var(--gray-200); padding: 2px 6px; border-radius: 4px; margin-left: 6px; vertical-align: middle; }
.sub-section { margin-top: 28px; margin-bottom: 16px; }
.sub-section h3 { font-size: 15px; font-weight: 600; color: var(--dark-green); padding-bottom: 6px; border-bottom: 2.5px solid var(--yellow); display: inline-block; }

/* ─── ALERTAS ─── */
.alert { display: none; background: var(--red-soft); border-left: 4px solid var(--red); border-radius: 8px; padding: 18px 22px; margin-bottom: 28px; }
.alert-title { font-weight: 700; color: var(--red); font-size: 15px; margin-bottom: 5px; }
.alert p { color: #7a1c1c; font-size: 14px; line-height: 1.5; }
.legal-note { background: #eaf3fc; border-left: 4px solid var(--blue); padding: 16px 20px; border-radius: 8px; margin-bottom: 25px; }
.legal-note p { margin: 0; color: #004085; font-size: 14px; line-height: 1.5; }

/* ─── DOCUMENTS ─── */
.doc-card { border: 1.5px solid var(--gray-200); border-radius: 10px; padding: 18px 20px; margin-bottom: 12px; transition: .25s; background: var(--white); }
.doc-card.hidden { display: none; }
.doc-card:hover { border-color: var(--green); }
.doc-card-label { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.doc-num { width: 26px; height: 26px; background: var(--dark-green); color: var(--white); font-size: 12px; font-weight: 700; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; margin-top: 2px; }
.doc-title-wrapper { display: flex; flex-direction: column; }
.doc-name { font-size: 14.5px; font-weight: 600; color: var(--gray-700); }
.doc-sub { font-size: 12px; color: var(--gray-400); margin-top: 3px; font-weight: 500; }
.doc-link { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--blue); font-weight: 600; text-decoration: none; margin-top: 5px; background: #eaf3fc; padding: 4px 10px; border-radius: 4px; width: fit-content; transition: .2s; cursor: pointer; border: none; }
.doc-link:hover { background: #d3e5f7; }
.doc-link svg { width: 14px; height: 14px; }
.file-wrapper { position: relative; }
.file-label { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 2px dashed var(--gray-200); border-radius: 8px; background: var(--gray-100); cursor: pointer; transition: .2s; }
.file-label:hover { border-color: var(--green); background: #f0f9f4; }
.file-icon { display: flex; align-items: center; color: var(--green); }
.file-text { flex: 1; }
.file-text strong { font-size: 13px; color: var(--dark-green); display: block; }
input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.file-selected-name { font-size: 12px; color: var(--green); margin-top: 6px; display: none; font-weight: 500; }

/* ─── BUTTONS ─── */
.wizard-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; }
.btn-prev { padding: 14px 28px; background: var(--white); color: var(--green); border: 2px solid var(--green); border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; transition: .2s; }
.btn-prev:hover { background: #f0f9f4; }
.btn-next { padding: 14px 28px; background: var(--green); color: var(--white); border: none; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer; transition: .2s; box-shadow: 0 4px 18px rgba(0,139,80,.3); min-width: 160px; }
.btn-next:hover { background: var(--dark-green); }
.btn-next:disabled { background: var(--gray-400); cursor: not-allowed; box-shadow: none; }
.btn-submit { width: 100%; padding: 17px; background: var(--green); color: var(--white); border: none; border-radius: 10px; font-size: 16px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; transition: .25s; box-shadow: 0 4px 18px rgba(0,139,80,.3); }
.btn-submit:hover:not(:disabled) { background: var(--dark-green); }
.btn-submit:disabled { background: var(--gray-400); cursor: not-allowed; box-shadow: none; }

/* ─── LOADER / PROGRESS ─── */
#loader { display: none; text-align: center; padding: 24px 0; }
.loader-ring { width: 44px; height: 44px; border: 4px solid var(--gray-200); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }
.progress-bar-container { width: 100%; background: var(--gray-200); border-radius: 8px; height: 12px; margin-top: 14px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--green), var(--yellow)); border-radius: 8px; width: 0%; transition: width 0.3s; }
.progress-text { font-size: 13px; color: var(--green); font-weight: 600; margin-top: 6px; }

/* ─── CONDITIONS ─── */
.conditions-box { background: var(--white); border: 2px solid var(--gray-200); border-radius: 12px; padding: 30px; text-align: center; }
.btn-download { display: inline-flex; align-items: center; gap: 8px; background: var(--blue); color: var(--white); padding: 14px 28px; border-radius: 8px; text-decoration: none; font-weight: 700; font-size: 15px; transition: .2s; margin: 20px 0; }
.btn-download:hover { background: #004494; }
.checkbox-wrapper { display: flex; align-items: flex-start; gap: 10px; margin-top: 20px; padding: 0; background: none; border-radius: 0; border: none; text-align: left; }
.checkbox-wrapper input[type="checkbox"] { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; accent-color: var(--green); cursor: pointer; }
.checkbox-wrapper label { font-size: 12.5px; font-weight: 400; color: var(--gray-400); cursor: pointer; line-height: 1.4; }

/* ─── WIZARD STEP VISIBILITY ─── */
.wizard-step { display: none; }
.wizard-step.active { display: block; }

/* ─── MODAL BANCOS ─── */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); z-index: 2000; display: none; place-items: center; opacity: 0; transition: .3s; }
.modal-overlay.active { display: grid; opacity: 1; }
.modal-content { background: white; width: 90%; max-width: 420px; border-radius: 14px; padding: 30px; box-shadow: 0 15px 40px rgba(0,0,0,.25); position: relative; max-height: 90vh; overflow-y: auto; }
.modal-close-btn { position: absolute; top: 15px; right: 20px; background: none; border: none; font-size: 28px; cursor: pointer; color: var(--gray-400); line-height: 1; }
.modal-close-btn:hover { color: var(--red); }
.bank-list { margin-top: 15px; padding-left: 20px; font-size: 14.5px; color: var(--gray-700); line-height: 1.8; }
.bank-list li::marker { color: var(--green); }

/* ─── CHAT ─── */
.chat-btn { position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px; background: var(--green); color: white; border-radius: 50%; display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 20px rgba(0,139,80,.4); transition: transform .2s; z-index: 1000; border: none; }
.chat-btn:hover { transform: scale(1.08); background: var(--dark-green); }
.chat-btn svg { width: 28px; height: 28px; }
.chat-window { position: fixed; bottom: 100px; right: 30px; width: 340px; background: white; border-radius: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.15); z-index: 999; overflow: hidden; transform: translateY(20px); opacity: 0; pointer-events: none; transition: .3s ease; display: flex; flex-direction: column; border: 1px solid var(--gray-200); }
.chat-window.active { transform: translateY(0); opacity: 1; pointer-events: all; }
.chat-header { background: var(--dark-green); color: var(--yellow); padding: 16px; font-weight: 600; font-size: 15px; display: flex; justify-content: space-between; align-items: center; }
.chat-close { background: none; border: none; color: white; cursor: pointer; font-size: 20px; line-height: 1; opacity: .7; }
.chat-body { padding: 20px; flex: 1; background: var(--gray-100); }
.chat-form .field { margin-bottom: 12px; }
.chat-form textarea { resize: none; height: 80px; }
.btn-chat-send { width: 100%; padding: 12px; background: var(--green); color: white; border: none; border-radius: 8px; font-weight: 600; cursor: pointer; transition: .2s; }
.btn-chat-send:hover { background: var(--dark-green); }
#chat-success { display: none; text-align: center; padding: 20px 10px; }

/* ─── INSTITUTION SEARCH ─── */
.search-wrapper { position: relative; }
.search-wrapper input { width: 100%; padding: 11px 14px; border: 1.5px solid var(--gray-200); border-radius: 8px; font-family: inherit; font-size: 15px; transition: .2s; }
.search-wrapper input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,139,80,.12); }
.search-results { position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border: 1.5px solid var(--gray-200); border-top: none; border-radius: 0 0 8px 8px; max-height: 240px; overflow-y: auto; z-index: 100; display: none; box-shadow: 0 6px 16px rgba(0,0,0,.1); }
.search-result-item { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--gray-100); transition: .15s; display: flex; flex-direction: column; gap: 2px; }
.search-result-item:hover { background: #f0f9f4; }
.search-result-item strong { font-size: 13.5px; color: var(--gray-700); }
.search-result-item span { font-size: 12px; color: var(--gray-400); }
.search-no-results { padding: 14px; text-align: center; font-size: 13px; color: var(--gray-400); }
.selected-inst-card { display: flex; align-items: center; justify-content: space-between; background: #f0f9f4; border: 1.5px solid var(--green); border-radius: 8px; padding: 10px 14px; margin-top: 8px; }
.selected-inst-info { display: flex; flex-direction: column; gap: 2px; }
.selected-inst-info strong { font-size: 13.5px; color: var(--dark-green); }
.selected-inst-info span { font-size: 12px; color: var(--gray-400); }
.selected-inst-remove { background: none; border: none; font-size: 22px; color: var(--gray-400); cursor: pointer; line-height: 1; padding: 4px 8px; }
.selected-inst-remove:hover { color: var(--red); }

/* ─── DOCUMENT ACCORDIONS ─── */
.doc-accordion { border: 1.5px solid var(--gray-200); border-radius: 12px; margin-bottom: 16px; overflow: hidden; background: var(--white); }
.doc-accordion-header { width: 100%; display: flex; align-items: center; gap: 12px; padding: 16px 20px; background: var(--gray-100); border: none; cursor: pointer; font-family: inherit; font-size: 15px; font-weight: 600; color: var(--dark-green); transition: .2s; }
.doc-accordion-header:hover { background: #e8f5ee; }
.doc-accordion-title { flex: 1; text-align: left; }
.doc-accordion-status { font-size: 12px; font-weight: 500; color: var(--gray-400); }
.doc-accordion-status.complete { color: var(--green); }
.doc-accordion-status.pending { color: var(--red); }
.doc-accordion-arrow { font-size: 12px; color: var(--gray-400); transition: transform .25s; }
.doc-accordion.open .doc-accordion-arrow { transform: rotate(180deg); }
.doc-accordion-body { display: none; padding: 16px 20px 8px; }
.doc-accordion.open .doc-accordion-body { display: block; }
.doc-accordion .doc-card { border-left: none; border-right: none; border-radius: 8px; }
.doc-accordion.accordion-error { border-color: var(--red); }
.doc-accordion.accordion-error .doc-accordion-header { background: var(--red-soft); }

/* ─── FOCUS STATES ─── */
.btn-next:focus-visible, .btn-prev:focus-visible, .btn-submit:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.doc-accordion-header:focus-visible { outline: 3px solid var(--green); outline-offset: -2px; }
.file-label:focus-within { border-color: var(--green); background: #f0f9f4; }
.chat-btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* ─── CURSOR ─── */
.doc-accordion-header, .file-label, .selected-inst-remove { cursor: pointer; }

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .pulse-dot { animation: none; }
}

.site-footer { background: var(--dark-green); text-align: center; padding: 22px 20px; color: rgba(255,255,255,.5); font-size: 13px; }
