/* Hand-rolled, no framework/build step. Mobile-first, single 1200px-max column container.
   Light theme is the default; [data-theme="dark"] on <html> overrides the same variables.
   Palette/type/shadow tokens below come from the "Artwork conservation studio app" design
   (claude.ai/design project 368de177-0eb9-4485-a454-8d0c6967d9d7, Studio.dc.html). */

@font-face { font-family: 'Raleway'; src: url('/static/fonts/Raleway-VariableFont_wght.ttf') format('truetype-variations'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Raleway'; src: url('/static/fonts/Raleway-Italic-VariableFont_wght.ttf') format('truetype-variations'); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Roboto'; src: url('/static/fonts/Roboto-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Roboto'; src: url('/static/fonts/Roboto-Medium.ttf') format('truetype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Roboto'; src: url('/static/fonts/Roboto-Bold.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }

/* Material Symbols (Outlined), loaded via Google Fonts CDN (internal/web/layout.templ's/ui.templ's
   <head>) - replaces the old one-off hand-drawn static/icons/*.svg set app-wide (logo.svg stays,
   it's the brand mark, not a UI icon) so every icon comes from one consistent, actively-maintained
   glyph set instead of a growing pile of bespoke SVGs. Rendered as inline <span> glyphs (see
   web.Icon) sized via font-size and colored via currentColor - a button's own text color already
   themes its icon correctly in both light and dark, on any background, with no separate "inverted"
   variant or dark-mode filter hack needed. */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

:root {
  --font-body: 'Roboto', system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-heading: 'Raleway', 'Roboto', system-ui, sans-serif;

  --gray-50: #F0F3F6;  --gray-100: #E8EBF0; --gray-200: #D3D8DF; --gray-300: #979FAB;
  --gray-400: #798492; --gray-700: #4E5863; --gray-800: #3E4651; --gray-900: #242A30;
  --green-500: #3FA864; --green-50: #E9F7EE;
  --yellow-100: #FCEDD5; --yellow-900: #302109;
  --blue-100: #CCE3F7; --blue-900: #00172B;

  --bg: var(--gray-50);
  --surface: #ffffff;
  --text: var(--gray-900);
  --text-muted: var(--gray-400);
  --text-faint: var(--gray-300);
  --border: var(--gray-200);
  --border-light: var(--gray-100);
  --accent: var(--green-500);
  --accent-text: #ffffff;
  --green-bg: #E9F7EE;
  --green-text: #205D36;
  --amber-bg: #FDF6EA;
  --amber-text: #8F621C;
  --red-bg: #FEECEB;
  --red-text: #922820;
  --blue-bg: #E6F1FB;
  --blue-text: #014682;
  --neutral-bg: var(--gray-100);
  --neutral-text: var(--text);
  --stripe-even: #E8F0F9;

  --header-bg: linear-gradient(96.04deg, var(--yellow-100) -17.14%, var(--blue-100) 94.45%);
  --shadow-sm: 0px 10px 80px rgba(0,0,0,0.02275), 0px 5.0625px 34.875px rgba(0,0,0,0.035), 0px 2px 13px rgba(0,0,0,0.04725), 0px 0.4375px 4.625px rgba(0,0,0,0.07);
  --shadow: 0px 43px 80px rgba(0,0,0,0.02275), 0px 21.7687px 34.875px rgba(0,0,0,0.035), 0px 8.6px 13px rgba(0,0,0,0.04725), 0px 1.88125px 4.625px rgba(0,0,0,0.07);
  --shadow-lg: 0px 65px 80px rgba(0,0,0,0.02275), 0px 32.9062px 34.875px rgba(0,0,0,0.035), 0px 13px 13px rgba(0,0,0,0.04725), 0px 2.84375px 4.625px rgba(0,0,0,0.07);
}

html[data-theme="dark"] {
  --bg: var(--gray-900);
  --surface: var(--gray-800);
  --text: #F5F6F7;
  --text-muted: var(--gray-300);
  --text-faint: var(--gray-400);
  --border: var(--gray-700);
  --border-light: var(--gray-700);
  --accent: var(--green-500);
  --accent-text: #ffffff;
  --neutral-bg: var(--gray-700);
  --stripe-even: #313B46;
  --header-bg: linear-gradient(96.04deg, var(--yellow-900) -17.14%, var(--blue-900) 94.45%);
  --shadow: none;
  --shadow-sm: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
}

.container {
  max-width: 1200px;
  margin-inline: auto;
  padding: 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 1.5rem 2rem;
  }
}

a {
  color: inherit;
}

h1, h2, h3 {
  margin: 0 0 0.25rem;
  font-family: var(--font-heading);
  font-weight: 600;
}

/* Mobile-first: smaller page title on a narrow screen (real estate is scarce, and it needs to
   share its row with the primary action - see .page-header/.btn-label below), back up to the
   original size from the sm breakpoint up. */
h1 {
  font-size: 1.375rem;
  font-weight: 500;
}

@media (min-width: 640px) {
  h1 {
    font-size: 1.75rem;
  }
}

/* flex-wrap: nowrap (not the app's usual mobile-first wrap) is deliberate here - the title and
   its primary action (New client/asset/... - see web.NewActionLink) always stay on one row, at
   every breakpoint, down to the smaller h1 above and .btn-label collapsing to icon-only below. */
.page-header {
  margin-bottom: 1.5rem;
}

/* Title + actions is its own row, kept separate from .page-subtitle below - a two-line title
   block would otherwise get compared for vertical centering against the actions row as one
   combined height, throwing the buttons off-center from the title text they actually sit next
   to. */
/* Mobile-first: wraps (actions drop to their own row under the title) below sm - .btn-label's
   icon-only collapse keeps most action rows short enough to fit, but a detail page with several
   always-visible-text buttons (e.g. Asset's Edit/Start/HTML/PDF) can still be too wide for a long
   title to share a strict single row with on a narrow phone; wrapping is a safe fallback rather
   than squeezing the title down to a sliver. nowrap (title/actions pinned to one row, vertically
   centered) from sm up, where there's room for both. */
.page-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
}

@media (min-width: 640px) {
  .page-header-row {
    flex-wrap: nowrap;
  }
}

.page-header-row h1 {
  min-width: 0;
}

.page-header .actions {
  flex-shrink: 0;
}

.page-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* A small breadcrumb-like chip for "this record's real-world context" lines directly under a
   PageHeader - Asset's owner, Project's asset/owner, an annotated Media version's source - a
   plain text line the same weight as .page-subtitle read as part of the header itself; a bordered
   pill reads as its own distinct, secondary piece of info instead. */
.subtitle-card {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: 0 0 1rem;
  padding: 0.375rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.card {
  background: var(--surface);
  border-radius: 4px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

html[data-theme="dark"] .card {
  border: 1px solid var(--border);
}

.card + .card {
  margin-top: 1rem;
}

/* A bare header-row + content block sitting directly on the page background between two .card
   elements (e.g. Asset detail's "Projects" section, a list of its own per-project cards rather
   than one enclosing card) - .card + .card's margin-top can't reach across it, so it carries its
   own top margin, and hands the same margin on to whatever .card follows it. */
.detail-section {
  margin-top: 1rem;
}

.detail-section + .card {
  margin-top: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.75rem;
  border-radius: 4px;
  padding: 0 1.125rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-body);
  transition: background-color 0.15s, border-color 0.15s;
}

.btn-primary {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-text);
}

.btn-primary:hover {
  box-shadow: var(--shadow-sm);
}

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

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

/* A smaller .btn for a card header's single "+ Add" action (web.ModalTriggerSmall) - sits next to
   a .dashboard-heading, so the full 44px touch-target height (right for a page's own primary
   actions) reads as oversized there. Still a real tap target, just not the standard button size. */
.btn-sm {
  height: 2rem;
  padding: 0 0.75rem;
  font-size: 0.8125rem;
  gap: 0.375rem;
}

.btn:hover {
  filter: brightness(0.96);
}

.btn-secondary:hover {
  background: var(--bg);
  border-color: var(--text-muted);
}

.btn-ghost:hover {
  background: var(--neutral-bg);
  color: var(--text);
}

.btn:active {
  filter: brightness(0.9);
}

.btn:focus-visible {
  outline: 2px solid var(--text-muted);
  outline-offset: 1px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* web.NewActionLink's label: icon-only below sm (a round/square icon button - simpler and never
   competes with the page title for room on a narrow .page-header row), icon + text from sm up. */
@media (max-width: 639px) {
  .btn-label {
    display: none;
  }

  .btn:has(.btn-label) {
    width: 2.75rem;
    padding: 0;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  background: var(--neutral-bg);
  color: var(--neutral-text);
  border: 1px solid var(--text-muted);
}

/* Every tone's border is that same tone's own (already darker/more-saturated) *-text color - one
   consistent rule ("this chip's border is a darker shade of its own color") instead of a flat
   gray outline that would clash with each background. */
.badge-green { background: var(--green-bg); color: var(--green-text); border-color: var(--green-text); }
.badge-amber { background: var(--amber-bg); color: var(--amber-text); border-color: var(--amber-text); }
.badge-blue  { background: var(--blue-bg);  color: var(--blue-text);  border-color: var(--blue-text); }
.badge-red   { background: var(--red-bg);   color: var(--red-text);   border-color: var(--red-text); }

/* .field is shared by web.Field's <label> (implicit label-association wraps its one control) and
   web.FileInput's <fieldset> (a <legend> heading over more than one control) - the fieldset reset
   below undoes the browser-default border/padding/min-width so both look identical. */
.field {
  display: block;
  margin-bottom: 1rem;
}

fieldset.field {
  border: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.field-label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0;
}

/* web.FileInput: the "Choose files…" trigger and its optional name/caption field side by side,
   wrapping to their own rows on a narrow screen rather than squeezing the caption input away. */
.file-input-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.file-input-row .input {
  flex: 1;
  min-width: 10rem;
}

.field .hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-faint);
}

/* date-input wraps a real control but must generate no box of its own, so the wrapped .input's
   width:100% and surrounding layout (form-row-2/.field, ...) behave exactly as when that control
   was the direct child. classifier-autocomplete keeps its own box on purpose - see
   .classifier-autocomplete below, which it now carries directly (renamed from a wrapping <div>,
   same position:relative anchor its dropdown list needs). */
date-input {
  display: contents;
}

.input, textarea, select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text);
  background: var(--surface);
  font-family: var(--font-body);
}

