/* ==========================================================
   Rastriya Banijya Bank – KYC Form
   Exact match to https://www.rbb.com.np/
   Colors extracted:
     Navy:  #1c3d90
     Red:   #c8102e
     Gold:  #aa820a / #a48400
     Body:  #f4f6f9
   ========================================================== */

/* ===== Base ===== */
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Montserrat', 'Open Sans', 'Roboto', Arial, sans-serif;
    background: #f4f6f9;
    min-height: 100vh;
    color: #222;
}


/* ===== Tokens ===== */
:root {
    --navy:   #1c3d90;
    --red:    #d9232d;
    --gold:   #aa820a;
    --white:  #ffffff;
    --body-bg:#f4f6f9;
    --text:   #263238;
    --muted:  #607d8b;
    --border: #dce3ea;
    --success:#2e7d32;
    --error:  #c62828;
}

/* Fix for main navigation bar background mismatch */
.navmenu_custom {
    background: #ffffff;
}

/* ============================================================
   PAGE CONTENT
   ============================================================ */
.page-content {
    flex: 1;
    padding: 36px 24px 56px;
    /* Subtle geometric network pattern like RBB */
    background:
        radial-gradient(circle at 20% 30%, rgba(28,61,144,.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(28,61,144,.03) 0%, transparent 50%),
        var(--body-bg);
}
.form-wrapper {
    max-width: 580px;
    margin: 0 auto;
    box-shadow: 0 4px 24px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);
    border-radius: 10px;
    overflow: hidden;
    background: var(--white);
}

/* ===== Form Header ===== */
.form-header {
    background: linear-gradient(135deg, #15307a 0%, var(--navy) 50%, #2651b0 100%);
    padding: 32px 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.form-header::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    background: rgba(255,255,255,.04);
    border-radius: 50%;
}
.form-header-icon {
    width: 56px; height: 56px;
    background: rgba(255,255,255,.1);
    border: 2px solid rgba(255,255,255,.2);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 12px;
}
.form-header h1 {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    letter-spacing: .5px;
    margin-bottom: 4px;
}
.form-header p {
    font-size: 13px;
    color: rgba(255,255,255,.65);
    font-weight: 400;
}

/* ===== Notice ===== */
.kyc-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 24px;
    background: #fff8f8;
    border-left: 4px solid var(--red);
    border-bottom: 1px solid #f0e4e4;
}
.kyc-notice-icon-wrap {
    flex-shrink: 0;
    width: 36px; height: 36px;
    background: #fce4ec;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--red);
    margin-top: 2px;
}
.kyc-notice-heading {
    font-size: 14px;
    font-weight: 700;
    color: var(--red);
    display: block;
    margin-bottom: 4px;
}
.kyc-notice-text {
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.6;
}

/* ===== Form ===== */
.kyc-form { }

/* Section */
.form-section {
    padding: 20px 24px 4px;
    border-top: 1px solid #f0f2f5;
}
.form-section:first-child { border-top: none; }

.section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 16px;
}
.section-accent {
    width: 4px;
    height: 16px;
    background: var(--navy);
    border-radius: 2px;
    display: inline-block;
}

/* Field */
.field { margin-bottom: 16px; }
.field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
}
.req { color: var(--red); font-weight: 700; }

