/* ============================================================================
   Cornfield — page & component layouts (library, document, editor)

   Loaded after styles.css. Everything here lives in the shared `components`
   cascade layer (order defined in styles.css, re-declared below so it holds
   regardless of load order). Tokens resolve to `light-dark()` values from
   styles.css, so nothing here needs per-theme overrides.
   ========================================================================== */

@layer reset, tokens, base, components, utilities;

@layer components {

/* ------------------------------------------------------------------ login */

.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: var(--s6); }
.auth-card {
  width: 100%; max-width: 400px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: var(--s8);
}
.auth-card .brand { justify-content: center; font-size: var(--fs-h2); margin-bottom: var(--s2); }
.auth-tagline { text-align: center; color: var(--text-3); margin-bottom: var(--s6); font-size: var(--fs-sm); }
.segmented { display: flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 3px; margin-bottom: var(--s6); }
.segmented button { flex: 1; background: transparent; border: none; font: inherit; font-weight: 600; color: var(--text-2); padding: var(--s2); border-radius: 7px; cursor: pointer; transition: all .16s; }
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.auth-card form { display: flex; flex-direction: column; gap: var(--s4); }
.auth-card .btn-primary { width: 100%; margin-top: var(--s2); }

/* upstream attribution credit (login footer, library footer) */
.app-credit { text-align: center; color: var(--text-3); font-size: var(--fs-caption); margin: var(--s5) 0 0; padding: var(--s4) var(--s3); }
.container > .app-credit { margin-top: var(--s10); }
.app-credit a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.app-credit a:hover { color: var(--accent); }

/* ------------------------------------------------------------------ library */

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s6); flex-wrap: wrap; }
.page-head h1 { font-size: var(--fs-display); }
.page-head .sub { color: var(--text-3); margin-top: var(--s1); }

.dropzone {
  border: 2px dashed var(--border-strong); border-radius: var(--radius-lg);
  background: var(--surface-2); padding: var(--s10) var(--s6); text-align: center;
  transition: border-color .18s, background .18s, transform .12s; cursor: pointer;
  margin-bottom: var(--s8);
}
.dropzone:hover { border-color: var(--accent); }
.dropzone.dragover { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.005); }
.dropzone .dz-icon { font-size: 40px; margin-bottom: var(--s3); }
.dropzone h3 { font-size: var(--fs-h3); margin-bottom: var(--s1); }
.dropzone p { color: var(--text-3); margin: 0; }
body.window-drag .dropzone { border-color: var(--accent); background: var(--accent-soft); }

.toolbar { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s5); flex-wrap: wrap; }
.toolbar .search { flex: 1; min-width: 200px; max-width: 360px; }
.toolbar select { width: auto; min-width: 150px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s5); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow .18s, transform .12s, border-color .18s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--border-strong); }
.card .thumb {
  aspect-ratio: 8.5 / 11; background: var(--surface-2); position: relative; overflow: hidden;
  border-bottom: 1px solid var(--border); display: grid; place-items: center;
}
.card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.card .thumb .placeholder { font-size: 34px; color: var(--text-3); }
.card .thumb .status-float { position: absolute; top: var(--s2); left: var(--s2); }
.card .body { padding: var(--s3) var(--s4) var(--s4); display: flex; flex-direction: column; gap: var(--s2); flex: 1; }
.card .fname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .meta { display: flex; align-items: center; gap: var(--s2); color: var(--text-3); font-size: var(--fs-caption); }
.card .meta .spacer { flex: 1; }
.card .actions { display: flex; gap: var(--s1); margin-top: auto; padding-top: var(--s2); }
.card .success-pulse { animation: cardpulse .8s ease; }
@keyframes cardpulse { 0% { box-shadow: 0 0 0 0 var(--ok-soft); } 100% { box-shadow: 0 0 0 12px transparent; } }

/* skeletons */
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 37%, var(--surface-2) 63%);
  background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.sk-card .thumb { animation: none; }
.sk-line { height: 12px; margin: 6px 0; }

