/* AOT Office Management — design system
   Primary: #02A0C7 · Text-safe brand: #027A98 · Secondary: #323232
   ============================================================ */

:root {
  /* Brand */
  --brand: #02A0C7;
  --brand-rgb: 2 160 199;
  --brand-600: #028FB2;
  --brand-700: #027A98;
  --brand-800: #02647D;
  --brand-50: #E6F7FB;
  --brand-100: #C2ECF5;
  --brand-contrast: #FFFFFF;
  --brand-tint: rgb(var(--brand-rgb) / 0.10);
  --brand-tint-strong: rgb(var(--brand-rgb) / 0.18);
  --brand-ring: rgb(var(--brand-rgb) / 0.22);
  --brand-border: rgb(var(--brand-rgb) / 0.35);

  /* Secondary (logo) */
  --secondary: #323232;
  --secondary-rgb: 50 50 50;
  --secondary-600: #2B2B2B;
  --secondary-700: #242424;
  --secondary-contrast: #FFFFFF;
  --secondary-soft: #F3F4F6;
  --secondary-border: #D1D5DB;

  /* Neutrals */
  --ink: #0F172A;
  --ink-2: #1E293B;
  --muted: #64748B;
  --muted-2: #94A3B8;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --border: #E2E8F0;
  --border-2: #CBD5E1;

  /* Semantic */
  --success: #16A34A;
  --success-strong: #15803D;
  --success-bg: #DCFCE7;
  --success-border: #86EFAC;
  --warning: #D97706;
  --warning-strong: #B45309;
  --warning-bg: #FEF3C7;
  --warning-border: #FCD34D;
  --danger: #DC2626;
  --danger-hover: #B91C1C;
  --danger-strong: #B91C1C;
  --danger-bg: #FEE2E2;
  --danger-border: #FCA5A5;
  --info: #0284C7;
  --info-bg: #E0F2FE;
  --info-border: #BAE6FD;
  --purple: #7C3AED;
  --purple-bg: #EDE9FE;

  /* Shape */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgb(15 23 42 / 0.06);
  --shadow: 0 4px 16px rgb(15 23 42 / 0.08);
  --shadow-lg: 0 12px 32px rgb(15 23 42 / 0.14);
  --focus-ring: 0 0 0 3px var(--brand-ring);

  /* Type */
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Layout */
  --sidebar-w: 248px;
  --topbar-h: 60px;
  --page-pad: clamp(14px, 2.2vw, 24px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--topbar-h) + 12px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

h1, h2, h3, h4, p, figure {
  margin: 0;
}

h1, h2, h3, h4 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--brand-700);
  text-decoration: none;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--brand);
  text-decoration: underline;
}

img, svg {
  vertical-align: middle;
}

:focus-visible {
  outline: 2px solid var(--brand-700);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: var(--brand-100);
  color: var(--ink);
}

a:focus-visible,
.btn:focus-visible {
  box-shadow: var(--focus-ring);
}

/* ---------------------------------------------------------------- Layout */

.app {
  min-height: 100vh;
}

.app-body {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 12px;
  background: var(--surface);
  color: var(--ink);
  overflow-y: auto;
  border-right: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 18px;
  color: var(--ink);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
  min-width: 0;
}

.brand .brand-logo-wide {
  flex: 0 1 auto;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  overflow: hidden;
}

.brand-mark.brand-logo {
  width: 40px;
  height: 40px;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--border);
}

.brand-mark.brand-logo.brand-logo-wide {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border);
  overflow: hidden;
}

.brand-mark.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.brand-mark.brand-logo.brand-logo-wide img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 42px;
}

.brand small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-label {
  padding: 16px 12px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
}

.nav a:hover {
  background: var(--brand-50);
  color: var(--brand-700);
  text-decoration: none;
}

.nav a.is-active {
  background: var(--brand-tint);
  color: var(--brand-800);
  box-shadow: inset 4px 0 0 var(--brand);
  font-weight: 600;
}

.nav a.is-active svg {
  color: var(--brand);
  opacity: 1;
}

.nav a svg {
  width: 18px;
  height: 18px;
  flex: none;
  opacity: 0.9;
}

.sidebar-foot {
  margin-top: auto;
  padding: 14px 12px 4px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.4vw, 16px);
  padding: 0 var(--page-pad);
  background: rgb(255 255 255 / 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  box-shadow: inset 0 -2px 0 0 var(--brand-100);
}

.topbar-title {
  font-size: clamp(15px, 0.35vw + 0.78rem, 17px);
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-spacer {
  flex: 1 1 auto;
  min-width: 0;
}

.topbar-clock {
  flex: none;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand-800);
  font-weight: 700;
  font-size: 13px;
  overflow: hidden;
}

.avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.avatar.avatar-sm {
  width: 30px;
  height: 30px;
  font-size: 11px;
}

.avatar.avatar-xs {
  width: 22px;
  height: 22px;
  font-size: 9px;
  flex: none;
}

.avatar.avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 20px;
}

