/* ============================================================================
 * vstyle-kit.css - THE component kit (2026-10-04, Viet: "a style page that has every element defined so we
 * don't need to keep creating the styles on each new page and area" - modelled on vercel.com's settings).
 *
 * Every on-page element, defined ONCE, on the theme tokens (works in all five themes and in both
 * interfaces). New pages use these classes instead of inline styles. The living reference with copy-ready
 * markup is Settings › Style Guide (public/js/style-guide.js) - add an element there when you add it here.
 *
 *   Links .......... .v-link  .v-ext (external: blue + ↗ box icon; automatic for target=_blank in Vstyle)
 *   Settings card .. .v-card > .v-card-body (h3 .v-title, p .v-desc) + .v-card-foot (.v-learn, actions right)
 *   Rows ........... .v-row (title/desc left, control right)  .v-row.danger  .v-row.collapse (+ .open)
 *   Option tiles ... .v-tiles > label.v-tile (input radio/checkbox, .v-tile-title, .v-tile-desc, .v-badge)
 *   Filters ........ .v-filterbar > .v-search (input) + .v-seg (buttons, .on) + .v-select
 *   Fields ......... .v-field > label.v-label + .v-input / .v-select / .v-textarea + .v-hint / .v-error
 *   Switch ......... label.v-switch > input[type=checkbox] + span
 *   Buttons ........ .v-btn  .v-btn.primary  .v-btn.danger  .v-btn.ghost  .v-btn.sm  .v-btn.icon
 *   Badges ......... .v-badge  .v-badge.ok|warn|bad|accent
 *   Table .......... table.v-table (th / td, tr.v-expand)
 *   Tabs ........... .v-tabs > button(.on)      Side nav .v-sidenav > a(.on)
 *   States ......... .v-empty  .v-skel (loading)  .v-note  .v-note.warn|bad
 * ============================================================================ */

/* ---- LEGACY CLASSES (2026-10-23, Viet: kit audit -> "Yeah lets go for it"): the older .btn / .btn-primary /
   .btn-ghost / .btn-secondary / .btn-danger / .btn-sm / .btn-s, .card and .filter-input / .filter-select are drawn
   by the SAME rules as their kit twins below (.v-btn, .v-card, .v-input) - one definition, so a look change made
   here reaches every page. Only the look is shared: layout stays per class (a .card keeps its padding, a
   .filter-input its width, .v-card alone clips its content). Prefixed html[data-ui="modern"] to outrank the base
   rules in index.html. Page-specific fixes stay in ui-modern.css until that page moves onto the kit. ---- */

/* ---- tokens the kit adds (blue for external links in every theme) ---- */
:root { --v-link-ext: #58a6ff; --v-radius: var(--radius-sm, 8px); --v-gap: 12px; --v-client-view: #f472b6; }   /* --v-client-view: the pink of the Client view pill (auth.js) */
[data-theme="light"] { --v-link-ext: #0b63e5; }
[data-theme="sand"]  { --v-link-ext: #1f5fbf; }
[data-theme="warm"]  { --v-link-ext: #6aa9ff; }
[data-theme="onyx"]  { --v-link-ext: #7aa2f7; }

/* ---- status palette (2026-10-23, Viet: "Status pallet everywhere") - the seeding dashboard's fixed status colours,
   app-wide. Seven buckets; js/titol-status.js maps every status word onto one. Light themes get the deeper set,
   dark themes the lighter one. Pages use .v-status / .v-dot or titolStatus.color(), never their own colours. ---- */
:root, [data-theme="dark"], [data-theme="onyx"], [data-theme="warm"] {
  --st-new: #b794f6; --st-open: #a1a1aa; --st-processing: #e9b04e; --st-ready: #7fb2ff; --st-shipped: #3dd6c0; --st-done: #3dd68c; --st-blocked: #ff6bb5; --st-cancelled: #8b8f98;
}
[data-theme="light"], [data-theme="sand"] {
  --st-new: #7c3aed; --st-open: #6b7280; --st-processing: #b26a0f; --st-ready: #1457d6; --st-shipped: #0e7c66; --st-done: #0a6b4f; --st-blocked: #d6337f; --st-cancelled: #787c84;
}

/* ---- links ---- */
.v-link { color: var(--accent); text-decoration: none; }
.v-link:hover { text-decoration: underline; }
.v-ext, html[data-ui="modern"] a[target="_blank"]:not(.btn):not(.v-btn):not([class*="btn-"]):not(.no-ext):not(:has(img)):not(:has(svg)) {
  color: var(--v-link-ext); text-decoration: none;
}
.v-ext:hover, html[data-ui="modern"] a[target="_blank"]:not(.btn):not(.v-btn):not([class*="btn-"]):not(.no-ext):not(:has(img)):not(:has(svg)):hover { text-decoration: underline; }
.v-ext::after, html[data-ui="modern"] a[target="_blank"]:not(.btn):not(.v-btn):not([class*="btn-"]):not(.no-ext):not(:has(img)):not(:has(svg))::after {
  content: ""; display: inline-block; width: .78em; height: .78em; margin-left: .28em; vertical-align: -.05em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 2.5h4.5V7'/%3E%3Cpath d='M13.5 2.5 7 9'/%3E%3Cpath d='M11.5 9.5v3a1 1 0 0 1-1 1h-7a1 1 0 0 1-1-1v-7a1 1 0 0 1 1-1h3'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 2.5h4.5V7'/%3E%3Cpath d='M13.5 2.5 7 9'/%3E%3Cpath d='M11.5 9.5v3a1 1 0 0 1-1 1h-7a1 1 0 0 1-1-1v-7a1 1 0 0 1 1-1h3'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---- settings card (Vercel: title, description, body, footer with Learn more + Save) ---- */
.v-card, html[data-ui="modern"] .card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius, 12px); box-shadow: none; }
.v-card { margin-bottom: 16px; overflow: hidden; }
.v-card-body { padding: 18px 20px; }
.v-card .v-title { margin: 0 0 4px; font-size: var(--fs-lg, 1rem); font-weight: 600; color: var(--text-primary); }
.v-card .v-desc { margin: 0 0 14px; color: var(--text-secondary); font-size: var(--fs-base, .85rem); }
.v-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 20px; border-top: 1px solid var(--border-subtle); background: var(--bg-secondary); color: var(--text-muted); font-size: var(--fs-sm, .78rem); }
.v-card-foot .v-actions { margin-left: auto; display: flex; gap: 8px; }
.v-card.danger { border-color: color-mix(in srgb, var(--error) 45%, transparent); }
.v-card.danger .v-card-foot { background: color-mix(in srgb, var(--error) 6%, var(--bg-secondary)); }

/* ---- rows inside a card (toggle row, danger row, collapsible row) ---- */
.v-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--border-subtle); border-radius: var(--v-radius); background: var(--bg-primary); margin-bottom: 10px; }
.v-row:last-child { margin-bottom: 0; }
.v-row .v-row-title { font-weight: 600; color: var(--text-primary); font-size: var(--fs-base, .85rem); }
.v-row .v-row-desc { color: var(--text-secondary); font-size: var(--fs-sm, .78rem); margin-top: 2px; }
.v-row.danger { border-color: color-mix(in srgb, var(--error) 35%, transparent); }
.v-row.collapse { cursor: pointer; }
.v-row.collapse .v-chev { display: inline-block; width: 14px; transition: transform .15s; color: var(--text-muted); }
.v-row.collapse.open .v-chev { transform: rotate(90deg); }
.v-row-detail { display: none; padding: 10px 14px 14px; border: 1px solid var(--border-subtle); border-top: 0; border-radius: 0 0 var(--v-radius) var(--v-radius); margin: -10px 0 10px; }
.v-row.collapse.open + .v-row-detail { display: block; }

/* ---- option tiles (radio cards with badges; the chosen one tinted) ---- */
.v-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.v-tiles.cols-1 { grid-template-columns: 1fr; }
.v-tile { display: grid; grid-template-columns: 18px 1fr; gap: 4px 10px; align-items: start; padding: 12px 14px; border: 1px solid var(--border-subtle); border-radius: var(--v-radius); background: var(--bg-primary); cursor: pointer; }
.v-tile:hover { border-color: var(--border-medium); }
.v-tile input { margin: 3px 0 0; accent-color: var(--accent); }
.v-tile .v-tile-title { font-weight: 600; color: var(--text-primary); font-size: var(--fs-base, .85rem); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.v-tile .v-tile-desc { grid-column: 2; color: var(--text-secondary); font-size: var(--fs-sm, .78rem); }
.v-tile:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 70%, transparent); background: color-mix(in srgb, var(--accent) 9%, var(--bg-primary)); }
.v-tile:has(input:checked) .v-tile-title { color: var(--accent); }

