/* =====================================================
   Modern UI — Fee Payment System  v3
   ===================================================== */

:root {
    --primary:      #1d4ed8;
    --primary-lt:   #3b82f6;
    --primary-dk:   #1e40af;
    --accent:       #0ea5e9;
    --success:      #16a34a;
    --success-lt:   #22c55e;
    --danger:       #dc2626;
    --danger-lt:    #ef4444;
    --warn:         #d97706;
    --warn-lt:      #f59e0b;
    --teal:         #0d9488;
    --bg:           #f1f5f9;
    --surface:      #ffffff;
    --surface2:     #f8fafc;
    --surface3:     #f0f4ff;
    --border:       #e2e8f0;
    --border-lt:    #f1f5f9;
    --text:         #0f172a;
    --text-body:    #334155;
    --text-muted:   #64748b;
    --text-light:   #94a3b8;
    --shadow-xs:    0 1px 2px rgba(0,0,0,.05);
    --shadow-sm:    0 1px 4px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
    --shadow-md:    0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
    --shadow-lg:    0 12px 40px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);
    --shadow-blue:  0 4px 20px rgba(29,78,216,.2);
    --radius-xs:    6px;
    --radius-sm:    10px;
    --radius:       16px;
    --radius-lg:    22px;
    --transition:   .2s cubic-bezier(.4,0,.2,1);
    --nav-h:        62px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Sarabun', 'Noto Sans Thai', 'IBM Plex Sans Thai', 'Leelawadee UI', 'Tahoma', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text-body);
    font-size: 15px;
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: clip;
}

/* ── SCROLLBAR ───────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── TOPNAV ──────────────────────────────────────── */
.topnav {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 55%, #2563eb 100%);
    color: #fff;
    height: var(--nav-h);
    padding: 0 28px;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 16px rgba(29,78,216,.3);
    position: sticky;
    top: 0;
    z-index: 200;
}

.topnav .nav-brand {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.2px;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 9px;
    margin-right: 6px;
    white-space: nowrap;
}

.nav-brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,.95);
    border-radius: 50%;
    flex-shrink: 0;
    padding: 3px;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
}

.nav-brand-icon[alt] {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(255,255,255,.95);
    padding: 3px;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
    flex-shrink: 0;
}

.topnav .nav-user {
    font-size: 13px;
    color: rgba(255,255,255,.7);
    margin-right: 4px;
    white-space: nowrap;
}

.topnav .nav-spacer { flex: 1; min-width: 12px; }

.topnav a {
    color: rgba(255,255,255,.9);
    text-decoration: none;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: background var(--transition), color var(--transition);
}

.topnav a:hover {
    background: rgba(255,255,255,.16);
    color: #fff;
}

.topnav a.active {
    background: rgba(255,255,255,.22);
    color: #fff;
    font-weight: 700;
}

/* Hamburger — hidden by default */
.nav-toggle {
    display: none;
    background: rgba(255,255,255,.12);
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    border-radius: 8px;
    padding: 6px 10px;
    margin-left: auto;
}

/* ── CONTAINER ───────────────────────────────────── */
.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 28px 24px 40px;
}

/* ── CARDS ───────────────────────────────────────── */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 28px 32px;
    margin-bottom: 20px;
    border: 1px solid rgba(226,232,240,.7);
    animation: fadeUp .3s ease both;
}

.card-flush {
    padding: 0;
    overflow: hidden;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── TYPOGRAPHY ──────────────────────────────────── */
h1 { font-size: 22px; font-weight: 800; color: var(--text); line-height: 1.3; }
h2 { font-size: 17px; font-weight: 700; color: var(--text); }
h3 { font-size: 14px; font-weight: 700; color: var(--text); }
p  { margin-top: 0; }
a  { color: var(--primary); transition: color var(--transition); }
a:hover { color: var(--primary-dk); }

/* ── PAGE HEADER ─────────────────────────────────── */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}

.page-header h1 { margin: 0; }
.page-header-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin: 3px 0 0;
    font-weight: 400;
}