.employee-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.employee-name-text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.avatar-upload {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.avatar.avatar-preview {
  width: 88px;
  height: 88px;
  flex: none;
  font-size: 26px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.avatar-file {
  display: grid;
  gap: 8px;
  flex: 1 1 280px;
  min-width: 0;
}

/* Click-to-pick / drag-and-drop surface. The real file input is visually
   hidden but focusable; the label forwards clicks and Enter/Space to it. */
.avatar-drop {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px dashed var(--border-2);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.avatar-drop:hover {
  border-color: var(--brand);
  background: var(--brand-50);
}

.avatar-drop.is-dragover {
  border-color: var(--brand-700);
  background: var(--brand-50);
  box-shadow: 0 0 0 3px var(--brand-100);
}

.avatar-file input:focus-visible + .avatar-drop {
  outline: 2px solid var(--brand-700);
  outline-offset: 2px;
}

.field.has-error .avatar-drop {
  border-color: var(--danger);
  background: var(--danger-bg);
}

.avatar-drop-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--brand-700);
}

.avatar-drop-copy {
  display: grid;
  gap: 3px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
}

.avatar-drop-copy strong {
  color: var(--ink);
  font-weight: 600;
}

.avatar-drop-meta {
  font-size: 12px;
  color: var(--muted);
}

.avatar-drop kbd {
  padding: 0 4px;
  border: 1px solid var(--border-2);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--surface);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-2);
}

/* Chip showing the file that will actually be posted. */
.avatar-selected {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 12px;
}

.avatar-selected[hidden] {
  display: none;
}

.avatar-selected-icon {
  display: grid;
  place-items: center;
  color: var(--brand-700);
}

.avatar-selected-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--ink-2);
}

.avatar-selected-size {
  flex: none;
  color: var(--muted);
  white-space: nowrap;
}

.avatar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.avatar-remove {
  margin: 0;
}

.user-meta {
  line-height: 1.2;
}

.user-meta strong {
  display: block;
  font-size: 13px;
}

.user-meta span {
  font-size: 11px;
  color: var(--muted);
}

/* Hidden by default: on desktop the sidebar is already visible, so the
   hamburger only appears once the sidebar collapses into a drawer (≤960px).
   The .btn qualifier is required to out-rank .btn's display rule, which is
   declared later in this file. */
.btn.sidebar-toggle {
  display: none;
}

/* Brand row: logo left, close control right (drawer mode only). */
.sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.btn.sidebar-close {
  display: none;
  margin-top: 3px;
  margin-left: auto;
}

.btn.sidebar-close svg {
  width: 18px;
  height: 18px;
}

.content {
  width: 100%;
  margin: 0 auto;
  padding: var(--page-pad);
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  margin-bottom: clamp(14px, 2vw, 20px);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  box-shadow: inset 0 -2px 0 0 var(--brand-100);
}

.page-head > div:first-child {
  flex: 1 1 320px;
  min-width: 0;
}

.page-head h1 {
  font-size: clamp(20px, 0.5vw + 0.92rem, 25px);
  line-height: 1.2;
  color: var(--secondary);
  overflow-wrap: break-word;
}

.page-head p {
  margin-top: 4px;
  max-width: 80ch;
  color: var(--muted);
  font-size: clamp(13px, 0.12vw + 0.78rem, 14px);
  line-height: 1.5;
}

.page-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 0 1 auto;
}

.page-actions .btn {
  flex: 0 1 auto;
}

/* ------------------------------------------------------------------ Grid */

.grid {
  display: grid;
  gap: clamp(12px, 1.4vw, 16px);
}

/* Auto-fit keeps every dashboard/report panel readable without forcing an
   awkward 4 → 2 → 1 staircase at arbitrary breakpoints. */
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 195px), 1fr)); }

.stack {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.4vw, 16px);
  min-width: 0;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

/* ----------------------------------------------------------------- Cards */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border-top: 2px solid var(--brand-100);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.card:hover {
  border-top-color: var(--brand);
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
  padding: clamp(12px, 1.4vw, 16px) clamp(14px, 1.8vw, 20px);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg) 0%, transparent 100%);
}

.card-head h2,
.card-head h3 {
  font-size: clamp(14px, 0.2vw + 0.82rem, 15px);
  font-weight: 600;
  color: var(--secondary);
  min-width: 0;
}

.card-head .muted {
  font-size: 12px;
}

.card-body {
  padding: clamp(14px, 1.8vw, 20px);
  min-width: 0;
}