/* ---- filters: search, segmented, select ---- */
.v-filterbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.v-search { position: relative; flex: 1 1 240px; min-width: 180px; }
.v-search input { width: 100%; box-sizing: border-box; padding: 8px 10px 8px 32px; background: var(--bg-primary); border: 1px solid var(--border-medium); border-radius: var(--v-radius); color: var(--text-primary); font: inherit; font-size: var(--fs-base, .85rem); }
.v-search::before { content: ""; position: absolute; left: 10px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); background: var(--text-muted);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='4.5'/%3E%3Cpath d='M10.5 10.5 14 14'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='4.5'/%3E%3Cpath d='M10.5 10.5 14 14'/%3E%3C/svg%3E") center / contain no-repeat; }
.v-seg { display: inline-flex; border: 1px solid var(--border-medium); border-radius: var(--v-radius); overflow: hidden; background: var(--bg-primary); }
.v-seg button { border: 0; background: transparent; color: var(--text-secondary); padding: 7px 12px; font: inherit; font-size: var(--fs-base, .85rem); cursor: pointer; }
.v-seg button + button { border-left: 1px solid var(--border-subtle); }
.v-seg button:hover { color: var(--text-primary); background: var(--bg-card-hover); }
.v-seg button.on { color: var(--text-primary); background: var(--bg-card-hover); font-weight: 600; }

/* ---- fields ---- */
.v-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; max-width: 460px; }
.v-label { font-size: var(--fs-sm, .78rem); font-weight: 600; color: var(--text-secondary); }
.v-input, .v-select, .v-textarea, html[data-ui="modern"] .filter-input, html[data-ui="modern"] .filter-select { box-sizing: border-box; padding: 8px 10px; background: var(--bg-primary); border: 1px solid var(--border-medium); border-radius: var(--v-radius); color: var(--text-primary); font: inherit; font-size: var(--fs-base, .85rem); }
.v-input, .v-select, .v-textarea { width: 100%; }
.v-textarea { min-height: 80px; resize: vertical; }
.v-input:focus, .v-select:focus, .v-textarea:focus, .v-search input:focus, html[data-ui="modern"] .filter-input:focus, html[data-ui="modern"] .filter-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.v-input[aria-invalid="true"] { border-color: var(--error); }
.v-hint { font-size: var(--fs-sm, .78rem); color: var(--text-muted); }
.v-error { font-size: var(--fs-sm, .78rem); color: var(--error); }
.v-unit { display: flex; align-items: stretch; }
.v-unit .v-input { border-radius: var(--v-radius) 0 0 var(--v-radius); }
.v-unit span { display: flex; align-items: center; padding: 0 10px; border: 1px solid var(--border-medium); border-left: 0; border-radius: 0 var(--v-radius) var(--v-radius) 0; background: var(--bg-secondary); color: var(--text-muted); font-size: var(--fs-sm, .78rem); }
.v-check { display: inline-flex; gap: 8px; align-items: center; color: var(--text-primary); font-size: var(--fs-base, .85rem); cursor: pointer; }
.v-check input { accent-color: var(--accent); width: 15px; height: 15px; }

/* ---- switch ---- */
.v-switch { position: relative; display: inline-block; width: 36px; height: 20px; flex: 0 0 auto; }
.v-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.v-switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--border-medium); transition: background .15s; cursor: pointer; }
.v-switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; border-radius: 50%; background: var(--text-primary); transition: transform .15s; }
.v-switch input:checked + span { background: var(--accent); }
.v-switch input:checked + span::before { transform: translateX(16px); background: var(--bg-primary); }
.v-switch input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.v-switch input:disabled + span { opacity: .5; cursor: default; }

/* ---- buttons ---- */
.v-btn, html[data-ui="modern"] .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 14px; border-radius: var(--v-radius); border: 1px solid var(--border-medium); background: var(--bg-card); color: var(--text-primary); font: inherit; font-size: var(--fs-base, .85rem); font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; }
.v-btn:hover, html[data-ui="modern"] .btn:hover { background: var(--bg-card-hover); }
.v-btn.primary, html[data-ui="modern"] .btn-primary { background: var(--text-primary); color: var(--bg-primary); border-color: var(--text-primary); }
.v-btn.primary:hover, html[data-ui="modern"] .btn-primary:hover { background: var(--text-primary); opacity: .88; }
.v-btn.accent { background: var(--accent); color: var(--btn-primary-text, var(--bg-primary)); border-color: var(--accent); }
.v-btn.danger, html[data-ui="modern"] .btn-danger { background: var(--error); color: var(--btn-primary-text, var(--bg-primary)); border-color: var(--error); }
.v-btn.ghost { background: transparent; border-color: transparent; color: var(--text-secondary); }
.v-btn.ghost:hover { color: var(--text-primary); background: var(--bg-card-hover); }
.v-btn.sm, html[data-ui="modern"] .btn-sm, html[data-ui="modern"] .btn-s { padding: 4px 10px; font-size: var(--fs-sm, .78rem); }
.v-btn.icon { padding: 6px; width: 32px; height: 32px; }
.v-btn:disabled { opacity: .5; cursor: default; }

