/* Ashtown Brewing Co. office: the design system for every office page.
 *
 * Same golden-hour palette as the public site: barley paper, Douglas fir
 * green, amber light, red ale, stout ink. Headlines in Fraunces, everything
 * else in Libre Franklin. Built for a phone held in one hand behind the bar:
 * 44px targets, a bottom tab bar, tables that turn into cards.
 */

:root {
  --paper: #F4ECDD;        /* barley */
  --paper-2: #EADFCA;
  --paper-hi: #FFFBF3;
  --cream: #FFF6E6;
  --ink: #2A1D14;          /* stout */
  --text: #2A1D14;
  --text-2: #6B5A49;
  --rule: #D9CBB3;
  --rule-soft: #E8DCC6;
  --fir: #1F4436;
  --fir-deep: #173229;
  --fir-soft: #DCE6DF;
  --amber: #E2952E;        /* fills and large type only */
  --amber-deep: #C27A17;
  --amber-soft: #FBE8C8;
  --red: #A8402B;          /* red ale: accents, danger, small text on paper */
  --red-soft: #F5DCD4;
  --good: #3F7F52;
  --good-soft: #DCEEDD;
  --blue: #2F5D7C;
  --blue-soft: #DCE7EF;

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Libre Franklin", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(42, 29, 20, .06), 0 6px 20px rgba(42, 29, 20, .07);
  --shadow-lg: 0 20px 60px rgba(23, 50, 41, .28);
  --gutter: 16px;
  --max: 1200px;
  --topbar-h: 60px;
  --tabbar-h: 64px;
  --tap: 44px;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--text);
  font: 400 1rem/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol, dl, figure { margin: 0; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--fir); text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: var(--amber); }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