/* ── FORMS ───────────────────────────────────────── */
.form-group { margin-bottom: 4px; }
.form-section {
    background: var(--surface3);
    border-radius: var(--radius-sm);
    padding: 18px 20px;
    margin-bottom: 14px;
    border: 1px solid rgba(29,78,216,.07);
}

.form-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

label {
    display: block;
    margin: 12px 0 5px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .4px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="month"],
input[type="tel"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    -webkit-appearance: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary-lt);
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
    background: #fff;
}

input::placeholder, textarea::placeholder { color: var(--text-light); }
textarea { min-height: 100px; resize: vertical; }

.field-display {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface2);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: default;
    user-select: text;
}
.field-display-muted {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

input[type="file"] {
    padding: 10px 12px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 14px;
}

/* Upload dropzone style */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
    background: var(--surface2);
}

.upload-zone:hover, .upload-zone:focus-within {
    border-color: var(--primary-lt);
    background: #eff6ff;
}

.upload-zone input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.upload-zone-text { font-size: 14px; color: var(--text-muted); }
.upload-zone-sub  { font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* OTP input */
.otp-input {
    font-size: 28px !important;
    font-weight: 800 !important;
    letter-spacing: 12px !important;
    text-align: center !important;
    padding: 14px 20px !important;
    border-radius: 12px !important;
    font-family: monospace !important;
}

/* ── BUTTONS ─────────────────────────────────────── */
button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    border: none;
    background: var(--primary);
    color: #fff;
    width: auto;
    margin-top: 8px;
    transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
    white-space: nowrap;
    -webkit-user-select: none;
    user-select: none;
}

button:hover, .btn:hover {
    background: var(--primary-dk);
    box-shadow: 0 4px 16px rgba(29,78,216,.35);
    transform: translateY(-1px);
}

button:active, .btn:active {
    transform: translateY(0);
    box-shadow: none;
}

button:focus-visible, .btn:focus-visible {
    outline: 3px solid var(--primary-lt);
    outline-offset: 2px;
}

