/* ============================================================
 *  arps Stock — Refined UI
 *  Apple/Linear/Vercel-inspired Light & Dark theme
 *  CSS variables (RGB triplets) drive Tailwind tokens via
 *  rgb(var(--c-xxx) / <alpha-value>)  (see renderer.tsx)
 * ============================================================ */

:root {
  /* ---- Light palette ---- */
  --c-bg:           250 250 252;   /* #fafafc */
  --c-surface:      255 255 255;
  --c-surface-2:    246 247 249;   /* #f6f7f9 */
  --c-ink:          15 17 21;      /* near-black */
  --c-ink-soft:     107 114 128;
  --c-ink-muted:    142 148 161;
  --c-line:         220 223 230;

  --c-accent:        10 102 235;   /* refined indigo-blue */
  --c-accent-hover:  10 88 210;
  --c-accent-soft:  226 234 250;

  --c-success:       34 175 87;
  --c-danger:       232  61  53;
  --c-warning:      234 144  21;

  /* Shadows: very subtle, layered */
  --shadow-soft:
    0 1px 2px rgba(15, 17, 21, 0.04),
    0 0 0 1px rgba(15, 17, 21, 0.05);
  --shadow-card:
    0 1px 2px rgba(15, 17, 21, 0.04),
    0 8px 24px -8px rgba(15, 17, 21, 0.08),
    0 0 0 1px rgba(15, 17, 21, 0.04);
  --shadow-lift:
    0 2px 4px rgba(15, 17, 21, 0.04),
    0 16px 40px -12px rgba(15, 17, 21, 0.16),
    0 0 0 1px rgba(15, 17, 21, 0.04);

  /* Field background (subtle gray on light) */
  --field-bg:       246 247 249;
  --field-bg-focus: 255 255 255;
  --hover-bg:       0 0 0;          /* alpha applied per-rule */

  /* Animation curves */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --c-bg:           10  10  12;   /* deep neutral */
    --c-surface:      24  25  29;
    --c-surface-2:    32  33  38;
    --c-ink:          240 242 247;
    --c-ink-soft:     158 162 173;
    --c-ink-muted:    120 124 135;
    --c-line:          48  50  58;

    --c-accent:        70 142 255;
    --c-accent-hover:  98 162 255;
    --c-accent-soft:   38  58  98;

    --c-success:       48 209 88;
    --c-danger:       255  85  76;
    --c-warning:      255 169  64;

    --shadow-soft:
      0 1px 2px rgba(0, 0, 0, 0.50),
      0 0 0 1px rgba(255, 255, 255, 0.06);
    --shadow-card:
      0 1px 2px rgba(0, 0, 0, 0.50),
      0 8px 24px -8px rgba(0, 0, 0, 0.60),
      0 0 0 1px rgba(255, 255, 255, 0.06);
    --shadow-lift:
      0 2px 4px rgba(0, 0, 0, 0.60),
      0 16px 40px -12px rgba(0, 0, 0, 0.70),
      0 0 0 1px rgba(255, 255, 255, 0.08);

    --field-bg:       38  40  46;
    --field-bg-focus: 48  50  58;
    --hover-bg:       255 255 255;
  }
}

/* ============================================================
 *  Base typography & rendering
 * ============================================================ */
html, body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  font-variant-numeric: oldstyle-nums proportional-nums;
  -webkit-tap-highlight-color: transparent;
  background-color: rgb(var(--c-bg));
  color: rgb(var(--c-ink));
  letter-spacing: -0.011em;
  /* スクロール時の挙動を滑らかに */
  scroll-behavior: smooth;
}

/* 見出しは Inter の tabular-nums で揃える */
h1, h2, h3, .tabular-nums, .tabular {
  font-feature-settings: 'tnum', 'cv11';
}

/* ============================================================
 *  Form input — unified
 * ============================================================ */
.form-input {
  width: 100%;
  background-color: rgb(var(--field-bg));
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 15px;
  line-height: 1.3;
  color: rgb(var(--c-ink));
  outline: none;
  transition: background-color 0.18s var(--ease-out),
              box-shadow 0.18s var(--ease-out),
              border-color 0.18s var(--ease-out);
}
.form-input::placeholder {
  color: rgb(var(--c-ink-muted));
}
.form-input:hover:not(:focus) {
  background-color: rgb(var(--field-bg) / 0.7);
  border-color: rgb(var(--c-line) / 0.6);
}
.form-input:focus {
  background-color: rgb(var(--field-bg-focus));
  border-color: rgb(var(--c-accent) / 0.55);
  box-shadow: 0 0 0 3px rgb(var(--c-accent) / 0.18);
}

