/* ==========================================================================
   Underway Technology — site styles
   Brand: navy #002F66 · blue #0066BA · deep navy #031C3D
   Type:  Montserrat (headings) · Inter (body) · JetBrains Mono (labels)
   ========================================================================== */

:root {
  --navy: #002F66;
  --blue: #0066BA;
  --blue-dark: #00509A;
  --deep: #031C3D;
  --deeper: #021430;
  --panel-dark: #0A2C57;
  --line-dark: #2C5B92;
  --sky: #6FB6F5;
  --sky-2: #4BA3F0;

  --ink: #0B1B33;
  --muted: #4A5B72;
  --muted-2: #6A7B91;
  --on-dark: #E9F1FA;
  --on-dark-muted: #B4C7DD;

  --bg: #FFFFFF;
  --bg-soft: #F3F6FA;
  --line: #DDE5EF;
  --line-2: #EEF2F7;
  --tint: #E6F0FA;
  --field: #C4D0DE;

  --ok-bg: #E3F4EA; --ok: #1E6B3E;
  --warn-bg: #FFF1DC; --warn: #8A4B00;
  --err-bg: #FDE8E8; --err: #A61B1B;

  --f-head: Montserrat, system-ui, sans-serif;
  --f-body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--f-body); color: var(--ink); background: var(--bg); line-height: 1.5; }