.btn.secondary { background: #475569; }
.btn.secondary:hover { background: #334155; box-shadow: 0 4px 14px rgba(71,85,105,.3); }

.btn.success { background: var(--success); }
.btn.success:hover { background: #15803d; box-shadow: 0 4px 14px rgba(22,163,74,.3); }

.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #b91c1c; box-shadow: 0 4px 14px rgba(220,38,38,.3); }

.btn.warn { background: var(--warn); color: #fff; }
.btn.warn:hover { background: #b45309; }

.btn.ghost {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}
.btn.ghost:hover { background: var(--surface3); box-shadow: none; }

.btn.sm { padding: 6px 14px; font-size: 13px; margin-top: 0; border-radius: 7px; }
.btn.lg { padding: 13px 28px; font-size: 15px; border-radius: 11px; }

.btn-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
    align-items: center;
}

/* ── TABLE ───────────────────────────────────────── */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 600px;
}

thead th {
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .7px;
    padding: 13px 16px;
    border-bottom: 1.5px solid var(--border);
    white-space: nowrap;
    position: sticky;
    top: 0;
}

thead th:first-child { border-radius: 0; }
thead th:last-child  { border-radius: 0; }

tbody tr { transition: background var(--transition); }
tbody tr:hover { background: #f8faff; }

td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border-lt);
    font-size: 14px;
    color: var(--text-body);
    vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }

.table-empty {
    text-align: center;
    padding: 48px 24px !important;
    color: var(--text-muted);
    font-size: 14px;
}

/* ── STATUS BADGES ───────────────────────────────── */
.status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    background: var(--border);
    color: var(--text-muted);
    white-space: nowrap;
}

.status::before { content: '●'; font-size: 8px; }

.status.submitted     { background: #dbeafe; color: #1d4ed8; }
.status.submitted::before { color: #3b82f6; }
.status.proof_uploaded { background: #fef9c3; color: #854d0e; }
.status.proof_uploaded::before { color: #f59e0b; }
.status.under_review  { background: #fef3c7; color: #92400e; }
.status.under_review::before { color: #d97706; }
.status.approved      { background: #dcfce7; color: #166534; }
.status.approved::before { color: #16a34a; }
.status.rejected      { background: #fee2e2; color: #991b1b; }
.status.rejected::before { color: #ef4444; }

/* ── FLASH MESSAGES ──────────────────────────────── */
.flash {
    padding: 13px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: fadeUp .25s ease;
    line-height: 1.5;
}

.flash.success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.flash.error   { background: #fff1f2; color: #be123c; border: 1px solid #fecdd3; }
.flash.info    { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.flash.warn    { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* ── SEARCH BAR ──────────────────────────────────── */
.search-bar {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 20px;
}

/* ── STATS GRID ──────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    padding: 18px 20px;
    border-top: 3px solid var(--primary);
    position: relative;
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-card::after {
    content: '';
    position: absolute;
    right: -12px;
    top: -12px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: currentColor;
    opacity: .04;
}

.stat-card.green { border-top-color: var(--success); }
.stat-card.amber { border-top-color: var(--warn); }
.stat-card.red   { border-top-color: var(--danger); }
.stat-card.teal  { border-top-color: var(--teal); }
.stat-card.sky   { border-top-color: var(--accent); }

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
}

.stat-value {
    font-size: 30px;
    font-weight: 800;
    color: var(--text);
    margin-top: 6px;
    line-height: 1;
    font-feature-settings: 'tnum';
}

.stat-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ── VISITOR BAR ─────────────────────────────────── */
.visitor-bar {
    background: linear-gradient(90deg, #0c2a6e 0%, #1d4ed8 50%, #0ea5e9 100%);
    padding: 9px 0;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.visitor-bar-inner {
    display: inline-flex;
    gap: 0;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    max-width: 1080px;
    padding: 0 20px;
}

.visitor-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255,255,255,.8);
    padding: 3px 20px;
    border-right: 1px solid rgba(255,255,255,.15);
}

.visitor-stat:last-child { border-right: none; }

.visitor-stat strong {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    font-feature-settings: 'tnum';
}

.visitor-stat .icon { font-size: 14px; }

/* ── LOGIN PAGE — SPLIT LAYOUT ───────────────────── */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f1f5f9;
}

/* Split container: left blue panel + right white form */
.login-split {
    flex: 1;
    display: flex;
    min-height: 0;
}

/* ── LEFT BRAND PANEL ── */
.login-brand {
    flex: 0 0 46%;
    background: linear-gradient(155deg, #0f172a 0%, #1e3a8a 42%, #1d4ed8 72%, #0284c7 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
    position: relative;
    overflow: hidden;
}

/* decorative rings */
.login-brand::before {
    content: '';
    position: absolute;
    width: 420px; height: 420px;
    top: -120px; right: -120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.08) 0%, transparent 70%);
    pointer-events: none;
}
.login-brand::after {
    content: '';
    position: absolute;
    width: 320px; height: 320px;
    bottom: -80px; left: -80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14,165,233,.2) 0%, transparent 70%);
    pointer-events: none;
}

.login-brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 320px;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 140px; height: 140px;
    background: rgba(255,255,255,.95);
    border-radius: 50%;
    margin-bottom: 24px;
    box-shadow: 0 8px 36px rgba(0,0,0,.35), 0 0 0 4px rgba(255,255,255,.3);
    padding: 8px;
    flex-shrink: 0;
    overflow: hidden;
}

.logo-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    display: block;
}

.login-brand-content h1 {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    line-height: 1.35;
    margin-bottom: 10px;
}

.login-brand-content > p {
    font-size: 13px;
    color: rgba(255,255,255,.65);
    line-height: 1.6;
    margin-bottom: 36px;
}

.brand-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,.15);
    margin: 0 0 28px;
}

/* Stats inside brand panel */
.brand-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.brand-stat-item {
    background: rgba(255,255,255,.1);
    border-radius: 12px;
    padding: 14px 10px;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,.12);
    transition: background var(--transition);
}

.brand-stat-item:hover { background: rgba(255,255,255,.16); }

.brand-stat-num {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    font-feature-settings: 'tnum';
    line-height: 1;
    margin-bottom: 4px;
}

.brand-stat-lbl {
    font-size: 11px;
    color: rgba(255,255,255,.65);
    font-weight: 500;
    letter-spacing: .3px;
}

/* ── RIGHT FORM PANEL ── */
.login-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: linear-gradient(160deg, #f0f4ff 0%, #f8fafc 60%, #fff 100%);
}

.login-card {
    background: #fff;
    border-radius: 20px;
    box-shadow:
        0 4px 6px rgba(0,0,0,.04),
        0 10px 30px rgba(0,0,0,.08),
        0 0 0 1px rgba(226,232,240,.6);
    padding: 40px 40px;
    width: 100%;
    max-width: 420px;
    animation: loginCardIn .4s cubic-bezier(.16,1,.3,1) both;
}

@keyframes loginCardIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login-card-header {
    margin-bottom: 28px;
    text-align: center;
}

.login-card-header h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 5px;
}

.login-card-header p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.login-card label {
    margin-top: 16px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.login-card label:first-of-type { margin-top: 0; }

.login-submit {
    width: 100%;
    padding: 13px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 11px;
    margin-top: 22px;
    justify-content: center;
    background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
    box-shadow: 0 4px 18px rgba(29,78,216,.35);
    letter-spacing: .2px;
    transition: box-shadow var(--transition), transform var(--transition);
}

.login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(29,78,216,.45);
    background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
    color: var(--text-light);
    font-size: 12px;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    border-top: 1px solid var(--border);
}

.login-links {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.login-links a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}
.login-links a:hover { text-decoration: underline; }

.login-footer {
    background: #1e293b;
    color: rgba(255,255,255,.45);
    text-align: center;
    font-size: 12px;
    padding: 12px 16px;
    letter-spacing: .2px;
}

/* ── OLD visitor-bar (hidden on login page, only for inner pages) ── */
.login-page .visitor-bar { display: none; }

/* ── REGISTER PAGE ──────────────────────────────── */
.register-page {
    min-height: 100vh;
    background: linear-gradient(155deg, #0f172a 0%, #1e3a8a 42%, #1d4ed8 72%, #0284c7 100%);
    padding: 24px 16px 40px;
}

.register-page .container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0;
}

.register-logo {
    text-align: center;
    margin-bottom: 18px;
}

.register-logo .logo-icon2 {
    display: block;
    width: 68px; height: 68px;
    background: rgba(255,255,255,.95);
    border-radius: 50%;
    padding: 5px;
    margin: 0 auto 10px;
    object-fit: contain;
    box-shadow: 0 4px 18px rgba(0,0,0,.28), 0 0 0 3px rgba(255,255,255,.2);
}

.register-logo h1 {
    font-size: 19px;
    color: #fff;
    font-weight: 800;
    margin-bottom: 3px;
}

.register-logo p {
    font-size: 12px;
    color: rgba(255,255,255,.65);
    margin: 0;
}

.register-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0,0,0,.2), 0 0 0 1px rgba(255,255,255,.1);
    padding: 26px 28px;
    animation: loginCardIn .4s cubic-bezier(.16,1,.3,1) both;
}

/* compact form spacing inside register card */
.register-card .form-section {
    padding: 14px 16px;
    margin-bottom: 10px;
}

.register-card .form-section-title {
    margin-bottom: 4px;
    font-size: 12px;
}

.register-card label {
    margin: 8px 0 4px;
    font-size: 12px;
}

.register-card input[type="text"],
.register-card input[type="email"],
.register-card input[type="password"],
.register-card select {
    padding: 8px 12px;
    font-size: 14px;
}

.register-card .form-grid {
    gap: 0 12px;
}

.register-footer-link {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: rgba(255,255,255,.7);
}

.register-footer-link a {
    color: #93c5fd;
    font-weight: 700;
    text-decoration: none;
}
.register-footer-link a:hover { text-decoration: underline; }

.req { color: var(--danger); margin-left: 2px; font-weight: 700; }

/* ── INFO CARD (detail rows) ─────────────────────── */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
}

.info-row {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-lt);
    font-size: 14px;
    line-height: 1.5;
}

