:root {
  --navy: #073b89;
  --blue: #0b63bd;
  --cyan: #13a8ca;
  --ink: #173c69;
  --muted: #6c7f98;
  --line: #d9e5f1;
  --paper: #f2f7fc;
  --danger: #b42318;
  --success: #167052;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; color: var(--ink); background: var(--paper); font-family: Arial, Helvetica, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, input, select { outline-offset: 3px; }
:focus-visible { outline: 3px solid #23a8c8; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.eyebrow { margin: 0 0 6px; color: #1383aa; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }

.login-view { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 15% 15%, #dff5ff 0, transparent 28%), radial-gradient(circle at 90% 10%, #e5eeff 0, transparent 30%), var(--paper); }
.login-card { width: min(430px, 100%); padding: 42px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 24px 70px #073b8920; }
.login-mark { width: 56px; height: 56px; display: grid; place-items: center; margin-bottom: 24px; border-radius: 50%; color: white; background: linear-gradient(135deg, var(--cyan), var(--navy)); font-size: 17px; font-weight: 900; box-shadow: 0 10px 25px #073b8935; }
.login-card h1 { margin: 0; color: var(--navy); font-size: 30px; letter-spacing: -.04em; }
.login-copy { margin: 10px 0 28px; color: var(--muted); font-size: 14px; }
.login-card label { display: grid; gap: 8px; margin-top: 17px; color: #395675; font-size: 12px; font-weight: 700; }
.login-card input, .filters input, .filters select, .dialog-toolbar select { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #cbdcec; border-radius: 8px; color: var(--ink); background: #fff; }
.login-card input:focus, .filters input:focus, .filters select:focus, .dialog-toolbar select:focus { border-color: #168fb8; box-shadow: 0 0 0 4px #13a8ca18; }
.login-card button, .filters button, .secondary-button { min-height: 48px; padding: 11px 18px; border: 0; border-radius: 8px; color: white; background: var(--navy); font-weight: 800; cursor: pointer; }
.login-card button { width: 100%; margin-top: 24px; }
.message { font-size: 12px; }
.message--error { margin: 14px 0 0; color: var(--danger); }

.dashboard { min-height: 100vh; }
.topbar { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px max(24px, calc((100vw - 1440px) / 2)); color: white; background: var(--navy); }
.topbar .eyebrow { color: #71d9ef; }
.topbar h1 { margin: 0; font-size: 24px; letter-spacing: -.025em; }
.account { display: flex; align-items: center; gap: 16px; font-size: 13px; }
.text-button { padding: 8px 0; border: 0; color: white; background: transparent; font-weight: 800; cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.dashboard-body { width: min(1440px, calc(100% - 48px)); margin: 28px auto 60px; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stats article { padding: 19px 20px; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 8px 25px #073b8909; }
.stats span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; }
.stats strong { color: var(--navy); font-size: 27px; }
.panel { padding: 25px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 14px 45px #073b890c; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.panel-heading h2 { margin: 0; font-size: 22px; }
.secondary-button { min-height: 40px; color: var(--navy); border: 1px solid #cbdceb; background: white; }
.filters { display: grid; grid-template-columns: minmax(260px, 1fr) 190px 190px auto; gap: 10px; margin-bottom: 22px; padding: 15px; border-radius: 10px; background: #f4f8fc; }
.filters input, .filters select { min-height: 44px; }
.filters button { min-height: 44px; }
.table-wrap { overflow-x: auto; border: 1px solid #e1eaf3; border-radius: 10px; }
table { width: 100%; min-width: 1040px; border-collapse: collapse; font-size: 12px; }
th { padding: 13px 14px; color: #58708d; background: #f5f8fc; text-align: left; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
td { padding: 14px; border-top: 1px solid #e7eef5; vertical-align: top; }
td strong { display: block; color: #173e70; }
td small { display: block; margin-top: 4px; color: var(--muted); }
.status { display: inline-flex; padding: 6px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.status--new { color: #075985; background: #e0f2fe; }
.status--reviewed { color: #854d0e; background: #fef3c7; }
.status--approved { color: #166534; background: #dcfce7; }
.status--rejected { color: #991b1b; background: #fee2e2; }
.view-button { padding: 7px 10px; border: 1px solid #bcd2e7; border-radius: 6px; color: var(--navy); background: white; font-size: 11px; font-weight: 800; cursor: pointer; }
.empty-state, .loading-state { display: grid; gap: 7px; place-items: center; padding: 55px 20px; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--ink); font-size: 16px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 20px; }
.pagination button { padding: 9px 14px; border: 1px solid #cbdceb; border-radius: 7px; color: var(--navy); background: white; font-weight: 700; cursor: pointer; }
.pagination button:disabled { opacity: .45; cursor: default; }
.pagination span { color: var(--muted); font-size: 12px; }

.detail-dialog { width: min(920px, calc(100% - 30px)); max-height: calc(100vh - 30px); padding: 0; border: 0; border-radius: 16px; color: var(--ink); background: white; box-shadow: 0 30px 100px #001d4770; }
.detail-dialog::backdrop { background: #021a3eaa; backdrop-filter: blur(4px); }
.dialog-header { position: sticky; z-index: 2; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 26px; border-bottom: 1px solid var(--line); background: white; }
.dialog-header h2 { margin: 0; font-size: 23px; }
.close-button { width: 40px; height: 40px; border: 0; border-radius: 50%; color: #526a86; background: #eff4f9; font-size: 26px; cursor: pointer; }
.dialog-toolbar { display: flex; align-items: end; gap: 18px; padding: 18px 26px; background: #f4f8fc; }
.dialog-toolbar label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.dialog-toolbar select { min-width: 210px; min-height: 42px; padding: 8px 11px; }
.detail-content { padding: 25px 26px 32px; }
.detail-section { margin-bottom: 26px; }
.detail-section h3 { margin: 0 0 13px; color: var(--navy); font-size: 14px; text-transform: uppercase; letter-spacing: .06em; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--line); }
.detail-field { min-height: 66px; padding: 12px 14px; background: white; }
.detail-field--wide { grid-column: 1 / -1; }
.detail-field span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.detail-field strong { display: block; color: #25486f; font-size: 13px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.file-list { display: grid; gap: 9px; }
.file-link { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 15px; border: 1px solid #ccdfef; border-radius: 8px; color: var(--navy); background: #f5faff; font-size: 12px; font-weight: 800; text-decoration: none; }
.file-link small { color: var(--muted); font-weight: 400; }

@media (max-width: 980px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .filters { grid-template-columns: 1fr 1fr; }
  .search-field { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .login-card { padding: 30px 22px; }
  .topbar { align-items: flex-start; padding: 17px 18px; }
  .topbar h1 { font-size: 19px; }
  .account > span { display: none; }
  .dashboard-body { width: calc(100% - 24px); margin-top: 16px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .stats article { padding: 14px; }
  .panel { padding: 18px 12px; }
  .filters { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-field--wide { grid-column: auto; }
  .dialog-toolbar { align-items: stretch; flex-direction: column; }
}