.card-foot {
  padding: clamp(12px, 1.5vw, 14px) clamp(14px, 1.8vw, 20px);
  border-top: 1px solid var(--border);
  background: var(--bg);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.stat {
  padding: clamp(14px, 1.6vw, 18px) clamp(14px, 1.8vw, 20px);
}

.stat-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-value {
  margin-top: 6px;
  font-size: clamp(23px, 1.8vw + 0.75rem, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.stat-foot {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.stat.is-brand {
  background: linear-gradient(135deg, var(--brand-600), var(--brand));
  border-color: transparent;
  border-top-color: var(--brand-800);
  color: var(--brand-contrast);
}

.stat.is-brand .stat-label,
.stat.is-brand .stat-foot {
  color: rgb(255 255 255 / 0.78);
}

/* -------------------------------------------------------------- Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  max-width: 100%;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 120ms ease, border-color 120ms ease, transform 60ms ease;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn[disabled],
.btn.is-disabled,
.btn.is-loading {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--brand);
  color: var(--brand-contrast);
  border-color: var(--brand);
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.15) inset;
}

.btn-primary:hover {
  background: var(--brand-600);
  border-color: var(--brand-600);
}

.btn-primary:active {
  background: var(--brand-700);
}

.btn-secondary {
  background: var(--secondary);
  border-color: var(--secondary);
  color: var(--secondary-contrast);
}

.btn-secondary:hover {
  background: var(--secondary-600);
  border-color: var(--secondary-600);
}

.btn-secondary:active {
  background: var(--secondary-700);
}

.btn-secondary.btn-block {
  background: var(--surface);
  border-color: var(--secondary);
  color: var(--secondary);
}

.btn-secondary.btn-block:hover {
  background: var(--secondary-soft);
  border-color: var(--secondary-700);
  color: var(--secondary-700);
}

.btn-secondary.btn-block:active {
  background: #E5E7EB;
}

.btn-ghost {
  background: transparent;
  color: var(--secondary);
}

.btn-ghost:hover {
  background: var(--secondary-soft);
  color: var(--secondary-700);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: var(--danger-hover);
}

.btn-sm {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

/* ---------------------------------------------------------------- Forms */

.form-grid {
  display: grid;
  gap: clamp(12px, 1.5vw, 16px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.form-grid .full {
  grid-column: 1 / -1;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field > label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

.field .hint {
  font-size: 12px;
  color: var(--muted);
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

.textarea {
  min-height: 104px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--brand-700);
  box-shadow: var(--focus-ring);
}

/* Custom select: strip the native OS chrome and draw our own chevron so the
   control matches the rest of the design system on every browser. */
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2364748B' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 7.75 10 12.25l4.5-4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px 16px;
  cursor: pointer;
  text-overflow: ellipsis;
  transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.select:hover:not(:focus) {
  border-color: var(--brand-border);
}

.select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23027A98' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 7.75 10 12.25l4.5-4.5'/%3E%3C/svg%3E");
}

.select:disabled,
.select[disabled] {
  cursor: not-allowed;
  opacity: 0.65;
  background-color: var(--bg);
}

.select::-ms-expand {
  display: none;
}

.select option {
  padding: 8px;
  color: var(--ink);
  background: var(--surface);
}

/* ------------------------------------------------ Custom select (JS) */

/* Enhance <select data-custom-select> into a fully styled listbox. The native
   select stays in the DOM as the form value (and the no-JS fallback); the
   trigger/menu below are pure presentation. */

.cs {
  position: relative;
  width: 100%;
  min-width: 0;
}

/* Visually hidden but still submitted with the form. */
.cs-native {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.cs-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.cs-trigger:hover {
  border-color: var(--brand-border);
}

.cs-trigger:focus-visible,
.cs.is-open .cs-trigger {
  outline: none;
  border-color: var(--brand-700);
  box-shadow: var(--focus-ring);
}

.cs-trigger:disabled,
.cs-trigger[disabled] {
  cursor: not-allowed;
  opacity: 0.65;
  background: var(--bg);
}

.cs-value {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cs-chevron {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: var(--muted);
  transition: transform 150ms ease, color 150ms ease;
}

.cs-chevron svg {
  display: block;
  width: 100%;
  height: 100%;
}

.cs.is-open .cs-chevron {
  transform: rotate(180deg);
  color: var(--brand-700);
}

.cs-menu {
  position: absolute;
  z-index: 70;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  max-height: min(280px, 45vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  animation: cs-pop 120ms ease-out;
}

/* Opens upward when the trigger sits near the bottom of the viewport. */
.cs.is-up .cs-menu {
  top: auto;
  bottom: calc(100% + 6px);
}

@keyframes cs-pop {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cs-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  scroll-margin: 6px;
}

.cs-option:hover,
.cs-option:focus-visible {
  outline: none;
  background: var(--brand-tint);
  color: var(--brand-800);
}

.cs-option[aria-selected="true"] {
  background: var(--brand-tint);
  color: var(--brand-800);
  font-weight: 600;
}

.cs-option-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cs-check {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: var(--brand-700);
  opacity: 0;
}

.cs-check svg {
  display: block;
  width: 100%;
  height: 100%;
}

.cs-option[aria-selected="true"] .cs-check {
  opacity: 1;
}

.cs-option[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}

.field.has-error .input,
.field.has-error .select,
.field.has-error .textarea,
.field.has-error .cs-trigger {
  border-color: var(--danger);
}

.field-error {
  font-size: 12px;
  color: var(--danger);
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.weekday-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  padding: 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--brand-700);
}

/* --------------------------------------------------------------- Tables */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.table-wrap:focus-within {
  outline: none;
}

.card > .table-wrap:first-child .table thead tr:first-child th:first-child {
  border-top-left-radius: calc(var(--radius-lg) - 3px);
}

.card > .table-wrap:first-child .table thead tr:first-child th:last-child {
  border-top-right-radius: calc(var(--radius-lg) - 3px);
}

.card-head + .table-wrap .table thead tr:first-child th:first-child,
.card-head + .table-wrap .table thead tr:first-child th:last-child {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  position: sticky;
  top: 0;
  padding: clamp(8px, 1vw, 10px) clamp(10px, 1.3vw, 16px);
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-800);
  background: var(--brand-50);
  border-bottom: 2px solid var(--brand-100);
  white-space: nowrap;
}

.table td {
  padding: clamp(9px, 1.2vw, 12px) clamp(10px, 1.3vw, 16px);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  overflow-wrap: break-word;
}

.table tbody tr:hover {
  background: var(--brand-50);
}

.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table-empty {
  padding: 36px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* ------------------------------------------- Attendance tracking switch */

.attendance-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.attendance-stat {
  min-width: 84px;
}

.switch-form {
  display: inline-flex;
  margin: 0;
}

.switch {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 22px;
  padding: 0;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  background: var(--border);
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 150ms ease;
}

.switch:hover {
  border-color: var(--brand-border);
}

.switch:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.switch.is-on {
  background: var(--brand);
  border-color: var(--brand);
}

.switch.is-on::after {
  transform: translateX(16px);
}

/* --------------------------------------------------------------- Badges */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.badge-slate { background: #F1F5F9; color: #475569; }
.badge-green { background: var(--success-bg); color: #15803D; }
.badge-amber { background: var(--warning-bg); color: #B45309; }
.badge-red { background: var(--danger-bg); color: #B91C1C; }
.badge-blue { background: var(--info-bg); color: #0369A1; }
.badge-purple { background: var(--purple-bg); color: #6D28D9; }
.badge-brand { background: var(--brand); color: var(--brand-contrast); }

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

/* --------------------------------------------------------------- Alerts */

.alert {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 14px;
}

.alert-success { background: var(--success-bg); border-color: var(--success-border); color: #166534; }
.alert-error { background: var(--danger-bg); border-color: var(--danger-border); color: #991B1B; }
.alert-warning { background: var(--warning-bg); border-color: var(--warning-border); color: #92400E; }
.alert-info { background: var(--info-bg); border-color: var(--info-border); color: #075985; }

/* ---------------------------------------------------------------- Toast */

.toasts {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  animation: toast-in 160ms ease-out;
}

.toast.is-success { border-left: 4px solid var(--success); }
.toast.is-error { border-left: 4px solid var(--danger); }
.toast.is-warning { border-left: 4px solid var(--warning); }
.toast.is-info { border-left: 4px solid var(--info); }

.toast button {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* -------------------------------------------------------------- Empty UI */

.empty {
  padding: 44px 20px;
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 22px;
}

.empty h3 {
  font-size: 15px;
}

.empty p {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------------------------------------------------------- Auth screens */

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 24px);
  background:
    radial-gradient(1000px 500px at 90% -10%, var(--brand-100), transparent 60%),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: clamp(20px, 5vw, 28px);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 22px;
}

.auth-brand .brand-mark.brand-logo {
  width: 44px;
  height: 44px;
}

.auth-brand .brand-mark.brand-logo.brand-logo-wide {
  width: auto;
  height: auto;
  max-width: 100%;
  padding: 8px 12px;
}

.auth-brand .brand-mark.brand-logo.brand-logo-wide img {
  max-height: 48px;
}

.auth-card h1 {
  font-size: 20px;
  margin-bottom: 4px;
}

.auth-card .sub {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 20px;
}

.auth-foot {
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ----------------------------------------------------------------- Error */

.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
}

/* Same block, swapped inside the app shell on boosted navigation. */
.error-page.is-inline {
  min-height: 60vh;
}

.error-code {
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  color: var(--brand-700);
  letter-spacing: -0.04em;
}

.error-page h1 {
  margin-top: 10px;
  font-size: 20px;
}

.error-page p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------------------------------------------------------------- station */

.station {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 520px at 50% -12%, var(--brand-tint), transparent 72%),
    var(--bg);
  color: var(--ink);
}

.station-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(10px, 1.6vw, 16px);
  padding: clamp(12px, 2.2vw, 18px) clamp(14px, 3vw, 28px);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 3px 0 0 var(--brand);
}

.station-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.station-head .brand-mark.brand-logo {
  width: 52px;
  height: 52px;
  padding: 5px;
}

.station-head .brand-mark.brand-logo.brand-logo-wide {
  width: auto;
  height: auto;
  max-width: min(340px, 40vw);
  padding: 8px 12px;
}

.station-head .brand-mark.brand-logo.brand-logo-wide img {
  max-height: 46px;
}

.station-clock {
  font-family: var(--mono);
  font-size: clamp(26px, 5vw, 40px);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--brand);
  white-space: nowrap;
}

.station-date {
  color: var(--muted);
  font-size: 14px;
}

.station-body {
  flex: 1;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 28px);
}

.station-panel {
  width: 100%;
  max-width: 700px;
  padding: clamp(20px, 3.6vw, 32px) clamp(16px, 3vw, 28px);
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

/* Idle prompt: a soft pulsing reader above the headline. */

.station-stage {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.station-reader {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(88px, 13vw, 112px);
  height: clamp(88px, 13vw, 112px);
  margin-bottom: 10px;
  border-radius: 50%;
  color: var(--brand-700);
  background: radial-gradient(circle at 50% 32%, var(--brand-100), var(--brand-50) 68%);
  border: 1px solid var(--brand-border);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.7);
}

.station-reader-icon {
  width: 46%;
  height: 46%;
}

.station-reader-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--brand);
  opacity: 0;
  animation: station-pulse 3s ease-out infinite;
}

.station-reader-pulse--late {
  animation-delay: 1.5s;
}

@keyframes station-pulse {
  0% {
    transform: scale(0.94);
    opacity: 0.5;
  }
  70% {
    opacity: 0;
  }
  100% {
    transform: scale(1.38);
    opacity: 0;
  }
}

.station-prompt {
  font-size: clamp(24px, 3.4vw, 32px);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--ink);
}

.station-hint {
  max-width: 46ch;
  margin: 6px auto 0;
  color: var(--muted);
  font-size: 14px;
}

.station-form {
  margin-top: clamp(16px, 2.6vw, 22px);
}

.station-input-wrap {
  position: relative;
}

.station-input-icon {
  position: absolute;
  top: 50%;
  left: 18px;
  width: 24px;
  height: 24px;
  transform: translateY(-50%);
  color: var(--muted-2);
  pointer-events: none;
  transition: color 120ms ease;
}

.station-input-wrap:focus-within .station-input-icon {
  color: var(--brand);
}

.station-input {
  width: 100%;
  height: clamp(54px, 8vw, 62px);
  padding: 0 20px 0 54px;
  border: 2px solid var(--border-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--mono);
  font-size: clamp(16px, 2.2vw, 20px);
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.station-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-ring);
}

.station-input::placeholder {
  color: var(--muted);
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: none;
}

.station-input-hint {
  margin: 10px 0 0;
}

.station-result {
  margin-top: clamp(16px, 2.6vw, 22px);
}

/* ------------------------------------------------------------ scan result */

.scan-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: clamp(14px, 2vw, 18px);
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--border-2);
  border-radius: var(--radius-lg);
  background: var(--bg);
  text-align: left;
  animation: scan-in 220ms ease-out;
}

@keyframes scan-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Placeholder shown before the first scan of the session. */

.scan-idle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px dashed var(--border-2);
  border-radius: var(--radius-lg);
  background: var(--bg);
  color: var(--muted);
  font-size: 13px;
  text-align: left;
}

.scan-idle svg {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  color: var(--muted-2);
}

.scan-card.is-success {
  border-color: var(--success-border);
  border-left-color: var(--success);
  background: linear-gradient(100deg, var(--success-bg), var(--surface) 78%);
}

.scan-card.is-warning {
  border-color: var(--warning-border);
  border-left-color: var(--warning);
  background: linear-gradient(100deg, var(--warning-bg), var(--surface) 78%);
}

.scan-card.is-error {
  border-color: var(--danger-border);
  border-left-color: var(--danger);
  background: linear-gradient(100deg, var(--danger-bg), var(--surface) 78%);
}

.scan-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border), var(--shadow-sm);
}

.scan-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.scan-avatar-empty {
  color: var(--muted-2);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--border);
}

.scan-avatar-empty svg {
  width: 40%;
  height: 40%;
}

.scan-card.is-warning .scan-avatar-empty {
  color: var(--warning-strong);
  background: var(--warning-bg);
  box-shadow: 0 0 0 1px var(--warning-border);
}

.scan-card.is-error .scan-avatar-empty {
  color: var(--danger-strong);
  background: var(--danger-bg);
  box-shadow: 0 0 0 1px var(--danger-border);
}

/* Initials fallback follows the result colour, so the tile still reads as
   success / warning / error when the employee has no photo. */

.scan-card.is-warning .scan-avatar:not(.scan-avatar-empty) {
  background: var(--warning-bg);
  color: var(--warning-strong);
}

.scan-card.is-error .scan-avatar:not(.scan-avatar-empty) {
  background: var(--danger-bg);
  color: var(--danger-strong);
}

.scan-avatar-initials {
  font-size: 30px;
}

/* Small status seal on the photo corner. */

.scan-mark {
  position: absolute;
  right: -2px;
  bottom: -2px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--success);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.scan-mark svg {
  width: 16px;
  height: 16px;
}

.scan-card.is-warning .scan-mark {
  background: var(--warning);
}

.scan-card.is-error .scan-mark {
  background: var(--danger);
}

.scan-body {
  min-width: 0;
}

.scan-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--success-bg);
  color: var(--success-strong);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.scan-card.is-warning .scan-status {
  background: var(--warning-bg);
  color: var(--warning-strong);
}

.scan-card.is-error .scan-status {
  background: var(--danger-bg);
  color: var(--danger-strong);
}

.scan-name {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}

.scan-role {
  margin-top: 2px;
  font-size: 14px;
  color: var(--ink-2);
}

.scan-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.station-recent {
  padding: 14px 28px 22px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
  background: var(--surface);
}

.station-shift {
  color: var(--ink-2);
  font-size: 14px;
}

.station-shift .tiny {
  display: block;
  margin-top: 2px;
}

.station-exit {
  margin-left: auto;
}

.station-recent-head {
  gap: 10px;
  padding-bottom: 6px;
}

.station-feed {
  display: grid;
  gap: 2px;
  margin-top: 4px;
}

.station-feed-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.station-feed-row:last-child {
  border-bottom: 0;
}

.station-feed-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--brand-50);
  border: 1px solid var(--border);
  color: var(--brand-700);
  font-size: 11px;
  font-weight: 700;
}

.station-feed-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.station-feed-avatar.is-unknown {
  background: var(--surface);
  color: var(--muted-2);
}

.station-feed-name {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: var(--ink);
}

.station-feed-name strong {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.station-feed-role {
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.station-feed-time {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

/* ------------------------------------------------------------- Calendar */

.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-head {
  padding: 4px 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cal-cell {
  min-height: clamp(58px, 9vw, 78px);
  padding: clamp(4px, 0.9vw, 6px) clamp(4px, 1.1vw, 8px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: clamp(11px, 0.9vw, 12px);
  min-width: 0;
  overflow: hidden;
}

.cal-cell.is-empty {
  border-color: transparent;
  background: transparent;
}

.cal-cell.is-weekend {
  background: var(--bg);
}

.cal-cell.is-holiday {
  background: var(--warning-bg);
  border-color: var(--warning-border);
}

.cal-cell.is-future {
  opacity: 0.55;
}

.cal-cell.is-before-start {
  opacity: 0.4;
  background: var(--bg);
}

.cal-cell.is-today {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-tint-strong);
}

.cal-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.cal-daynum {
  font-weight: 700;
  font-size: 13px;
}

.cal-note {
  margin-top: 5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ------------------------------------------------ Month-by-month trend */

.trend {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trend-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 140px;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  color: inherit;
  text-decoration: none;
}

.trend-row:hover {
  background: var(--brand-50);
}

.trend-row.is-selected {
  background: var(--brand-tint);
  box-shadow: inset 0 0 0 1px var(--brand-border);
}

.trend-month {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  white-space: nowrap;
}

.trend-bar {
  display: flex;
  gap: 1px;
  height: 14px;
  border-radius: 5px;
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--border);
  overflow: hidden;
}

.trend-seg {
  display: block;
  height: 100%;
}

.seg-present { background: var(--success); }
.seg-late { background: var(--warning); }
.seg-half { background: #FBBF24; }
.seg-early { background: #F59E0B; }
.seg-absent { background: var(--danger); }

.trend-stat {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

@media (max-width: 720px) {
  .trend-row {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .trend-stat {
    display: none;
  }
}

/* ---------------------------------------------------------------- Tasks */

.progress {
  height: 8px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-600), var(--brand));
  transition: width 200ms ease;
}

.progress-sm {
  height: 5px;
  margin-top: 8px;
}

/* Move-to / progress form: the two controls share one row when there is room,
   collapse to a single column on narrow cards, and the button never shrinks
   into an unreadable sliver. */
.workflow-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  gap: 12px;
  align-items: end;
}

.workflow-form > .field {
  min-width: 0;
}

.workflow-form > .btn {
  grid-column: 1 / -1;
  justify-self: start;
}

/* Percentage chip that sits in the "Progress & workflow" card head. */
.progress-value {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  background: var(--brand-tint);
  color: var(--brand-700);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

@media (max-width: 480px) {
  .workflow-form {
    grid-template-columns: 1fr;
  }

  .workflow-form > .btn {
    justify-self: stretch;
    width: 100%;
    min-height: 44px;
  }
}

/* Collapsible audit trail under the workflow form: every status move, so a
   send-back from review stays visible instead of disappearing. */
.workflow-history {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.workflow-history > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.workflow-history > summary::-webkit-details-marker {
  display: none;
}

.workflow-history > summary::before {
  content: "▸";
  font-size: 11px;
  transition: transform 120ms ease;
}

.workflow-history[open] > summary::before {
  transform: rotate(90deg);
}

.workflow-history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.workflow-history-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

.check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

/* Filter bars with data-autofilter submit themselves, so the Filter button is
   only needed when JavaScript is unavailable. */
[data-autofilter].is-auto .btn[type="submit"] {
  display: none;
}

/* Phones get a collapsible filter bar so a full stack of selects never pushes
   the list off-screen. app.js inserts the summary row and the is-collapsible
   class, so no-JS visitors keep the whole bar, and desktop never hides it. */
.filter-head {
  display: none;
}

@media (max-width: 640px) {
  .filter-head {
    display: block;
  }

  [data-autofilter].is-collapsible > .card-body {
    display: none;
  }

  [data-autofilter].is-collapsible.is-open > .card-body {
    display: block;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }

  .filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 0;
    border-radius: var(--radius-lg);
    background: none;
    color: var(--ink-2);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    touch-action: manipulation;
  }

  .filter-toggle:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
  }

  .filter-toggle-label {
    flex: 1;
  }

  .filter-toggle-count {
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--brand-50);
    color: var(--brand-700);
    font-size: 11px;
    font-weight: 700;
  }

  .filter-toggle-chevron::before {
    content: "▾";
    display: block;
    font-size: 12px;
    color: var(--muted);
    transition: transform 120ms ease;
  }

  [data-autofilter].is-open .filter-toggle-chevron::before {
    transform: rotate(180deg);
  }
}

/* Kanban */

/* Status tabs for phones. The bar stays hidden until app.js marks the board
   shell as tabbed, so desktop and no-JS visitors keep the column layout. */
.board-tabs {
  display: none;
}

.board-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

.board-tab:hover {
  border-color: var(--border-2);
}

.board-tab[aria-pressed="true"] {
  border-color: var(--brand-border);
  background: var(--brand-50);
  color: var(--brand-700);
}

.board-tab:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.board-tab-count {
  flex: none;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.board-tab[aria-pressed="true"] .board-tab-count {
  background: var(--surface);
  color: var(--brand-700);
}

.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: clamp(8px, 1vw, 12px);
  align-items: start;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  padding-bottom: 8px;
}

.board-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 170px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  scroll-snap-align: start;
}

.board-col-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.board-count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.board-drop {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  min-height: 110px;
  padding: 10px;
}

.board-drop.is-over {
  background: var(--brand-50);
  outline: 2px dashed var(--brand);
  outline-offset: -4px;
  border-radius: var(--radius);
}

/* Columns the dragged card cannot move to. */
.board-col.is-disabled { opacity: 0.45; }
.board-col.is-disabled .board-drop { cursor: not-allowed; }

.task-card {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  cursor: grab;
}

.task-card:active { cursor: grabbing; }
.task-card.is-dragging { opacity: 0.5; }
.task-card.is-overdue { border-left-color: var(--danger); }
.task-card.is-static { cursor: default; }

.task-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}

.task-card-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.task-card-title:hover {
  color: var(--brand-700);
  text-decoration: underline;
}

/* A card is dragged, not clicked, so opening it is an explicit action: the
   title link and this footer link both lead to the task page. */
.task-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.task-card-details {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--brand-700);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.task-card-details:hover {
  background: var(--brand-50);
  text-decoration: underline;
}

.task-card-details:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.task-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

/* Assignee: photo (or initials) next to the name, so the card reads like a
   person rather than a plain string. */
.task-card-person {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.task-card-person-name {
  max-width: 130px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink-2);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-card-person.is-empty .avatar {
  border: 1px dashed var(--border-2);
  background: transparent;
  color: var(--muted-2);
}

.task-card-person.is-empty .task-card-person-name {
  font-weight: 500;
  color: var(--muted);
}

/* Who assigned the card. Cross-department assignments are called out so a
   Head opening another department's queue knows where the work came from. */
.task-card-assign {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.board-empty {
  padding: 12px 4px;
  text-align: center;
}

/* Done column footer: the board only keeps recent completions, the archive
   page has the rest. */
.board-more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 8px;
  padding: 6px 2px 0;
  border-top: 1px dashed var(--border);
}

/* Task detail */

.meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 0;
}

.meta-list > div { min-width: 0; }

.meta-list dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta-list dd {
  margin: 2px 0 0;
  font-size: 14px;
}

.prose {
  font-size: 14px;
  line-height: 1.6;
}

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.comment {
  padding-left: 12px;
  border-left: 3px solid var(--brand-100);
}

.comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}

.comment-body {
  margin-top: 3px;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* -------------------------------------------------- Task daily checklist */

.work-log-score {
  margin-left: auto;
}

.work-log-form {
  padding: 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.work-log-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.work-log-body-field {
  flex: 1 1 260px;
  min-width: 0;
}

.work-log-form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.work-log-days {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.work-log-day-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border);
}

.work-log-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.work-log-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  background: var(--brand-tint);
}

.work-log-toggle {
  display: flex;
  padding-top: 2px;
}

.work-log-toggle input {
  width: 17px;
  height: 17px;
  cursor: pointer;
  accent-color: var(--brand);
}

.work-log-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border: 2px solid var(--brand-300, var(--brand-100));
  border-radius: 50%;
  background: transparent;
}

.work-log-dot.is-done {
  border-color: var(--brand-600);
  background: var(--brand-600);
}

.work-log-text {
  flex: 1 1 auto;
  min-width: 0;
}

.work-log-body {
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.work-log-item.is-done .work-log-body {
  color: var(--muted);
  text-decoration: line-through;
}

.work-log-remove {
  flex: 0 0 auto;
}

.work-log-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
}

.work-log-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

.work-log-edit-btn:hover {
  background: color-mix(in srgb, var(--brand) 12%, transparent);
  color: var(--brand-600);
}

/* The hidden checkbox drives the inline editor: clicking the pencil (or
   Cancel) toggles it, and the form below the line appears while checked. */
.work-log-edit-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.work-log-edit-form {
  display: none;
  margin-top: 8px;
}

.work-log-item:has(.work-log-edit-toggle:checked) .work-log-edit-form {
  display: block;
}

.work-log-edit-toggle:focus-visible ~ .work-log-actions .work-log-edit-btn {
  outline: 2px solid var(--brand-600);
  outline-offset: 1px;
}

.work-log-edit-form textarea {
  width: 100%;
  min-height: 58px;
  resize: vertical;
}

.work-log-edit-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.work-log-remove-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.work-log-remove-btn:hover {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
  padding: 0 0 0 6px;
  list-style: none;
}

.timeline-item {
  display: flex;
  gap: 10px;
}

.timeline-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-50);
}