/* ---- badges ---- */
.v-badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: var(--fs-sm, .78rem); font-weight: 500; color: var(--text-secondary); background: var(--bg-card-hover); border: 1px solid var(--border-subtle); white-space: nowrap; }
.v-badge.ok { color: var(--success); background: color-mix(in srgb, var(--success) 12%, transparent); border-color: color-mix(in srgb, var(--success) 35%, transparent); }
.v-badge.warn { color: var(--warning); background: color-mix(in srgb, var(--warning) 12%, transparent); border-color: color-mix(in srgb, var(--warning) 35%, transparent); }
.v-badge.bad { color: var(--error); background: color-mix(in srgb, var(--error) 12%, transparent); border-color: color-mix(in srgb, var(--error) 35%, transparent); }
.v-badge.accent { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
/* status pill + dot (titolStatus.pill / .dot) */
.v-status { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 999px; font-size: var(--fs-sm, .78rem); font-weight: 500; white-space: nowrap; color: var(--st-c, var(--st-open)); background: color-mix(in srgb, var(--st-c, var(--st-open)) 14%, transparent); }
.v-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--st-c, var(--st-open)); flex: 0 0 auto; }
.st-new { --st-c: var(--st-new); } .st-open { --st-c: var(--st-open); } .st-processing { --st-c: var(--st-processing); } .st-ready { --st-c: var(--st-ready); }
.st-shipped { --st-c: var(--st-shipped); } .st-done { --st-c: var(--st-done); } .st-blocked { --st-c: var(--st-blocked); } .st-cancelled { --st-c: var(--st-cancelled); }

/* ---- table ---- */
.v-table { width: 100%; border-collapse: separate; border-spacing: 0; border: 1px solid var(--border-subtle); border-radius: var(--v-radius); overflow: hidden; font-size: var(--fs-base, .85rem); }
.v-table th { text-align: left; font-weight: 500; color: var(--text-muted); font-size: var(--fs-sm, .78rem); padding: 9px 12px; background: var(--bg-secondary); border-bottom: 1px solid var(--border-subtle); }
.v-table td { padding: 10px 12px; border-bottom: 1px solid var(--border-subtle); color: var(--text-primary); vertical-align: middle; }
.v-table tr:last-child td { border-bottom: 0; }
.v-table tbody tr:hover td { background: var(--bg-card-hover); }
.v-table td.num, .v-table th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- tabs + side nav ---- */
.v-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 16px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.v-tabs::-webkit-scrollbar { display: none; }
.v-tabs button { border: 0; background: none; color: var(--text-secondary); padding: 8px 12px; font: inherit; font-size: var(--fs-base, .85rem); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.v-tabs button:hover { color: var(--text-primary); }
.v-tabs button.on { color: var(--text-primary); border-bottom-color: var(--text-primary); }
.v-sidenav { display: flex; flex-direction: column; gap: 2px; }
.v-sidenav a { padding: 7px 10px; border-radius: var(--v-radius); color: var(--text-secondary); text-decoration: none; font-size: var(--fs-base, .85rem); cursor: pointer; }
.v-sidenav a:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.v-sidenav a.on { background: var(--bg-card-hover); color: var(--text-primary); font-weight: 600; }
.v-sidenav .v-sidenav-h { font-size: var(--fs-sm, .78rem); font-weight: 600; color: var(--text-muted); padding: 10px 10px 4px; }

/* ---- states ---- */
.v-empty { padding: 28px 16px; text-align: center; color: var(--text-muted); border: 1px dashed var(--border-medium); border-radius: var(--v-radius); font-size: var(--fs-base, .85rem); }
.v-skel { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--bg-card-hover) 25%, var(--border-subtle) 50%, var(--bg-card-hover) 75%); background-size: 200% 100%; animation: v-skel 1.2s infinite linear; margin: 6px 0; }
@keyframes v-skel { to { background-position: -200% 0; } }
.v-note { padding: 10px 12px; border-radius: var(--v-radius); background: var(--bg-secondary); border: 1px solid var(--border-subtle); color: var(--text-secondary); font-size: var(--fs-sm, .78rem); }
.v-note.warn { border-color: color-mix(in srgb, var(--warning) 40%, transparent); background: color-mix(in srgb, var(--warning) 8%, var(--bg-secondary)); }
.v-note.bad { border-color: color-mix(in srgb, var(--error) 40%, transparent); background: color-mix(in srgb, var(--error) 8%, var(--bg-secondary)); }

/* ---- page layout helper: side nav + content (Client Settings, Style Guide) ---- */
.v-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: start; }
.v-layout > .v-sidenav { position: sticky; top: 12px; }
@media (max-width: 760px) { .v-layout { grid-template-columns: 1fr; } .v-layout > .v-sidenav { position: static; flex-direction: row; flex-wrap: wrap; } .v-tiles { grid-template-columns: 1fr; } }

/* ---- theme swatch (Settings › Appearance): a mini page in a theme's colours. Light / warm / sand / onyx
   come from their own [data-theme] rules; dark is the stylesheet's :root, so its core tokens are repeated
   here (keep in step with index.html :root). ---- */