[hidden] { display: none !important; }
.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;
}
.muted { color: var(--text-2); }
.small { font-size: .88rem; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.right { text-align: right; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.display, h1, h2 {
  font-family: var(--display);
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 72;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: 0;
}
h1 { font-size: clamp(1.6rem, 4.5vw, 2.2rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; font-weight: 700; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
main.wrap { padding-top: 20px; padding-bottom: calc(var(--tabbar-h) + 32px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) {
  :root { --gutter: 28px; }
  main.wrap { padding-top: 28px; padding-bottom: 48px; }
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--fir-deep);
  background-image: linear-gradient(180deg, var(--fir) 0%, var(--fir-deep) 100%);
  color: var(--cream);
  box-shadow: 0 2px 0 var(--amber);
}
.topbar-in { display: flex; align-items: center; gap: 12px; min-height: var(--topbar-h); }
.brand {
  display: flex; align-items: center; gap: 10px; min-height: var(--tap);
  color: var(--cream); text-decoration: none;
  font-family: var(--display); font-weight: 650; font-size: 1.15rem;
  font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 48;
}
.brand:hover { color: var(--amber-soft); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--amber); color: var(--fir-deep);
  font-size: 1.1rem; font-weight: 800;
}
.brand small { display: block; font: 600 .88rem/1.1 var(--body); letter-spacing: .01em; color: var(--amber-soft); opacity: .9; margin-top: 2px; }
.topbar .who { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.who-name { font-size: .9rem; color: var(--amber-soft); max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .btn-ghost { color: var(--cream); border-color: rgba(255, 246, 230, .35); }
.topbar .btn-ghost:hover { background: rgba(255, 246, 230, .1); color: #fff; }

/* desktop nav */
.nav { display: none; }
@media (min-width: 900px) {
  .nav { display: block; background: var(--paper-hi); border-bottom: 1px solid var(--rule); }
  .nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
  .nav a {
    display: flex; align-items: center; min-height: 48px; padding: 0 12px;
    color: var(--text-2); text-decoration: none; font-weight: 600; font-size: .92rem; white-space: nowrap;
    border-bottom: 3px solid transparent;
  }
  .nav a:hover { color: var(--fir); }
  .nav a[aria-current="page"] { color: var(--fir); border-bottom-color: var(--amber); }
  .who-name { max-width: 24ch; }
}
@media (max-width: 899px) { .topbar .hide-phone { display: none; } }

/* phone tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  background: var(--paper-hi); border-top: 1px solid var(--rule);
  box-shadow: 0 -4px 16px rgba(42, 29, 20, .08);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tabbar a, .tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 100%; min-height: var(--tabbar-h); padding: 6px 0;
  background: none; border: 0; cursor: pointer;
  color: var(--text-2); text-decoration: none; font-size: .88rem; font-weight: 600;
  letter-spacing: -.01em; white-space: nowrap;
}
/* Under 375px a cell is 60px: "Requests" fits with the letters a touch closer. */
@media (max-width: 374px) { .tabbar a, .tabbar button { letter-spacing: -.03em; } }
.tabbar svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar [aria-current="page"] { color: var(--fir); }
.tabbar [aria-current="page"] svg { stroke: var(--fir); }
.tabbar [aria-current="page"]::after { content: ""; width: 22px; height: 3px; border-radius: 3px; background: var(--amber); }
@media (min-width: 900px) { .tabbar { display: none; } }

/* "More" sheet */
.sheet-list { list-style: none; margin: 0; padding: 0; }
.sheet-list a, .sheet-list button {
  display: flex; align-items: center; width: 100%; min-height: 52px; padding: 0 4px;
  background: none; border: 0; border-bottom: 1px solid var(--rule-soft);
  color: var(--text); text-decoration: none; font-weight: 600; text-align: left; cursor: pointer;
}
.sheet-list [aria-current="page"] { color: var(--fir); }
.sheet-list a::after { content: "›"; margin-left: auto; color: var(--text-2); font-size: 1.3rem; }

/* ---------- page header ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 20px; }
/* Same voice as the public site's kickers: sentence case, bold, red ale. */
.page-head .eyebrow { display: block; font: 700 1.05rem/1.3 var(--body); letter-spacing: .01em; color: var(--red); margin-bottom: 6px; }
.page-head p { color: var(--text-2); margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 599px) { .page-actions { width: 100%; } .page-actions .btn { flex: 1 1 auto; } }

/* ---------- cards ---------- */
.card {
  background: var(--paper-hi); border: 1px solid var(--rule); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.accent { border-top: 4px solid var(--amber); }
.grid { display: grid; gap: 16px; }
@media (min-width: 700px) { .grid.two { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: repeat(3, 1fr); } }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .n { font-family: var(--display); font-size: 2rem; font-weight: 650; color: var(--fir); line-height: 1.1; }
.stat .l { color: var(--text-2); font-size: .92rem; font-weight: 600; }

/* ---------- tables (cards on phones) ---------- */
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th {
  text-align: left; font-size: .88rem; letter-spacing: .01em;
  color: var(--text-2); font-weight: 700; padding: 10px 12px; border-bottom: 2px solid var(--rule);
  background: var(--paper-hi); white-space: nowrap;
}
.table td { padding: 12px; border-bottom: 1px solid var(--rule-soft); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover td { background: var(--cream); }
.table .actions { text-align: right; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
@media (max-width: 699px) {
  .table.stack-phone thead { display: none; }
  .table.stack-phone, .table.stack-phone tbody, .table.stack-phone tr, .table.stack-phone td { display: block; width: 100%; }
  .table.stack-phone tr {
    background: var(--paper-hi); border: 1px solid var(--rule); border-radius: var(--radius);
    padding: 10px 14px; margin-bottom: 10px; box-shadow: var(--shadow);
  }
  .table.stack-phone td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .table.stack-phone td::before { content: attr(data-label); font-weight: 600; color: var(--text-2); text-align: left; font-size: .92rem; }
  .table.stack-phone td.primary { font-weight: 700; font-size: 1.05rem; text-align: left; display: block; }
  .table.stack-phone td.primary::before, .table.stack-phone td.actions::before { content: none; }
  .table.stack-phone td.actions { justify-content: flex-end; padding-top: 8px; }
  /* On phones the rows are the cards, so the wrapping card steps back. */
  .card.flush:has(> .table.stack-phone) { background: none; border: 0; box-shadow: none; overflow: visible; }
}

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .field > label, .label { font-weight: 600; font-size: .9rem; }
.field .hint { font-size: .9rem; font-weight: 400; color: var(--text-2); }
.form-grid { display: grid; gap: 14px; }
@media (min-width: 700px) { .form-grid.two { grid-template-columns: 1fr 1fr; } .form-grid.three { grid-template-columns: repeat(3, 1fr); } .span-all { grid-column: 1 / -1; } }
.input, input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="url"],
input[type="number"], input[type="date"], input[type="time"], input[type="search"], select, textarea {
  width: 100%; min-height: var(--tap); padding: 10px 12px;
  background: #fff; border: 1.5px solid var(--rule); border-radius: var(--radius-sm);
  font-size: 1rem; /* 16px: phones do not zoom in */
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--fir); box-shadow: 0 0 0 3px rgba(226, 149, 46, .35); }
input:disabled, select:disabled, textarea:disabled { background: var(--paper-2); color: var(--text-2); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--red); }
select {
  appearance: none; padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.error-text { color: var(--red); font-weight: 600; font-size: .9rem; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
/* Save bar that stays in reach on long forms. */
.form-actions.sticky {
  position: sticky; bottom: 0; z-index: 30; margin-inline: calc(-1 * var(--gutter)); padding: 12px var(--gutter);
  background: rgba(244, 236, 221, .94); backdrop-filter: blur(6px); border-top: 1px solid var(--rule);
}
@media (max-width: 899px) { .form-actions.sticky { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); } }
@media (max-width: 599px) { .form-actions .btn { flex: 1 1 auto; } }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 700; padding: 0; margin-bottom: 10px; }

/* chips: radio/checkbox pills */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip > span {
  display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 16px;
  border: 1.5px solid var(--rule); border-radius: 999px; background: #fff;
  font-weight: 600; font-size: .92rem; user-select: none;
}
.chip input:checked + span { background: var(--fir); border-color: var(--fir); color: var(--cream); }
.chip input:focus-visible + span { outline: 3px solid var(--amber); outline-offset: 2px; }

/* toggle switch: <label class="toggle"><input type="checkbox"><span>Label</span></label> */
.toggle { display: inline-flex; align-items: center; gap: 12px; min-height: var(--tap); cursor: pointer; font-weight: 600; }
.toggle input { appearance: none; width: 48px; height: 28px; border-radius: 999px; background: var(--rule); position: relative; flex: none; margin: 0; cursor: pointer; transition: background .15s; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.toggle input:checked { background: var(--fir); }
.toggle input:checked::after { transform: translateX(20px); }

/* stepper: <div class="stepper"><button>-</button><input type="number"><button>+</button></div> */
.stepper { display: inline-flex; align-items: stretch; border: 1.5px solid var(--rule); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.stepper button { width: var(--tap); min-height: var(--tap); border: 0; background: var(--paper-2); font-size: 1.25rem; font-weight: 700; cursor: pointer; color: var(--fir); }
.stepper button:active { background: var(--amber-soft); }
.stepper input { width: 4.5em; border: 0; border-radius: 0; text-align: center; min-height: var(--tap); -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { box-shadow: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 18px;
  border: 1.5px solid transparent; border-radius: 999px;
  font-weight: 700; font-size: .95rem; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--amber); color: var(--ink); border-color: var(--amber); }
.btn-primary:hover { background: var(--amber-deep); border-color: var(--amber-deep); color: var(--ink); }
.btn-secondary { background: var(--fir); color: var(--cream); border-color: var(--fir); }
.btn-secondary:hover { background: var(--fir-deep); color: #fff; }
.btn-outline { background: transparent; color: var(--fir); border-color: var(--fir); }
.btn-outline:hover { background: var(--fir-soft); color: var(--fir-deep); }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { background: #8E3422; color: #fff; }
.btn-ghost { background: transparent; color: var(--fir); border-color: var(--rule); }
.btn-ghost:hover { background: var(--paper-2); color: var(--fir-deep); }
.btn-link { background: none; border: 0; padding: 0 6px; color: var(--fir); text-decoration: underline; text-decoration-color: var(--amber); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: .9rem; }
@media (pointer: coarse) { .btn-sm { min-height: var(--tap); } }
.btn-block { width: 100%; }
.btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-busy::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--ink); border-right-color: transparent; animation: spin .7s linear infinite; }
.btn-secondary.is-busy::after, .btn-danger.is-busy::after { border-color: #fff; border-right-color: transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: .88rem; font-weight: 700; letter-spacing: .01em; white-space: nowrap;
  background: var(--paper-2); color: var(--text-2); border: 1px solid transparent;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge-new, .badge-inquiry { background: var(--blue-soft); color: var(--blue); }
.badge-contacted, .badge-sent { background: var(--blue-soft); color: var(--blue); }
.badge-held, .badge-partial { background: var(--amber-soft); color: #7A4A08; }
.badge-booked, .badge-accepted, .badge-paid { background: var(--good-soft); color: var(--good); }
.badge-completed { background: var(--fir-soft); color: var(--fir); }
.badge-converted { background: var(--fir-soft); color: var(--fir); }
.badge-cancelled, .badge-declined, .badge-void { background: var(--red-soft); color: var(--red); }
.badge-draft { background: #fff; color: var(--text-2); border-color: var(--rule); }
.badge-archived, .badge-suspended { background: var(--paper-2); color: var(--text-2); }
.badge-active { background: var(--good-soft); color: var(--good); }
.badge-owner { background: var(--fir); color: var(--cream); }
.badge-admin { background: var(--amber-soft); color: #7A4A08; }
.badge-staff { background: var(--paper-2); color: var(--text-2); }
.badge-owner::before, .badge-admin::before, .badge-staff::before { content: none; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1.5px solid var(--rule); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs [role="tab"], .tabs a {
  min-height: var(--tap); padding: 0 16px; background: none; border: 0; border-bottom: 3px solid transparent;
  margin-bottom: -1.5px; font-weight: 700; color: var(--text-2); cursor: pointer; white-space: nowrap;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.tabs [aria-selected="true"], .tabs [aria-current="page"] { color: var(--fir); border-bottom-color: var(--amber); }
.tabs .count { background: var(--paper-2); border-radius: 999px; padding: 0 8px; font-size: .88rem; }

/* ---------- dialogs ---------- */
dialog {
  border: 0; border-radius: var(--radius); padding: 0; width: min(520px, calc(100vw - 24px));
  background: var(--paper-hi); color: var(--text); box-shadow: var(--shadow-lg);
  max-height: calc(100vh - 32px);
}
dialog::backdrop { background: rgba(23, 50, 41, .55); }
/* The body scrolls below a 12px band of the dialog's own paper (a transparent
   top border: it counts in the max height, and the scroll bar starts below
   it), so a line scrolled up is cut off clear of the rounded top edge rather
   than flush against it, where the page behind the backdrop seemed to carry
   it on above the dialog. A page that sets the body's padding keeps its top
   12px short of what it shows (title at 22px here: 12 + 10). */
.dialog-body { padding: 10px 22px 22px; border-top: 12px solid transparent; overflow-y: auto; max-height: calc(100vh - 140px); }
.dialog-body h2 { margin-bottom: 10px; }
.dialog-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--rule-soft); background: var(--cream); flex-wrap: wrap; }
@media (max-width: 599px) {
  dialog.sheet { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: var(--radius) var(--radius) 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .dialog-foot .btn { flex: 1 1 auto; }
}
.secret {
  font: 700 1.25rem/1.3 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .04em;
  background: var(--cream); border: 2px dashed var(--amber); border-radius: var(--radius-sm);
  padding: 12px 14px; text-align: center; user-select: all; word-break: break-all;
}

/* ---------- toasts ---------- */
.toasts {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 100;
  bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(460px, calc(100vw - 24px));
  pointer-events: none;
}
@media (min-width: 900px) { .toasts { bottom: 24px; } }
/* As a popover (top layer): undo the browser's popover box, keep the position above. */
.toasts[popover] { top: auto; right: auto; height: auto; margin: 0; padding: 0; border: 0; background: transparent; overflow: visible; color: inherit; }
.toast {
  pointer-events: auto; width: 100%; padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--fir-deep); color: var(--cream); box-shadow: var(--shadow-lg); font-weight: 600;
  border-left: 5px solid var(--amber); animation: toast-in .2s ease-out;
}
.toast.error { background: #5E2216; border-left-color: #F2A08C; }
.toast.has-action { display: flex; align-items: center; gap: 12px; }
.toast.has-action > span { flex: 1 1 auto; }
.toast-action { flex: none; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--amber); background: transparent; color: var(--amber-soft); font-weight: 700; cursor: pointer; }
.toast-action:hover { background: rgba(226, 149, 46, .18); }

/* beer glasses (glassSVG) */
.glass { display: inline-block; flex: none; }
.glass-sm { width: 22px; height: 39px; }
.glass-md { width: 40px; height: 71px; }
.toast.leaving { opacity: 0; transition: opacity .25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- empty, error, loading ---------- */
.empty { text-align: center; padding: 36px 16px; color: var(--text-2); }
.empty .empty-mark { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; background: var(--amber-soft); display: grid; place-items: center; font-size: 1.6rem; color: var(--amber-deep); }
.empty h3 { color: var(--text); font-family: var(--display); font-size: 1.2rem; font-weight: 650; margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }
.alert { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--amber-soft); border-left: 4px solid var(--amber); }
.alert.error { background: var(--red-soft); border-left-color: var(--red); color: #5E2216; }
.alert.good { background: var(--good-soft); border-left-color: var(--good); }
.skeleton { display: block; height: 1em; border-radius: 6px; background: linear-gradient(90deg, var(--paper-2) 25%, var(--rule-soft) 50%, var(--paper-2) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
.skeleton + .skeleton { margin-top: 10px; }
.skeleton.w60 { width: 60%; } .skeleton.w80 { width: 80%; } .skeleton.w40 { width: 40%; }
.skeleton.block { height: 72px; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton, .btn.is-busy::after, .toast { animation: none; } }

/* ---------- login ---------- */
.login-body {
  min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: var(--fir-deep);
  background-image: radial-gradient(120% 80% at 50% 0%, #2B5B48 0%, var(--fir-deep) 60%);
}
.login-card { width: min(420px, 100%); background: var(--paper-hi); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 28px 24px; border-top: 6px solid var(--amber); }
.login-card .brand { color: var(--fir); margin-bottom: 18px; }
.login-card .brand small { color: var(--red); }
.login-card h1 { margin-bottom: 18px; }

/* ---------- print ---------- */
@media print {
  @page { margin: 14mm; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .topbar, .nav, .tabbar, .toasts, .page-actions, .no-print, dialog { display: none !important; }
  main.wrap { padding: 0; max-width: none; }
  .card { box-shadow: none; border-color: #bbb; break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  .badge { border: 1px solid #999; background: none !important; color: #000 !important; }
}
.login-card > p.muted { margin-top: 18px; text-align: center; }