/* ------------------------------------------------------------ Utilities */

.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.strong { font-weight: 600; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.hidden { display: none !important; }
[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;
}

.audit-meta {
  max-width: 520px;
  max-height: 260px;
  overflow: auto;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  white-space: pre-wrap;
  word-break: break-word;
}

/* --------------------------------------------------------- HTMX helpers */

/* Slim GitHub-style progress bar shown during boosted navigation. */
.page-progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 200;
  height: 2px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 120ms ease;
}

.page-progress span {
  display: block;
  width: 35%;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--brand-700));
  transform: translateX(-100%);
}

.page-progress.htmx-request {
  opacity: 1;
}

.page-progress.htmx-request span {
  animation: page-progress 800ms ease-in-out infinite;
}

@keyframes page-progress {
  from { transform: translateX(-100%); }
  to { transform: translateX(320%); }
}

/* Dim stale content only when the swap is slow (JS adds .is-loading). */
#content {
  transition: opacity 140ms ease;
}

#content.is-loading {
  opacity: 0.55;
  pointer-events: none;
}

.htmx-indicator {
  display: none;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: inline-flex;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 600ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.htmx-request.btn,
.btn.htmx-request {
  opacity: 0.7;
  pointer-events: none;
}

/* -------------------------------------------------------------- Responsive */

/* Large tablets / small laptops */
@media (max-width: 1120px) {
  .board {
    grid-template-columns: repeat(4, minmax(230px, 1fr));
  }
}

/* Wide desktops have enough room for all four columns without a scrollbar. */
@media (min-width: 1300px) {
  .board {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Tablet: the sidebar becomes a drawer and the content takes the full width,
   which is what the task board and the wide reports need most. */
@media (max-width: 960px) {
  .app-body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: min(82vw, 280px);
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  body.nav-open .sidebar {
    transform: none;
    box-shadow: var(--shadow-lg);
  }

  body.nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgb(15 23 42 / 0.4);
  }

  .btn.sidebar-toggle {
    display: inline-flex;
  }

  .btn.sidebar-close {
    display: inline-flex;
  }

  .user-meta {
    display: none;
  }

  .board {
    grid-template-columns: repeat(4, minmax(220px, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar-clock {
    display: none;
  }

  .page-head {
    align-items: flex-start;
  }

  .page-head > div:first-child {
    flex-basis: 100%;
  }

  .page-actions {
    margin-left: 0;
  }

  .page-actions .btn {
    flex: 1 1 auto;
  }

  .trend-row {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .trend-stat {
    display: none;
  }

  .station-recent {
    padding: 12px 16px 18px;
  }
}

@media (max-width: 640px) {
  .content {
    padding: 14px;
  }

  /* Filter bars: every control gets a full row instead of squeezing into
     unreadable 100px columns. The inline flex-basis in the views is
     intentionally overridden here. */
  .card-body > .row > .field {
    flex: 1 1 100% !important;
  }

  .card-body > .row > .btn {
    flex: 1 1 auto;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  /* 16px stops iOS Safari from zooming the page when a field is focused. */
  .input,
  .select,
  .textarea {
    font-size: 16px;
  }

  /* Comfortable touch target for dropdowns on phones. */
  .select {
    min-height: 44px;
    padding-right: 44px;
    background-position: right 14px center;
  }

  .cs-trigger {
    min-height: 44px;
    font-size: 16px;
  }

  .cs-option {
    min-height: 44px;
    font-size: 15px;
  }

  /* Tables scroll horizontally instead of squeezing every cell into a
     three-line stack. The first column keeps wrapping so the primary name or
     task stays readable while the rest stays on one line. */
  .table {
    font-size: 13px;
  }

  .table th,
  .table td {
    white-space: nowrap;
  }

  .table td:first-child,
  .table th:first-child {
    white-space: normal;
    min-width: 128px;
  }

  .month-nav {
    flex-wrap: wrap;
    row-gap: 6px;
  }

  .month-nav > .text-center {
    order: -1;
    flex: 1 0 100%;
    margin-bottom: 2px;
  }

  .month-nav > a,
  .month-nav > span {
    flex: 1 1 auto;
    justify-content: center;
  }

  .month-nav .btn {
    font-size: 12px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .meta-list {
    grid-template-columns: 1fr;
  }

  .calendar {
    gap: 4px;
  }

  .cal-cell {
    min-height: 64px;
    padding: 4px;
  }

  .cal-top {
    gap: 2px;
  }

  .cal-top .badge {
    font-size: 9px;
    padding: 2px 5px;
  }

  .cal-daynum {
    font-size: 12px;
  }

  .cal-note,
  .badge {
    font-size: 11px;
  }

  .board {
    grid-auto-flow: column;
    grid-auto-columns: min(86vw, 340px);
    grid-template-columns: none;
    scroll-snap-type: x mandatory;
  }

  .board-col {
    scroll-snap-align: start;
  }

  /* With JS, phones show a 2×2 tap bar and one full-width column instead of
     the swipe carousel. Switching back to a wider screen restores the grid. */
  .board-shell.is-tabbed .board-tabs {
    position: sticky;
    top: var(--topbar-h);
    z-index: 19;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 10px;
    padding: 6px 0;
    background: var(--bg);
  }

  .board-shell.is-tabbed .board {
    display: block;
    overflow: visible;
    scroll-snap-type: none;
  }

  .board-shell.is-tabbed .board-col {
    display: none;
  }

  .board-shell.is-tabbed .board-col.is-active {
    display: flex;
  }

  .toasts {
    left: 12px;
    right: 12px;
    max-width: none;
  }

  .scan-card {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .scan-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    font-size: 22px;
  }

  .scan-avatar-initials {
    font-size: 22px;
  }

  .scan-mark {
    width: 24px;
    height: 24px;
  }

  .scan-mark svg {
    width: 13px;
    height: 13px;
  }

  .scan-name {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .page-head h1 {
    font-size: 19px;
  }

  .page-head p {
    font-size: 13px;
  }

  /* Two compact stat cards per row beats four full-width blocks. */
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-actions {
    width: 100%;
  }

  .page-actions .btn {
    flex: 1 1 calc(50% - 4px);
  }

  .page-actions .btn:only-child {
    flex-basis: 100%;
  }

  /* A lone Cancel/ghost link stays a compact pill instead of turning into a
     full-width dark bar above the form. */
  .page-actions .btn-secondary:only-child,
  .page-actions .btn-ghost:only-child {
    flex: 0 1 auto;
    margin-left: auto;
  }

  .card-head,
  .card-body {
    padding-left: 14px;
    padding-right: 14px;
  }

  .stat-value {
    font-size: 26px;
  }

  .avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .auth-card {
    padding: 20px 16px;
  }

  .error-code {
    font-size: 52px;
  }

  .station-head {
    gap: 10px;
  }

  .scan-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .scan-avatar {
    width: 84px;
    height: 84px;
    margin: 0 auto;
  }

  .scan-avatar-initials {
    font-size: 26px;
  }

  .station-input::placeholder {
    font-size: 15px;
  }
}

@media (max-width: 360px) {
  .board {
    grid-auto-columns: 90vw;
  }

  .cal-cell {
    min-height: 58px;
  }

  .cal-note {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .sidebar,
  .topbar,
  .page-actions,
  .btn,
  .toasts,
  form.card,
  .sidebar-toggle {
    display: none !important;
  }

  .app-body {
    grid-template-columns: 1fr;
  }

  .content {
    padding: 0;
  }

  .card {
    box-shadow: none;
    break-inside: avoid;
  }

  a[href]::after {
    content: "";
  }
}