.v-swatch[data-theme="dark"] { --bg-primary:#0d0d0d; --bg-secondary:#151515; --bg-card:#1a1a1a; --bg-card-hover:#222; --border-subtle:#2a2a2a; --border-medium:#3a3a3a; --text-primary:#f0f0f0; --text-secondary:#8a8a8a; --text-muted:#555; --accent:#7ba7e1; }
.v-swatch { display: grid; grid-template-columns: 26% 1fr; gap: 6px; padding: 8px; height: 74px; border-radius: 6px; background: var(--bg-primary); border: 1px solid var(--border-subtle); margin-bottom: 8px; box-sizing: border-box; }
.v-swatch i { display: block; border-radius: 4px; background: var(--bg-card); border: 1px solid var(--border-subtle); }
.v-swatch b { display: flex; flex-direction: column; gap: 5px; padding: 6px; border-radius: 4px; background: var(--bg-card); border: 1px solid var(--border-subtle); }
.v-swatch b::before { content: ""; height: 6px; width: 60%; border-radius: 3px; background: var(--text-primary); }
.v-swatch b::after { content: ""; height: 6px; width: 34%; border-radius: 3px; background: var(--accent); }
.v-tile.v-theme-tile { grid-template-columns: 1fr; }
.v-tile.v-theme-tile input { position: absolute; opacity: 0; pointer-events: none; }
.v-tile.v-theme-tile { position: relative; }

/* ---- action bar (bulk selection): the Task Manager selection bar as a kit component (2026-10-04).
   A count, groups of quiet icon + label buttons split by .v-sep, ONE .primary, .danger as red text, an x to
   clear. Add .floating to pin it to the bottom centre of the screen while something is selected. ---- */
.v-actionbar { display: inline-flex; align-items: center; gap: 2px; padding: 6px 8px; background: var(--bg-card); border: 1px solid var(--border-medium); border-radius: 12px; box-shadow: 0 10px 30px color-mix(in srgb, var(--bg-primary) 70%, transparent); max-width: 100%; overflow-x: auto; }
.v-actionbar.floating { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 9000; max-width: calc(100vw - 32px); }
.v-actionbar .v-count { color: var(--text-primary); font-weight: 500; font-size: var(--fs-base, .85rem); padding: 0 8px 0 6px; white-space: nowrap; }
.v-actionbar .v-sep { width: 1px; height: 20px; background: var(--border-subtle); margin: 0 4px; flex: 0 0 auto; }
.v-actionbar button { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; background: transparent; color: var(--text-secondary); border: 0; border-radius: 8px; padding: 6px 10px; font: inherit; font-size: var(--fs-sm, .78rem); font-weight: 500; cursor: pointer; flex: 0 0 auto; }
.v-actionbar button:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.v-actionbar button.primary { background: var(--text-primary); color: var(--bg-primary); margin-right: 4px; }
.v-actionbar button.primary:hover { opacity: .88; }
.v-actionbar button.danger { color: var(--error); }
.v-actionbar button.danger:hover { background: color-mix(in srgb, var(--error) 12%, transparent); }
.v-actionbar button.x { padding: 6px; }
.v-actionbar svg { width: 14px; height: 14px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- dropdown menu (2026-10-04): a button that opens a short list of actions. Markup:
   <span class="v-menu-wrap"><button class="v-btn" onclick="vMenuToggle(this)">New</button>
   <span class="v-menu"><button onclick="vMenuClose();doThing()">Thing</button>...</span></span>
   vMenuToggle / vMenuClose live in style-guide.js (loaded on every page); Esc or a click outside closes it. ---- */
.v-menu-wrap { position: relative; display: inline-flex; }
.v-menu { display: none; position: absolute; top: calc(100% + 6px); right: 0; z-index: 9500; min-width: 200px; padding: 4px; background: var(--bg-card); border: 1px solid var(--border-medium); border-radius: 10px; box-shadow: 0 10px 30px color-mix(in srgb, var(--bg-primary) 70%, transparent); flex-direction: column; }
.v-menu-wrap.open > .v-menu { display: flex; }
.v-menu > button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 6px; padding: 7px 10px; color: var(--text-primary); font: inherit; font-size: var(--fs-base, .85rem); cursor: pointer; white-space: nowrap; }
.v-menu > button:hover { background: var(--bg-card-hover); }
.v-menu > button.danger { color: var(--error); }
.v-menu svg, .v-btn svg { flex: 0 0 auto; }
.v-menu-wrap.left > .v-menu { right: auto; left: 0; }

/* ---- filter & sort menu (2026-10-25, Viet: "all filters for all our pages use filter and sort drop down that looks
   like vercel"). One icon button; the popover holds titled sections - Filter by / Sort by / Preferences - each a list
   of rows; the chosen row carries a check. Built by titolUI.filterMenu() (js/titol-ui.js); the .tp-filters card draws it
   with menu:true (page-template.js). The button is tinted while open or while a filter is on; a count sits on it. ---- */
.v-fmenu-wrap { position: relative; display: inline-flex; }
.v-fmenu-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; min-width: 32px; padding: 0 8px; border-radius: var(--v-radius); border: 1px solid var(--border-medium); background: var(--bg-card); color: var(--text-secondary); font: inherit; font-size: var(--fs-base, .85rem); font-weight: 500; cursor: pointer; white-space: nowrap; }
.v-fmenu-btn:hover { color: var(--text-primary); background: var(--bg-card-hover); }
.v-fmenu-btn.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 10%, var(--bg-card)); }
.v-fmenu-ico { width: 16px; height: 16px; background: currentColor; flex: 0 0 auto; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M2 4h12M4.5 8h7M7 12h2'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M2 4h12M4.5 8h7M7 12h2'/%3E%3C/svg%3E") center / contain no-repeat; }
.v-fmenu-n { display: none; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: var(--btn-primary-text, var(--bg-primary)); font-family: "Space Mono", monospace; font-size: var(--fs-xs, .66rem); font-weight: 700; line-height: 16px; text-align: center; }
.v-fmenu-btn.has-n .v-fmenu-n { display: inline-block; }
.v-fmenu { display: none; position: absolute; top: calc(100% + 6px); right: 0; z-index: 9500; min-width: 240px; max-width: min(360px, calc(100vw - 24px)); max-height: min(70vh, 520px); overflow-y: auto; padding: 4px 0; background: var(--bg-card); border: 1px solid var(--border-medium); border-radius: 12px; box-shadow: 0 12px 32px color-mix(in srgb, var(--bg-primary) 70%, transparent); flex-direction: column; text-align: left; }
.v-fmenu-wrap.open > .v-fmenu { display: flex; }
.v-fmenu.v-fmenu-float { display: flex; position: fixed; z-index: 9600; }   /* while open it floats on the body, placed under its button by titolUI (no clipping by scrolling bars) */
.v-fmenu-wrap.left > .v-fmenu { right: auto; left: 0; }
.v-fmenu-sec { padding: 6px 6px 8px; }
.v-fmenu-sec + .v-fmenu-sec { border-top: 1px solid var(--border-subtle); }
.v-fmenu-h { padding: 6px 10px 4px; font-size: var(--fs-sm, .78rem); color: var(--text-muted); }
.v-fmenu-it { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 32px; padding: 6px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text-primary); font: inherit; font-size: var(--fs-base, .85rem); text-align: left; cursor: pointer; white-space: nowrap; }
.v-fmenu-it:hover { background: var(--bg-card-hover); }
.v-fmenu-it:disabled { opacity: .5; cursor: default; }
.v-fmenu-it .v-fmenu-ic { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-secondary); flex: 0 0 auto; font-size: var(--fs-sm, .78rem); }
.v-fmenu-it .v-fmenu-ic:empty { display: none; }
.v-fmenu-it .v-fmenu-l { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }
.v-fmenu-it .v-fmenu-hint { color: var(--text-muted); font-size: var(--fs-sm, .78rem); }
.v-fmenu-it .v-fmenu-ck { width: 14px; height: 14px; flex: 0 0 auto; visibility: hidden; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3.2 3.2L13 5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3.2 3.2L13 5'/%3E%3C/svg%3E") center / contain no-repeat; }
.v-fmenu-it.on .v-fmenu-ck { visibility: visible; }
.v-fmenu-it.on { font-weight: 600; }
.v-fmenu-sec.multi .v-fmenu-it .v-fmenu-ck { visibility: visible; opacity: .18; background: var(--text-muted); border-radius: 3px; -webkit-mask: none; mask: none; }
.v-fmenu-sec.multi .v-fmenu-it.on .v-fmenu-ck { opacity: 1; background: currentColor; border-radius: 0; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3.2 3.2L13 5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5l3.2 3.2L13 5'/%3E%3C/svg%3E") center / contain no-repeat; }
.v-fmenu-sec.long .v-fmenu-list { max-height: 228px; overflow-y: auto; }
.v-fmenu-find { display: block; width: calc(100% - 8px); margin: 2px 4px 6px; padding: 6px 10px; box-sizing: border-box; background: var(--bg-primary); border: 1px solid var(--border-medium); border-radius: 6px; color: var(--text-primary); font: inherit; font-size: var(--fs-sm, .78rem); }
.v-fmenu-find:focus { outline: none; border-color: var(--accent); }
.v-fmenu-none { padding: 6px 10px; color: var(--text-muted); font-size: var(--fs-sm, .78rem); }
.v-fmenu-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 8px 10px 6px; border-top: 1px solid var(--border-subtle); }
.v-fmenu-foot button { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-size: var(--fs-sm, .78rem); font-weight: 600; cursor: pointer; }
.v-fmenu-empty { padding: 8px 10px; color: var(--text-muted); font-size: var(--fs-sm, .78rem); }

/* ---- Client view frame (2026-10-25, Viet on #client-inv=CHB: "When in client view, can we make a glow around the whole
   page"). body.dev-client-view is set by devClientViewPaintBtn (auth.js) while a dev is previewing as a client: a pink
   frame + inner glow on the whole viewport, breathing slowly, clicks pass through. body::before is the noise layer. ---- */
body.dev-client-view::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 9998; border: 2px solid var(--v-client-view); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--v-client-view) 35%, transparent), inset 0 0 56px color-mix(in srgb, var(--v-client-view) 26%, transparent); animation: v-cv-breathe 2.8s ease-in-out infinite; }
@keyframes v-cv-breathe { 0%, 100% { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--v-client-view) 35%, transparent), inset 0 0 40px color-mix(in srgb, var(--v-client-view) 20%, transparent); } 50% { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--v-client-view) 45%, transparent), inset 0 0 80px color-mix(in srgb, var(--v-client-view) 36%, transparent); } }
@media (prefers-reduced-motion: reduce) { body.dev-client-view::after { animation: none; } }