/* empty state */
.empty { text-align: center; padding: var(--s16) var(--s6); color: var(--text-3); }
.empty .big { font-size: 48px; margin-bottom: var(--s3); }

.upload-progress { position: fixed; top: 58px; right: var(--s6); z-index: 60; display: flex; flex-direction: column; gap: var(--s2); width: 300px; }
.up-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--s3); font-size: var(--fs-sm); }
.up-item .bar { height: 5px; background: var(--surface-2); border-radius: var(--radius-full); overflow: hidden; margin-top: var(--s2); }
.up-item .bar > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s ease; }

/* view switcher (large icons / small icons / list) */
.view-switch button { display: inline-flex; align-items: center; justify-content: center; padding: 6px 10px; color: var(--text-2); }
.view-switch button.active { color: var(--text); }
.view-switch svg { display: block; }

/* small-icon grid: denser columns, name-only tiles (status shows on the thumb) */
.grid.grid-sm { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--s3); }
.grid.grid-sm .card .body { padding: var(--s2) var(--s3); gap: 0; }
.grid.grid-sm .card .fname { font-size: var(--fs-sm); }
.grid.grid-sm .card .meta,
.grid.grid-sm .card .actions { display: none; }

/* ------------------------------------------------------------------ icons */

/* Inline SVG (see `icon()` in ui.js). `currentColor` means an icon takes its
   button's colour automatically, including hover and disabled states. */
.icon {
  display: block;
  flex-shrink: 0;
  /* Stroke width is in user units, so it scales with the box. Nudge it down at
     16px so the glyphs sit at the same visual weight as the label text. */
  stroke-width: 1.9;
}

/* Icon-only controls: square, so a row of them reads as a toolbar rather than a
   set of differently-sized buttons. */
.btn-icon {
  padding: 0;
  width: 34px;
  min-width: 34px;
  flex-shrink: 0;
}
.btn-sm.btn-icon { width: 30px; min-width: 30px; min-height: 30px; }

/* Destructive actions stay neutral until pointed at — a row of red icons reads as
   an error state, but the intent still has to be unmistakable before clicking. */
.btn-danger-hover:hover:not([disabled]),
.btn-danger-hover:focus-visible {
  color: var(--err);
  background: var(--err-soft);
}

/* ------------------------------------------------------------------ library shell */

.lib-layout { display: grid; grid-template-columns: 220px 1fr; gap: var(--s6); align-items: start; }
.lib-layout > .app-credit { grid-column: 1 / -1; }
.lib-side { position: sticky; top: 78px; display: flex; flex-direction: column; gap: var(--s2); }
.lib-main { min-width: 0; }

.side-nav { display: flex; flex-direction: column; gap: 1px; }
.side-nav button {
  display: flex; align-items: center; gap: var(--s2); width: 100%; text-align: left;
  background: transparent; border: none; font: inherit; font-size: var(--fs-sm); font-weight: 600;
  color: var(--text-2); padding: var(--s2) var(--s3); border-radius: var(--radius); cursor: pointer;
  transition: background .12s, color .12s;
}
.side-nav button:hover { background: var(--surface-2); color: var(--text); }
.side-nav button.active { background: var(--accent-soft); color: var(--accent); }
.side-nav .side-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-nav .side-count { font-size: var(--fs-caption); color: var(--text-3); font-variant-numeric: tabular-nums; }
.side-nav button.active .side-count { color: inherit; }

.side-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2);
  margin-top: var(--s4); padding: 0 var(--s3);
  font-size: var(--fs-caption); font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-3);
}
.side-empty { padding: var(--s2) var(--s3); font-size: var(--fs-sm); }
.side-note { padding: var(--s2) var(--s3); margin: 0; font-size: var(--fs-caption); color: var(--text-3); line-height: 1.5; }

@media (max-width: 860px) {
  .lib-layout { grid-template-columns: 1fr; }
  .lib-side { position: static; }
  .lib-side .side-nav { flex-direction: row; flex-wrap: wrap; }
  .lib-side .side-nav button { width: auto; }
  .side-note { display: none; }
}