.info-row:nth-child(odd) { padding-right: 20px; }
.info-row:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--border-lt); }

.info-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 2px;
}

.info-value {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}

/* ── OTP DISPLAY BOX ─────────────────────────────── */
.otp-display {
    background: #fffbeb;
    border: 1.5px solid #fde68a;
    border-radius: var(--radius-sm);
    padding: 18px 22px;
    text-align: center;
}

.otp-display-code {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: 10px;
    font-family: 'Courier New', monospace;
    color: var(--text);
    margin: 8px 0;
}

/* ── NOTICE BOX ──────────────────────────────────── */
.notice-box {
    background: var(--surface3);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 14px 18px;
    font-size: 14px;
    color: var(--text-body);
    margin-bottom: 18px;
}

/* ── AMOUNT DISPLAY ──────────────────────────────── */
.amount-big {
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
    font-feature-settings: 'tnum';
}

.amount-big small {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 4px;
}

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 900px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }

    /* Login: collapse to single column and allow scrolling */
    .login-page { height: auto; max-height: unset; overflow: visible; }
    .login-split { flex-direction: column; min-height: unset; overflow: visible; }
    .login-brand { flex: none; padding: 40px 28px; }
    .brand-stats { grid-template-columns: repeat(4, 1fr); gap: 10px; }
    .brand-stat-num { font-size: 20px; }
    .login-form-side { padding: 36px 24px; }
}