/* ---- page: Delivery Hub action bar (dropoffs.js, 2026-10-04) - built from .v-btn + .v-menu ---- */
.do-actions { margin-left: auto; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.do-sep { width: 1px; height: 20px; background: var(--border-subtle); margin: 0 4px; }
.do-actions .v-btn.do-eod { color: var(--warning); }
.do-actions .v-btn.icon { width: 30px; height: 30px; padding: 0; }

/* ---- page: Submit ASN / Add Task forms (tv2-*, task-create-v2.js) in Vstyle (2026-10-04): sentence-case labels,
   a quiet 'required' marker, plain requirement tags - no caps-with-tracking ---- */
html[data-ui="modern"] .tv2-f label { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--text-secondary); font-size: var(--fs-sm, .78rem); }
html[data-ui="modern"] .tv2-f label .req { font-family: inherit; font-size: var(--fs-sm, .78rem); font-weight: 500; text-transform: lowercase; color: var(--accent); }
html[data-ui="modern"] .tv2-check li small { font-family: inherit; font-size: var(--fs-sm, .78rem); text-transform: none; letter-spacing: 0; }
html[data-ui="modern"] .tv2-check h4, html[data-ui="modern"] .tv2-admbar-h b, html[data-ui="modern"] .tv2-items-bar .lbl { text-transform: none; letter-spacing: 0; font-weight: 600; }
/* the dropdown pills' label ("Brand", "Requester", "Job" ...) everywhere: sentence case in Vstyle */
html[data-ui="modern"] .tf-pill-label { text-transform: none; letter-spacing: 0; }
/* 2026-10-23 (Viet on #client-inv: "use the kit on the top bar pills too"): the dropdown pill itself (.tf-pill - Brand /
   Event / View, + Add product, Brand Portal, Barcodes on Client Inventory; the same pills on Submit Request, Submit ASN,
   Order Request, Quick add) is a small kit button - card fill, medium border, the kit radius; an open or set pill
   (.active) takes the text-primary border like a .v-tabs / .v-seg "on". Page rules that outrank this on purpose keep
   working (.tv2-dd.quiet keeps its quiet pills). */
html[data-ui="modern"] .tf-pill { background: var(--bg-card); border: 1px solid var(--border-medium); border-radius: var(--v-radius); color: var(--text-secondary); padding: 4px 10px; font-size: var(--fs-sm, .78rem); gap: 6px; }
html[data-ui="modern"] .tf-pill:hover { background: var(--bg-card-hover); border-color: var(--border-medium); color: var(--text-primary); }
html[data-ui="modern"] .tf-pill.active { border-color: var(--text-primary); color: var(--text-primary); }
html[data-ui="modern"] .tf-pill.has-value .tf-pill-value { color: var(--text-primary); font-weight: 600; }
html[data-ui="modern"] .tf-pill-label { opacity: 1; color: var(--text-muted); }

/* ---- page: Settings > User Management (2026-10-04, Viet: "restyle this too, vstyle? cleaned up?") ---- */
#settings-user-mgmt .um-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
#settings-user-mgmt .um-head .v-desc { margin-bottom: 12px; }
#settings-user-mgmt .um-count { margin-left: 6px; font-size: var(--fs-sm, .78rem); font-weight: 500; color: var(--text-muted); }
#settings-user-mgmt .um-add { border: 1px solid var(--border-subtle); border-radius: var(--v-radius, 8px); background: var(--bg-secondary); padding: 14px 14px 4px; margin: 0 0 14px; }
#settings-user-mgmt .um-add-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 12px; }
#settings-user-mgmt .um-add .v-field { max-width: none; }
#settings-user-mgmt .um-add-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 2px 0 10px; }
#settings-user-mgmt .um-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
#settings-user-mgmt .um-table-wrap { overflow-x: auto; }
#settings-user-mgmt .um-table { width: 100%; }
#settings-user-mgmt .um-table td { vertical-align: middle; }
#settings-user-mgmt .um-person { display: flex; align-items: center; gap: 10px; min-width: 200px; }
#settings-user-mgmt .um-av { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--bg-elevated); border: 1px solid var(--border-subtle); color: var(--text-secondary); font-size: var(--fs-sm, .72rem); font-weight: 600; }
#settings-user-mgmt .um-name { font-weight: 500; color: var(--text-primary); }
#settings-user-mgmt .um-name .set-editable-txt, #settings-user-mgmt .um-title .set-editable-txt { padding: 0 !important; }
#settings-user-mgmt .um-mail { font-size: var(--fs-sm, .75rem); color: var(--text-muted); }
#settings-user-mgmt .um-title { color: var(--text-secondary); }
#settings-user-mgmt .um-sel { padding: 4px 8px; min-width: 130px; max-width: 200px; }
#settings-user-mgmt .um-role { appearance: none; -webkit-appearance: none; border: 1px solid var(--border-subtle); border-radius: 999px; padding: 3px 12px; background: var(--bg-elevated); color: var(--text-primary); font: inherit; font-size: var(--fs-sm, .75rem); font-weight: 500; cursor: pointer; }
#settings-user-mgmt .um-role:focus { outline: none; border-color: var(--accent); }
#settings-user-mgmt .um-role.role-admin { color: var(--warning); border-color: color-mix(in srgb, var(--warning) 40%, transparent); background: color-mix(in srgb, var(--warning) 10%, transparent); }
#settings-user-mgmt .um-role.role-team { color: var(--violet, var(--accent)); border-color: color-mix(in srgb, var(--violet, var(--accent)) 40%, transparent); background: color-mix(in srgb, var(--violet, var(--accent)) 10%, transparent); }
#settings-user-mgmt .um-role.role-dev { color: var(--error); border-color: color-mix(in srgb, var(--error) 40%, transparent); background: color-mix(in srgb, var(--error) 10%, transparent); }
#settings-user-mgmt .um-role option { color: var(--text-primary); background: var(--bg-card); }
#settings-user-mgmt .um-act { white-space: nowrap; text-align: right; }
#settings-user-mgmt .um-act .v-btn { color: var(--text-muted); }
#settings-user-mgmt .um-act .v-btn:hover { color: var(--text-primary); }
#settings-user-mgmt .um-act .um-del:hover { color: var(--error); }
#settings-user-mgmt tr.um-off td { opacity: .55; }
#settings-user-mgmt tr.um-off td:nth-child(5) { opacity: 1; }
#settings-user-mgmt .um-tos { display: inline-block; white-space: nowrap; border-radius: 999px; padding: 2px 10px; font-size: var(--fs-sm, .75rem); font-weight: 500; border: 1px solid transparent; }
#settings-user-mgmt .um-tos.ok { color: var(--success); background: color-mix(in srgb, var(--success) 10%, transparent); }
#settings-user-mgmt .um-tos.old { color: var(--warning); background: color-mix(in srgb, var(--warning) 10%, transparent); }
#settings-user-mgmt .um-tos.no { color: var(--text-muted); border-color: var(--border-subtle); }
/* 2026-10-22: sortable headers (Person / Role / Last login / Terms) and the per-person Permissions modal */
#settings-user-mgmt th.um-sort { cursor: pointer; user-select: none; white-space: nowrap; }
#settings-user-mgmt th.um-sort:hover { color: var(--text-primary); }
#settings-user-mgmt th.um-sort.on { color: var(--text-primary); }
#settings-user-mgmt th.um-sort.on::after { content: " \25BE"; }
#settings-user-mgmt th.um-sort.on.asc::after { content: " \25B4"; }
#settings-user-mgmt #ca-role-defaults-card { border-color: var(--border-subtle); box-shadow: none; }
.um-perms-modal #ca-user-card { border: 0; box-shadow: none; background: transparent; padding: 0; margin: 0; }
.um-perms-modal #ca-user-card > .card-header { display: none; }
/* Permissions + User settings: the same quiet table look (sentence-case headers, no tracking) */
#settings-user-mgmt .um-panel th { text-transform: none !important; letter-spacing: 0 !important; font-weight: 500; color: var(--text-muted); }
#settings-user-mgmt .um-panel .card { border-color: var(--border-subtle); box-shadow: none; }
#settings-user-mgmt .um-panel .card-title { text-transform: none; letter-spacing: 0; }
#settings-user-mgmt select.um-sel { appearance: none; -webkit-appearance: none; background: transparent !important; color: var(--text-secondary) !important; border: 1px solid transparent !important; border-radius: var(--v-radius, 8px); padding: 4px 22px 4px 8px; height: auto !important; font-size: var(--fs-base, .85rem); cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%), linear-gradient(135deg, var(--text-muted) 50%, transparent 50%) !important; background-position: calc(100% - 11px) 52%, calc(100% - 7px) 52% !important; background-size: 4px 4px !important; background-repeat: no-repeat !important; }
#settings-user-mgmt select.um-sel:hover, #settings-user-mgmt select.um-sel:focus { border-color: var(--border-medium) !important; color: var(--text-primary) !important; outline: none; }
#settings-user-mgmt select.um-sel option { background: var(--bg-card); color: var(--text-primary); }
#settings-user-mgmt .um-table td { padding-top: 7px; padding-bottom: 7px; }