.input-box {
    position: relative;
    display: flex;
    align-items: center;
}
.field-icon {
    position: absolute;
    left: 12px;
    width: 18px; height: 18px;
    fill: none;
    stroke: #90a4ae;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
    z-index: 1;
    transition: stroke .2s;
}
.input-box input {
    width: 100%;
    padding: 11px 14px 11px 40px;
    font-size: 14px;
    font-family: 'Open Sans', 'Roboto', sans-serif;
    color: var(--text);
    background: #f8fafb;
    border: 1.5px solid var(--border);
    border-radius: 5px;
    outline: none;
    transition: all .2s;
}
.input-box input::placeholder { color: #b0bec5; font-weight: 400; }
.input-box input:hover { border-color: #b0bec5; background: #f5f7fa; }
.input-box input:focus {
    background: #fff;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(28,61,144,.1);
}
.input-box:focus-within .field-icon { stroke: var(--navy); }

/* Validation */
.input-box input.ok { border-color: var(--success); background: #f1f8e9; }
.input-box input.ok ~ .field-icon { stroke: var(--success); }
.input-box input.err { border-color: var(--error); background: #fff5f5; animation: shake .35s ease; }
.input-box input.err ~ .field-icon { stroke: var(--error); }

.field-error {
    display: block;
    min-height: 16px;
    font-size: 11.5px;
    color: var(--error);
    font-weight: 500;
    margin-top: 3px;
    opacity: 0;
    transform: translateY(-3px);
    transition: all .2s;
}
.field-error.show { opacity: 1; transform: translateY(0); }

/* Eye toggle */
.eye-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: #90a4ae;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    z-index: 1;
    transition: color .2s;
}
.eye-btn:hover { color: var(--navy); }

/* ===== Actions ===== */
.form-actions {
    padding: 18px 24px 26px;
    display: flex;
    gap: 12px;
    border-top: 1px solid #f0f2f5;
}
.btn-reset, .btn-submit {
    flex: 1;
    padding: 12px 16px;
    font-size: 14px;
    font-family: 'Open Sans', 'Roboto', sans-serif;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all .25s;
    letter-spacing: .3px;
}
.btn-reset {
    background: #fff;
    color: var(--muted);
    border: 1.5px solid var(--border);
}
.btn-reset:hover { border-color: #b0bec5; color: var(--text); background: #f8f9fa; }
.btn-submit {
    background: var(--navy);
    color: #fff;
    border: none;
    box-shadow: 0 3px 12px rgba(28,61,144,.3);
    position: relative;
    overflow: hidden;
}
.btn-submit::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.1), transparent);
    transition: left .45s;
}
.btn-submit:hover {
    background: #15307a;
    box-shadow: 0 5px 18px rgba(28,61,144,.4);
    transform: translateY(-1px);
}
.btn-submit:hover::before { left: 100%; }
.btn-submit:active { transform: translateY(1px); box-shadow: 0 2px 6px rgba(28,61,144,.25); }

/* Loading */
.btn-submit.loading { pointer-events: none; opacity: .8; }
.btn-submit.loading svg { display: none; }
.btn-submit.loading::after {
    content: '';
    width: 17px; height: 17px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .65s linear infinite;
    margin-left: 8px;
}

/* ===== Footer ===== */
.footer {
    background: var(--white);
    border-top: 1px solid #e0e6ed;
    text-align: center;
    padding: 18px 24px;
}
.footer p {
    font-size: 12.5px;
    color: var(--navy);
    font-weight: 500;
}
.footer span { color: var(--red); font-weight: 700; }

/* ===== Modal ===== */
.modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(28,61,144,.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all .3s;
    backdrop-filter: blur(5px);
    padding: 20px;
}
.modal-bg.show { opacity: 1; visibility: visible; }
.modal-box {
    background: #fff;
    border-radius: 10px;
    max-width: 400px;
    width: 100%;
    transform: scale(.85) translateY(16px);
    transition: all .35s cubic-bezier(.34,1.56,.64,1);
    box-shadow: 0 20px 50px rgba(0,0,0,.2);
    overflow: hidden;
}
.modal-bg.show .modal-box { transform: scale(1) translateY(0); }
.modal-top {
    background: var(--navy);
    color: #fff;
    padding: 14px 22px;
    font-size: 14px;
    font-weight: 600;
}
.modal-body {
    padding: 28px 24px 20px;
    text-align: center;
}
.modal-check {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--success), #388e3c);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 4px 16px rgba(46,125,50,.35);
    animation: scaleIn .5s cubic-bezier(.34,1.56,.64,1) .15s both;
}
.modal-body h3 { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.modal-body p { font-size: 13px; color: var(--muted); line-height: 1.6; }
.modal-bottom { padding: 0 24px 22px; text-align: center; }
.modal-ok { min-width: 140px; }

/* ===== Animations ===== */
@keyframes shake {
    0%,100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes scaleIn { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}
.form-wrapper { animation: fadeUp .5s ease both; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .topbar-inner { flex-direction: column; height: auto; padding: 8px 16px; gap: 4px; }
    .topbar-left, .topbar-right { flex-wrap: wrap; justify-content: center; }
    .topbar-link { padding: 5px 8px; font-size: 11px; }
    .lang-bar { height: 26px; }
    .header-inner { padding: 8px 16px; min-height: 60px; }
    .logo-img { width: 160px; }
    .main-nav-link { font-size: 11px; padding: 8px 8px; }
    .nav-search-btn { width: 32px; height: 32px; }
    .contact-label-box { padding: 10px 16px; font-size: 12px; }
    .contact-marquee-box { padding: 0 12px; }
    .contact-marquee-content { font-size: 11px; gap: 10px; }
    .page-content { padding: 20px 12px 36px; }
    .form-header { padding: 24px 20px; }
    .form-header h1 { font-size: 22px; }
    .notice { padding: 14px 16px; }
    .form-section { padding: 16px 16px 4px; }
    .form-actions { padding: 14px 16px 22px; }
}

@media (max-width: 480px) {
    .topbar { display: none; }
    .lang-bar { display: none; }
    .header-inner { flex-direction: column; gap: 8px; align-items: flex-start; }
    .main-nav { width: 100%; justify-content: space-between; }
    .main-nav-link { font-size: 10px; padding: 6px 6px; }
    .contact-strip-inner { flex-direction: column; }
    .contact-label-box { padding: 8px 16px; font-size: 11px; }
    .contact-marquee-content { font-size: 10px; flex-wrap: wrap; gap: 6px; }
    .sep { display: none; }
    .form-actions { flex-direction: column; }
}