@media (max-width: 700px) {
    :root { --nav-h: auto; }

    .topnav {
        flex-wrap: wrap;
        padding: 10px 16px;
        height: auto;
        gap: 0;
    }

    .nav-toggle { display: flex; }

    .topnav .nav-links {
        width: 100%;
        display: none;
        flex-direction: column;
        gap: 2px;
        padding: 8px 0 4px;
        border-top: 1px solid rgba(255,255,255,.12);
        margin-top: 8px;
    }

    .topnav .nav-links.open { display: flex; }

    .topnav .nav-links a {
        padding: 9px 12px;
        border-radius: 8px;
        width: 100%;
    }

    .topnav .nav-spacer { display: none; }
    .topnav .nav-user   { display: none; }

    .container { padding: 20px 14px 32px; }

    .card { padding: 20px 18px; }

    .login-card { padding: 28px 22px; border-radius: 18px; }
    .register-card { padding: 24px 20px; }

    .search-bar { grid-template-columns: 1fr; }
    .search-bar button { margin-top: 0; }

    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat-value { font-size: 24px; }

    .form-grid { grid-template-columns: 1fr; }

    .info-grid { grid-template-columns: 1fr; }
    .info-row:nth-child(odd)  { padding-right: 0; }
    .info-row:nth-child(even) { padding-left: 0; border-left: none; }

    .visitor-stat { padding: 3px 10px; font-size: 12px; }

    .btn-row { gap: 8px; }

    table { min-width: 480px; }

    .page-header { flex-direction: column; gap: 8px; }
    .page-header .btn { width: 100%; justify-content: center; }
}

@media (max-width: 420px) {
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .brand-stats { grid-template-columns: repeat(2, 1fr); }
    .visitor-bar-inner { gap: 0; }
    .visitor-stat { border-right: none; border-bottom: 1px solid rgba(255,255,255,.1); width: 50%; }
    .visitor-stat:nth-child(3), .visitor-stat:nth-child(4) { border-bottom: none; }
    .login-card { padding: 28px 20px; }
}