/* A single-line control's fixed height - not textarea (rows-based, must stay auto) or
   input[type=color] (its own fixed square size a bit further down). Matched by .btn below so a
   button dropped next to a text field/select (e.g. .inline-edit-form-row, a toolbar row) lines up
   exactly rather than sitting visibly taller. */
.input:not(textarea), select {
  height: 2.75rem;
}

.input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--text-muted);
  outline-offset: 1px;
}

/* One consistent dropdown arrow everywhere, replacing each browser's own default chevron. Only
   background-image/-repeat/-position/-size are set here (not the `background` shorthand) so this
   layers on top of the shared .input background-color above instead of resetting it.
   `select.input` (matching real specificity 0,1,1) is listed alongside plain `select` because
   most <select>s carry class="input" from the shared rule above — its own `background: ...`
   shorthand resets background-image at specificity 0,1,0, which beats a bare `select` (0,0,1)
   regardless of source order. */
select.input, select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2rem;
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23798492' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
}

html[data-theme="dark"] select.input, html[data-theme="dark"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23979FAB' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
}

/* Classifier autocomplete (internal/web/ui.templ's ClassifierAutocomplete, driven by
   static/js/classifier-autocomplete.js) - a text input standing in for a <select>, so it gets the
   exact same dropdown-arrow treatment as one above, making "this opens a list of choices"
   readable at a glance instead of it looking like a plain text field. The suggestion list itself
   is a real <ul> (not a native <datalist>, which several mobile browsers render inconsistently or
   not at all) styled like the account-menu dropdown panel, with touch-sized (44px) options. */
classifier-autocomplete {
  position: relative;
  display: block;
}

.classifier-autocomplete-input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2rem;
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23798492' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
}

html[data-theme="dark"] .classifier-autocomplete-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%23979FAB' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
}

.classifier-autocomplete-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: 15rem;
  overflow-y: auto;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.classifier-autocomplete-option {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 0.875rem;
  color: var(--text);
  cursor: pointer;
}