/* ---- page: Task Manager > End of Day (2026-10-04, Viet: "fix this to vstyle") ---- */
#ops-eod .eod-page { max-width: 1080px; padding: 4px 10px 40px; }
#ops-eod .eod-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
#ops-eod .eod-top .tp-head { margin: 0; }
#ops-eod .eod-day { display: flex; align-items: center; gap: 8px; }
#ops-eod .eod-day label { font-size: var(--fs-sm, .78rem); color: var(--text-muted); }
#ops-eod .eod-day .v-input { width: auto; padding: 6px 10px; }
#ops-eod .eod-close .v-card-body { padding: 16px 18px; }
#ops-eod .eod-close-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
#ops-eod .eod-prog { flex: 1; min-width: 220px; }
#ops-eod .eod-prog-l { font-size: var(--fs-sm, .78rem); color: var(--text-muted); margin-bottom: 6px; }
#ops-eod .eod-bar { height: 6px; background: var(--bg-secondary); border-radius: 999px; overflow: hidden; }
#ops-eod .eod-bar span { display: block; height: 100%; border-radius: 999px; transition: width .3s; }
#ops-eod .eod-help { margin: 10px 0 0; font-size: var(--fs-sm, .78rem); color: var(--text-muted); }
#ops-eod #eod-batch-note:not(:empty) { margin-top: 10px; }
#ops-eod .eod-closed { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: var(--fs-sm, .78rem); }
#ops-eod .eod-closed .v-btn { margin-left: auto; }
#ops-eod .eod-sec { margin: 18px 0 0; }
#ops-eod .eod-sec-h { font-size: var(--fs-sm, .78rem); font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
#ops-eod .eod-sec-h span { color: var(--text-muted); font-weight: 500; margin-left: 2px; }
#ops-eod .eod-empty { padding: 14px; border: 1px dashed var(--border-subtle); border-radius: var(--radius, 12px); }
#ops-eod .eod-list { margin: 0; }
#ops-eod .eod-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--border-subtle); }
#ops-eod .eod-row:first-child { border-top: 0; }
#ops-eod .eod-main { flex: 1; min-width: 0; }
#ops-eod .eod-t { font-weight: 500; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ops-eod .eod-job { font-family: 'Space Mono', monospace; font-size: var(--fs-sm, .75rem); color: var(--text-muted); margin-left: 4px; }
#ops-eod .eod-m { font-size: var(--fs-sm, .75rem); color: var(--text-muted); margin-top: 2px; }
#ops-eod .eod-old { color: var(--warning); }
#ops-eod .eod-act { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

/* ---- page: Inventory > Products (2026-10-04, Viet: "Can we give this Vstyle?") ---- */
#products-host .prod-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
#products-host .prod-top .tp-head { margin: 0; flex: 1 1 360px; }
#products-host .prod-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
#products-host .prod-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
#products-host .prod-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
#products-host .prod-filters .v-select { width: auto; min-width: 150px; }
#products-host .prod-count { font-size: var(--fs-sm, .78rem); color: var(--text-muted); margin-left: auto; }
#products-host .prod-table-card { overflow-x: auto; border: 1px solid var(--border-subtle); border-radius: var(--radius, 12px); background: var(--bg-card); }
#products-host .prod-table { width: 100%; border-collapse: collapse; font-size: var(--fs-base, .85rem); }
#products-host .prod-table th { padding: 9px 10px; text-align: left; font-size: var(--fs-sm, .78rem); font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text-muted); border-bottom: 1px solid var(--border-subtle); white-space: nowrap; background: var(--bg-card); position: sticky; top: 0; z-index: 1; }
#products-host .prod-table th:hover { color: var(--text-primary); }
#products-host tr.prod-row { border-bottom: 1px solid var(--border-subtle); }
#products-host tr.prod-row:last-child { border-bottom: 0; }
#products-host tr.prod-row:hover td { background: var(--bg-card-hover); }