/* access chips — who can open a document *inside* Cornfield */
.chip {
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
  font-size: var(--fs-caption); font-weight: 600; line-height: 1.5;
  padding: 2px 8px; border-radius: var(--radius-full);
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border);
}
.access-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* list / details view */
.doc-list { display: flex; flex-direction: column; gap: 2px; }
.doc-list .lr {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s2) var(--s3); border-radius: var(--radius);
  border: 1px solid transparent; cursor: pointer; transition: background .12s, border-color .12s;
}
.doc-list .lr:hover { background: var(--surface-2); border-color: var(--border); }
.doc-list .lr-thumb {
  width: 34px; height: 44px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center;
}
.doc-list .lr-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.doc-list .lr-thumb .placeholder { font-size: 16px; color: var(--text-3); }
.doc-list .lr-main { flex: 1; min-width: 0; }
.doc-list .lr-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-list .lr-sub { font-size: var(--fs-caption); }
.doc-list .lr-status, .doc-list .lr-owner, .doc-list .lr-access, .doc-list .actions { flex-shrink: 0; }
.doc-list .actions { display: flex; gap: var(--s1); }
.doc-list .sk-card { pointer-events: none; }
@media (max-width: 900px) { .doc-list .lr-access { display: none; } }
@media (max-width: 680px) {
  .doc-list .lr-status, .doc-list .lr-owner { display: none; }
}

/* ------------------------------------------------------------------ plot / move dialogs */

.dialog-sub { font-size: var(--fs-sm); color: var(--text-3); margin: calc(-1 * var(--s1)) 0 var(--s4) !important; }
.dialog-body { display: block; }
.dialog-note {
  font-size: var(--fs-caption); color: var(--text-3); line-height: 1.5;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--s3);
}
.share-body { display: flex; flex-direction: column; gap: var(--s5); margin-bottom: var(--s5); }
.field-block { display: flex; flex-direction: column; gap: var(--s2); }
.field-label { font-size: var(--fs-sm); font-weight: 700; color: var(--text-2); }
.field-hint { font-size: var(--fs-caption); color: var(--text-3); line-height: 1.5; }