img { max-width: 100%; display: block; }
a { color: var(--blue); }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--sky-2); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--f-head); margin: 0; letter-spacing: -0.015em; }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.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; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--navy); color: #fff; padding: 12px 16px; border-radius: var(--r-sm); z-index: 100; }
.skip:focus { top: 16px; color: #fff; }
.eyebrow { font-family: var(--f-mono); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
.mono { font-family: var(--f-mono); }

/* --- Buttons ------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: var(--r-sm); border: 1.5px solid transparent; font-family: var(--f-head); font-weight: 700; font-size: 15px;
  text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.btn svg { flex: none; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--deep); color: #fff; }
.btn-ghost-dark { border-color: #4E6E95; color: #fff; }
.btn-ghost-dark:hover { border-color: #fff; color: #fff; }
.btn-ghost { border-color: var(--field); color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 10px 6px; font: inherit; font-size: 14px; font-weight: 600; color: var(--blue); cursor: pointer; }
.link-btn:hover { color: var(--navy); text-decoration: underline; }
.link-btn.danger { color: var(--err); }

/* --- Forms ---------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .lbl { font-size: 14px; font-weight: 600; color: var(--ink); }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number], input[type=tel], input[type=url], select, textarea {
  font: inherit; font-size: 16px; color: var(--ink); padding: 12px 14px; border: 1px solid var(--field); border-radius: var(--r-sm);
  background: #fff; width: 100%; min-height: 48px; }
textarea { resize: vertical; min-height: 120px; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 3px solid rgba(0,102,186,.18); outline-offset: 0; }
.help, .helptext { font-size: 13px; color: var(--muted); }
.errorlist { list-style: none; margin: 0; padding: 0; color: var(--err); font-size: 14px; font-weight: 500; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* --- Messages ------------------------------------------------------------- */
.messages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.msg { padding: 14px 16px; border-radius: var(--r-sm); font-size: 15px; background: var(--tint); color: var(--blue-dark); border: 1px solid #C9DDF2; }
.msg.success { background: var(--ok-bg); color: var(--ok); border-color: #BFE3CC; }
.msg.warning { background: var(--warn-bg); color: var(--warn); border-color: #F3D8AE; }
.msg.error { background: var(--err-bg); color: var(--err); border-color: #F3C2C2; }

/* --- Public header ------------------------------------------------------- */
.site-header { background: #fff; border-bottom: 1px solid #E3E9F1; position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.brand img { height: 50px; width: auto; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.nav a.nav-link { font-family: var(--f-head); font-weight: 600; font-size: 15px; color: var(--navy); text-decoration: none; padding: 12px 14px; border-radius: var(--r-sm); }
.nav a.nav-link:hover { background: var(--bg-soft); }
.nav .btn { margin-left: 8px; }
.nav-toggle { display: none; }
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; color: var(--navy); cursor: pointer; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding-bottom: 8px; }
  .nav.open { display: flex; }
  .nav .btn { margin: 8px 0 0; }
  .brand img { height: 42px; }
}

/* --- Hero ------------------------------------------------------------------ */
.hero { background: var(--deep); color: var(--on-dark); overflow: hidden; }
.hero .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-top: 96px; padding-bottom: 104px; }
.hero-copy { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.hero .eyebrow { color: var(--sky); }
.hero h1 { font-weight: 800; font-size: clamp(38px, 5.2vw, 60px); line-height: 1.05; letter-spacing: -0.02em; color: #fff; }
.hero p.lead { font-size: 19px; line-height: 1.6; color: var(--on-dark-muted); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-art { flex: 1 1 380px; min-width: 0; display: flex; justify-content: center; }
.hero-art svg { width: 100%; max-width: 500px; height: auto; }
.sweep { transform-origin: 280px 280px; animation: sweep 9s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sweep { animation: none; } html { scroll-behavior: auto; } }

/* --- Sections ------------------------------------------------------------ */
.section { padding: 104px 0; }
.section.soft { background: var(--bg-soft); }
.section.navy { background: var(--navy); color: var(--on-dark); }
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 680px; margin-bottom: 48px; }
.section h2 { font-weight: 800; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.1; color: var(--navy); }
.section.navy h2 { color: #fff; }
.section.navy .eyebrow { color: #8CC4F7; }
.section .lead { font-size: 18px; line-height: 1.6; color: var(--muted); }
.section.navy .lead { color: #C3D4E8; }
@media (max-width: 700px) { .section { padding: 72px 0; } .hero .wrap { padding-top: 64px; padding-bottom: 72px; } }

.cards { display: flex; flex-wrap: wrap; gap: 24px; }
.card { flex: 1 1 250px; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.card h3 { font-weight: 700; font-size: 20px; color: var(--navy); }
.card p { font-size: 16px; line-height: 1.6; color: var(--muted); }
.icon-tile { width: 48px; height: 48px; border-radius: 10px; background: var(--tint); color: var(--blue); display: flex; align-items: center; justify-content: center; }

.split { display: flex; flex-wrap: wrap; align-items: center; gap: 64px; }
.split > * { flex: 1 1 440px; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 22px; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.5; }
.checks svg { flex: none; margin-top: 1px; color: var(--blue); }

.mock { background: var(--deep); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.mock-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mock-title { font-family: var(--f-head); font-weight: 700; font-size: 17px; color: #fff; }
.mock-pill { font-family: var(--f-mono); font-size: 12px; color: var(--deep); background: var(--sky); padding: 5px 10px; border-radius: 999px; }
.mock-row { display: flex; align-items: center; gap: 14px; background: var(--panel-dark); border-radius: 10px; padding: 14px 16px; }
.mock-row .ext { font-family: var(--f-mono); font-size: 11px; color: var(--deep); background: var(--on-dark-muted); padding: 4px 7px; border-radius: 4px; }
.mock-row .name { flex: 1; font-size: 15px; color: var(--on-dark); }
.mock-row .date { font-size: 13px; color: #8FA8C6; }
.mock-drop { border: 1.5px dashed var(--line-dark); border-radius: 12px; padding: 22px; display: flex; align-items: center; justify-content: center; gap: 10px; color: #8FA8C6; font-size: 15px; }
.mock-note { font-family: var(--f-mono); font-size: 11px; color: #6F8FB5; }

.steps { display: flex; flex-wrap: wrap; gap: 32px; }
.step { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 12px; border-top: 3px solid var(--blue); padding-top: 22px; }
.step .num { font-family: var(--f-mono); font-size: 14px; color: var(--blue); }
.step h3 { font-weight: 700; font-size: 21px; color: var(--navy); }
.step p { font-size: 16px; line-height: 1.6; color: var(--muted); }

.about { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.about-mark { flex: 0 1 220px; display: flex; justify-content: center; }
.about-mark img { width: 200px; }
.about-copy { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

.contact { display: flex; flex-wrap: wrap; gap: 64px; }
.contact-info { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.contact-lines { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; font-size: 17px; color: var(--muted); }
.contact-lines a { font-weight: 600; text-decoration: none; }
.contact-form { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 18px; background: var(--bg-soft); border-radius: var(--r-lg); padding: 36px; }
.row { display: flex; flex-wrap: wrap; gap: 18px; }
.row > .field { flex: 1 1 220px; }
@media (max-width: 560px) { .contact-form { padding: 24px; } }

/* --- Footer ---------------------------------------------------------------- */
.site-footer { background: var(--deeper); color: #9FB4CE; }
.site-footer .wrap { padding-top: 56px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 32px; }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; }
.footer-top img { height: 56px; width: auto; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.footer-nav a { color: #C3D4E8; text-decoration: none; font-size: 15px; padding: 10px 0; }
.footer-nav a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #16345C; padding-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 14px; }
.footer-bottom a { color: #9FB4CE; }
.footer-bottom a:hover { color: #fff; }

/* --- Prose pages ------------------------------------------------------ */
.prose { max-width: 760px; margin: 0 auto; padding: 72px 32px 104px; display: flex; flex-direction: column; gap: 18px; font-size: 17px; line-height: 1.7; color: var(--ink); }
.prose h1 { font-weight: 800; font-size: 40px; color: var(--navy); margin-bottom: 8px; }
.prose h2 { font-weight: 700; font-size: 22px; color: var(--navy); margin-top: 16px; }

/* --- Auth (sign-in, MFA, password) -------------------------------------- */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; }
.auth-aside { flex: 1 1 460px; min-width: 0; background: var(--deep); color: var(--on-dark); padding: 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 48px; position: relative; overflow: hidden; }
.auth-aside .logo img { height: 56px; width: auto; }
.auth-aside h2 { font-weight: 800; font-size: clamp(30px, 3.2vw, 44px); line-height: 1.1; color: #fff; }
.auth-aside p { font-size: 17px; line-height: 1.6; color: var(--on-dark-muted); }
.auth-aside .eyebrow { color: var(--sky); }
.auth-aside .secure { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #8FA8C6; }
.auth-aside .rings { position: absolute; right: -160px; bottom: -160px; width: 520px; opacity: .5; pointer-events: none; }
.auth-main { flex: 1 1 460px; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 56px 28px; }
.auth-card { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 22px; }
@media (max-width: 700px) { .auth-aside { padding: 32px 28px; gap: 24px; } .auth-aside .pitch, .auth-aside .rings { display: none; } }

/* Style allauth's plain markup inside the card */
.auth-card h1 { font-weight: 800; font-size: 30px; color: var(--navy); }
.auth-card h2 { font-weight: 700; font-size: 20px; color: var(--navy); }
.auth-card > p, .auth-card section > p { font-size: 16px; line-height: 1.55; color: var(--muted); }
.auth-card form { display: flex; flex-direction: column; gap: 18px; }
.auth-card form > p, .auth-card form p { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.auth-card form p:has(> input[type=checkbox]) { flex-direction: row; align-items: center; gap: 10px; }
.auth-card label { font-size: 14px; font-weight: 600; }
.auth-card input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--blue); }
.auth-card form p > span { font-size: 13px; color: var(--muted); }
.auth-card button, .auth-card a[href].button-like {
  min-height: 52px; width: 100%; border: 0; border-radius: var(--r-sm); background: var(--navy); color: #fff;
  font-family: var(--f-head); font-weight: 700; font-size: 16px; cursor: pointer; padding: 0 18px; }
.auth-card button:hover { background: var(--deep); }
.auth-card button[type=submit][name=action_remove],
.auth-card button.secondary { background: #fff; color: var(--ink); border: 1px solid var(--field); }
.auth-card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.auth-card ul.errorlist { color: var(--err); }
.auth-card section { display: flex; flex-direction: column; gap: 12px; }
.auth-card hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }
.auth-card img { margin: 0 auto; border: 8px solid #fff; border-radius: var(--r-sm); box-shadow: 0 0 0 1px var(--line); }
.auth-card pre, .auth-card code { font-family: var(--f-mono); }
.auth-card .footer-note { font-size: 14px; color: var(--muted-2); }
.provider-btn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 52px; background: #fff;
  border: 1px solid var(--field); border-radius: var(--r-sm); font-weight: 600; font-size: 16px; color: var(--ink); text-decoration: none; }
.provider-btn:hover { border-color: var(--navy); color: var(--navy); }
.or { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--muted-2); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* --- Portal --------------------------------------------------------------- */
.portal { background: var(--bg-soft); min-height: 100vh; }
.appbar { background: var(--deep); color: var(--on-dark); }
.appbar-inner { padding: 10px 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.appbar-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.appbar-brand img { width: 40px; }
.appbar-brand .t1 { font-family: var(--f-head); font-weight: 800; font-size: 17px; color: #fff; display: block; }
.appbar-brand .t2 { font-size: 13px; color: #8FA8C6; display: block; }
.appnav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.appnav a { color: var(--on-dark-muted); text-decoration: none; font-weight: 600; font-size: 15px; padding: 11px 14px; border-radius: var(--r-sm); }
.appnav a:hover { color: #fff; background: rgba(255,255,255,.06); }
.appnav a[aria-current=page] { color: #fff; background: var(--panel-dark); }
.usermenu { position: relative; }
.usermenu summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 6px 8px; border-radius: var(--r-sm); color: var(--on-dark); font-size: 15px; min-height: 44px; }
.usermenu summary::-webkit-details-marker { display: none; }
.avatar { width: 34px; height: 34px; border-radius: 999px; background: var(--blue); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; flex: none; }
.avatar.light { background: var(--tint); color: var(--navy); }
.usermenu-panel { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: 0 12px 32px rgba(3,28,61,.18); min-width: 240px; padding: 8px; z-index: 30; display: flex; flex-direction: column; }
.usermenu-panel a, .usermenu-panel button { display: block; text-align: left; width: 100%; padding: 11px 12px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; font: inherit; font-size: 15px; background: none; border: 0; cursor: pointer; }
.usermenu-panel a:hover, .usermenu-panel button:hover { background: var(--bg-soft); }
.usermenu-panel .who { padding: 10px 12px 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.usermenu-panel .who strong { display: block; color: var(--ink); font-size: 15px; }

.portal-body { max-width: 1360px; margin: 0 auto; padding: 32px 28px 64px; display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.portal-body > .messages { flex: 1 1 100%; }
.sidebar { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.sidebar-head { display: flex; justify-content: space-between; align-items: center; }
.sidebar-head h2 { font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.proj-list { display: flex; flex-direction: column; gap: 10px; }
.proj { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: var(--r-md); border: 2px solid var(--line); text-decoration: none; background: transparent; color: inherit; }
.proj:hover { border-color: #B8CCE2; background: #fff; color: inherit; }
.proj[aria-current=page] { border-color: var(--blue); background: #fff; }
.proj-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.proj-code { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.proj-name { font-family: var(--f-head); font-weight: 700; font-size: 16px; color: var(--navy); }
.proj-meta { font-size: 13px; color: var(--muted); }
.pill { font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--tint); color: var(--blue-dark); white-space: nowrap; }
.pill.complete { background: var(--ok-bg); color: var(--ok); }
.pill.review { background: var(--warn-bg); color: var(--warn); }
.pill.on_hold, .pill.planning { background: var(--line-2); color: #33455C; }

.main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.panel-pad { padding: 28px; }
.proj-header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; }
.proj-header h1 { font-weight: 800; font-size: 30px; color: var(--navy); }
.proj-header p { font-size: 15px; line-height: 1.55; color: var(--muted); max-width: 620px; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 32px; align-content: start; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 600; }

.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs a { font-size: 15px; font-weight: 600; padding: 14px 16px; margin-bottom: -1px; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; }
.tabs a:hover { color: var(--navy); }
.tabs a[aria-current=page] { color: var(--navy); border-bottom-color: var(--blue); }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15px; }
table.data th { text-align: left; color: var(--muted); font-size: 13px; font-weight: 600; padding: 14px 12px; border-bottom: 1px solid #E3E9F1; }
table.data td { padding: 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data th:first-child, table.data td:first-child { padding-left: 20px; }
table.data th:last-child, table.data td:last-child { padding-right: 20px; }
.ext { font-family: var(--f-mono); font-size: 11px; color: var(--navy); background: var(--tint); padding: 4px 7px; border-radius: 4px; min-width: 38px; text-align: center; display: inline-block; }
.file-cell { display: flex; align-items: center; gap: 12px; }
.file-name { font-weight: 500; }
.file-sub { font-size: 13px; color: var(--muted); }
.muted { color: var(--muted); }
.num { font-family: var(--f-mono); font-size: 13px; color: var(--muted); }
.right { text-align: right; }
.dl { display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; font-weight: 600; font-size: 14px; text-decoration: none; border-radius: var(--r-sm); }
.dl:hover { background: var(--bg-soft); }
details.history summary { cursor: pointer; font-size: 13px; color: var(--blue); padding: 4px 0; }
details.history ul { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }

.empty { padding: 48px 24px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty h3 { font-size: 18px; color: var(--navy); }

.dropzone { position: relative; background: #fff; border: 2px dashed #9DB8D8; border-radius: 14px; padding: 40px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--blue); background: #F7FAFE; }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .dz-icon { width: 56px; height: 56px; border-radius: 999px; background: var(--tint); color: var(--blue); display: flex; align-items: center; justify-content: center; }
.dropzone .dz-title { font-family: var(--f-head); font-weight: 700; font-size: 18px; color: var(--navy); }
.dropzone .dz-sub { font-size: 14px; color: var(--muted); }
.selected { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.selected li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 14px; }
.progress { height: 8px; background: #E3E9F1; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; background: var(--blue); transition: width .2s; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; align-items: end; }

.feed { padding: 8px 24px; }
.feed-item { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.feed-item:last-child { border-bottom: 0; }
.feed-text { font-size: 15px; }
.feed-when { font-size: 13px; color: var(--muted); }

.role { font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; background: var(--line-2); color: #33455C; }
.role.owner { background: var(--navy); color: #fff; }
.role.manager { background: var(--blue); color: #fff; }
.role.client_admin { background: var(--tint); color: var(--blue-dark); }
.inline-form { display: inline-flex; gap: 6px; align-items: center; }
.inline-form select { min-height: 40px; padding: 6px 10px; font-size: 14px; width: auto; }

.matrix { width: 100%; min-width: 760px; border-collapse: collapse; font-size: 15px; }
.matrix th, .matrix td { padding: 12px; border-bottom: 1px solid var(--line-2); text-align: center; }
.matrix th:first-child, .matrix td:first-child { text-align: left; padding-left: 0; font-weight: 500; }
.matrix thead th { font-size: 13px; color: var(--muted); vertical-align: bottom; border-bottom-color: #E3E9F1; }
.matrix .grp { display: block; font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; }
.matrix .rname { display: block; font-family: var(--f-head); font-weight: 700; font-size: 14px; color: var(--navy); }
.matrix .scoped { font-size: 12px; font-weight: 600; color: var(--blue-dark); background: var(--tint); padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.matrix .no { display: inline-block; width: 14px; height: 2px; background: #B7C3D2; vertical-align: middle; }
.page-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.page-title h1 { font-weight: 800; font-size: 30px; color: var(--navy); }
.page-title p { font-size: 15px; color: var(--muted); }
.section-title { font-family: var(--f-head); font-weight: 800; font-size: 20px; color: var(--navy); }

.error-page { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; padding: 48px 24px; }
.error-page .code { font-family: var(--f-mono); color: var(--blue); letter-spacing: .14em; }
.error-page h1 { font-weight: 800; font-size: 36px; color: var(--navy); }

/* allauth button groups: space them out; secondary actions get an outline style */
.auth-card div:has(> button), .auth-card form:has(> button ~ button) { display: flex; flex-direction: column; gap: 10px; }
.auth-card button ~ button, .auth-card form + form button, .auth-card button[value=cancel], .auth-card button[name=action_cancel] {
  background: #fff; color: var(--ink); border: 1px solid var(--field); }
.auth-card button ~ button:hover, .auth-card form + form button:hover { background: var(--bg-soft); border-color: var(--navy); color: var(--navy); }
