@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700&display=swap");

:root {
  --brand: #ed130b;
  --brand-dark: #b3160e;
  --canvas: #f8f8fa;
  --surface: #ffffff;
  --ink: #16151b;
  --muted: #76747d;
  --line: #e5e4e9;
  --green: #078a4c;
  --warning: #c53e21;
  --radius: 8px;
}

* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; background: var(--canvas); color: var(--ink); font-family: "Manrope", sans-serif; font-size: 15px; line-height: 1.5; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
[hidden] { display: none !important; }
.site-header { height: 56px; background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner, .page-shell { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }
.header-inner { display: flex; height: 100%; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-size: 18px; font-weight: 700; text-decoration: none; }
.brand-logo { width: auto; height: 25px; }
.page-shell { padding: 52px 0 72px; }
.intro { margin-bottom: 30px; }
.intro h1 { margin: 0; font-size: 34px; letter-spacing: 0; line-height: 1.15; }
.intro > p { margin: 10px 0 0; color: var(--muted); }
.auth-card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.auth-card { width: min(100%, 480px); overflow: hidden; }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tab { flex: 1; padding: 15px 18px; background: var(--surface); border: 0; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 600; }
.tab:hover { color: var(--brand-dark); background: #fff8f7; }
.tab.is-active { border-bottom-color: var(--brand); color: var(--ink); }
.auth-content { padding: 25px; }
.auth-content h2, .panel-heading h2 { margin: 0; font-size: 20px; letter-spacing: 0; line-height: 1.2; }
.muted { margin: 9px 0 0; color: var(--muted); font-size: 13px; }
.field { display: grid; gap: 6px; margin-top: 18px; color: var(--ink); font-size: 13px; font-weight: 600; }
.field input { width: 100%; min-height: 42px; padding: 10px 11px; background: #fff; border: 1px solid #d8d7de; border-radius: 4px; color: var(--ink); outline: none; }
.field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgb(237 19 11 / 12%); }
.button { display: inline-flex; min-height: 42px; margin-top: 21px; padding: 9px 15px; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 6px; font-weight: 700; }
.button-primary { width: 100%; background: var(--brand); color: #fff; }
.button-primary:hover { background: var(--brand-dark); }
.form-message { margin: 15px 0 0; color: var(--green); font-size: 13px; }
.form-message.is-error { color: var(--warning); }
.portal { width: min(100%, 760px); }
.portal-nav { display: flex; gap: 3px; margin-bottom: 12px; padding: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.nav-item, .logout { min-height: 34px; padding: 7px 10px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 700; }
.nav-item:hover, .nav-item.is-active { background: #fff1ef; color: var(--brand-dark); }
.logout { margin-left: auto; color: var(--muted); }
.logout:hover { color: var(--warning); }
.panel { padding: 25px; }
.panel-heading { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; }
.badge { display: inline-flex; min-height: 27px; padding: 4px 9px; align-items: center; background: #eaf7f0; border: 1px solid #bde4ce; border-radius: 20px; color: var(--green); font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge-admin { background: #fff1ef; border-color: #f0b4ae; color: var(--brand-dark); }
.profile-list { display: grid; margin: 24px 0 0; border-top: 1px solid var(--line); }
.profile-list div { display: grid; grid-template-columns: minmax(135px, .55fr) 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.profile-list dt { color: var(--muted); font-size: 13px; }
.profile-list dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.admin-status { margin-top: 24px; padding: 18px; background: #f9f9fa; border-left: 3px solid var(--muted); }
.admin-status p { margin: 0; }
.admin-status p + p { margin-top: 9px; }
.admin-status.is-denied { border-left-color: var(--warning); background: #fff8f7; }
.admin-status.is-granted { border-left-color: var(--green); background: #f4fbf7; }
.flag-row { font-family: "DM Mono", monospace; font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .site-header { height: 52px; }
  .header-inner, .page-shell { width: min(100% - 24px, 1160px); }
  .page-shell { padding: 33px 0 45px; }
  .intro h1 { font-size: 28px; }
  .brand { gap: 7px; font-size: 16px; }
  .auth-content, .panel { padding: 18px; }
  .portal-nav { overflow-x: auto; }
  .nav-item, .logout { flex: 0 0 auto; }
  .profile-list div { grid-template-columns: 1fr; gap: 3px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 1ms !important; } }