/* Staff app layout. Colours and type come from brand/tokens.css (served as /static/brand/tokens.css).
   Fonts are self-hosted (static/fonts, SIL OFL); nothing is loaded from Google Fonts. */

@font-face { font-family: "Montserrat"; font-weight: 400; font-display: swap; src: url("../fonts/montserrat-latin-400-normal.e7198b2dcb57.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-weight: 400; font-display: swap; src: url("../fonts/montserrat-latin-ext-400-normal.17898728c63b.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-weight: 600; font-display: swap; src: url("../fonts/montserrat-latin-600-normal.9e606da1cbeb.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-weight: 600; font-display: swap; src: url("../fonts/montserrat-latin-ext-600-normal.e2a7d38baea7.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-weight: 700; font-display: swap; src: url("../fonts/montserrat-latin-700-normal.1c0792ac34ef.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-weight: 700; font-display: swap; src: url("../fonts/montserrat-latin-ext-700-normal.7b0c49b295bd.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Raleway"; font-weight: 700; font-display: swap; src: url("../fonts/raleway-latin-700-normal.5f860de71c07.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Raleway"; font-weight: 700; font-display: swap; src: url("../fonts/raleway-latin-ext-700-normal.6b897cc95b7a.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Hind"; font-weight: 400; font-display: swap; src: url("../fonts/hind-latin-400-normal.4c5bc71b3cf6.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Hind"; font-weight: 400; font-display: swap; src: url("../fonts/hind-latin-ext-400-normal.2a0bff8b7eb5.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Hind"; font-weight: 600; font-display: swap; src: url("../fonts/hind-latin-600-normal.e9224cf8a465.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Hind"; font-weight: 600; font-display: swap; src: url("../fonts/hind-latin-ext-600-normal.875fea80cfb8.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Hind"; font-weight: 700; font-display: swap; src: url("../fonts/hind-latin-700-normal.376d4202f030.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Hind"; font-weight: 700; font-display: swap; src: url("../fonts/hind-latin-ext-700-normal.e20e045d0f41.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--vae-bg); color: var(--vae-text); font: 16px/1.5 var(--vae-font-body); }
h1, h2, h3 { font-family: var(--vae-font-heading); font-weight: 700; line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.25rem; } h3 { font-family: var(--vae-font-subheading); font-size: 1.05rem; }
a { color: var(--vae-primary); }
img { max-width: 100%; height: auto; }

.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--vae-nav-bg); color: var(--vae-nav-text); padding: 20px 16px; display: flex; flex-direction: column; gap: 18px; }
.sidebar a { color: var(--vae-nav-text); text-decoration: none; }
.sidebar .brand img { width: 100%; max-width: 190px; display: block; }
.sidebar .org { font-family: var(--vae-font-heading); font-weight: 700; font-size: 1.05rem; word-break: break-word; }
.sidebar .state { display: inline-block; margin-top: 4px; font-size: .78rem; padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,.15); }
.sidebar nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sidebar nav .module { font-family: var(--vae-font-subheading); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; opacity: .8; margin: 10px 0 4px; }
.sidebar nav .module small { font-weight: 400; text-transform: none; letter-spacing: 0; opacity: .8; }
.sidebar nav a { display: block; padding: 8px 10px; border-radius: 6px; }
.sidebar nav a:hover, .sidebar nav a[aria-current="page"] { background: rgba(255,255,255,.14); }
.sidebar .me { margin-top: auto; font-size: .9rem; display: grid; gap: 6px; }
.main { padding: 28px 32px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }

.card { overflow-wrap: anywhere; background: var(--vae-surface); border-radius: 10px; padding: 18px 20px; box-shadow: 0 1px 2px rgba(0,0,0,.06); margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.muted { color: var(--vae-text-muted); }
.notice { border-left: 4px solid var(--vae-attention); padding: 6px 10px; margin: 10px 0; }
.notice p { margin: 0 0 6px; }
.needs-you { background: var(--vae-attention); color: var(--vae-on-attention); border-radius: 6px; padding: 2px 8px; font-weight: 600; }
.banner { border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; background: var(--vae-surface-muted); }
.banner.attention { background: var(--vae-attention); color: var(--vae-on-attention); }
.error { color: #a40000; font-weight: 600; }

table { width: 100%; border-collapse: collapse; background: var(--vae-surface); }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--vae-surface-muted); vertical-align: top; }
th { font-family: var(--vae-font-subheading); font-size: .85rem; color: var(--vae-text-muted); }
.table-wrap { overflow-x: auto; border-radius: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }

form .field { display: grid; gap: 4px; margin-bottom: 12px; }
label { font-weight: 600; font-size: .92rem; }
input, select, textarea { font: inherit; padding: 9px 10px; border: 1px solid #c9c9c9; border-radius: 6px; background: #fff; color: #212121; width: 100%; min-height: 40px; }
button, .button { font-family: var(--vae-font-heading); font-weight: 600; font-size: .95rem; border: 0; border-radius: 6px; padding: 10px 16px; min-height: 40px; cursor: pointer; background: var(--vae-primary); color: var(--vae-on-primary); text-decoration: none; display: inline-block; }
button.secondary, .button.secondary { background: var(--vae-surface-muted); color: var(--vae-text); }
button.link { background: none; color: inherit; padding: 0; min-height: 0; font: inherit; text-decoration: underline; }

.auth { max-width: 420px; margin: 8vh auto; padding: 0 16px; }
.auth .logo { width: 260px; max-width: 100%; display: block; margin: 0 auto 24px; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { padding: 12px 16px; gap: 10px; }
  .sidebar .brand img { max-width: 150px; }
  .sidebar nav ul { grid-auto-flow: row; }
  .main { padding: 18px 16px; }
}

/* Screens: filters, timelines, call list, small forms */
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.filter-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 12px; }
label.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin-right: 14px; }
label.check input, input[type="checkbox"], input[type="radio"] { width: auto; min-height: 0; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; }
.card.narrow { max-width: 560px; }
ul.hints { font-size: .875em; padding-left: 1.2em; }
.members li { margin-bottom: 6px; overflow-wrap: anywhere; }
details.member-access > summary { cursor: pointer; display: inline-block; text-decoration: underline; }
details.member-access[open] { margin: 6px 0 10px; }
details.member-access form { margin: 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.inline-form input, .inline-form select { width: auto; flex: 1 1 140px; }
.timeline { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 12px; }
.timeline li { border-left: 3px solid var(--vae-surface-muted); padding-left: 10px; overflow-wrap: anywhere; }
.timeline li.undone { opacity: .55; text-decoration: line-through; }
.timeline li.undone .muted { text-decoration: none; }
.card.call .call-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.card.call .phone { font-size: 1.1rem; font-weight: 600; }
td, th { overflow-wrap: anywhere; }
code { overflow-wrap: anywhere; }

@media (max-width: 640px) {
  table.stack-on-phone thead { display: none; }
  table.stack-on-phone, table.stack-on-phone tbody, table.stack-on-phone tr, table.stack-on-phone td { display: block; width: 100%; }
  table.stack-on-phone tr { border-bottom: 1px solid var(--vae-surface-muted); padding: 8px 0; }
  table.stack-on-phone td { border: 0; padding: 3px 10px; }
  table.stack-on-phone td[data-label]::before { content: attr(data-label) ": "; color: var(--vae-text-muted); font-size: .85rem; }
  .outbox-actions form { display: inline-block; margin: 6px 6px 0 0; }
  .grid.wide { grid-template-columns: 1fr; }
}

/* The main menu: always shown on wide screens, folded behind "Menu" on phones */
details.menu > summary { list-style: none; cursor: pointer; font-family: var(--vae-font-heading); font-weight: 600; padding: 8px 10px; border-radius: 6px; background: rgba(255,255,255,.14); display: none; }
details.menu > summary::-webkit-details-marker { display: none; }
@media (max-width: 860px) {
  details.menu > summary { display: inline-block; }
  details.menu > summary::after { content: " ▾"; }
  details.menu[open] > summary::after { content: " ▴"; }
  details.menu nav { margin-top: 8px; }
}

/* The Desk: report button and panel */
.report-button { position: fixed; right: 16px; bottom: 16px; width: 48px; height: 48px; border-radius: 50%; font-size: 1.4rem; padding: 0; box-shadow: 0 2px 8px rgba(0,0,0,.2); z-index: 20; }
dialog#desk-report { border: none; border-radius: 10px; padding: 20px; width: min(520px, calc(100vw - 32px)); box-shadow: 0 8px 30px rgba(0,0,0,.25); }
dialog#desk-report::backdrop { background: rgba(0,0,0,.35); }
/* Send and Cancel stay in reach while the panel scrolls */
dialog#desk-report .button-row { position: sticky; bottom: -20px; background: #fff; padding: 12px 0 20px; margin-bottom: -20px; border-top: 1px solid rgba(0,0,0,.08); }
.desk-text { white-space: pre-wrap; overflow-wrap: anywhere; }
/* Room at the end of every page so the round button never covers the last line or button */
body.has-report .main { padding-bottom: 88px; }
.desk-ask { margin-top: 18px; }
.desk-shot { display: block; max-width: 100%; max-height: 220px; margin: 6px 0; border: 1px solid rgba(0,0,0,.15); border-radius: 6px; }
.desk-batches { padding-left: 18px; }
.desk-batches li { margin: 6px 0; }
.desk-batches .inline-form { display: inline-flex; margin: 0 0 0 8px; }
/* A question's proposed answers: buttons that fill its answer box (long options wrap, never wider than the card) */
.desk-proposed .label { font-weight: 600; font-size: .92rem; }
.desk-options button { max-width: 100%; text-align: left; white-space: normal; overflow-wrap: anywhere; }

/* The outbox preview: the exact recipient and the whole text, line breaks kept */
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; }
.facts dt { font-weight: 600; color: var(--vae-text-muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.outbox-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.outbox-address { overflow-wrap: anywhere; }
.outbox-list th { overflow-wrap: normal; white-space: nowrap; }
.outbox-list .outbox-actions .button { white-space: nowrap; }
@media (max-width: 640px) {
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
}
