:root {
    --navy: #0a2c5c;
    --blue: #1c9dd7;
    --gold: #f5b800;
    --ink: #17324d;
    --muted: #46617e;
    --line: #e3edf7;
    --bg-soft: #f8fbff;
    --green: #1f9d6b;
    --red: #d6453d;
    --amber: #d99e00;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: "Book Antiqua", "Palatino Linotype", Palatino, "URW Palladio L", Georgia, serif;
    color: var(--ink);
    background: #eef3f9;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }

/* ---------- App shell ---------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
    background: #fff;
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 40;
}
.topbar__inner {
    max-width: 1180px; margin: 0 auto; padding: 0 24px;
    height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--navy); }
.brand img { height: 40px; width: auto; }
.topnav { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.topnav a { font-size: 0.92rem; font-weight: 600; color: var(--muted); }
.topnav a:hover, .topnav a.active { color: var(--blue); }
.userchip { display: flex; align-items: center; gap: 12px; font-size: 0.86rem; color: var(--muted); }
.userchip strong { color: var(--navy); }
.role-tag {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
    background: var(--bg-soft); color: var(--blue); border: 1px solid var(--line);
    padding: 3px 9px; border-radius: 999px;
}

.content { flex: 1; max-width: 1180px; width: 100%; margin: 0 auto; padding: 32px 24px 56px; }
.page-head { margin-bottom: 24px; }
.page-head h1 { font-size: 1.7rem; color: var(--navy); font-weight: 800; }
.page-head p { color: var(--muted); margin-top: 6px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border-radius: 10px; padding: 10px 18px; font-weight: 600; font-size: 0.92rem;
    border: 1px solid transparent; cursor: pointer; transition: background 0.15s ease, transform 0.1s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--blue); }
.btn--gold { background: var(--gold); color: var(--navy); }
.btn--gold:hover { background: var(--amber); }
.btn--ghost { background: #fff; color: var(--navy); border-color: #c4d6ea; }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn--danger { background: #fff; color: var(--red); border-color: #f0c4c1; }
.btn--sm { padding: 7px 12px; font-size: 0.82rem; border-radius: 8px; }

/* ---------- Cards & grid ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.card + .card { margin-top: 20px; }
.grid { display: grid; gap: 18px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.stat-card .num { font-size: 2rem; font-weight: 800; color: var(--blue); }
.stat-card .lbl { color: var(--muted); font-size: 0.9rem; margin-top: 2px; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 0.88rem; color: var(--navy); margin-bottom: 6px; }
.field input, .field select, .field textarea {
    width: 100%; padding: 11px 13px; border: 1px solid #c9d8e8; border-radius: 10px;
    font-size: 0.95rem; color: var(--ink); background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid rgba(28,157,215,0.35); border-color: var(--blue); }
.field .hint { font-size: 0.8rem; color: var(--muted); margin-top: 5px; }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th, .table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.table th { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
.table tr:hover td { background: var(--bg-soft); }

/* ---------- Badges ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 700;
    padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line);
}
.badge--pending { background: #fff7e6; color: #9a6b00; border-color: #f3e2bd; }
.badge--review { background: #eef6ff; color: #1c6fb0; border-color: #cfe3f6; }
.badge--success { background: #e9f8f0; color: #157a51; border-color: #c3ecd7; }
.badge--adjudication { background: #fdeceb; color: #b3372f; border-color: #f4cbc8; }
.badge--adjudicated { background: #eef0fb; color: #3b46a5; border-color: #d4d8f3; }

/* ---------- Alerts ---------- */
.alert { border-radius: 12px; padding: 13px 16px; font-size: 0.9rem; margin-bottom: 18px; border: 1px solid; }
.alert--success { background: #e9f8f0; color: #157a51; border-color: #c3ecd7; }
.alert--error { background: #fdeceb; color: #b3372f; border-color: #f4cbc8; }
.alert ul { margin: 4px 0 0 18px; }

/* ---------- Auth ---------- */
.auth-page { height: 100vh; overflow: hidden; display: flex; flex-direction: column;
    background: linear-gradient(135deg, #0a2c5c, #1c9dd7); }
.auth-topnav { display: flex; align-items: center; justify-content: space-between;
    padding: 14px 28px; gap: 16px; flex-wrap: wrap; }
.auth-topnav__brand img { height: 36px; width: auto; display: block; filter: brightness(0) invert(1); }
.auth-topnav__links { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.auth-topnav__links a { color: #dcecf8; font-weight: 600; font-size: 0.9rem; }
.auth-topnav__links a:hover { color: #fff; }
.auth-wrap { flex: 1; display: flex; align-items: center; justify-content: center; padding: 16px; min-height: 0; }
.auth-card { background: #fff; border-radius: 18px; padding: 28px 30px; width: 100%; max-width: 400px;
    box-shadow: 0 30px 70px rgba(10,44,92,0.35); }
.auth-card img { height: 56px; width: auto; display: block; margin: 0 auto 12px; }
.auth-card h1 { text-align: center; font-size: 1.2rem; color: var(--navy); }
.auth-card p.sub { text-align: center; color: var(--muted); font-size: 0.88rem; margin: 5px 0 18px; }

/* ---------- Evaluation screen ---------- */
.eyes { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.eye-col h3 { color: var(--navy); font-size: 1.05rem; margin-bottom: 10px; }
.eye-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.zoom {
    position: relative; overflow: hidden; border-radius: 12px;
    border: 1px solid var(--line); background: #000; cursor: zoom-in;
}
.zoom img {
    width: 100%; height: 210px; object-fit: contain; display: block;
    transition: transform 0.08s ease-out; transform-origin: center center;
}
.zoom:hover img { transform: scale(2.6); }
.eye-imgs img { width: 100%; border-radius: 12px; border: 1px solid var(--line); background: #000; }
.eye-empty { border: 1px dashed #b9d3e6; border-radius: 12px; background: var(--bg-soft); padding: 40px 12px;
    text-align: center; color: #6f8aa6; font-weight: 600; font-size: 0.85rem; }
.cond-list { margin-top: 14px; display: flex; flex-direction: column; gap: 9px;
    border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--bg-soft); }
.cond { display: flex; align-items: flex-start; gap: 10px; font-size: 0.9rem; color: var(--ink); }
.cond input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--blue); }
.prior { border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line); padding: 14px; margin-top: 14px; }
.prior .t { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--blue); }
.pill { display: inline-block; margin: 6px 6px 0 0; background: #fff; border: 1px solid var(--line);
    border-radius: 999px; padding: 4px 11px; font-size: 0.8rem; color: var(--navy); font-weight: 600; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 22px; flex-wrap: wrap; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state h3 { color: var(--navy); font-size: 1.2rem; }

@media (max-width: 900px) {
    .grid--4 { grid-template-columns: 1fr 1fr; }
    .grid--3 { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .grid--2, .grid--4, .eyes { grid-template-columns: 1fr; }
    .topnav { gap: 14px; }
}