.person-list { display: flex; flex-direction: column; gap: 2px; max-height: 190px; overflow-y: auto; }
.person-row {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s2); border-radius: var(--radius);
}
.person-row:hover { background: var(--surface-2); }
.person-main { flex: 1; min-width: 0; }
.person-name { font-size: var(--fs-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-sub { font-size: var(--fs-caption); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.add-row { display: flex; align-items: center; gap: var(--s2); }
.add-row > input, .add-row > select { flex: 1; min-width: 0; }
.add-row .spacer { flex: 1; }

/* ------------------------------------------------------------------ document detail */

.doc-head { display: flex; align-items: center; gap: var(--s4); margin-bottom: var(--s5); flex-wrap: wrap; }
.doc-head .titles { flex: 1; min-width: 220px; }
.doc-head h1 { font-size: var(--fs-h2); word-break: break-word; }

/* the title doubles as its own rename field — hint at that on hover, and look
   like a real input once focused */
.doc-title {
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 2px 6px; margin: -2px -6px; cursor: text; transition: background .12s, border-color .12s;
}
.doc-title:hover { background: var(--surface-2); border-color: var(--border); }
.doc-title:focus {
  outline: none; background: var(--surface);
  border-color: var(--accent); box-shadow: var(--focus);
}

.version-row { display: flex; flex-direction: column; gap: 2px; padding: var(--s2) 0; }
.version-row + .version-row { border-top: 1px solid var(--border); }
.version-file {
  font-size: var(--fs-caption); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.doc-head .titles .meta { color: var(--text-3); font-size: var(--fs-sm); margin-top: 2px; display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.doc-head .actions { display: flex; gap: var(--s2); flex-wrap: wrap; }

.doc-layout { display: grid; grid-template-columns: 1fr 300px; gap: var(--s6); align-items: start; }
@media (max-width: 900px) { .doc-layout { grid-template-columns: 1fr; } }

.viewer { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--s4); }
.viewer-toolbar { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s4); flex-wrap: wrap; }
.toggle-group { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 3px; }
.toggle-group button { background: transparent; border: none; font: inherit; font-weight: 600; font-size: var(--fs-sm); color: var(--text-2); padding: 5px 12px; border-radius: 7px; cursor: pointer; }
.toggle-group button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.pages { display: flex; flex-direction: column; gap: var(--s5); align-items: center; }
.page-wrap { position: relative; width: 100%; max-width: 800px; box-shadow: var(--shadow); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.page-wrap img { width: 100%; display: block; }
.overlay { position: absolute; inset: 0; }
.field-box {
  position: absolute; border: 1.5px solid var(--ft-text); background: color-mix(in srgb, var(--ft-text) 12%, transparent);
  border-radius: 3px; box-sizing: border-box;
}
.field-box.t-TextBox { border-color: var(--ft-text); background: color-mix(in srgb, var(--ft-text) 12%, transparent); }
.field-box.t-ChoiceButton { border-color: var(--ft-choice); background: color-mix(in srgb, var(--ft-choice) 12%, transparent); }
.field-box.t-RadioButton { border-color: var(--ft-radio); background: color-mix(in srgb, var(--ft-radio) 12%, transparent); border-radius: 50%; }
.field-box.t-Signature { border-color: var(--ft-sign); background: color-mix(in srgb, var(--ft-sign) 12%, transparent); }

.side-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--s5); position: sticky; top: 78px; display: flex; flex-direction: column; gap: var(--s4); }
.side-panel h3 { font-size: var(--fs-lg); }
.side-panel .hint { font-size: var(--fs-sm); color: var(--text-3); }
.slider-val { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--accent); }
.legend { display: flex; flex-direction: column; gap: var(--s2); }
.legend .row { font-size: var(--fs-sm); }
.legend .sw { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid; }
.summary-stats { display: flex; gap: var(--s3); }
.stat { flex: 1; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--s3); text-align: center; }
.stat .n { font-size: var(--fs-h2); font-weight: 700; }
.stat .l { font-size: var(--fs-caption); color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }

.center-state { text-align: center; padding: var(--s16) var(--s6); color: var(--text-3); }
.center-state .spinner { width: 30px; height: 30px; color: var(--accent); margin-bottom: var(--s4); }

/* ------------------------------------------------------------------ editor (Phase 2) */

.editor-layout { display: grid; grid-template-columns: 260px 1fr; gap: var(--s5); align-items: start; }
@media (max-width: 900px) { .editor-layout { grid-template-columns: 1fr; } }