.classifier-autocomplete-option:hover,
.classifier-autocomplete-option.is-active {
  background: var(--neutral-bg);
}

.empty-state {
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-faint);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table th, .table td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.table th {
  color: var(--text-muted);
  font-weight: 500;
}

/* Narrow centered shell for auth pages (login/register/forgot-reset-password/verify-email) —
   distinct from the full 1200px .container used for in-app pages. */
.auth-shell {
  max-width: 24rem;
  margin: 4rem auto 0;
}

.auth-shell .logo {
  display: block;
  margin: 0 auto 0.75rem;
  height: 3rem;
  width: 3rem;
}

.auth-shell h1 {
  text-align: center;
  font-size: 1.5rem;
}

.auth-shell .tagline {
  margin: 0 0 2rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.auth-shell .below {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.auth-links {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
}

.auth-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.alert {
  margin-bottom: 1rem;
  border-radius: 0.375rem;
  border: 1px solid;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

.alert-error {
  border-color: var(--red-bg);
  background: var(--red-bg);
  color: var(--red-text);
}

.alert-success {
  border-color: var(--green-bg);
  background: var(--green-bg);
  color: var(--green-text);
}

.table-wrap {
  overflow-x: auto;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}

.row-actions form {
  display: inline;
}

/* Project detail's stage row (internal/workflows/views.templ) - the "move to stage" form (select
   + update button) on the left, "Finish" on the right, pushed apart rather than just left-aligned
   with a small gap like plain .row-actions. Stacks to its own full-width row per form below sm,
   instead of the two forms crowding onto one line. */
.project-stage-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

@media (max-width: 639px) {
  .project-stage-row {
    flex-direction: column;
    align-items: stretch;
  }

  .project-stage-row > form {
    display: flex;
    width: 100%;
  }
}

.inline-edit-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.inline-edit-form-row {
  align-items: center;
}

.inline-edit-form-row input[type="text"],
.inline-edit-form-row input:not([type]) {
  flex: 1 1 10rem;
  min-width: 8rem;
}

.inline-edit-form-row input[type="color"] {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0.125rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  cursor: pointer;
  flex: 0 0 auto;
}

.inline-edit-form-row select {
  flex: 0 0 auto;
  width: auto;
}

@media (max-width: 639px) {
  .inline-edit-form-row {
    flex-direction: column;
    align-items: stretch;
  }
  .inline-edit-form-row input[type="text"],
  .inline-edit-form-row input:not([type]) {
    flex: 0 0 auto;
    width: 100%;
  }
  .inline-edit-form-row .btn {
    width: 100%;
    justify-content: center;
  }
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
}

/* --- Navbar --------------------------------------------------------------------------------
   A floating header (margin all round, its own shadow/radius) plus a right-side slide-in drawer
   on narrow screens — both driven by a single hidden checkbox + <label for> toggles, no JS. */

.icon {
  display: inline-block;
  vertical-align: middle;
  color: currentColor;
}

/* Visually hides an element while keeping it in the accessibility tree and clickable via an
   associated <label for> — used to hide the native file input behind a styled .btn trigger. */
.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;
}

.avatar-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 9999px;
  background: var(--border-light);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

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

.avatar-chip-user {
  background: var(--gray-900);
  color: #fff;
}

/* --- Client portal-account star (list row + detail page) ---------------------------------------
   Marks a Client that has a linked client-portal User account (see settings.users.clientId) -
   shown inline next to the name wherever a Client is displayed. */
.portal-account-star {
  display: inline-flex;
  align-items: center;
  color: var(--amber-text);
  vertical-align: middle;
}

.portal-account-line {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.navbar {
  margin: 8px;
  padding: 0.625rem 1.25rem;
  background: var(--header-bg);
  border-radius: 4px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text);
  position: relative;
  flex-wrap: wrap;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

/* logo.svg is a flat black mark with no light/dark variant of its own - light mode leaves it as
   drawn (black reads fine against --header-bg's light gradient, matching --text: var(--gray-900)),
   dark mode inverts it to white so it stays legible against --header-bg's dark gradient, matching
   --text: #F5F6F7 the brand name text next to it already switches to. */
html[data-theme="dark"] .navbar-brand img {
  filter: invert(1);
}

.navbar-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.navbar-brand-name {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.02em;
}

.navbar-brand-tagline {
  font-size: 11px;
  opacity: 0.65;
  font-weight: 500;
}

.nav-toggle-checkbox {
  display: none;
}

.nav-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(36, 42, 48, 0.25);
  border-radius: 4px;
  cursor: pointer;
  margin-left: auto;
}

html[data-theme="dark"] .nav-toggle-btn {
  border-color: rgba(255, 255, 255, 0.25);
}

.navbar-links {
  display: none;
}

.navbar-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}

.navbar-link:hover {
  background: rgba(255, 255, 255, 0.35);
}

.navbar-link-active {
  background: rgba(255, 255, 255, 0.5);
}

.navbar-controls {
  position: relative;
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.navbar-controls form {
  display: inline;
}

.navbar-pill-btn {
  background: transparent;
  border: 1px solid rgba(36, 42, 48, 0.25);
  border-radius: 4px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  font-family: var(--font-body);
  letter-spacing: 0.02em;
}

/* 40px is Material Design's minimum comfortable touch target for a dense icon button (the navbar
   row has several side by side, so the full 48px spec target would crowd it) - matches
   .pattern-layer-tool-btn/.split-btn-caret's own icon-button size for the same reason. */
.navbar-icon-btn {
  background: transparent;
  border: 1px solid rgba(36, 42, 48, 0.25);
  border-radius: 4px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
}

.navbar-pill-btn:hover,
.navbar-icon-btn:hover {
  background: var(--neutral-bg);
}

/* Plain "vX.Y.Z" text (web.AppVersion) between the Help icon and the account menu trigger -
   never a link/button, just a label, so no hover/focus treatment. */
.navbar-version {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Round, not .navbar-icon-btn's usual 4px-radius square, and a white hover fill (not the shared
   .navbar-icon-btn:hover's --neutral-bg) - a deliberately distinct treatment since Help sits alone
   outside the account-menu dropdown now, not grouped with other icon buttons. */
.navbar-help-btn {
  border-radius: 50%;
}

.navbar-help-btn:hover {
  background: #fff;
}

html[data-theme="dark"] .navbar-pill-btn,
html[data-theme="dark"] .navbar-icon-btn {
  border-color: rgba(255, 255, 255, 0.25);
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
}

.navbar-user-role {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 11px;
}

/* Right-side slide-in drawer, always present in the DOM, toggled by #nav-toggle. */

.nav-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
  border: none;
  cursor: default;
}

.nav-toggle-checkbox:checked ~ .nav-drawer-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.nav-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: 280px;
  max-width: 82vw;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  padding: 20px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 200ms ease;
}

.nav-toggle-checkbox:checked ~ .nav-drawer {
  transform: translateX(0);
}

.nav-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.nav-drawer-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 17px;
}