/* ---- page: Inventory > Inventory Wizard (2026-10-05, Viet: "apply Vstyle to this page") ---- */
#inv-wizard-container .iw-views { margin-bottom: 14px; }
#inv-wizard-container .iw-views button.iw-amend.on { color: var(--warning); border-bottom-color: var(--warning); }
#inv-wizard-container .iw-steps { list-style: none; display: flex; gap: 0; margin: 4px 0 18px; padding: 0; counter-reset: none; }
#inv-wizard-container .iw-steps li { flex: 1; display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: var(--fs-base, .85rem); position: relative; padding-right: 12px; }
#inv-wizard-container .iw-steps li:not(:last-child)::after { content: ""; flex: 1; height: 1px; background: var(--border-subtle); margin-left: 4px; }
#inv-wizard-container .iw-step-n { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: var(--fs-sm, .75rem); font-weight: 600; border: 1px solid var(--border-medium); color: var(--text-muted); background: var(--bg-card); }
#inv-wizard-container .iw-step-l { white-space: nowrap; }
#inv-wizard-container .iw-steps li.on { color: var(--text-primary); font-weight: 600; }
#inv-wizard-container .iw-steps li.on .iw-step-n { background: var(--text-primary); color: var(--bg-primary); border-color: var(--text-primary); }
#inv-wizard-container .iw-steps li.done { color: var(--text-secondary); }
#inv-wizard-container .iw-steps li.done .iw-step-n { color: var(--success); border-color: color-mix(in srgb, var(--success) 50%, transparent); }
#inv-wizard-container .card { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius, 12px); box-shadow: none; }
#inv-wizard-container label { text-transform: none; letter-spacing: 0; }
#inv-wizard-container select.filter-select, #inv-wizard-container input.filter-input, #inv-wizard-container textarea.filter-input {
  background: var(--bg-primary); border: 1px solid var(--border-medium); border-radius: var(--v-radius, 8px); color: var(--text-primary);
  padding: 8px 10px !important; font-size: var(--fs-base, .85rem) !important; min-width: 0; box-sizing: border-box; }
#inv-wizard-container select.filter-select:focus, #inv-wizard-container input.filter-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
#inv-wizard-container select.filter-select:disabled { opacity: .75; cursor: not-allowed; }
#inv-wizard-container details { border-radius: var(--radius, 12px); }
#inv-wizard-container #iw-setup-preview { background: transparent !important; border: 1px dashed var(--border-subtle); }
@media (max-width: 760px) { #inv-wizard-container .iw-step-l { display: none; } #inv-wizard-container .iw-steps li.on .iw-step-l { display: inline; } }

/* Inventory Wizard: a picked Setup value reads like the job tie ("ready") */
#inv-wizard-container #iw-task-tie, #inv-wizard-container .iw-ready { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); border-radius: var(--radius-sm); }
#inv-wizard-container .iw-ready { margin: 0; }
#inv-wizard-container .iw-ready-k { font-size: var(--fs-sm, .78rem); font-weight: 700; color: var(--accent); white-space: nowrap; }
#inv-wizard-container .iw-ready-sub { font-size: var(--fs-sm, .78rem); color: var(--text-secondary); flex: 1; min-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#inv-wizard-container .iw-ready .btn { padding: 4px 10px; font-size: var(--fs-sm, .75rem); }

/* Disabled buttons look disabled (2026-10-05, Viet: "mute Next -> Map fields until the data is parsed" -
   a disabled .btn-primary looked exactly like a live one, so every gated button read as ready) */
.btn:disabled, .btn[disabled], .v-btn:disabled { opacity: .4; cursor: not-allowed; filter: grayscale(.4); box-shadow: none; }
.btn:disabled:hover, .btn[disabled]:hover { transform: none; }
/* Task Manager: Artist / brand pills in capitals (2026-10-05, Viet) - wins over the Vstyle sentence-case pill pass */
#tab-tasks .db-brand-pill, #tab-tasks .db-brand-cell { text-transform: uppercase !important; }
/* Task Manager: Priority flags centred in their column, header too (2026-10-05, Viet) */
#tab-tasks .db-priority-cell { display: flex !important; justify-content: center; }
#tab-tasks .db-col-drag[data-col="priority"] { justify-content: center; text-align: center; }

/* ---- page: Client Inventory gallery (2026-10-06, Viet: "make the brand filter connected ... the search bar in
   Vstyle") ---- */
.cinv-filter-seg { display: inline-flex; align-items: center; background: var(--bg-secondary); border: 1px solid var(--border-subtle); border-radius: 999px; padding: 2px; gap: 2px; }
.cinv-filter-seg .cinv-star-filter-btn { border: 0 !important; background: transparent !important; border-radius: 999px !important; padding: 4px 12px !important; color: var(--text-muted) !important; box-shadow: none !important; }
.cinv-filter-seg .cinv-star-filter-btn:hover { color: var(--text-primary) !important; }
.cinv-filter-seg .cinv-star-filter-btn.active { background: var(--accent) !important; color: var(--btn-primary-text) !important; }
.cinv-filter-seg .cinv-star-filter-btn.active span { color: inherit; opacity: .8; }
.cinv-hero-search.v-search { flex: 0 1 340px; min-width: 200px; }
.cinv-hero-search.v-search input { border-radius: var(--v-radius, 8px) !important; padding: 7px 10px 7px 32px !important; background: var(--bg-primary) !important; border: 1px solid var(--border-medium) !important; }
.cinv-hero-search.v-search input:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.cinv-hero-gear { border-radius: var(--v-radius, 8px) !important; }

/* Inventory Wizard - centred step bar + the Guide side card (2026-10-06, Viet: "side card the Guide and tab the
   info, and center align the progress bar") */
#inv-wizard-container .iw-steps { max-width: 860px; margin-left: auto; margin-right: auto; }
.iw-guide-btn { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: var(--fs-sm, .72rem); font-weight: 600; color: var(--text-secondary); cursor: pointer; }
.iw-guide-btn:hover { color: var(--text-primary); border-color: var(--border-medium); }
.iw-guide { position: fixed; top: 64px; right: 16px; bottom: 16px; width: min(420px, calc(100vw - 32px)); z-index: 900; display: flex; flex-direction: column; background: var(--bg-card); border: 1px solid var(--border-medium); border-radius: var(--radius); box-shadow: var(--shadow); transform: translateX(calc(100% + 24px)); transition: transform .18s ease; }
.iw-guide.open { transform: none; }
.iw-guide-h { display: flex; align-items: baseline; gap: 8px; padding: 14px 16px 10px; border-bottom: 1px solid var(--border-subtle); }
.iw-guide-h b { font-size: var(--fs-md, .9rem); }
.iw-guide-h span { font-size: var(--fs-sm, .72rem); color: var(--text-muted); }
.iw-guide-h button { margin-left: auto; background: none; border: 0; color: var(--text-muted); cursor: pointer; font-size: var(--fs-base, .85rem); }
.iw-guide-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--border-subtle); }
.iw-guide-tabs button { background: none; border: 1px solid var(--border-subtle); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: var(--fs-sm, .72rem); color: var(--text-secondary); cursor: pointer; }
.iw-guide-tabs button.on { background: var(--text-primary); color: var(--bg-primary); border-color: var(--text-primary); }
.iw-guide-b { flex: 1; overflow-y: auto; padding: 12px 16px 16px; font-size: var(--fs-base, .8rem); color: var(--text-secondary); line-height: 1.55; }
.iw-guide-b ul { margin: 0 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.iw-guide-b ul[hidden] { display: none; }

/* 2026-10-22 permission tree (perm-tree.js): the editors laid out like the left menu */
.ca-tree { display: flex; flex-direction: column; gap: 2px; }
.ca-sec { display: flex; align-items: baseline; gap: 10px; margin: 12px 0 6px; padding-bottom: 6px; border-bottom: 1px solid var(--border-subtle); font-size: var(--fs-sm, .75rem); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-primary); }
.ca-sec small { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--text-muted); }
.ca-sec-admin { margin-top: 22px; }
.ca-grp { margin: 10px 0 2px 8px; font-size: var(--fs-sm, .75rem); font-weight: 600; color: var(--text-muted); }
.ca-row { padding: 6px 8px; border-radius: var(--radius-sm); }
.ca-row:hover { background: var(--bg-card-hover); }
.ca-main { display: flex; align-items: center; gap: 10px; min-height: 28px; flex-wrap: wrap; }
.ca-sw-gap { width: 36px; flex: 0 0 36px; }
.ca-ico { width: 22px; text-align: center; }
.ca-lbl { font-weight: 500; color: var(--text-primary); }
.ca-row.ca-link .ca-lbl { color: var(--text-secondary); }
.ca-note { font-size: var(--fs-sm, .75rem); color: var(--text-muted); }
.ca-subs { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px 46px; }
.ca-subs.off { opacity: .4; }
.ca-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border-subtle); background: var(--bg-secondary); font-size: var(--fs-sm, .75rem); color: var(--text-secondary); cursor: pointer; }
.ca-chip.on { color: var(--text-primary); border-color: var(--border-medium); }
.ca-chip input { margin: 0; width: 13px; height: 13px; }
details.ca-fold { display: block; }
details.ca-fold > summary { cursor: pointer; font-size: var(--fs-sm, .75rem); color: var(--text-muted); list-style: none; }
details.ca-fold > summary::-webkit-details-marker { display: none; }
details.ca-fold > summary::before { content: "\25B8 "; }
details.ca-fold[open] > summary::before { content: "\25BE "; }
details.ca-fold > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
details.ca-rest { margin-top: 14px; }
details.ca-rest > summary { cursor: pointer; font-size: var(--fs-sm, .75rem); color: var(--text-muted); }

