/* Shared release behavior. Palette values come from palette-tokens.js. */
:root { font-family:"Segoe UI",system-ui,sans-serif; }
:focus-visible { outline:2px solid var(--focus); outline-offset:3px; box-shadow:0 0 0 2px var(--focus-sep); }
button.primary:active { background:var(--pressed); border-color:var(--pressed); }
.window-strip { color:var(--caption-text); }
.window-strip button:focus-visible { outline-color:var(--caption-focus); box-shadow:none; outline-offset:-3px; }
.window-strip .tab.active { background:var(--tab-active); color:var(--caption-text); }
.window-strip .tab.active > button:first-child > .icon-svg { color:var(--caption-text); }
#desktop-window-controls { color:var(--caption-text); background:var(--caption-end); }
#desktop-window-controls button { color:var(--caption-text); }
#desktop-window-controls button:hover { background:var(--caption-hover); }
#desktop-window-controls button:focus-visible { outline-color:var(--caption-focus); box-shadow:none; outline-offset:-4px; }
#desktop-caption-fallback { color:var(--caption-text); }
#desktop-caption-fallback button:focus-visible { outline-color:var(--caption-focus); box-shadow:none; outline-offset:-4px; }
.stock-table tbody tr.selected { color:var(--selection-text); }
.stock-table tbody tr:focus-visible { outline-color:var(--focus); }
.stock-table .product-sub { display:none; }
.movements-table .product-sub,.batch-table .product-sub,.batch-history .product-sub { display:block; white-space:normal; line-height:1.5; }
.movements-table tbody tr { cursor:default; }
.context-menu button:focus-visible { outline:2px solid var(--focus); outline-offset:-2px; }
.about-details { display:grid; grid-template-columns:130px minmax(0,1fr); gap:10px; margin:20px 0; }
.about-details dt { color:var(--muted); }
.about-details dd { margin:0; overflow-wrap:anywhere; }
.product-brand-mark { display:block; width:28px; height:28px; object-fit:contain; flex:none; }
.window-shortcuts button.product-brand-button { padding:2px 5px; min-width:38px; }
.about-logo { display:block; width:112px; height:112px; object-fit:contain; margin:0 0 24px; }
.signin-card > img { object-fit:contain; border-radius:0; }
.settings-actions { display:flex; gap:10px; flex-wrap:wrap; margin:14px 0; }
.button-link { display:inline-flex; align-items:center; justify-content:center; border:1px solid var(--border); border-radius:5px; min-height:36px; padding:7px 12px; color:var(--text); background:var(--surface); text-decoration:none; }
.button-link:hover { background:var(--raised); }
.backup-list { display:grid; gap:18px; }
.backup-list article { border-bottom:1px solid var(--line); padding-bottom:12px; overflow-wrap:anywhere; }
#workspace-panel:focus,#workspace-heading:focus { outline:none; box-shadow:none; }
dialog[open] { display:flex; flex-direction:column; overflow:hidden; max-height:calc(100dvh - 24px); }
.desktop-host dialog[open] { inset-block-start:42px; max-height:calc(100dvh - 66px); }
.modal-header,.modal-footer { flex:0 0 auto; }
.modal-header h2 { overflow-wrap:anywhere; }
.modal-body { flex:1 1 auto; min-height:0; overflow:auto; overscroll-behavior:contain; }
.modal-footer { flex-wrap:wrap; }
.modal-body input,.modal-body select,.modal-body textarea { scroll-margin:12px; }
.review-list dd { min-width:0; }
.form-error { scroll-margin:16px; }
.inspector-backdrop { display:none; }