/* Select矢印 (ライト/ダーク両対応, currentColor を SVG に流す方式) */
select.form-input,
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='currentColor' opacity='0.55' d='M5 6 0 0h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 30px !important;
  appearance: none;
  -webkit-appearance: none;
}

/* 数値input スピナー非表示 */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* チェックボックス・ラジオ */
input[type="checkbox"],
input[type="radio"] {
  accent-color: rgb(var(--c-accent));
}

/* リンク/ボタン共通: フォーカスリング (キーボード操作時のみ) */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid rgb(var(--c-accent) / 0.6);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ============================================================
 *  Scrollbar (subtle)
 * ============================================================ */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background-color: rgb(var(--c-ink) / 0.18);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background-color: rgb(var(--c-ink) / 0.30);
}
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
 *  QR scanner
 * ============================================================ */
#qr-reader video {
  border-radius: 12px;
  width: 100% !important;
  max-height: 320px;
  object-fit: cover;
  background: #000;
}
#qr-reader__dashboard_section_csr,
#qr-reader__header_message,
#qr-reader__status_span,
#qr-reader select {
  display: none !important;
}
#qr-reader__scan_region {
  background: #000;
  border-radius: 12px;
}
#qr-reader__scan_region > img {
  display: none !important;
}

/* ============================================================
 *  Badges
 * ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.4;
}
.badge-inbound  { background: rgb(var(--c-success) / 0.14); color: rgb(var(--c-success)); }
.badge-outbound { background: rgb(var(--c-danger)  / 0.14); color: rgb(var(--c-danger)); }
.badge-stocktake{ background: rgb(var(--c-warning) / 0.14); color: rgb(var(--c-warning)); }
.badge-low      { background: rgb(var(--c-warning) / 0.14); color: rgb(var(--c-warning)); }
.badge-out      { background: rgb(var(--c-danger)  / 0.14); color: rgb(var(--c-danger)); }
.badge-admin    { background: rgb(var(--c-accent)  / 0.14); color: rgb(var(--c-accent)); }
.badge-staff    { background: rgb(var(--c-ink)     / 0.10); color: rgb(var(--c-ink-soft)); }

/* StatCard tone color tokens */
.tone-success { background: rgb(var(--c-success) / 0.14); color: rgb(var(--c-success)); }
.tone-danger  { background: rgb(var(--c-danger)  / 0.14); color: rgb(var(--c-danger)); }
.tone-ink     { background: rgb(var(--c-ink)     / 0.08); color: rgb(var(--c-ink)); }
.tone-accent  { background: rgb(var(--c-accent)  / 0.14); color: rgb(var(--c-accent)); }

/* ============================================================
 *  Page transition
 * ============================================================ */
@keyframes page-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-fade {
  animation: page-fade-in 0.42s var(--ease-out) both;
}

/* スキャン成功時のフラッシュ */
@keyframes scan-flash-anim {
  0%   { box-shadow: 0 0 0 0 rgb(var(--c-success) / 0.65); }
  100% { box-shadow: 0 0 0 10px rgb(var(--c-success) / 0); }
}
.scan-flash {
  animation: scan-flash-anim 0.45s var(--ease-out);
}

/* ============================================================
 *  Modal (confirm / prompt replacement)
 * ============================================================ */