/* ---- list table: ☰ Columns picker + resizable headers (2026-10-23, js/titol-list.js) ---- */
.v-cols-wrap { position: relative; display: inline-flex; }
.v-cols-btn { display: inline-flex; align-items: center; gap: 5px; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: var(--fs-sm, .72rem); color: var(--text-secondary); cursor: pointer; white-space: nowrap; }
.v-cols-btn:hover { border-color: var(--border-medium); color: var(--text-primary); }
.v-cols-btn.on { border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--bg-card)); }
.v-cols-ico, .v-cols-n { opacity: .7; }
.v-cols-pop { position: absolute; top: calc(100% + 6px); right: 0; z-index: 60; min-width: 230px; max-height: 70vh; overflow-y: auto; background: var(--bg-card); border: 1px solid var(--border-medium); border-radius: var(--v-radius); box-shadow: 0 12px 32px rgba(0,0,0,.35); padding: 8px 0; }
.v-cols-h { display: flex; align-items: center; justify-content: space-between; padding: 2px 12px 6px; font-size: var(--fs-sm, .72rem); font-weight: 600; color: var(--text-muted); }
.v-cols-h button, .v-cols-f button { background: none; border: 0; color: var(--accent); font: inherit; font-size: var(--fs-sm, .72rem); font-weight: 600; cursor: pointer; padding: 0; }
.v-cols-chip { display: flex; align-items: center; gap: 8px; padding: 5px 12px; font-size: var(--fs-base, .78rem); color: var(--text-primary); cursor: grab; white-space: nowrap; user-select: none; }
.v-cols-chip:hover { background: var(--bg-card-hover); }
.v-cols-chip.drag { opacity: .4; }
.v-cols-grip { color: var(--text-muted); opacity: .5; }
.v-cols-chip label { display: flex; align-items: center; gap: 8px; cursor: pointer; flex: 1; }
.v-cols-pop input { margin: 0; accent-color: var(--accent); }
.v-cols-f { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; padding: 6px 12px 2px; border-top: 1px solid var(--border-subtle); font-size: var(--fs-sm, .72rem); color: var(--text-muted); }
table.v-list { width: 100%; table-layout: fixed; border-collapse: collapse; }
table.v-list thead th { position: relative; text-align: left; font-weight: 500; color: var(--text-muted); font-size: var(--fs-sm, .72rem); white-space: nowrap; }
table.v-list td { vertical-align: middle; overflow-wrap: anywhere; }
.v-col-rz { position: absolute; top: 0; right: -3px; width: 7px; height: 100%; cursor: col-resize; z-index: 2; user-select: none; }
.v-col-rz:hover, .v-col-rz.on { background: var(--accent); opacity: .5; }

/* ---- modal + drawer (2026-10-23, js/titol-ui.js titolUI.modal / titolUI.drawer) ---- */
.v-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(0,0,0,.6); display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 16px; overflow-y: auto; }
.v-modal { width: 100%; max-width: 520px; background: var(--bg-card); border: 1px solid var(--border-medium); border-radius: var(--radius, 12px); box-shadow: 0 24px 64px rgba(0,0,0,.45); display: flex; flex-direction: column; max-height: calc(100vh - 8vh - 32px); }
.v-modal.sm { max-width: 400px; } .v-modal.lg { max-width: 820px; }
.v-dlg-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 20px 12px; border-bottom: 1px solid var(--border-subtle); }
.v-dlg-titles { min-width: 0; }
.v-dlg-title { font-size: var(--fs-lg, 1rem); font-weight: 600; color: var(--text-primary); overflow-wrap: anywhere; }
.v-dlg-sub { font-size: var(--fs-sm, .78rem); color: var(--text-muted); margin-top: 2px; }
.v-dlg-x { background: none; border: 0; color: var(--text-muted); font: inherit; font-size: var(--fs-lg, 1rem); line-height: 1; padding: 4px 6px; border-radius: var(--v-radius); cursor: pointer; }
.v-dlg-x:hover { color: var(--text-primary); background: var(--bg-card-hover); }
.v-dlg-body { padding: 16px 20px; overflow-y: auto; color: var(--text-secondary); flex: 1 1 auto; min-height: 0; }
.v-dlg-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--border-subtle); background: var(--bg-secondary); border-radius: 0 0 var(--radius, 12px) var(--radius, 12px); }
.v-overlay-drawer { padding: 0; justify-content: flex-end; align-items: stretch; background: rgba(0,0,0,0); transition: background .18s ease; overflow: hidden; }
.v-overlay-drawer.open { background: rgba(0,0,0,.45); }
.v-drawer { height: 100%; max-width: 100vw; background: var(--bg-card); border-left: 1px solid var(--border-medium); box-shadow: -16px 0 48px rgba(0,0,0,.35); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .18s ease; }
.v-overlay-drawer.open .v-drawer { transform: none; }
.v-drawer .v-dlg-foot { border-radius: 0; }
@media (prefers-reduced-motion: reduce) { .v-drawer, .v-overlay-drawer { transition: none; } }
table.v-list thead th.v-sort { cursor: pointer; user-select: none; }
table.v-list thead th.v-sort:hover { color: var(--text-primary); }
