:root {
    --blue: #0d47a1;
    --blue-dark: #082f6b;
    --orange: #ff9800;
    --green: #168447;
    --red: #b42318;
    --ink: #172033;
    --muted: #667085;
    --line: #d8deea;
    --surface: #ffffff;
    --page: #eef3f9;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background: var(--page);
    font-family: Arial, Helvetica, sans-serif;
}

a { color: var(--blue); }

.shell { width: min(1120px, calc(100% - 28px)); margin: 32px auto; }
.auth-shell { width: min(500px, calc(100% - 28px)); margin: 40px auto; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 40px rgba(22, 45, 85, .12); overflow: hidden; }
.card-body { padding: 28px; }
.brand { padding: 24px; color: #fff; text-align: center; background: linear-gradient(135deg, var(--blue-dark), var(--blue)); }
.brand-mark { display: grid; place-items: center; width: 68px; height: 68px; margin: 0 auto 12px; color: var(--blue); background: #fff; border: 4px solid var(--orange); border-radius: 50%; font-weight: 800; }
.brand h1 { margin: 0 0 6px; font-size: 28px; }
.brand p { margin: 0; color: #dce8ff; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; padding: 18px 22px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.topbar h1 { margin: 0 0 4px; color: var(--blue-dark); font-size: 26px; }
.topbar p { margin: 0; color: var(--muted); }

.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel { padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.panel h2, .panel h3 { margin-top: 0; color: var(--blue-dark); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.field.full { grid-column: 1 / -1; }
label { display: block; margin-bottom: 7px; color: #344054; font-size: 14px; font-weight: 700; }
input, select, textarea { width: 100%; padding: 12px 13px; color: var(--ink); background: #fff; border: 1px solid #b8c1d1; border-radius: 8px; font: inherit; }
textarea { min-height: 92px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(13, 71, 161, .13); border-color: var(--blue); }
.hint { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.45; }

.button-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 12px 18px; color: #fff; background: var(--blue); border: 0; border-radius: 8px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
button:hover, .button:hover { background: var(--blue-dark); }
button:disabled { opacity: .6; cursor: wait; }
.button.secondary { color: var(--blue); background: #eaf1fb; }
.button.warn { background: #b54708; }
.button.danger { background: var(--red); }
.button.success { background: var(--green); }

.message { margin: 0 0 18px; padding: 12px 14px; border-radius: 8px; font-weight: 700; line-height: 1.45; }
.message[hidden] { display: none; }
.message.success { color: #05603a; background: #ecfdf3; border: 1px solid #a6f4c5; }
.message.error { color: #912018; background: #fff1f0; border: 1px solid #fecdca; }
.message.info { color: #1849a9; background: #eff8ff; border: 1px solid #b2ddff; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.stat strong { display: block; margin-top: 5px; color: var(--blue-dark); font-size: 28px; }
.status { display: inline-block; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.status-PENDING { color: #92400e; background: #fef3c7; }
.status-ACTIVE { color: #05603a; background: #dcfae6; }
.status-SUSPENDED, .status-REJECTED { color: #912018; background: #fee4e2; }

.record-list { display: grid; gap: 14px; }
.record { padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.record-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.record h3 { margin: 0 0 5px; color: var(--blue-dark); }
.record p { margin: 5px 0; color: #475467; }
.record-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.record-actions button { padding: 8px 12px; font-size: 13px; }

.nav-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.nav-card { display: block; padding: 22px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; }
.nav-card:hover { border-color: var(--blue); box-shadow: 0 10px 26px rgba(13,71,161,.1); }
.nav-card strong { display: block; margin-bottom: 7px; color: var(--blue-dark); font-size: 18px; }
.nav-card span { color: var(--muted); line-height: 1.5; }

.footer-note { margin-top: 18px; color: var(--muted); text-align: center; font-size: 13px; }
.hidden { display: none !important; }
code { overflow-wrap: anywhere; }

@media (max-width: 760px) {
    .shell { margin: 16px auto; }
    .topbar { align-items: flex-start; flex-direction: column; }
    .grid.two, .grid.three, .form-grid, .stats, .nav-cards { grid-template-columns: 1fr; }
    .field.full { grid-column: auto; }
    .card-body { padding: 21px; }
}