.nav-drawer-close {
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  padding: 6px;
  display: inline-flex;
}

.nav-drawer-close:hover {
  background: var(--neutral-bg);
}

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

.nav-drawer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
}

.nav-drawer-link-active {
  background: var(--green-bg);
  color: var(--green-text);
}

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

.nav-drawer-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-drawer-footer-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-drawer-footer-user form {
  margin-left: auto;
}

.nav-drawer-footer .btn {
  padding: 6px;
}

/* Was min-width: 1024px — measured (Playwright, real viewport widths) the header actually
   wrapping to two rows from 1024px up to ~1060px (7 nav links + logo + account-menu trigger don't
   fit on one line there), first reliably single-row at 1080px. 1152px keeps a safety margin above
   that measured cutoff. */
@media (min-width: 1152px) {
  .nav-toggle-btn {
    display: none;
  }

  .navbar-links {
    display: flex;
    gap: 4px;
    margin-left: auto;
    margin-right: 8px;
  }

  .navbar-controls {
    display: flex;
  }

  .nav-drawer,
  .nav-drawer-backdrop {
    display: none;
  }
}

/* --- Dashboard ------------------------------------------------------------------------------ */

/* Mobile-first: 2 columns by default (5 stat cards wrap 2/2/1), 3 at the md breakpoint (3/2,
   more balanced than a 4-wide grid ever was for 5 items), 5 — one row, no wrapping — at lg. */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  align-items: start;
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .stat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .stat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-card {
  display: block;
  border-radius: 4px;
  padding: 1.125rem 1.25rem;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: box-shadow 150ms ease;
}

.stat-card:hover {
  box-shadow: var(--shadow-lg);
}

html[data-theme="dark"] .stat-card {
  border: 1px solid var(--border);
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 1.625rem;
  font-weight: 600;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Report detail page: a plain single grid column below 1024px, so the three direct children below
   just stack in source order (top, side, bottom - see internal/reporter/views.templ's detailBody)
   without needing any `order` overrides. At 1024px+ .report-layout-side moves into its own right
   column spanning both rows, spacing .report-layout-top/-bottom's stacked cards out of the flow
   below it - "the main column" reads top-to-bottom while the sidebar reads independently beside
   it. */
.report-layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 1024px) {
  .report-layout {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto auto;
  }

  .report-layout-top {
    grid-column: 1;
    grid-row: 1;
  }

  .report-layout-side {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .report-layout-bottom {
    grid-column: 1;
    grid-row: 2;
  }
}

.dashboard-heading {
  margin: 0 0 0.75rem;
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
}

.dashboard-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dashboard-list li {
  padding: 0.5rem 0;
  border-top: 1px solid var(--border-light);
}

.dashboard-list li:first-child {
  border-top: none;
}

.dashboard-list a {
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.dashboard-list a:hover {
  text-decoration: underline;
}

/* Active-project cards: one full-container-width card per row (capped independently by the
   Settings -> Features "Active projects shown" limit, so this never needs to render more than a
   handful anyway) — each card's own body then splits Assessments/Treatments/Reports horizontally
   at the md breakpoint. */
.dashboard-project-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.dashboard-project-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: box-shadow 150ms ease;
}

.dashboard-project-card:hover {
  box-shadow: var(--shadow-lg);
}

.dashboard-project-card-header {
  margin-bottom: 0.25rem;
}

.dashboard-project-card-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  font-family: var(--font-heading);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.dashboard-project-card-title:hover {
  text-decoration: underline;
}

.dashboard-project-card-asset {
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-muted);
}

.dashboard-project-card-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .dashboard-project-card-body {
    grid-template-columns: repeat(3, 1fr);
  }
}

.dashboard-project-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border-light);
}

.dashboard-project-card-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

/* --- Entity lists (Clients/Assets/etc.) -------------------------------------------------- */

.entity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Report detail's Assessments/Treatments lists - each item is that record's own detail-page
   content (condition/method + timestamp, description, small thumbnail row) condensed inline,
   rather than a one-line summary row (see internal/reporter/views.templ's recordDetailItem). */
.record-detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.record-detail-item {
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}

.record-detail-item:hover {
  background: var(--neutral-bg);
  border-color: var(--text-muted);
}

.record-thumb-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.625rem;
}

/* One consistent 4-column shape everywhere this is used (a module's own full list page, or a
   "linked records" list inside a detail page's section card - internal/web/ui.templ's
   TableRowChips/TableRowActions render columns 2/4 here): title+description (grows, left),
   chips/tags, a date, then View/Edit action buttons (fixed, right). A bordered, small-radius card
   per row instead of the old divider-line list, with one plain hover highlight (background+border
   tint) - no per-type/per-status color coding on the row itself, only on the chips inside it. */
.entity-list-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
}

.entity-list-row:hover {
  background: var(--neutral-bg);
  border-color: var(--text-muted);
}

/* Column 1: thumbnail + title/description, the row's own click-to-detail link - not the whole
   row (a real View/Edit button now lives in column 4, so nesting another link/button in there
   would be invalid HTML). */
.entity-list-main {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}

.entity-list-name {
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
}

.entity-list-main:hover .entity-list-name {
  text-decoration: underline;
}

/* Column 2: tag-chip badges - already double as this list's own one-click filter shortcuts (see
   static/js/entity-list-filter.js) where the page has a filter toolbar to hook into. */
.entity-list-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  justify-content: flex-end;
}

/* Column 3 */
.entity-list-date {
  color: var(--text-muted);
  font-size: 0.8125rem;
  white-space: nowrap;
}