.app-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px) saturate(140%);
  -webkit-backdrop-filter: blur(8px) saturate(140%);
  display: flex; align-items: center; justify-content: center;
  z-index: 10000; padding: 20px;
  opacity: 0; transition: opacity 0.22s var(--ease-out);
}
.app-modal-overlay.is-open { opacity: 1; }
.app-modal {
  background: rgb(var(--c-surface));
  color: rgb(var(--c-ink));
  border-radius: 18px;
  max-width: 380px; width: 100%;
  box-shadow: var(--shadow-lift);
  transform: scale(0.94) translateY(6px);
  transition: transform 0.26s var(--ease-out);
  overflow: hidden;
}
.app-modal-overlay.is-open .app-modal { transform: scale(1) translateY(0); }
.app-modal-body {
  padding: 24px 24px 18px;
  text-align: center;
}
.app-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgb(var(--c-line) / 0.6);
}
.app-modal-btn {
  padding: 14px 16px;
  font-size: 15px; font-weight: 500;
  background: transparent; border: none;
  cursor: pointer;
  transition: background 0.15s var(--ease-out);
  color: rgb(var(--c-accent));
  letter-spacing: -0.01em;
}
.app-modal-btn:hover { background: rgb(var(--hover-bg) / 0.04); }
.app-modal-cancel {
  color: rgb(var(--c-ink-soft));
  border-right: 1px solid rgb(var(--c-line) / 0.6);
}
.app-modal-danger {
  color: rgb(var(--c-danger)); font-weight: 600;
}
.app-modal-confirm { font-weight: 600; }

/* ============================================================
 *  Mode tabs
 * ============================================================ */
.mode-tab {
  background: transparent;
  color: rgb(var(--c-ink-soft));
  cursor: pointer;
  border: none;
  letter-spacing: -0.01em;
  transition: all 0.18s var(--ease-out);
}
.mode-tab:hover { color: rgb(var(--c-ink)); }
.mode-tab.is-active {
  background: rgb(var(--c-accent) / 0.10);
  color: rgb(var(--c-accent));
}

/* ============================================================
 *  Queue rows (continuous scan)
 * ============================================================ */
