:root {
  --ink: #15252d;
  --muted: #607078;
  --line: #d9dedf;
  --paper: #f4f1eb;
  --card: #ffffff;
  --orange: #d86128;
  --orange-dark: #a94319;
  --teal: #197d78;
  --danger: #a7332b;
  --shadow: 0 18px 45px rgba(21, 37, 45, .11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 88% 5%, #e8ddd0 0, transparent 28rem), var(--paper); }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 max(24px, calc((100vw - 1180px) / 2)); background: rgba(255,255,255,.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-size: 21px; font-weight: 850; letter-spacing: -.03em; }
.brand img { width: 38px; height: 38px; }
.topbar nav { display: flex; gap: 10px; align-items: center; }
.topbar nav a, .topbar nav button { border: 0; background: transparent; text-decoration: none; color: #28363f; font-weight: 750; padding: 10px 13px; border-radius: 10px; }
.topbar nav .primary { background: var(--orange); color: white; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 56px 0 80px; }
.hero { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 56px; min-height: calc(100vh - 132px); }
.eyebrow { color: var(--orange-dark); font-size: 12px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(46px, 6vw, 78px); line-height: .98; letter-spacing: -.055em; max-width: 760px; margin: 14px 0 24px; }
h2 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -.035em; }
.lead { color: #4b5b62; font-size: 19px; line-height: 1.65; max-width: 680px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button { border: 1px solid var(--ink); padding: 13px 19px; border-radius: 11px; background: white; color: var(--ink); text-decoration: none; font-weight: 850; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.button.primary { border-color: var(--orange); background: var(--orange); color: white; }
.button.primary:hover { background: var(--orange-dark); }
.button:disabled { opacity: .5; cursor: not-allowed; }
.hero-art { position: relative; }
.hero-art img { width: 100%; display: block; border-radius: 26px; box-shadow: var(--shadow); }
.trust-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 30px; }
.trust-row div { border-left: 3px solid var(--teal); padding-left: 12px; }
.trust-row strong, .trust-row span { display: block; }
.trust-row span { font-size: 12px; color: var(--muted); margin-top: 3px; }
.auth-wrap { width: min(760px, calc(100% - 32px)); margin: 48px auto 90px; }
.card { background: rgba(255,255,255,.97); border: 1px solid var(--line); border-radius: 18px; padding: clamp(22px, 4vw, 38px); box-shadow: var(--shadow); }
.card + .card { margin-top: 18px; }
.card header { margin-bottom: 24px; }
.card header p, .muted { color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
label { display: grid; gap: 7px; font-size: 13px; font-weight: 800; color: #36464d; }
label.full { grid-column: 1 / -1; }
input, textarea, select { width: 100%; border: 1px solid #bcc6c9; border-radius: 10px; padding: 12px 13px; background: white; color: var(--ink); }
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(25,125,120,.17); border-color: var(--teal); }
textarea { min-height: 120px; resize: vertical; }
.checkbox { display: flex; grid-column: 1 / -1; align-items: flex-start; gap: 10px; font-weight: 600; }
.checkbox input { width: auto; margin-top: 3px; }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.assessment { grid-column: 1 / -1; display: grid; gap: 14px; margin-top: 6px; }
.question { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: #fbfbf9; }
.question strong { display: block; margin-bottom: 10px; }
.question label { display: flex; align-items: flex-start; gap: 8px; font-weight: 550; padding: 5px 0; }
.question input { width: auto; margin-top: 3px; }
.dashboard { width: min(1280px, calc(100% - 32px)); margin: 32px auto 80px; }
.dashboard-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.dashboard-grid { display: grid; grid-template-columns: 320px minmax(0,1fr); gap: 20px; align-items: start; }
.sidebar { position: sticky; top: 96px; }
.status { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 850; background: #e8f4f1; color: #14615d; }
.status.warn { background: #fff0dc; color: #87511c; }
.status.danger { background: #f9e4e1; color: var(--danger); }
.metric { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--line); }
.metric:last-child { border-bottom: 0; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button { border: 1px solid var(--line); background: white; padding: 9px 13px; border-radius: 9px; font-weight: 800; }
.tabs button.active { background: var(--ink); color: white; border-color: var(--ink); }
.list { display: grid; gap: 12px; }
.list-item { border: 1px solid var(--line); border-radius: 13px; background: white; padding: 18px; }
.list-item-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.list-item p { color: var(--muted); line-height: 1.55; }
.list-item footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.amount { font-size: 22px; font-weight: 900; }
.notice { border-left: 4px solid var(--teal); padding: 13px 15px; background: #edf8f6; border-radius: 0 10px 10px 0; color: #24504e; }
.notice.danger { border-color: var(--danger); background: #fff1ef; color: #7d2b25; }
.empty { border: 1px dashed #aab6ba; border-radius: 13px; padding: 30px; text-align: center; color: var(--muted); }
.toast { position: fixed; right: 22px; bottom: 22px; max-width: 380px; padding: 14px 17px; border-radius: 11px; color: white; background: var(--ink); box-shadow: var(--shadow); z-index: 50; }
.toast.error { background: var(--danger); }
.loading { padding: 80px 24px; text-align: center; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.admin-dashboard .dashboard-head p { margin-bottom: 0; }
.admin-kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.admin-kpi { padding: 20px; box-shadow: none; }
.admin-kpi span, .admin-kpi small { display: block; color: var(--muted); }
.admin-kpi strong { display: block; margin: 5px 0; font-size: 30px; letter-spacing: -.035em; }
.admin-kpi small { font-size: 12px; line-height: 1.45; }
.admin-side-summary { margin-top: 20px; }
.admin-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin: 8px 0 16px; }
.admin-section-head h3 { margin-bottom: 5px; font-size: 24px; }
.admin-section-head p { margin-bottom: 0; }
.admin-toolbar { display: grid; grid-template-columns: minmax(0,2fr) minmax(180px,1fr); gap: 10px; margin-bottom: 14px; }
.status-stack { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.admin-meta-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin: 14px 0; padding: 13px; border-radius: 11px; background: #f7f7f4; }
.admin-meta-grid span { color: var(--muted); font-size: 13px; min-width: 0; overflow-wrap: anywhere; }
.admin-meta-grid strong { display: block; color: var(--ink); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.admin-actions { justify-content: flex-end !important; margin-top: 14px; }
.danger-button { border-color: var(--danger); color: var(--danger); }
.danger-button:hover { background: #fff1ef; }
.audit-item details { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.audit-item summary { cursor: pointer; font-weight: 800; }
.audit-item pre { white-space: pre-wrap; overflow-wrap: anywhere; background: #f5f6f4; padding: 12px; border-radius: 9px; font-size: 12px; }

@media (max-width: 1000px) {
  .admin-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .admin-meta-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 24px; }
  .hero-art { order: -1; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}
@media (max-width: 640px) {
  .topbar { height: 66px; padding: 0 16px; }
  .brand span { display: none; }
  .topbar nav a, .topbar nav button { padding: 8px 10px; font-size: 13px; }
  .shell { padding-top: 28px; }
  .form-grid { grid-template-columns: 1fr; }
  .trust-row { grid-template-columns: 1fr; }
  .dashboard-head { align-items: flex-start; flex-direction: column; }
  .admin-kpis, .admin-meta-grid, .admin-toolbar { grid-template-columns: 1fr; }
  .admin-section-head { flex-direction: column; }
  .status-stack { justify-content: flex-start; }
}