/* Column 4 */
.entity-list-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Below md, the 4 columns wrap into two rows: title+actions on top (actions never separated from
   the row they belong to), chips and date below, full width - still no cramped 4-across squeeze
   on a phone. */
@media (max-width: 767px) {
  .entity-list-row {
    grid-template-columns: 1fr auto;
    grid-template-areas: "main actions" "chips chips" "date date";
    row-gap: 0.375rem;
  }

  .entity-list-main { grid-area: main; }
  .entity-list-actions { grid-area: actions; }
  .entity-list-chips { grid-area: chips; justify-content: flex-start; }
  .entity-list-date { grid-area: date; }
}

.entity-thumb {
  width: 56px;
  height: 56px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--border-light);
}

.entity-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-faint);
  text-align: center;
  padding: 2px;
}

/* Report detail's "Image gallery" section — one row per image: a fixed-size thumbnail on the
   left (image centered/contained inside, never cropped, capped at 300px tall so a very tall
   portrait photo doesn't blow out the row) and its caption/stretch/save controls on the right.
   The "Columns"/"stretch" controls alongside this list are about the exported PDF/HTML's own
   layout (see internal/export), not this editing screen, which always lists one image per row
   regardless of what they're set to. */
.gallery-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gallery-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  /* Drag-drop reorder (static/js/report-gallery.js) - a visual cue distinct from the browser's
     own drag ghost, and dims the item being dragged so the reflow of the rest of the list reads
     clearly. */
  cursor: grab;
}

.gallery-item.is-dragging {
  opacity: 0.4;
}

.gallery-item-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 300px;
  max-width: 40vw;
  height: 220px;
  max-height: 300px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--bg);
}

.gallery-item-thumb img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
}

/* Cover-photo preview (an Asset's own Details card, the Report module's Asset info card) - not
   the report gallery grid above, which uses .gallery-item-thumb instead. */
.gallery-photo {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 4px;
  background: var(--bg);
}

/* Caption + "stretch" checkbox + Save button, deliberately kept to one row (only the text input
   shrinks - the checkbox label and button stay their own natural width) rather than wrapping. */
.gallery-item-form {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 639px) {
  .gallery-item {
    flex-direction: column;
  }

  .gallery-item-thumb {
    width: 100%;
    max-width: 100%;
  }
}

.gallery-item-form .input {
  flex: 1;
  min-width: 0;
}

.gallery-item-form .checkbox-field {
  flex-shrink: 0;
  white-space: nowrap;
}

/* The upload control's own row (web.FileInput not used directly here so Upload can sit inline in
   the same row instead of its own line below) - centered, no hint text underneath (see this
   section's own doc comment in views.templ). */