.edit-rail { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--s4); position: sticky; top: 78px; display: flex; flex-direction: column; gap: var(--s4); max-height: calc(100vh - 100px); overflow: auto; }
.add-tools { display: flex; flex-direction: column; gap: var(--s2); }
.add-tools .btn { justify-content: flex-start; }
.field-list { display: flex; flex-direction: column; gap: 2px; }
/* "reuse fields from another form" picker */
.src-list { display: flex; flex-direction: column; gap: var(--s1); max-height: 50vh; overflow-y: auto; }
.src-doc { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: var(--s2) var(--s3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.src-doc:hover:not(:disabled) { background: var(--surface-2); border-color: var(--accent); }
.src-doc:disabled { opacity: 0.6; cursor: progress; }
.src-doc .src-title { font-weight: 600; font-size: var(--fs-sm); }

.field-list .fitem { display: flex; align-items: center; gap: var(--s2); padding: var(--s2); border-radius: var(--radius-sm); cursor: pointer; font-size: var(--fs-sm); }
.field-list .fitem:hover { background: var(--surface-2); }
.field-list .fitem.sel { background: var(--accent-soft); }
.field-list .fitem .tick { width: 8px; height: 8px; border-radius: 2px; }

/* "Edit names" dialog: one row per field, scrolling inside the dialog rather than
   growing it. The error line spans the inputs, under the row it belongs to. */
.name-grid { display: flex; flex-direction: column; gap: var(--s2); max-height: 55vh; overflow-y: auto; }
.name-row { display: grid; grid-template-columns: 10px 26px 1fr 1fr; gap: var(--s2); align-items: center; }
.name-row .tick { width: 8px; height: 8px; border-radius: 2px; }
.name-row .np { font-size: var(--fs-caption); text-align: right; font-variant-numeric: tabular-nums; }
.name-row .insp-error { grid-column: 3 / -1; margin-top: 0; }
.name-head { position: sticky; top: 0; z-index: 1; padding-bottom: var(--s1); background: var(--surface); font-size: var(--fs-caption); color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }

.editor-canvas .page-wrap { cursor: crosshair; }
/* Turn-page controls, floated over the top-right of each page in the editor. Faint
   until the page is hovered so they don't read as part of the form. */
.page-tools { position: absolute; top: var(--s2); right: var(--s2); display: flex; gap: 2px; padding: 2px; z-index: 6; cursor: default; background: color-mix(in srgb, var(--surface) 85%, transparent); border: 1px solid var(--border); border-radius: var(--radius-sm); opacity: .35; transition: opacity .12s ease; }
.page-wrap:hover .page-tools, .page-tools:focus-within { opacity: 1; }
/* On touch, manipulating a field/handle must not also scroll the page; while a draw
   tool is armed the whole canvas swallows the gesture. */
.field-box.editable, .field-box .handle { touch-action: none; }
.editor-canvas.drawing .page-wrap { touch-action: none; }
.field-box.editable { cursor: move; }
.field-box.editable.selected { box-shadow: 0 0 0 2px var(--accent); z-index: 5; }
/* secondary members of a multi-selection: highlighted, but only the primary shows handles */
.field-box.editable.multi { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent); z-index: 4; }
.field-box .handle { position: absolute; width: 11px; height: 11px; background: var(--accent); border: 1.5px solid var(--surface); border-radius: 2px; }
/* invisible enlarged hit area so the ~11px handles are usable by touch/imprecise pointers */
.field-box .handle::before { content: ""; position: absolute; inset: -9px; }
.field-box .handle.nw { left: -6px; top: -6px; cursor: nwse-resize; }
.field-box .handle.ne { right: -6px; top: -6px; cursor: nesw-resize; }
.field-box .handle.sw { left: -6px; bottom: -6px; cursor: nesw-resize; }
.field-box .handle.se { right: -6px; bottom: -6px; cursor: nwse-resize; }
.field-box .fb-label { position: absolute; top: -18px; left: 0; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 3px; white-space: nowrap; color: #fff; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* inspector (selected-field editor) */
.inspector { display: flex; flex-direction: column; gap: var(--s3); }
.inspector .insp-row { display: flex; flex-direction: column; gap: var(--s1); }
.inspector .insp-row > label { font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); }
.insp-input { width: 100%; padding: var(--s2) var(--s3); min-height: 34px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text); font: inherit; font-size: var(--fs-sm); }
.insp-input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.insp-input.invalid { border-color: var(--err); }
.insp-error { color: var(--err); font-size: var(--fs-caption); font-weight: 600; margin-top: calc(-1 * var(--s2)); }
.insp-error:empty { display: none; }
.insp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.insp-dim { display: flex; flex-direction: column; gap: 2px; }
.insp-dim > label { font-size: 11px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.insp-dim .with-unit { position: relative; }
.insp-dim .with-unit .unit { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--text-2); pointer-events: none; }
.insp-dim .with-unit .insp-input { padding-right: 22px; -moz-appearance: textfield; }
.insp-dim input[type="number"]::-webkit-outer-spin-button,
.insp-dim input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.insp-check { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); cursor: pointer; }
.insp-actions { display: flex; gap: var(--s2); flex-wrap: wrap; }
.insp-actions .btn { flex: 1; }

.action-bar { position: sticky; bottom: 0; z-index: 30; display: flex; align-items: center; gap: var(--s3); margin-top: var(--s5); padding: var(--s3) var(--s4); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.action-bar .dirty { color: var(--warn); font-size: var(--fs-sm); font-weight: 600; }
.action-bar .spacer { flex: 1; }

} /* @layer components */
