/* GoK IB Verifier */
:root {
    --navy-900: #082a52;
    --navy-800: #0b3a6e;
    --navy-700: #134f91;
    --gold: #f2b632;
    --bg: #f3f5f9;
    --surface: #ffffff;
    --border: #dde3ec;
    --text: #1c2533;
    --muted: #64708a;
    --green: #177a45;
    --green-bg: #e3f5eb;
    --amber: #9a6200;
    --amber-bg: #fff3d6;
    --red: #b42318;
    --red-bg: #fde8e7;
    --blue-bg: #e6effa;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
    --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: Consolas, "SFMono-Regular", Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: var(--navy-700); }
h1, h2 { margin: 0 0 .25rem; line-height: 1.25; color: var(--navy-900); }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; margin-bottom: 1rem; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .9em; }
.nowrap { white-space: nowrap; }
.inline { display: inline; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Top bar ---------- */
.topbar {
    background: linear-gradient(90deg, var(--navy-900), var(--navy-800));
    color: #fff;
    border-bottom: 3px solid var(--gold);
}
.topbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: .6rem 1rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: #fff;
    text-decoration: none;
    font-size: 1.15rem;
    white-space: nowrap;
}
.brand img { background: #fff; border-radius: 8px; padding: 2px; }
.brand strong { color: var(--gold); }
.main-nav { display: flex; align-items: center; gap: .25rem; flex: 1; }
.main-nav > a {
    color: rgba(255, 255, 255, .85);
    text-decoration: none;
    padding: .5rem .8rem;
    border-radius: 6px;
    font-weight: 500;
}
.main-nav > a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.main-nav > a.active { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: inset 0 -2px 0 var(--gold); }
.nav-user { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--navy-900);
    font-weight: 700;
    display: grid; place-items: center;
}
.nav-user-text { display: flex; flex-direction: column; line-height: 1.2; }
.nav-user-name { font-weight: 600; font-size: .9rem; }
.nav-user-role { font-size: .75rem; color: rgba(255, 255, 255, .7); }
.topbar .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); background: transparent; }
.topbar .btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; padding: .5rem; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: #fff; margin: 4px 0; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 1.5rem 1rem 2rem; flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-head p { margin: 0; }
.crumbs { font-size: .85rem; color: var(--muted); }
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem;
}
.card.narrow { max-width: 640px; }
.card.center { margin: 2rem auto; text-align: center; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.25rem; align-items: start; }
.site-footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 1rem; border-top: 1px solid var(--border); background: #fff; }
.error-code { font-size: 3rem; font-weight: 700; color: var(--navy-700); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 4px solid var(--navy-700);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem 1.25rem;
    display: flex; flex-direction: column;
}
.stat-pending { border-left-color: var(--gold); }
.stat-verified { border-left-color: var(--green); }
.stat-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 1.8rem; font-weight: 700; color: var(--navy-900); }
.stat-sub { font-size: .9rem; color: var(--muted); }

/* ---------- Filters ---------- */
.filters { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; align-items: center; }
.filters .field { margin: 0; }
.filters .grow { flex: 1; min-width: 220px; }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: .7rem .8rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table thead th {
    background: #f7f9fc;
    color: var(--muted);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfd; }
.table tr.is-verified { background: #f7fcf9; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions > * + * { margin-left: .3rem; }
.table .empty { text-align: center; color: var(--muted); padding: 2rem; }
.table-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; font-size: .9rem; }
.pagination { display: flex; gap: .25rem; }
.pagination a, .pagination span {
    padding: .35rem .7rem; border: 1px solid var(--border); border-radius: 6px; text-decoration: none; color: var(--text);
}
.pagination a:hover { background: var(--blue-bg); }
.pagination .current { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }

/* ---------- Badges ---------- */
.badge {
    display: inline-block;
    padding: .18rem .6rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
}
.badge-pending { background: var(--amber-bg); color: var(--amber); }
.badge-verified, .badge-active { background: var(--green-bg); color: var(--green); }
.badge-inactive { background: var(--red-bg); color: var(--red); }
.badge-admin { background: var(--navy-800); color: #fff; }
.badge-staff { background: var(--blue-bg); color: var(--navy-700); }
.from-tag {
    display: inline-block; padding: .15rem .55rem; border-radius: 6px;
    background: var(--blue-bg); color: var(--navy-800); font-size: .8rem; font-weight: 600; white-space: nowrap;
}
.tag {font-size: .7rem; background: var(--gold); color: var(--navy-900); border-radius: 4px; padding: .05rem .35rem; margin-left: .35rem; font-weight: 700; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    padding: .55rem 1rem;
    border-radius: 7px;
    border: 1px solid transparent;
    font: inherit; font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
    transition: background .15s, border-color .15s, opacity .15s;
}
.btn:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(19, 79, 145, .35); outline-offset: 1px; }
.btn-sm { padding: .35rem .75rem; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--navy-800); color: #fff; }
.btn-primary:hover { background: var(--navy-900); }
.btn-ghost { background: #fff; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: #f3f5f9; }
.btn-danger { background: #fff; color: var(--red); border-color: #f4c7c3; }
.btn-danger:hover { background: var(--red-bg); }
.btn-verify { background: var(--green); color: #fff; min-width: 74px; }
.btn-verify:hover { background: #106236; }
.btn-reset { background: #fff; color: var(--muted); border-color: var(--border); min-width: 74px; }
.btn-reset:hover { border-color: var(--amber); color: var(--amber); }
.btn:disabled, .btn.is-busy { opacity: .6; cursor: progress; }

/* ---------- Forms ---------- */
.form .field { margin-bottom: 1rem; }
.field label, .field .label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .35rem; }
.hint { font-weight: 400; font-size: .8rem; color: var(--muted); margin: .3rem 0 0; }
label .hint { margin: 0; }
input[type=text], input[type=email], input[type=password], input[type=search], select {
    width: 100%;
    padding: .6rem .75rem;
    border: 1px solid #c8d0dc;
    border-radius: 7px;
    font: inherit;
    background: #fff;
    color: var(--text);
}
input:disabled { background: #f3f5f9; color: var(--muted); }
input:focus, select:focus { border-color: var(--navy-700); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 400 !important; padding-top: .55rem; }
.check input { width: 18px; height: 18px; }
.fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 1rem 1rem 0; margin: .5rem 0 1rem; }
.fieldset legend { font-weight: 700; padding: 0 .4rem; color: var(--navy-900); }
.fieldset .hint:first-of-type { margin: 0 0 1rem; }
.form-actions { display: flex; gap: .6rem; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 4.2rem; }
.pw-toggle {
    position: absolute; right: .35rem; top: 50%; transform: translateY(-50%);
    background: none; border: 0; color: var(--navy-700); font: inherit; font-size: .8rem; font-weight: 600;
    cursor: pointer; padding: .3rem .5rem;
}
.meta { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin: 1.5rem 0 0; padding-top: 1rem; border-top: 1px solid var(--border); font-size: .88rem; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }

/* ---------- Alerts & toasts ---------- */
.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid; transition: opacity .4s; }
.alert ul { margin: .35rem 0 0; padding-left: 1.2rem; }
.alert-success { background: var(--green-bg); border-color: #b7e2c8; color: #0f5130; }
.alert-error { background: var(--red-bg); border-color: #f4c7c3; color: #8a1c13; }
.alert-warning { background: var(--amber-bg); border-color: #f5dea0; color: #6d4600; }
.alert-info { background: var(--blue-bg); border-color: #c3d7f0; color: var(--navy-800); }
.alert.fade { opacity: 0; }
.toasts { position: fixed; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: .5rem; z-index: 100; }
.toast {
    background: var(--navy-900); color: #fff; padding: .7rem 1rem; border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .2); max-width: 360px; font-size: .9rem;
    border-left: 4px solid var(--gold); transition: opacity .4s, transform .4s;
}
.toast-success { border-left-color: #3ecf7a; }
.toast-error { border-left-color: #ff6b5e; }
.toast.hide { opacity: 0; transform: translateY(8px); }

/* ---------- Confirmation modal ---------- */
.btn-warning { background: #c27c00; color: #fff; }
.btn-warning:hover { background: #9a6200; }
.btn-danger-solid { background: var(--red); color: #fff; }
.btn-danger-solid:hover { background: #8a1c13; }
.modal-open { overflow: hidden; }
.modal-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(8, 26, 52, .55);
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
    animation: modal-fade .15s ease-out;
}
.modal {
    width: 100%; max-width: 440px;
    background: #fff; border-radius: 12px;
    border-top: 4px solid var(--gold);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
    padding: 1.5rem;
    animation: modal-pop .15s ease-out;
}
.modal h2 { margin-bottom: .5rem; }
.modal-body p { margin: 0 0 1rem; color: var(--muted); }
.modal-details {
    display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem;
    margin: 0 0 1.25rem; padding: .85rem 1rem;
    background: #f7f9fc; border: 1px solid var(--border); border-radius: 8px; font-size: .92rem;
}
.modal-details dt { color: var(--muted); }
.modal-details dd { margin: 0; font-weight: 600; word-break: break-word; }
.modal-actions { display: flex; justify-content: flex-end; gap: .6rem; }
@keyframes modal-fade { from { opacity: 0; } }
@keyframes modal-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* ---------- Login ---------- */
.layout-bare { background: radial-gradient(circle at 20% 0%, var(--navy-700), var(--navy-900) 60%); }
.auth-main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 1.5rem 1rem; }
.auth-main > .alert { max-width: 420px; width: 100%; margin: 0 auto 1rem; }
.auth-wrap { display: flex; justify-content: center; }
.auth-card {
    width: 100%; max-width: 420px;
    background: #fff; border-radius: 14px; padding: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
    border-top: 4px solid var(--gold);
}
.auth-brand { text-align: center; margin-bottom: 1.5rem; }
.auth-brand h1 { font-size: 1.5rem; margin-top: .5rem; }
.auth-brand h1 strong { color: var(--navy-700); }
.auth-brand p { margin: 0; }
.auth-note { text-align: center; font-size: .78rem; color: var(--muted); margin: 1.25rem 0 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .nav-toggle { display: block; }
    .topbar-inner { flex-wrap: wrap; }
    .main-nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; padding-bottom: .5rem; }
    .nav-open .main-nav { display: flex; }
    .nav-user { margin: .5rem 0 0; padding-top: .75rem; border-top: 1px solid rgba(255, 255, 255, .15); }
    .nav-user form { margin-left: auto; }
}
@media (max-width: 560px) {
    h1 { font-size: 1.35rem; }
    .field-row { grid-template-columns: 1fr; }
    .auth-card { padding: 1.5rem; }
    .container { padding-top: 1rem; }
}