/* Comfortable density is the default; the previous compact layout remains available. */
html[data-density=comfortable] body { font-size:14px; }
html[data-density=comfortable] button { min-height:38px; }
html[data-density=comfortable] input,html[data-density=comfortable] select,html[data-density=comfortable] textarea { min-height:38px; font-size:14px; }
html[data-density=comfortable] .toolbar button,html[data-density=comfortable] .toolbar input,html[data-density=comfortable] .toolbar select { height:auto; min-height:38px; font-size:13px; }
html[data-density=comfortable] .stock-table th { height:38px; font-size:12px; }
html[data-density=comfortable] .stock-table td { height:42px; font-size:14px; line-height:21px; padding:6px 10px; }
html[data-density=comfortable] .stock-table td button { min-width:32px; min-height:32px; height:auto; }
html[data-density=comfortable] .product-name,html[data-density=comfortable] .stock-table .qty { font-size:14px; }
html[data-density=comfortable] .stock-table .unit,html[data-density=comfortable] .stock-table .badge,html[data-density=comfortable] .product-sub,html[data-density=comfortable] .small { font-size:12px; }
html[data-density=comfortable] .nav-item { min-height:38px; font-size:13px; }
html[data-density=comfortable] .page-heading p,html[data-density=comfortable] .settings-section > p,html[data-density=comfortable] label,html[data-density=comfortable] .form-help,html[data-density=comfortable] .modal-header p { font-size:13px; }
html[data-density=comfortable] .eyebrow,html[data-density=comfortable] .breadcrumb,html[data-density=comfortable] .statusbar,html[data-density=comfortable] .nav-group .eyebrow { font-size:11px; }
html[data-density=comfortable] .metric > span,html[data-density=comfortable] .metric > label,html[data-density=comfortable] .metric-note,html[data-density=comfortable] .inspector .source-note,html[data-density=comfortable] .inspector-movements .mini-movement span { font-size:12px; }
html[data-density=comfortable] .inspector-batches { font-size:12px; }
html[data-density=comfortable] .inspector-batches th { font-size:11px; }
html[data-density=comfortable] .pagination button { min-width:32px; }
html[data-density=comfortable] .window-strip button { min-height:30px; }
html[data-density=comfortable] .window-strip .tab > button { min-height:35px; }
html[data-density=comfortable] .window-strip .tab > .tab-close { min-height:24px; }

@media (max-width:1099px) {
  .stock-page > .inspector { position:fixed; inset:52px 10px 10px auto; width:380px; min-width:0; max-width:calc(100vw - 20px); height:auto; z-index:81; flex:none; border-color:var(--border); box-shadow:0 16px 50px #0008; }
  .inspector-backdrop { display:block; position:fixed; inset:42px 0 0; z-index:80; width:100%; height:auto; border:0; border-radius:0; padding:0; background:#0008; }
  .inspector-backdrop:hover { background:#0008; }
  .topbar { min-height:58px; padding:8px; gap:8px; }
  .topbar-left { flex-wrap:wrap; }
  .topbar-right { gap:7px; }
  .topbar-right .operator { display:none; }
  .shell { grid-template-rows:42px auto minmax(0,1fr); }
  .sidebar .venue-brand { min-height:96px; margin-bottom:10px; }
  .stock-main .toolbar { flex-wrap:wrap; }
}
@media (max-height:650px) {
  .sidebar .venue-brand { min-height:72px; padding:8px 4px; margin-bottom:10px; }
  .venue-brand .venue-mark { width:38px; height:38px; }
  .venue-brand-copy { display:none; }
  .nav-group { margin-bottom:10px; }
  .stat-card { min-height:48px; padding:6px 10px; }
  .stat-card strong { font-size:19px; }
  .page-heading { margin-bottom:8px; }
  .sidebar-bottom { padding-top:4px; }
  .sidebar-bottom .storage { display:none; }
  .modal-header { padding:12px 18px; }
  .modal-footer { padding:10px 18px; }
  dialog { max-height:calc(100dvh - 16px); }
}
@media (max-width:720px) {
  .shell { min-height:360px; }
  .stats { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .stat-card strong { font-size:18px; }
  .topbar-left button { font-size:12px; }
  .topbar-left .toolbar-history { display:none; }
  .review-list,.about-details { grid-template-columns:100px minmax(0,1fr); }
  .transfer-review h3 { flex-direction:column; }
}
@media (forced-colors:active) {
  .window-strip,.window-strip .tab.active,#desktop-window-controls,#desktop-caption-fallback { background:Canvas; color:CanvasText; }
  .window-strip button,#desktop-window-controls button,#desktop-caption-fallback button { color:CanvasText; }
  :focus-visible,.window-strip button:focus-visible,#desktop-window-controls button:focus-visible { outline:2px solid Highlight; }
  .window-strip .tab.active { border:2px solid Highlight; }
  .inspector-backdrop { background:Canvas; opacity:.7; }
  button.primary { background:ButtonFace; color:ButtonText; border:1px solid ButtonText; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior:auto!important; animation:none!important; transition:none!important; } }