.gallery-upload-form {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.list-toolbar {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.search-wrap {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 12px;
  height: 40px;
}

.search-wrap input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  font-family: var(--font-body);
  background: transparent;
  color: var(--text);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0 14px;
  height: 40px;
  font-size: 13px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Below sm, search and every filter/group-by chip each take their own full-width row instead of
   wrapping into uneven, cramped widths - easier to read and tap on a phone. Must come *after* the
   .list-toolbar/.search-wrap/.filter-chip base rules above: equal-specificity CSS ties break on
   source order regardless of which @media condition is active, so placed any earlier this whole
   block would lose every one of these overrides (width, min-width, flex, height) right back to
   the unconditional base rules - which is exactly what silently happened before this comment. */
@media (max-width: 639px) {
  .list-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-wrap,
  .filter-chip {
    width: 100%;
    min-width: 0;
    /* .search-wrap's own flex: 1 sizes it along .list-toolbar's *main* axis - width in the
       desktop row layout above, but height once flex-direction flips to column here, collapsing
       it down toward its content's min-height instead of the explicit 40px height both rules
       set. flex: none stops that axis takeover, so height:40px applies as intended. */
    flex: none;
  }

  .filter-chip-select {
    flex: 1;
    width: 100%;
  }
}

/* --- Detail pages (Client/Asset/etc.) ------------------------------------------------------ */

/* --- Classifier list (Settings → Classifiers) ------------------------------------------------
   A plain drag-drop-reorderable list (static/js/classifier-list.js) - replaces the old
   flex-wrapped chip/pill layout, whose only way to reorder was typing a raw sequence number. */

.classifier-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.classifier-list-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  cursor: grab;
}

.classifier-list-row:hover {
  background: var(--neutral-bg);
  border-color: var(--text-muted);
}

.classifier-list-row.is-dragging {
  opacity: 0.4;
}

.classifier-list-row > .icon {
  color: var(--text-faint);
  flex-shrink: 0;
}

.classifier-list-title {
  flex: 1;
  min-width: 0;
}

.classifier-list-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.color-swatch-input {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.125rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  cursor: pointer;
}

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

.form-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-row-2 {
  display: grid;
  gap: 0.75rem 1rem;
  grid-template-columns: 1fr;
}

.form-row-3 {
  display: grid;
  gap: 0.75rem 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .form-row-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-row-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Rows already carry their own grid gap, so the fields inside them don't need the standalone
   .field's bottom margin too — keeps multi-row forms from double-spacing between rows. */
.form-row-2 > .field,
.form-row-3 > .field {
  margin-bottom: 0;
}

.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.form-section {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.form-section-title {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
}

/* --- Detail field lists (Asset, and future modules) ----------------------------------------- */

.detail-dl {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 0;
  font-size: 0.875rem;
}

.detail-dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-faint);
}

.detail-dd {
  margin: 0;
  color: var(--text);
}

.detail-paragraph {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Help module: a role/module manual's numbered example flow (internal/help/views.templ). */
.help-example-flow {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.help-example-flow li {
  padding-left: 0.25rem;
}

/* Report detail's Client/Asset/Project info panels (internal/reporter/views.templ's
   infoPanelHeader) - a plain rule separating the header (label + "View" link) from the fields/
   cover photo below it. */
.section-divider {
  margin: 1rem 0;
  border: none;
  border-top: 1px solid var(--border-light);
}

.info-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.info-panel-header .dashboard-heading {
  margin-bottom: 0;
}

.info-panel-view-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
}

.info-panel-view-link:hover {
  color: var(--text);
}

.cover-photo-preview {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.375rem;
}

.cover-photo-preview img {
  max-width: 100%;
  max-height: 12rem;
  width: auto;
  height: auto;
  border-radius: 4px;
}

/* Details card: cover photo + tabular fields, split into two columns from tablet-landscape up
   (see internal/assets/views.templ's detailBody) - the Report module's own Asset info card uses
   the same cover/fields/description shape but stays stacked (its sidebar column is already
   narrow), so it never gets this split class. Below that breakpoint (and always, for the Report
   card's own .detail-card-cover) the cover and fields stack - gap/margin-bottom give that stack
   the same visual separation the split layout's column gap already provides on the x-axis. */
.detail-card-cover-split {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.detail-card-cover {
  margin-bottom: 1.25rem;
}

@media (min-width: 768px) {
  .detail-card-cover-split {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.25rem;
    align-items: start;
  }

  .detail-card-cover-split .cover-photo-preview {
    margin: 0;
  }
}

.detail-card-description {
  margin-top: 1rem;
}

/* read-more (static/js/read-more.js) replaces a <p data-read-more> that just held plain text - it
   needs the same block flow a <p> has by default, custom elements aren't block-level otherwise. */
read-more {
  display: block;
}

.read-more-toggle {
  display: inline;
  padding: 0;
  margin-left: 0.25rem;
  border: none;
  background: none;
  color: var(--accent);
  font-size: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
}

/* --- Statistics tab counters (Settings -> Statistics) --------------------------------------- */

.stat-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.stat-list-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.625rem 0;
  border-top: 1px solid var(--border-light);
  font-size: 0.875rem;
}

.stat-list-row:first-child {
  border-top: none;
}

/* --- Album ------------------------------------------------------------------------------- */

.album-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.album-search {
  max-width: 16rem;
}

.album-controls-group {
  display: flex;
  gap: 0.25rem;
}

.album-group-btn.is-active {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

.album-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Grouped mode stacks each group vertically (album.js wraps a group's own cards in their own
   .album-group/.album-group-cards pair) - the grid itself switches to a column of groups, not a
   single column of cards; each group's .album-group-cards row keeps the same flex-wrap row layout
   as the ungrouped grid so a group with many items still wraps sensibly rather than forcing one
   image per line. */
.album-grid-grouped {
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 1.25rem;
}

.album-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.album-group-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.album-group-header {
  font-size: 0.875rem;
  font-weight: 600;
}

.album-card {
  display: block;
  width: 10rem;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--surface);
  text-decoration: none;
  color: inherit;
}

.album-thumb {
  height: 7rem;
  width: 10rem;
  background: var(--border);
  overflow: hidden;
}

.album-thumb img, .album-thumb video {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.album-thumb-doc {
  display: flex;
  height: 100%;
  width: 100%;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-faint);
  text-align: center;
  padding: 0.5rem;
}

.album-card-body {
  padding: 0.5rem;
}

.album-card-title {
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-card-sub {
  font-size: 0.6875rem;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Media view image + video ---------------------------------------------------------------- */

.lightbox-controls {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lightbox-control-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.media-view-video {
  max-height: 60vh;
  width: 100%;
  border-radius: 0.5rem;
  background: #000;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}

@media (min-width: 640px) {
  .media-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .media-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.media-grid-item {
  display: block;
  height: 8rem;
  border-radius: 0.375rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

.media-grid-item img, .media-grid-item video {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

/* The report gallery's "Add from library" picker (internal/reporter/views.templ) - a .media-grid
   of checkable thumbnails rather than plain links, each tagged with which record (Asset/Project/
   Assessment/Treatment/Report) it actually lives on since the library spans the whole Asset. */
.library-picker-item {
  position: relative;
  cursor: pointer;
}

.library-picker-checkbox {
  position: absolute;
  top: 0.375rem;
  left: 0.375rem;
  width: 1.1rem;
  height: 1.1rem;
  z-index: 1;
}

.library-picker-tag {
  position: absolute;
  bottom: 0.375rem;
  right: 0.375rem;
  font-size: 0.65rem;
}

.library-picker-item:has(.library-picker-checkbox:checked) {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* --- Pattern layer / deep-zoom viewer ----------------------------------------------------------
   Shared by the plain view page (static/js/media-viewer.js, read-only, no overlay/toolbar) and the
   edit page (static/js/media-editor.js): OpenSeadragon deep zoom against the IIIF Image API is the
   viewing surface (.osd-viewer), with, on the edit page only, the stored annotation regions
   (internal/media/annotations.go — rectangles or freehand-brush outlines) rendered into a 0-100
   viewBox SVG that OpenSeadragon manages as one of its own overlays (viewer.addOverlay) so it
   tracks pan/zoom automatically instead of needing hand-rolled viewport-transform math — new
   regions are drawn directly on this same surface. A legend is always rendered underneath the
   editor's image, whether or not anything's marked yet. */

.pattern-layer-stage {
  position: relative;
  width: 100%;
  min-width: 300px;
  height: 55vh;
  min-height: 20rem;
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--bg);
  /* Hands every touch gesture over this stage to JS (OpenSeadragon's own pan/pinch-zoom,
     static/js/media-editor.js's touch region-drawing) instead of the browser's default touch
     handling - without it, mobile Safari/Chrome can intercept a drag as a page-scroll/pull-to-
     refresh gesture (or add its own tap-recognition delay) before either ever sees it. */
  touch-action: none;
}

.osd-viewer {
  width: 100%;
  height: 100%;
}

.osd-annotation-overlay {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.pattern-layer-stage.is-add-mode {
  cursor: crosshair;
}

.pattern-layer-drag-box {
  position: absolute;
  border: 1.5px dashed var(--accent);
  background: rgb(63 168 100 / 0.15);
  pointer-events: none;
}

.pattern-layer-toolbar {
  align-items: center;
}

.pattern-layer-tool-group {
  display: inline-flex;
  gap: 0.25rem;
}

/* Icon-toggle buttons picking rect vs. freehand-brush - is-active gets the same accent-highlight
   treatment every other active-state toggle in the app uses (e.g. .kanban-card being dragged). */
.pattern-layer-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
}

.pattern-layer-tool-btn:hover {
  background: var(--neutral-bg);
}

.pattern-layer-tool-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.pattern-layer-select-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.pattern-layer-select-field select {
  width: auto;
}

/* Whole-image description note: label + field on one row — saved together with the region set by
   the edit page's one general Save button (.media-edit-save-row), not its own inline button. */
.lightbox-note-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lightbox-note-row label {
  flex-shrink: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.lightbox-note-row input {
  flex: 1;
}

.media-edit-save-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

/* Download-with-a-secondary-option split button (media view's "Download" / "Original") - a plain
   <details> disclosure for the caret side, no JS needed. */
.split-btn {
  position: relative;
  display: inline-flex;
}

.split-btn-main {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.split-btn-toggle summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  list-style: none;
}

.split-btn-toggle summary::-webkit-details-marker {
  display: none;
}

/* Icon-only, so it gets a square touch target instead of .btn's own text padding (which would
   leave it oddly wide for just one glyph) - same 40px sizing as the other icon buttons. */
.split-btn-caret {
  width: 2.5rem;
  height: 100%;
  min-height: 40px;
  padding: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-left: 1px solid var(--border);
  cursor: pointer;
}

.split-btn-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 20;
  min-width: 9rem;
  padding: 0.25rem;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.split-btn-menu-item {
  display: block;
  padding: 0.5rem 0.625rem;
  border-radius: 4px;
  font-size: 0.875rem;
  color: var(--text);
  text-decoration: none;
}

.split-btn-menu-item:hover {
  background: var(--neutral-bg);
}

.pattern-layer-swatch {
  display: inline-block;
  width: 1.375rem;
  height: 1.375rem;
  flex: none;
}

/* --- Media editor: "+ New annotation" draft + annotations table ----------------------------- */
/* The editor stage defaults to plain pan/zoom (no draw-mode toggle). "+ New annotation" reveals
   .annotation-draft and arms drawing (static/js/media-editor.js); a drag marks a region shown as
   .annotation-preview on the overlay but not persisted until "Save annotation". Existing regions
   are listed in .annotations-table, one row each, flipped to an inline type <select> + note
   <input> by .annotation-row.is-editing. */

.annotation-editor {
  margin-top: 0.75rem;
}

.annotation-toolbar {
  display: flex;
  margin-bottom: 0.75rem;
}

/* static/js/media-editor.js toggles the `hidden` attribute on these; the plain `[hidden]` UA rule
   loses on specificity to `.btn { display: inline-flex }`, so pin it back for these two. */
#annotation-new[hidden],
#annotation-draft[hidden] {
  display: none;
}

.annotation-draft {
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--neutral-bg);
}

.annotation-draft-hint {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.annotation-draft-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.annotation-draft-note {
  flex: 1 1 12rem;
  min-width: 8rem;
}

#annotation-draft-status:empty {
  display: none;
}

#annotation-draft-status {
  display: block;
  margin-top: 0.5rem;
}

/* Dashed preview of the region being drawn in the "+ New annotation" draft - lives in the same
   0-100 percent-of-image SVG overlay as the persisted region shapes, so non-scaling-stroke keeps
   it a hairline at any zoom. */
.annotation-preview {
  fill: var(--accent);
  fill-opacity: 0.18;
  stroke: var(--accent);
  stroke-width: 0.5;
  stroke-dasharray: 1.2 0.8;
  vector-effect: non-scaling-stroke;
}

.annotation-preview-line {
  fill: none;
}

.annotations-table {
  margin-top: 0.25rem;
}

.annotations-table .annotations-actions-col {
  width: 1%;
}

.annotation-cell-actions {
  white-space: nowrap;
  text-align: right;
}

/* The rounded-border type chip: the annotation type's own hatch swatch + label. */
.annotation-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.125rem 0.5rem 0.125rem 0.375rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8125rem;
  background: var(--surface);
}

.annotation-note-empty {
  color: var(--text-faint);
}

/* Read view <-> inline edit view, toggled by .is-editing (static/js/media-editor.js). */
.annotation-edit-field,
.annotation-act-save,
.annotation-act-cancel {
  display: none;
}

.annotation-row.is-editing .annotation-chip,
.annotation-row.is-editing .annotation-note-text,
.annotation-row.is-editing .annotation-act-edit,
.annotation-row.is-editing .annotation-act-delete {
  display: none;
}

.annotation-row.is-editing .annotation-edit-field {
  display: block;
  width: 100%;
}

.annotation-row.is-editing .annotation-act-save,
.annotation-row.is-editing .annotation-act-cancel {
  display: inline-flex;
}

.annotation-row.is-busy {
  opacity: 0.55;
  pointer-events: none;
}

/* --- Commerce: kanban ------------------------------------------------------------------------ */

/* Full-bleed 5-column board (Orders) - breaks out of .container's 1200px max-width to use the
   full viewport instead of horizontal-scrolling fixed-width columns. */
/* Mobile-first: a single column below lg (no cramped 2/3-column in-between state — 5 real stage
   columns need real width), all 5 stage columns in one row at lg and up. */
.kanban-board {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 1rem;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding-inline: 1.5rem;
  box-sizing: border-box;
}

@media (min-width: 1024px) {
  .kanban-board {
    grid-template-columns: repeat(5, 1fr);
  }
}

.kanban-column {
  min-width: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0 0.25rem;
}

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.25rem;
  margin-bottom: 0.5rem;
}

.kanban-column-header h3 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.kanban-column-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 3rem;
  border-radius: 0.375rem;
  transition: background-color 0.1s;
}

.kanban-column-body.is-drop-target {
  background: var(--border);
}

.kanban-card {
  border-radius: 4px;
  background: var(--surface);
  padding: 0.875rem;
  cursor: grab;
  box-shadow: var(--shadow-sm);
}

.kanban-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.5rem;
}

.kanban-card-leader {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.125rem;
}

html[data-theme="dark"] .kanban-card {
  border: 1px solid var(--border);
}

.kanban-card:active {
  cursor: grabbing;
}

.kanban-card.is-dragging {
  opacity: 0.5;
}

.kanban-card a {
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}

.kanban-card a:hover {
  text-decoration: underline;
}

/* --- Modal (generic "+Add" dialog) ------------------------------------------------------------ */
/* Mirrors .lightbox-overlay/.lightbox-modal/.lightbox-close's tokens/spacing — same overlay
   pattern, narrower panel (these hold forms, not an image). static/js/modal.js drives open/close. */

/* web.Modal's <dialog> (see static/js/app-modal.js) - showModal() handles centering/top-layer/
   focus-trap itself, this only resets the UA stylesheet's default border/background and repeats
   the old .modal-overlay's padding/sizing on the dialog box itself. */
app-modal {
  display: contents;
}

.modal-panel {
  position: relative;
  max-width: min(32rem, calc(100vw - 3rem));
  max-height: 90vh;
  width: 100%;
  margin: auto;
  padding: 1.5rem;
  border: 0;
  border-radius: 0.75rem;
  background: var(--surface);
  overflow-y: auto;
}

/* A closed <dialog> is display:none by the UA stylesheet on its own - but that default only
   holds as long as no author rule sets its own unconditional `display`, so the flex layout is
   scoped to [open] specifically. Getting this wrong doesn't just mis-style a hidden element: it
   makes the dialog visible - and in normal document flow, right where the "+ Add" trigger sits -
   even while "closed", alongside the real thing once showModal() promotes it to the top layer. */
.modal-panel[open] {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.modal-panel::backdrop {
  background: rgba(0, 0, 0, 0.85);
}

.modal-panel-title {
  margin: 0;
  padding-right: 2rem;
  font-size: 1rem;
  font-weight: 600;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--bg);
  cursor: pointer;
}

.modal-close:hover {
  background: var(--neutral-bg);
}

/* --- Entity-list row actions (View/Edit/Unlink icon buttons) --------------------------------- */
/* Compact icon-only buttons for entity-list-row's own actions column (.entity-list-actions) and
   related-list rows (asset detail page's Treatments/Reports/Projects/Media sections). */

.row-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
}

.row-action-icon:hover {
  background: var(--neutral-bg);
  color: var(--text);
}

/* --- Entity list filter/group toolbar (static/js/entity-list-filter.js) ---------------------- */

.filter-chip-select {
  border: none;
  outline: none;
  background-color: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 0 1.35rem 0 0;
}

.entity-list-group-header {
  margin: 1.25rem 0 0.25rem;
  padding: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-faint);
}

.entity-list-group-header:first-child {
  margin-top: 0;
}

/* --- "Linked records" row actions (a Project's Assessments/Treatments/Reports/Media, an Asset's
   per-project sub-lists, a Client's Assets, an annotated Media's other versions, ...) — rendered
   via web.TableRowChips/TableRowActions inside the same .entity-list-row grid (see above) every
   module landing/search-result list page also uses now, so both contexts share one row look. */

.row-chips {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}

/* web.TableRowActions renders a row's actions twice: .row-actions-inline (plain, shown from sm
   up) and .row-actions-menu (a "⋮" kebab opening the same actions in a dropdown, shown below sm) -
   only one is ever visible at a time. */
.row-actions-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.row-actions-menu {
  display: none;
  position: relative;
}

.row-actions-menu summary {
  list-style: none;
}

.row-actions-menu summary::-webkit-details-marker {
  display: none;
}

.row-actions-menu-panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 10rem;
  padding: 0.25rem;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.row-actions-menu-panel a,
.row-actions-menu-panel button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.625rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font-size: 0.875rem;
  font-family: var(--font-body);
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}