@keyframes queue-row-in {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes queue-row-bump {
  0%   { background-color: rgb(var(--c-accent) / 0.20); }
  100% { background-color: transparent; }
}
.queue-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  animation: queue-row-in 0.26s var(--ease-out) both;
  transition: background-color 0.22s var(--ease-out);
}
.queue-row.is-bumped {
  animation: queue-row-in 0.26s var(--ease-out) both,
             queue-row-bump 0.75s var(--ease-out) 0.22s both;
}
.queue-row.is-error {
  background: rgb(var(--c-danger) / 0.06);
}
.queue-row .q-img {
  width: 38px; height: 38px;
  border-radius: 8px;
  background: rgb(var(--c-ink) / 0.05);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.queue-row .q-img img {
  width: 100%; height: 100%; object-fit: cover;
}
.queue-row .q-body { flex: 1; min-width: 0; }
.queue-row .q-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.012em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.queue-row .q-meta {
  font-size: 11px;
  color: rgb(var(--c-ink-soft));
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.queue-row .q-qty {
  width: 62px;
  background: rgb(var(--field-bg));
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 6px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  outline: none;
  color: rgb(var(--c-ink));
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  transition: all 0.18s var(--ease-out);
}
.queue-row .q-qty:focus {
  background: rgb(var(--field-bg-focus));
  border-color: rgb(var(--c-accent) / 0.55);
  box-shadow: 0 0 0 3px rgb(var(--c-accent) / 0.16);
}
.queue-row .q-del {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgb(var(--c-ink) / 0.05);
  color: rgb(var(--c-ink-soft));
  cursor: pointer;
  border: none;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s var(--ease-out);
  flex-shrink: 0;
}
.queue-row .q-del:hover {
  background: rgb(var(--c-danger) / 0.12);
  color: rgb(var(--c-danger));
}
.queue-row .q-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 5px;
  flex-shrink: 0;
}
.queue-row .q-status.ok    { background: rgb(var(--c-success) / 0.16); color: rgb(var(--c-success)); }
.queue-row .q-status.err   { background: rgb(var(--c-danger)  / 0.16); color: rgb(var(--c-danger)); }
.queue-row .q-status.queue { background: rgb(var(--c-warning) / 0.16); color: rgb(var(--c-warning)); }

/* スキャン重複時の警告色 */
.queue-row.is-dup-warn {
  background: rgb(var(--c-warning) / 0.08);
}

/* ============================================================
 *  Offline bar
 * ============================================================ */
.offline-bar {
  position: fixed; top: 0; left: 0; right: 0;
  background: rgb(var(--c-warning)); color: #fff;
  font-size: 12px; font-weight: 600;
  text-align: center; padding: 6px 12px;
  z-index: 10001; letter-spacing: -0.01em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  animation: page-fade-in 0.32s both;
}

/* ============================================================
 *  Accordion
 * ============================================================ */
.acc-row {
  cursor: pointer;
  transition: background-color 0.15s var(--ease-out);
}
.acc-row:hover {
  background-color: rgb(var(--hover-bg) / 0.03);
}
.acc-row[aria-expanded="true"] .acc-chevron {
  transform: rotate(90deg);
}
.acc-chevron {
  transition: transform 0.22s var(--ease-out);
  display: inline-block;
}
.acc-detail {
  display: none;
  background-color: rgb(var(--hover-bg) / 0.02);
  border-top: 1px solid rgb(var(--c-line) / 0.5);
}
.acc-row[aria-expanded="true"] + .acc-detail {
  display: block;
}

/* ============================================================
 *  Bottom navigation
 * ============================================================ */
.bottom-nav {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px 6px;
  color: rgb(var(--c-ink-soft));
  transition: color 0.18s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  min-height: 58px;
  position: relative;
}
.bottom-nav-item:hover { color: rgb(var(--c-ink)); }
.bottom-nav-item.is-active { color: rgb(var(--c-accent)); }
.bottom-nav-item .scan-bubble {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: rgb(var(--c-accent));
  color: #fff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 6px 16px rgb(var(--c-accent) / 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  margin-top: -16px;
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}
.bottom-nav-item:hover .scan-bubble {
  transform: translateY(-1px);
  box-shadow:
    0 10px 22px rgb(var(--c-accent) / 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.bottom-nav-item:active .scan-bubble { transform: scale(0.95); }
.bottom-nav-item .scan-bubble i { color: #fff !important; }
.bottom-nav-item.is-active .scan-bubble { background: rgb(var(--c-accent)); }

/* iOS Safari スタンドアロン時の調整 */
@supports (padding: max(0px)) {
  .bottom-nav {
    padding-bottom: max(env(safe-area-inset-bottom), 0px);
  }
}

/* ============================================================
 *  Label printing
 * ============================================================ */
.size-btn,
.code-btn {
  cursor: pointer;
  color: rgb(var(--c-ink));
  transition: all 0.15s var(--ease-out);
}
.size-btn.is-active,
.code-btn.is-active {
  background-color: rgb(var(--c-accent) / 0.10);
  border-color: rgb(var(--c-accent)) !important;
  color: rgb(var(--c-accent));
}
.show-cb {
  width: 16px;
  height: 16px;
  accent-color: rgb(var(--c-accent));
  cursor: pointer;
}

.label-grid {
  display: grid;
  gap: 4mm;
  justify-content: start;
}
.label-grid[data-size="sm"] { grid-template-columns: repeat(auto-fill, 40mm); }
.label-grid[data-size="md"] { grid-template-columns: repeat(auto-fill, 60mm); }
.label-grid[data-size="lg"] { grid-template-columns: repeat(auto-fill, 80mm); }

.label-card {
  border: 1px dashed rgb(var(--c-line));
  background: #fff;
  padding: 2mm;
  display: flex;
  flex-direction: column;
  gap: 1mm;
  box-sizing: border-box;
  page-break-inside: avoid;
  break-inside: avoid;
  overflow: hidden;
  position: relative;
  color: #000;
}
.label-card[data-size="sm"] { width: 40mm; height: 25mm; font-size: 7pt; }
.label-card[data-size="md"] { width: 60mm; height: 40mm; font-size: 8pt; }
.label-card[data-size="lg"] { width: 80mm; height: 50mm; font-size: 9pt; }

.label-name {
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #000;
}
.label-meta {
  font-size: 0.85em;
  color: #555;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.label-meta span { white-space: nowrap; }
.label-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8em;
  color: #333;
  word-break: break-all;
  line-height: 1;
}
.label-codes {
  display: flex;
  align-items: center;
  gap: 2mm;
  flex: 1;
  min-height: 0;
}
.label-codes svg,
.label-codes canvas,
.label-codes img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  height: auto;
}
.label-codes.center { justify-content: center; }
.label-codes.barcode-only svg { width: 100%; height: 100%; }
.label-codes.qr-only canvas { margin: 0 auto; }
.label-codes.both { justify-content: space-between; }
.label-codes.both .bc { flex: 1; min-width: 0; }
.label-codes.both .qr { flex-shrink: 0; }

.label-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background-color 0.15s var(--ease-out);
}
.label-row:hover { background-color: rgb(var(--hover-bg) / 0.03); }
.label-row .row-cb {
  width: 18px;
  height: 18px;
  accent-color: rgb(var(--c-accent));
  cursor: pointer;
  flex-shrink: 0;
}
.label-row .row-qty {
  width: 56px;
  background: rgb(var(--field-bg));
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 13px;
  text-align: center;
  outline: none;
  color: rgb(var(--c-ink));
  font-variant-numeric: tabular-nums;
  border: 1px solid transparent;
}
.label-row .row-qty:focus {
  background: rgb(var(--field-bg-focus));
  border-color: rgb(var(--c-accent) / 0.55);
  box-shadow: 0 0 0 3px rgb(var(--c-accent) / 0.16);
}

/* ============================================================
 *  Login page (refined)
 * ============================================================ */
.login-bg {
  position: relative;
  overflow: hidden;
  background: rgb(var(--c-bg));
}
.login-bg::before,
.login-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  opacity: 0.55;
  z-index: 0;
}
.login-bg::before {
  width: 480px; height: 480px;
  background: radial-gradient(circle at 30% 30%, rgb(var(--c-accent)), transparent 70%);
  top: -160px; left: -120px;
}
.login-bg::after {
  width: 520px; height: 520px;
  background: radial-gradient(circle at 70% 70%, rgb(var(--c-success)), transparent 70%);
  bottom: -200px; right: -140px;
  opacity: 0.32;
}
@media (prefers-color-scheme: dark) {
  .login-bg::before { opacity: 0.32; }
  .login-bg::after  { opacity: 0.20; }
}

.login-card {
  position: relative;
  z-index: 1;
  background: rgb(var(--c-surface) / 0.78);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid rgb(var(--c-line) / 0.55);
  box-shadow: var(--shadow-lift);
  border-radius: 22px;
}

.login-logo {
  width: 88px; height: 88px;
  border-radius: 22px;
  background: #ffffff;
  padding: 8px;
  object-fit: contain;
  box-shadow:
    0 10px 36px rgb(var(--c-accent) / 0.32),
    0 0 0 1px rgb(var(--c-line) / 0.5);
  user-select: none;
}

@keyframes login-float-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.login-anim     { animation: login-float-in 0.7s var(--ease-out) both; }
.login-anim-1   { animation: login-float-in 0.7s var(--ease-out) 0.08s both; }
.login-anim-2   { animation: login-float-in 0.7s var(--ease-out) 0.18s both; }

/* primary button */
.btn-primary {
  background: rgb(var(--c-accent));
  color: #fff;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: 10px;
  padding: 12px 16px;
  transition: background 0.18s var(--ease-out), transform 0.12s var(--ease-out), box-shadow 0.18s var(--ease-out);
  box-shadow: 0 1px 2px rgb(var(--c-accent) / 0.22),
              inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover  { background: rgb(var(--c-accent-hover)); }
.btn-primary:active { transform: scale(0.985); }

/* ============================================================
 *  Print
 * ============================================================ */
@media print {
  @page { margin: 8mm; }
  header,
  button,
  .bottom-nav,
  #btn-print,
  #btn-new,
  #step-select,
  .login-bg::before,
  .login-bg::after,
  .print\:hidden { display: none !important; }
  body {
    background: white !important;
    color: #000 !important;
  }
  main {
    padding: 0 !important;
    margin: 0 !important;
    max-width: none !important;
  }
  .shadow-soft, .shadow-card, .shadow-lift { box-shadow: none !important; }
  .label-card {
    border: 1px solid rgba(0, 0, 0, 0.18) !important;
  }
  .label-grid { gap: 2mm; }
}

/* ============================================================
 *  Utility: tappable area & subtle hover for nav items in light/dark
 * ============================================================ */
.hover-row:hover { background-color: rgb(var(--hover-bg) / 0.04); }

/* Tailwind `divide-y` color (light/dark unified) */
.divide-line > * + * {
  border-top: 1px solid rgb(var(--c-line) / 0.65);
}