.row-actions-menu-panel a:hover,
.row-actions-menu-panel button:hover {
  background: var(--neutral-bg);
}

/* Lets a <form> wrapping one menu action (e.g. a data-confirm delete) participate directly in the
   panel's own flex column, instead of adding an extra unstyled block level of its own. */
.row-actions-menu-panel form {
  display: contents;
}

@media (max-width: 639px) {
  .row-actions-inline {
    display: none;
  }

  .row-actions-menu {
    display: inline-block;
  }
}

/* Tag-chip badges (condition/method/type/status) double as one-click filters for the same grid —
   see static/js/entity-list-filter.js's data-el-tag-filter handling. */
.tag-chip {
  cursor: pointer;
  user-select: none;
  text-decoration: none;
}

.stat-link {
  text-decoration: none;
}

.tag-chip:hover {
  filter: brightness(0.95);
}

.tag-chip:focus-visible {
  outline: 2px solid var(--text-muted);
  outline-offset: 2px;
}

/* --- Settings tab nav -------------------------------------------------------------------------- */

.tab-nav {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.tab-nav-link {
  padding: 0.625rem 0.25rem;
  margin-right: 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
}

.tab-nav-link:hover {
  color: var(--text);
}

.tab-nav-link-active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* --- Settings -> Classifiers: sidebar type nav + right-side list panel ------------------------- */

.classifiers-layout {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  align-items: start;
}

@media (min-width: 768px) {
  .classifiers-layout {
    grid-template-columns: 220px 1fr;
  }
}

.classifier-type-nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.25rem;
}

@media (min-width: 768px) {
  .classifier-type-nav {
    flex-direction: column;
    flex-wrap: nowrap;
    position: sticky;
    top: 1rem;
  }
}

.classifier-type-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
}

.classifier-type-nav-link:hover {
  background: var(--neutral-bg);
  color: var(--text);
}

.classifier-type-nav-link-active {
  background: var(--gray-900);
  color: #fff;
}

.classifier-type-nav-link-active .badge {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.classifier-type-panel {
  min-width: 0;
}

/* --- Account menu (desktop navbar user-chip dropdown) ----------------------------------------- */

/* account-menu (static/js/account-menu.js) wraps the trigger+panel purely for behavior - it must
   generate no box of its own so .account-menu-panel's position:absolute still resolves against
   .navbar-controls (position:relative), exactly as when trigger/panel were its direct children. */
account-menu {
  display: contents;
}

.account-menu-trigger {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  background: transparent;
  border: 0;
  padding: 2px;
  border-radius: 4px;
  color: var(--text);
  cursor: pointer;
  font-family: var(--font-body);
  text-align: left;
}

.account-menu-trigger:hover {
  background: rgba(255, 255, 255, 0.35);
}

.navbar-user-text {
  display: none;
}

@media (min-width: 1280px) {
  .navbar-user-text {
    display: block;
  }
}

.account-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  min-width: 200px;
  padding: 6px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.account-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-family: var(--font-body);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.account-menu-item:hover {
  background: var(--neutral-bg);
}

.account-menu-divider {
  height: 1px;
  margin: 6px 4px;
  background: var(--border);
}
