/* ============================================================================
   Yasin's Tools — Online Orders · Design system
   Quiet-luxury: porcelain + ink, hairline borders, soft shadows.
   Type: Plus Jakarta Sans (UI) + JetBrains Mono (codes/figures).
   ========================================================================== */

:root {
  /* — type — */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* — neutrals (warm porcelain → ink) — */
  --bg:          #f1f0ec;
  --surface:     #ffffff;
  --surface-2:   #faf9f6;
  --ink:         #1b1a17;
  --ink-muted:   #56544d;
  --ink-soft:    #8c8a80;
  --ink-faint:   #b3b1a7;
  --line:        #e8e6df;
  --line-strong: #dbd8cf;
  --tb-bg:       rgba(255,255,255,0.82);

  /* — single warm brand spot (used with restraint) — */
  --gold-1: #caa53f;
  --gold-2: #9c7c24;

  /* — semantic data colours (muted, refined) — */
  --green: #15803d; --green-bg: rgba(21,128,61,0.09);  --green-bd: rgba(21,128,61,0.18);
  --red:   #b3261e; --red-bg:   rgba(179,38,30,0.08);  --red-bd:   rgba(179,38,30,0.18);
  --amber: #a45a09; --amber-bg: rgba(164,90,9,0.10);   --amber-bd: rgba(164,90,9,0.20);
  --blue:  #2451c4; --blue-bg:  rgba(36,81,196,0.08);  --blue-bd:  rgba(36,81,196,0.16);

  /* — radii — */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 22px; --r-pill: 999px;

  /* — elevation — */
  --sh-sm: 0 1px 2px rgba(27,26,23,0.04), 0 1px 1px rgba(27,26,23,0.03);
  --sh-md: 0 6px 22px -8px rgba(27,26,23,0.14), 0 2px 6px -2px rgba(27,26,23,0.06);
  --sh-lg: 0 22px 60px -16px rgba(27,26,23,0.24);
  --ring:  0 0 0 3px rgba(27,26,23,0.08);

  /* — motion — */
  --t-fast: 130ms; --t: 220ms;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}
button, input, select { font-family: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(27,26,23,0.10); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }

/* tabular figures everywhere numbers matter */
.mono, .kpi-value, .oc-num-text, .oc-date, .oc-li-sku, .tb-synced, .o-order-count, .o-selected-count { font-variant-numeric: tabular-nums; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -420px 0; } 100% { background-position: 420px 0; } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.skeleton {
  background: linear-gradient(90deg, var(--line) 0%, #f2f1ec 50%, var(--line) 100%);
  background-size: 840px 100%;
  animation: shimmer 1.4s linear infinite;
  border-radius: 6px;
}

/* ============================================================================
   LOGIN
   ========================================================================== */
.lg-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; position: relative; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(202,165,63,0.10), transparent 60%),
    var(--bg);
}
.lg-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 35%, black, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 50% 35%, black, transparent 70%);
}
.lg-glow { display: none; }
.lg-card {
  position: relative; width: 100%; max-width: 396px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 40px 36px 30px;
  box-shadow: var(--sh-lg);
  animation: fadeIn var(--t) var(--ease) both;
}
.lg-logo {
  width: 46px; height: 46px; border-radius: 13px;
  background: linear-gradient(140deg, var(--gold-1), var(--gold-2));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px -6px rgba(156,124,36,0.6); margin-bottom: 22px;
}
.lg-logo svg rect { fill: rgba(255,255,255,0.18); }
.lg-logo svg path { fill: #fff; }
.lg-header { margin-bottom: 26px; }
.lg-title { font-size: 24px; font-weight: 700; letter-spacing: -0.035em; }
.lg-subtitle { font-size: 13px; color: var(--ink-soft); margin-top: 5px; }
.lg-form { display: flex; flex-direction: column; gap: 14px; }
.lg-field { display: flex; flex-direction: column; gap: 6px; }
.lg-label { font-size: 11px; font-weight: 600; color: var(--ink-muted); letter-spacing: 0.01em; }
.lg-input {
  background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: var(--r-md); color: var(--ink); font-size: 14px;
  padding: 11px 13px; transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.lg-input::placeholder { color: var(--ink-faint); }
.lg-input:focus { outline: none; background: var(--surface); border-color: var(--ink); box-shadow: var(--ring); }
.lg-error {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--red);
  background: var(--red-bg); border: 1px solid var(--red-bd);
  border-radius: var(--r-md); padding: 9px 11px; animation: fadeIn var(--t-fast) var(--ease) both;
}
.lg-button {
  margin-top: 6px; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ink); color: #fff; border: none; border-radius: var(--r-md);
  font-size: 14px; font-weight: 600; padding: 12px 16px;
  transition: transform var(--t-fast), box-shadow var(--t-fast), opacity var(--t-fast);
  box-shadow: var(--sh-sm);
}
.lg-button:hover { transform: translateY(-1px); box-shadow: var(--sh-md); }
.lg-button:active { transform: none; }
.lg-hint { margin-top: 18px; text-align: center; font-size: 11px; color: var(--ink-faint); }

/* ============================================================================
   APP SHELL — top bar (no sidebar)
   ========================================================================== */
.app-main { min-height: 100vh; }

.tb {
  position: sticky; top: 0; z-index: 40;
  background: var(--tb-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.tb-inner {
  max-width: 1260px; margin: 0 auto; height: 58px;
  display: flex; align-items: center; gap: 14px; padding: 0 28px;
}
.tb-brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; min-width: 0; }
.tb-logo { display: block; width: auto; height: 28px; max-width: 180px; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(171,130,36,0.22)); }
.tb-brand-copy { display: none; }
.tb-submark { display: none !important; }
.tb-name, .tb-sub, .tb-mono { display: none; }
.tb-sep { width: 1px; height: 26px; background: var(--line-strong); margin: 0 2px; }
.tb-section {
  font-size: 11px; font-weight: 700; color: var(--ink-muted);
  text-transform: uppercase; letter-spacing: 0.14em;
}
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.tb-synced {
  display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--ink-soft);
  font-family: var(--font-mono); white-space: nowrap;
}
.tb-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-bg); }
.tb-dot.is-loading { background: var(--amber); animation: pulse 1.1s ease-in-out infinite; box-shadow: 0 0 0 3px var(--amber-bg); }
.tb-select {
  appearance: none; -webkit-appearance: none;
  background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238c8a80' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat right 9px center;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  font-size: 12px; color: var(--ink-muted); padding: 6px 26px 6px 10px; cursor: pointer;
  transition: border-color var(--t-fast), color var(--t-fast);
}
.tb-select:hover { border-color: var(--ink-soft); color: var(--ink); }
.tb-select:focus { outline: none; border-color: var(--ink); box-shadow: var(--ring); }
.tb-refresh {
  display: flex; align-items: center; gap: 7px; padding: 7px 13px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  color: var(--ink-muted); font-size: 12.5px; font-weight: 500;
  transition: all var(--t-fast); white-space: nowrap;
}
.tb-refresh:hover:not(:disabled) { color: var(--ink); border-color: var(--ink-soft); box-shadow: var(--sh-sm); }
.tb-refresh:disabled { opacity: 0.55; cursor: default; }
.tb-spin { animation: spin 0.9s linear infinite; display: inline-flex; }
.tb-user {
  display: flex; align-items: center; gap: 9px; padding: 5px 6px 5px 10px;
  border: 1px solid transparent; border-radius: var(--r-pill); transition: background var(--t-fast);
}
.tb-user-name { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.tb-av {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--ink); color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.tb-logout {
  width: 32px; height: 32px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); border: 1px solid transparent; transition: all var(--t-fast);
}
.tb-logout:hover { color: var(--red); background: var(--red-bg); }

/* ============================================================================
   ORDERS PAGE
   ========================================================================== */
.o-page { max-width: 1260px; margin: 0 auto; padding: 30px 28px 90px; animation: fadeIn var(--t) var(--ease); }
.o-title-wrap { display: flex; flex-direction: column; gap: 3px; }
.o-title-brand { font-size: 13px; font-weight: 800; letter-spacing: 0.32em; text-transform: uppercase; color: #b38728; }
.o-title { margin-top: 0; }
::selection { background: rgba(179,135,40,0.28); color: var(--ink); }
[data-theme="dark"] ::selection { background: rgba(122,162,255,0.42); color: #fff; }

.o-head { margin-bottom: 22px; }
.o-title { font-size: 30px; font-weight: 800; letter-spacing: -0.045em; line-height: 1.05; }
.o-subtitle { font-size: 13.5px; color: var(--ink-soft); margin-top: 7px; }

/* — KPI — */
.kpi-bar {
  display: flex; align-items: stretch; gap: 4px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 8px; margin-bottom: 18px; box-shadow: var(--sh-sm);
}
.kpi-tile {
  display: flex; flex-direction: column; gap: 3px; padding: 10px 16px;
  border-radius: var(--r-md); min-width: 78px; transition: background var(--t-fast);
  border: 1px solid transparent;
}
.kpi-clickable { cursor: pointer; }
.kpi-clickable:hover { background: var(--surface-2); }
.kpi-active { background: var(--ink) !important; }
.kpi-active .kpi-value, .kpi-active .kpi-label { color: #fff !important; }
.kpi-value { font-size: 21px; font-weight: 800; letter-spacing: -0.03em; color: var(--ink); line-height: 1; }
.kpi-label { font-size: 10px; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.09em; }
.kpi-green { color: var(--green); } .kpi-red { color: var(--red); }
.kpi-amber { color: var(--amber); } .kpi-blue { color: var(--blue); }
.kpi-divider { width: 1px; background: var(--line); margin: 8px 6px; align-self: stretch; }

/* — Filter bar — */
.o-filter-bar {
  display: flex; align-items: center; gap: 0; flex-wrap: nowrap; overflow-x: auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 9px 14px; margin-bottom: 12px; box-shadow: var(--sh-sm);
}
.o-filter-bar::-webkit-scrollbar { height: 0; }
.o-filter-left { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.o-filter-label { font-size: 10px; font-weight: 700; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.1em; white-space: nowrap; }
.o-chip-group { display: flex; align-items: center; gap: 4px; flex-shrink: 0; padding: 0 6px; }
.o-filter-sep { width: 1px; height: 20px; background: var(--line); flex-shrink: 0; margin: 0 6px; }

.o-segmented { display: flex; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r-sm); padding: 2px; gap: 2px; }
.o-seg { padding: 5px 12px; background: none; border: none; border-radius: 6px; color: var(--ink-muted); font-size: 12px; font-weight: 500; transition: all var(--t-fast); white-space: nowrap; }
.o-seg:hover { color: var(--ink); }
.o-seg-active { background: var(--surface) !important; color: var(--ink) !important; box-shadow: var(--sh-sm); font-weight: 600; }

.o-date-pickers { display: flex; align-items: center; gap: 6px; margin-left: 8px; }
.o-date-input { background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r-sm); color: var(--ink); font-size: 12px; padding: 6px 9px; transition: border-color var(--t-fast); }
.o-date-input:focus { outline: none; border-color: var(--ink); box-shadow: var(--ring); }
.o-date-sep { font-size: 12px; color: var(--ink-faint); }
.o-apply { padding: 6px 13px; background: var(--ink); border: none; border-radius: var(--r-sm); color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; transition: opacity var(--t-fast); }
.o-apply:hover { opacity: 0.88; }

.o-chip { padding: 5px 12px; background: none; border: 1px solid transparent; border-radius: var(--r-pill); color: var(--ink-muted); font-size: 12px; font-weight: 500; white-space: nowrap; transition: all var(--t-fast); }
.o-chip:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line-strong); }
.o-chip-active { background: var(--ink) !important; color: #fff !important; border-color: var(--ink) !important; font-weight: 600; }

/* — Search — */
.o-search {
  display: flex; align-items: center; gap: 11px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 0 16px; margin-bottom: 14px; box-shadow: var(--sh-sm);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.o-search:focus-within { border-color: var(--ink); box-shadow: var(--ring); }
.o-search-icon { color: var(--ink-faint); flex-shrink: 0; }
.o-search:focus-within .o-search-icon { color: var(--ink); }
.o-search-input { flex: 1; background: transparent; border: none; color: var(--ink); font-size: 14px; padding: 13px 0; }
.o-search-input::placeholder { color: var(--ink-faint); }
.o-search-input:focus { outline: none; }
.o-search-clear { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); border: none; border-radius: 50%; color: var(--ink-soft); flex-shrink: 0; transition: all var(--t-fast); }
.o-search-clear:hover { background: var(--line); color: var(--ink); }

/* — Bulk bar — */
.o-bulk {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--ink);
  border-radius: var(--r-lg); padding: 11px 16px; margin-bottom: 14px;
  box-shadow: var(--sh-md); animation: fadeIn var(--t-fast) var(--ease);
}
.o-bulk-count { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.o-bulk-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.o-bulk-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; background: var(--ink); border: 1px solid var(--ink); border-radius: var(--r-sm); color: #fff; font-size: 12.5px; font-weight: 600; transition: all var(--t-fast); }
.o-bulk-btn:hover { transform: translateY(-1px); box-shadow: var(--sh-md); }
.o-bulk-amber { background: var(--surface); color: var(--ink); }
.o-bulk-amber:hover { background: var(--surface-2); }
.o-bulk-blue { background: var(--surface); color: var(--ink); }
.o-bulk-blue:hover { background: var(--surface-2); }
.o-bulk-close { margin-left: auto; padding: 7px 12px; background: none; border: none; color: var(--ink-soft); font-size: 12.5px; font-weight: 500; border-radius: var(--r-sm); transition: color var(--t-fast); }
.o-bulk-close:hover { color: var(--red); }

/* — Error — */
.o-error { display: flex; align-items: flex-start; gap: 12px; background: var(--red-bg); border: 1px solid var(--red-bd); border-radius: var(--r-lg); padding: 15px 18px; margin-bottom: 16px; }
.o-error-title { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.o-error-detail { font-size: 11.5px; color: var(--ink-muted); font-family: var(--font-mono); margin-top: 3px; word-break: break-word; }
.o-retry { margin-left: auto; padding: 7px 15px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md); color: var(--ink); font-size: 12.5px; font-weight: 600; white-space: nowrap; transition: all var(--t-fast); }
.o-retry:hover { box-shadow: var(--sh-sm); border-color: var(--ink-soft); }

/* — Skeleton / empty — */
.o-skel-list { display: flex; flex-direction: column; gap: 8px; }
.o-skel-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--sh-sm); animation: fadeIn var(--t) var(--ease) both; }
.o-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 90px 20px; gap: 14px; color: var(--ink-faint); animation: fadeIn var(--t) var(--ease); }
.o-empty p { font-size: 14px; color: var(--ink-soft); }

/* — Select-all row — */
.o-selectall { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 0; margin-bottom: 10px; }
.o-check-label { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--ink-muted); cursor: pointer; }
.o-checkbox { width: 16px; height: 16px; accent-color: var(--ink); cursor: pointer; }
.o-selectall-right { display: flex; align-items: center; gap: 13px; }
.o-select-entire { padding: 6px 13px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm); color: var(--ink-muted); font-size: 12px; font-weight: 600; white-space: nowrap; transition: all var(--t-fast); }
.o-select-entire:hover:not(:disabled) { color: var(--ink); border-color: var(--ink-soft); }
.o-select-entire:disabled { opacity: 0.5; cursor: default; }
.o-selected-count { font-size: 12px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.o-order-count { font-size: 11.5px; color: var(--ink-faint); white-space: nowrap; }

/* — Order list — */
.o-order-list { display: flex; flex-direction: column; gap: 8px; }

/* — Warehouse view — */
.o-wh-view { display: flex; flex-direction: column; gap: 30px; }
.o-wh-head { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; padding-bottom: 11px; border-bottom: 1px solid var(--line-strong); }
.o-wh-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.o-wh-name { font-size: 16px; font-weight: 800; letter-spacing: -0.025em; }
.o-wh-count { font-size: 11.5px; color: var(--ink-muted); background: var(--surface); border: 1px solid var(--line-strong); padding: 2px 9px; border-radius: var(--r-pill); }
.o-wh-list { display: flex; flex-direction: column; gap: 7px; }

/* ============================================================================
   ORDER CARD
   ========================================================================== */
.oc-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-sm); transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
  overflow: hidden;
}
.oc-card:hover { border-color: var(--line-strong); box-shadow: var(--sh-md); }
.oc-selected { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink), var(--sh-md); }
.oc-card-open { box-shadow: var(--sh-md); }

.oc-main {
  display: grid; grid-template-columns: 34px minmax(150px, 200px) 1fr auto 30px;
  align-items: center; gap: 16px; padding: 15px 18px; cursor: pointer;
}
.oc-compact .oc-main { grid-template-columns: 30px minmax(130px,170px) 1fr auto 26px; padding: 12px 16px; gap: 12px; }
.oc-check-cell { display: flex; align-items: center; justify-content: center; }
.oc-checkbox { width: 16px; height: 16px; accent-color: var(--ink); cursor: pointer; }
.oc-num { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.oc-num-text { font-family: var(--font-mono); font-size: 14px; font-weight: 600; letter-spacing: -0.02em; }
.oc-date { font-size: 10.5px; color: var(--ink-faint); font-family: var(--font-mono); }
.oc-cust { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.oc-cust-name { font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-cust-phone { font-size: 11.5px; color: var(--ink-muted); font-family: var(--font-mono); }
.oc-cust-addr { font-size: 11px; color: var(--ink-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.oc-badges { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.oc-badge { font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em; padding: 3px 9px; border-radius: var(--r-pill); border: 1px solid transparent; white-space: nowrap; }
.oc-paid     { color: var(--green); background: var(--green-bg); border-color: var(--green-bd); }
.oc-unpaid   { color: var(--red);   background: var(--red-bg);   border-color: var(--red-bd); }
.oc-partial  { color: var(--amber); background: var(--amber-bg); border-color: var(--amber-bd); }
.oc-refunded { color: var(--ink-soft); background: var(--surface-2); border-color: var(--line-strong); }
.oc-unknown  { color: var(--ink-soft); background: var(--surface-2); border-color: var(--line-strong); }
.oc-split    { color: var(--blue);  background: var(--blue-bg);  border-color: var(--blue-bd); }
.oc-wh0 { color: #1d6f5c; background: rgba(29,111,92,0.08);  border-color: rgba(29,111,92,0.18); }
.oc-wh1 { color: #2451c4; background: rgba(36,81,196,0.08);  border-color: rgba(36,81,196,0.16); }
.oc-wh2 { color: #8a4ec4; background: rgba(138,78,196,0.08); border-color: rgba(138,78,196,0.16); }
.oc-wh3 { color: #a45a09; background: rgba(164,90,9,0.08);   border-color: rgba(164,90,9,0.18); }
.oc-item-count { font-size: 11.5px; color: var(--ink-soft); white-space: nowrap; padding-left: 2px; }

.oc-expand { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--ink-soft); transition: all var(--t-fast); }
.oc-expand:hover { color: var(--ink); border-color: var(--line-strong); }
.oc-expand svg { transition: transform var(--t); }
.oc-card-open .oc-expand svg { transform: rotate(180deg); }
.oc-card-open .oc-expand { background: var(--ink); border-color: var(--ink); color: #fff; }

/* — Expanded detail — */
.oc-detail { border-top: 1px solid var(--line); padding: 14px 18px 16px; background: var(--surface-2); animation: fadeIn var(--t-fast) var(--ease); }
.oc-li-wrap { display: flex; flex-direction: column; }
.oc-li-head, .oc-li {
  display: grid; grid-template-columns: 48px 1fr 150px 52px 130px 92px;
  align-items: center; gap: 12px;
}
.oc-li-head { padding: 0 4px 8px; font-size: 9.5px; font-weight: 700; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 1px solid var(--line); }
.oc-li { padding: 9px 4px; border-bottom: 1px solid var(--line); }
.oc-li:last-child { border-bottom: none; }
.oc-li-img { width: 44px; height: 44px; border-radius: var(--r-sm); overflow: hidden; background: var(--line); }
.oc-li-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.oc-li-ph { width: 44px; height: 44px; border-radius: var(--r-sm); background: var(--line); display: flex; align-items: center; justify-content: center; color: var(--ink-faint); }
.oc-li-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.oc-li-title { font-size: 12.5px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.oc-li-variant { font-size: 11px; color: var(--ink-soft); }
.oc-li-sku { font-size: 11.5px; color: var(--ink-muted); font-family: var(--font-mono); word-break: break-all; }
.oc-li-qty { font-size: 13px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.oc-li-wh { display: flex; }
.oc-li-stock { font-size: 11.5px; font-weight: 600; text-align: right; }
.oc-stock-ok { color: var(--green); }
.oc-stock-low { color: var(--red); }
.oc-note { margin-top: 12px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); font-size: 12.5px; color: var(--ink-muted); }
.oc-note-label { font-weight: 700; color: var(--ink); }

/* ============================================================================
   PRINT / PDF MODAL
   ========================================================================== */
.pm-screen { position: fixed; inset: 0; z-index: 100; background: #e9e8e3; display: flex; flex-direction: column; animation: fadeIn var(--t-fast) var(--ease); }
.pm-topbar { display: flex; align-items: center; gap: 16px; padding: 12px 22px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--sh-sm); flex-shrink: 0; }
.pm-close { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r-sm); color: var(--ink-muted); font-size: 13px; font-weight: 500; transition: all var(--t-fast); }
.pm-close:hover { color: var(--ink); border-color: var(--ink-soft); }
.pm-center { display: flex; flex-direction: column; gap: 2px; }
.pm-title { font-size: 15px; font-weight: 800; letter-spacing: -0.02em; }
.pm-meta { font-size: 11.5px; color: var(--ink-soft); font-family: var(--font-mono); }
.pm-actions { margin-left: auto; display: flex; gap: 9px; }
.pm-csv, .pm-print { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: var(--r-sm); font-size: 13px; font-weight: 600; transition: all var(--t-fast); }
.pm-csv { background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink); }
.pm-csv:hover { box-shadow: var(--sh-sm); border-color: var(--ink-soft); }
.pm-print { background: var(--ink); border: 1px solid var(--ink); color: #fff; }
.pm-print:hover { transform: translateY(-1px); box-shadow: var(--sh-md); }
.pm-preview { flex: 1; overflow-y: auto; padding: 30px 20px 60px; }
.pm-preview-label { max-width: 794px; margin: 0 auto 12px; font-size: 11px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.12em; }
.pm-a4 { width: 794px; max-width: 100%; margin: 0 auto; background: #fff; padding: 14mm 13mm; box-shadow: var(--sh-lg); border-radius: 2px; }

/* ============================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 920px) {
  .tb-inner, .o-page { padding-left: 18px; padding-right: 18px; }
  .tb-submark, .tb-section, .tb-user-name { display: none; }
  .o-title { font-size: 25px; }
  .o-title-brand { font-size: 11px; letter-spacing: 0.24em; }
  .oc-main { grid-template-columns: 30px 1fr auto 26px; }
  .oc-cust { display: none; }
  .oc-compact .oc-main { grid-template-columns: 28px 1fr auto 24px; }
  .oc-li-head { display: none; }
  .oc-li { grid-template-columns: 40px 1fr auto; gap: 10px; }
  .oc-li-sku, .oc-li-wh, .oc-li-stock { display: none; }
}
@media print { .tb, .o-filter-bar, .o-search, .o-bulk, .kpi-bar { display: none; } }

/* ============================================================================
   TOP-BAR NAV LINK (gear) + SETTINGS PAGE
   ========================================================================== */
.tb-nav { width: 32px; height: 32px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; color: var(--ink-soft); border: 1px solid transparent; transition: all var(--t-fast); }
.tb-nav:hover { color: var(--ink); background: var(--surface-2); }
.tb-nav.is-active { color: var(--ink); background: var(--surface-2); border-color: var(--line-strong); }

.set-page { max-width: 720px; margin: 0 auto; padding: 34px 28px 90px; animation: fadeIn var(--t) var(--ease); }
.set-head { margin-bottom: 24px; }
.set-title { font-size: 28px; font-weight: 800; letter-spacing: -0.04em; }
.set-subtitle { font-size: 13.5px; color: var(--ink-soft); margin-top: 7px; }
.set-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 24px; margin-bottom: 14px; box-shadow: var(--sh-sm); }
.set-card-title { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; }
.set-card-hint { font-size: 12px; color: var(--ink-soft); margin-top: 3px; line-height: 1.5; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.set-fields { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.set-input { background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r-md); color: var(--ink); font-size: 14px; padding: 11px 13px; width: 100%; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.set-input:focus { outline: none; background: var(--surface); border-color: var(--ink); box-shadow: var(--ring); }
.set-input::placeholder { color: var(--ink-faint); }
.set-input.is-mono { font-family: var(--font-mono); }
.set-times { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.set-time { background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r-md); color: var(--ink); font-size: 15px; font-family: var(--font-mono); padding: 10px 13px; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.set-time:focus { outline: none; background: var(--surface); border-color: var(--ink); box-shadow: var(--ring); }
.set-toggle { position: relative; width: 46px; height: 26px; flex-shrink: 0; }
.set-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.set-slider { position: absolute; inset: 0; background: var(--line-strong); border-radius: var(--r-pill); cursor: pointer; transition: background var(--t); }
.set-slider::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; box-shadow: var(--sh-sm); transition: transform var(--t) var(--ease); }
.set-toggle input:checked + .set-slider { background: var(--ink); }
.set-toggle input:checked + .set-slider::before { transform: translateX(20px); }
.set-note { display: flex; gap: 9px; align-items: flex-start; background: var(--amber-bg); border: 1px solid var(--amber-bd); border-radius: var(--r-md); padding: 11px 13px; margin-top: 14px; font-size: 12.5px; color: var(--ink-muted); line-height: 1.5; }
.set-note b { color: var(--amber); font-weight: 700; }
.set-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.set-save { display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: #fff; border: none; border-radius: var(--r-md); font-size: 14px; font-weight: 600; padding: 12px 22px; transition: transform var(--t-fast), box-shadow var(--t-fast), opacity var(--t-fast); box-shadow: var(--sh-sm); }
.set-save:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--sh-md); }
.set-save:disabled { opacity: 0.6; cursor: default; }
.set-test { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r-md); font-size: 14px; font-weight: 600; padding: 12px 20px; transition: all var(--t-fast); }
.set-test:hover:not(:disabled) { border-color: var(--ink-soft); box-shadow: var(--sh-sm); }
.set-test:disabled { opacity: 0.6; cursor: default; }
.set-status { font-size: 13px; font-weight: 600; margin-left: auto; }
.set-status.is-ok { color: var(--green); }
.set-status.is-err { color: var(--red); }
.set-cron { font-family: var(--font-mono); font-size: 12px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 11px 13px; margin-top: 8px; word-break: break-all; line-height: 1.6; }
.set-cron-rec { font-size: 12.5px; font-weight: 600; color: var(--ink-muted); margin-top: 14px; }
.set-cronstatus { font-size: 12.5px; line-height: 1.5; padding: 10px 13px; border-radius: var(--r-md); margin: 8px 0 4px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-muted); }
.set-cronstatus.is-ok { color: var(--green); border-color: var(--green-bd); background: var(--green-bg); }
.set-cronstatus.is-warn { color: var(--amber); border-color: var(--amber-bd); background: var(--amber-bg); }
.set-cronstatus.is-bad { color: var(--red); border-color: var(--red-bd); background: var(--red-bg); }
.set-cron-rec:first-of-type { color: var(--green); margin-top: 12px; }
.set-link { color: var(--blue); text-decoration: underline; }
.set-cron-label { font-size: 11px; font-weight: 700; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 16px; margin-bottom: 4px; }

/* ============================================================================
   FIXES + ADDITIONS (v3)
   ========================================================================== */
/* top-bar sync slot must lay its children out in a row */
#tb-sync { display: flex; align-items: center; gap: 10px; }

/* WhatsApp share button in print modal */
.pm-wa { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: var(--r-sm); font-size: 13px; font-weight: 600; background: #1faf54; border: 1px solid #1c9d4c; color: #fff; transition: all var(--t-fast); }
.pm-wa:hover { transform: translateY(-1px); box-shadow: var(--sh-md); }

/* dynamic add/remove rows (settings) */
.set-list { display: flex; flex-direction: column; gap: 9px; margin-top: 16px; }
.set-list-row { display: flex; align-items: center; gap: 8px; }
.set-list-row .set-input, .set-list-row .set-time { flex: 1; margin: 0; }
.set-remove { width: 36px; height: 40px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-md); color: var(--ink-soft); transition: all var(--t-fast); }
.set-remove:hover { color: var(--red); border-color: var(--red-bd); background: var(--red-bg); }
.set-times-list { flex-direction: row; flex-wrap: wrap; }
.set-times-list .set-list-row { width: auto; }
.set-mode-select { width: 148px; }
.set-add { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; padding: 8px 14px; background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--r-md); color: var(--ink-muted); font-size: 12.5px; font-weight: 600; transition: all var(--t-fast); }
.set-add:hover { color: var(--ink); border-color: var(--ink-soft); background: var(--surface); }
.set-add:disabled { opacity: 0.45; cursor: default; }

/* per-email warehouse target select */
.set-wh-select { flex-shrink: 0; width: 200px; appearance: none; -webkit-appearance: none;
  background: var(--surface-2) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238c8a80' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") no-repeat right 11px center;
  border: 1px solid var(--line-strong); border-radius: var(--r-md); color: var(--ink); font-size: 13px; padding: 11px 30px 11px 12px; cursor: pointer; }
.set-wh-select:focus { outline: none; border-color: var(--ink); box-shadow: var(--ring); }
@media (max-width: 620px) { .set-list-row { flex-wrap: wrap; } .set-wh-select { width: 100%; } .set-mode-select { width: 100%; } }

/* ============================================================================
   WAREHOUSE TABS (picking modal) + THEME TOGGLE + DARK MODE
   ========================================================================== */
.pm-tabs { max-width: 794px; margin: 0 auto 14px; display: flex; flex-wrap: wrap; gap: 7px; }
.pm-tab { padding: 8px 15px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-pill); color: var(--ink-muted); font-size: 12.5px; font-weight: 600; transition: all var(--t-fast); }
.pm-tab:hover { color: var(--ink); border-color: var(--ink-soft); }
.pm-tab-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.tb-theme { width: 32px; height: 32px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; color: var(--ink-soft); border: 1px solid transparent; transition: all var(--t-fast); }
.tb-theme:hover { color: var(--ink); background: var(--surface-2); }

/* ---- dark theme ---- */
:root[data-theme="dark"] {
  --bg:          #15141a;
  --surface:     #201f28;
  --surface-2:   #1a1922;
  --ink:         #f1f1f6;
  --ink-muted:   #c4c2ce;
  --ink-soft:    #a6a4b2;
  --ink-faint:   #7c7a87;
  --line:        #2c2b35;
  --line-strong: #3a3944;
  --tb-bg:       rgba(26,25,33,0.85);
  --sh-sm: 0 1px 2px rgba(0,0,0,0.4), 0 1px 1px rgba(0,0,0,0.3);
  --sh-md: 0 6px 22px -8px rgba(0,0,0,0.6), 0 2px 6px -2px rgba(0,0,0,0.4);
  --sh-lg: 0 22px 60px -16px rgba(0,0,0,0.7);
  --ring:  0 0 0 3px rgba(237,237,242,0.14);
  --green-bg: rgba(52,199,123,0.14); --red-bg: rgba(255,107,99,0.14);
  --amber-bg: rgba(240,170,70,0.16); --blue-bg: rgba(96,150,255,0.16);
  --green: #4ed08a; --red: #ff7a72; --amber: #e7a34a; --blue: #7aa2ff;
}
/* elements that use --ink as a FILL get dark text on their now-light fill */
[data-theme="dark"] .kpi-active .kpi-value,
[data-theme="dark"] .kpi-active .kpi-label,
[data-theme="dark"] .o-chip-active,
[data-theme="dark"] .o-apply,
[data-theme="dark"] .lg-button,
[data-theme="dark"] .set-save,
[data-theme="dark"] .o-bulk-btn:not(.o-bulk-amber):not(.o-bulk-blue),
[data-theme="dark"] .tb-av,
[data-theme="dark"] .pm-print,
[data-theme="dark"] .pm-tab-active,
[data-theme="dark"] .oc-card-open .oc-expand { color: var(--bg) !important; }
[data-theme="dark"] .skeleton { background: linear-gradient(90deg, var(--line) 0%, #26252f 50%, var(--line) 100%); }
[data-theme="dark"] .pm-screen { background: #0e0d12; }
[data-theme="dark"] .pm-a4 { background: #fff; }            /* keep the A4 sheet white (it prints) */
[data-theme="dark"] .pm-a4 * { color: initial; }
[data-theme="dark"] .lg-page { background: radial-gradient(1200px 500px at 50% -10%, rgba(202,165,63,0.08), transparent 60%), var(--bg); }

/* ============================================================================
   REPEAT/NEW BADGES · FRAUD CHECK · THERMAL BUTTON
   ========================================================================== */
.oc-repeat { color: var(--blue); background: var(--blue-bg); border-color: var(--blue-bd); }
.oc-new { color: var(--ink-soft); background: var(--surface-2); border-color: var(--line-strong); }

/* always-visible meta strip under the primary row: order history + fraud check */
.oc-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 8px 18px; border-top: 1px solid var(--line); background: var(--surface-2); }
.oc-compact .oc-meta { display: none; }
.oc-card-open .oc-meta { border-bottom: 1px solid var(--line); }
.oc-meta-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.oc-meta-right { display: flex; align-items: center; gap: 8px; }
.oc-hist { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: var(--r-pill); border: 1px solid transparent; }
.oc-hist svg { flex-shrink: 0; }
.oc-hist-repeat { color: var(--blue); background: var(--blue-bg); border-color: var(--blue-bd); }
.oc-hist-new { color: var(--green); background: var(--green-bg); border-color: var(--green-bd); }
.oc-hist-unknown { color: var(--ink-soft); }

.oc-fraud-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-pill); color: var(--ink); font-size: 12px; font-weight: 600; transition: all var(--t-fast); }
.oc-fraud-btn:hover:not(:disabled) { border-color: var(--ink-soft); box-shadow: var(--sh-sm); }
.oc-fraud-btn:disabled { opacity: 0.55; cursor: default; }
.oc-fraud-note { font-size: 11.5px; color: var(--ink-soft); }
.oc-fraud-result { display: inline-flex; align-items: baseline; gap: 8px; }
.oc-fr-pct { font-size: 14px; font-weight: 800; }
.oc-fr-detail { font-size: 10.5px; color: var(--ink-soft); }
.oc-fr-ok .oc-fr-pct { color: var(--green); }
.oc-fr-warn .oc-fr-pct { color: var(--amber); }
.oc-fr-bad .oc-fr-pct { color: var(--red); }

.pm-thermal { display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px; border-radius: var(--r-sm); font-size: 13px; font-weight: 600; background: var(--surface); border: 1px solid var(--line-strong); color: var(--ink); transition: all var(--t-fast); }
.pm-thermal:hover { box-shadow: var(--sh-sm); border-color: var(--ink-soft); }

/* ============================================================================
   AMBIENT SKY — behind content (sun+birds by day, moon+fireflies night)
   ========================================================================== */
.app-main { position: relative; z-index: 1; background: transparent; }
.yt-sky { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.yt-sky > * { position: absolute; }
.yt-birds, .yt-fireflies, .yt-butterflies { top: 0; right: 0; bottom: 0; left: 0; }   /* full-viewport layers */
.yt-bird, .yt-firefly, .yt-butterfly { position: absolute; }                          /* so top/left actually apply */

/* ---- day (default / light) ---- */
.yt-sun {
  top: -90px; right: -70px; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(255,206,120,0.55), rgba(255,216,150,0.26) 42%, rgba(255,228,170,0) 72%);
  filter: blur(1px); animation: yt-breathe 8s ease-in-out infinite;
}
.yt-sun-core {
  position: absolute; left: 50%; top: 50%; width: 118px; height: 118px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 40% 36%, #fff6dd, #ffdf96 55%, #ffc75e 100%);
  box-shadow: 0 0 60px 18px rgba(255,205,110,0.5), 0 0 24px 6px rgba(255,236,180,0.7),
    inset -8px -10px 20px rgba(230,150,60,0.28), inset 6px 8px 14px rgba(255,255,255,0.55);
}
.yt-sun-rays {
  position: absolute; left: 50%; top: 50%; width: 320px; height: 320px;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg,
    rgba(255,214,130,0.16) 0deg 9deg, rgba(255,214,130,0) 9deg 30deg);
  border-radius: 50%;
  -webkit-mask: radial-gradient(circle, transparent 62px, #000 70px, #000 130px, transparent 160px);
  mask: radial-gradient(circle, transparent 62px, #000 70px, #000 130px, transparent 160px);
  animation: ytSunSpin 90s linear infinite;
}
@keyframes ytSunSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes yt-breathe { 0%,100% { transform: scale(1); opacity: 0.85; } 50% { transform: scale(1.07); opacity: 1; } }

.yt-bird {
  width: 30px; height: 14px; top: 11%; left: -50px;
  background: no-repeat center/contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='30' height='14' viewBox='0 0 30 14' fill='none' stroke='%231b1a17' stroke-width='1.7' stroke-linecap='round'><path d='M1 10 Q7.5 1 15 8 Q22.5 1 29 10'/></svg>");
  animation: yt-fly linear infinite;
}
@keyframes yt-fly {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(26vw, -16px); }
  50%  { transform: translate(52vw, -26px); }
  75%  { transform: translate(78vw, -14px); }
  100% { transform: translate(106vw, 6px); }
}
.yt-bird.b1 { top: 9%;  width: 32px; opacity: 0.42; animation-duration: 28s; animation-delay: -2s; }
.yt-bird.b2 { top: 14%; width: 24px; opacity: 0.3;  animation-duration: 34s; animation-delay: -9s; }
.yt-bird.b3 { top: 7%;  width: 36px; opacity: 0.36; animation-duration: 40s; animation-delay: -17s; }
.yt-bird.b4 { top: 18%; width: 22px; opacity: 0.26; animation-duration: 31s; animation-delay: -24s; }
.yt-bird.b5 { top: 12%; width: 28px; opacity: 0.22; animation-duration: 46s; animation-delay: -33s; }
.yt-bird.b6 { top: 6%;  width: 26px; opacity: 0.3;  animation-duration: 36s; animation-delay: -12s; }
.yt-bird.b7 { top: 16%; width: 30px; opacity: 0.28; animation-duration: 42s; animation-delay: -27s; }

/* ---- fluttering butterflies (day only) ---- */
[data-theme="dark"] .yt-butterflies { display: none; }
.yt-butterfly { top: 32%; left: -50px; width: 30px; height: 26px; animation: yt-flutter linear infinite; }
.yt-butterfly svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 3px 5px rgba(120,110,120,0.2)); }
.yt-bf-wing { transform-box: fill-box; transform-origin: right center; animation: yt-flap 0.32s ease-in-out infinite alternate; }
.yt-bf-wing-r { transform-origin: left center; }
@keyframes yt-flap { from { transform: scaleX(1); } to { transform: scaleX(0.4); } }
@keyframes yt-flutter {
  0%   { transform: translate(0,0) rotate(-6deg); }
  25%  { transform: translate(27vw,-34px) rotate(7deg); }
  50%  { transform: translate(53vw,12px) rotate(-6deg); }
  75%  { transform: translate(79vw,-26px) rotate(8deg); }
  100% { transform: translate(107vw,8px) rotate(-6deg); }
}
.yt-butterfly.f1 { top: 30%; animation-duration: 34s; animation-delay: -3s; }
.yt-butterfly.f2 { top: 46%; width: 24px; height: 21px; animation-duration: 44s; animation-delay: -19s; }
.yt-butterfly.f3 { top: 38%; width: 34px; height: 30px; animation-duration: 52s; animation-delay: -34s; }

/* ---- night (dark) ---- */
.yt-moon, .yt-fireflies, .yt-stars { display: none; }
.yt-moon {
  top: 58px; right: 90px; width: 138px; height: 138px; border-radius: 50%; z-index: 3;
  background:
    radial-gradient(circle at 33% 30%, rgba(255,255,255,0.9), rgba(255,255,255,0) 42%),
    radial-gradient(circle at 36% 36%, #f8f6ec, #ddd9ca 52%, #b9b5a4 82%, #98937f 100%);
  box-shadow:
    0 0 90px 22px rgba(210,220,255,0.20),
    0 0 34px 8px rgba(240,240,220,0.28),
    inset -18px -16px 34px rgba(35,32,50,0.30),
    inset 6px 8px 18px rgba(255,255,255,0.35);
  opacity: 0.94; animation: yt-glow 9s ease-in-out infinite;
}
.yt-moon::before, .yt-moon::after { content: ""; position: absolute; border-radius: 50%; }
.yt-moon::before {
  width: 30px; height: 30px; top: 32px; left: 36px;
  background: radial-gradient(circle at 38% 34%, rgba(0,0,0,0.02), rgba(0,0,0,0.11));
  box-shadow:
    inset 2px 3px 4px rgba(0,0,0,0.10), inset -1px -2px 3px rgba(255,255,255,0.35),
    46px 40px 0 -7px rgba(0,0,0,0.07),
    -8px 58px 0 -10px rgba(0,0,0,0.06),
    62px 4px 0 -11px rgba(0,0,0,0.055);
}
.yt-moon::after {
  width: 17px; height: 17px; top: 78px; left: 84px;
  background: radial-gradient(circle at 40% 35%, rgba(0,0,0,0.03), rgba(0,0,0,0.10));
  box-shadow: inset 1px 2px 3px rgba(0,0,0,0.09), -40px -10px 0 -3px rgba(0,0,0,0.05), 18px -34px 0 -6px rgba(0,0,0,0.05);
}
@keyframes yt-glow { 0%,100% { opacity: 0.64; } 50% { opacity: 0.82; } }

.yt-firefly { width: 7px; height: 7px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,238,150,1), rgba(255,222,120,0) 70%);
  box-shadow: 0 0 8px 2px rgba(255,232,140,0.55);
  animation: yt-twinkle ease-in-out infinite; }
@keyframes yt-twinkle {
  0%, 100% { opacity: 0.05; transform: translate(0,0) scale(0.8); }
  50%      { opacity: 1;    transform: translate(8px,-10px) scale(1.08); }
}

[data-theme="dark"] .yt-sun, [data-theme="dark"] .yt-birds { display: none; }
[data-theme="dark"] .yt-moon, [data-theme="dark"] .yt-fireflies, [data-theme="dark"] .yt-nightfx, [data-theme="dark"] .yt-stars { display: block; }
.yt-nightfx { display: none; inset: 0; z-index: 2; }

/* ---- twinkling starfield ---- */
.yt-stars { top: 0; right: 0; bottom: 0; left: 0; z-index: 1; }
.yt-star {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, rgba(255,255,255,0.65) 45%, rgba(255,255,255,0) 75%);
  box-shadow: 0 0 6px 1px rgba(215,228,255,0.55);
  animation: ytStarTwinkle var(--d, 4s) ease-in-out var(--dl, 0s) infinite;
}
.yt-star.s-lg { width: 4.5px; height: 4.5px; box-shadow: 0 0 9px 2px rgba(220,232,255,0.7); }
.yt-star.s-lg::before, .yt-star.s-lg::after {
  content: ""; position: absolute; left: 50%; top: 50%; background: rgba(255,255,255,0.75); border-radius: 999px;
}
.yt-star.s-lg::before { width: 15px; height: 1px; transform: translate(-50%, -50%); }
.yt-star.s-lg::after  { width: 1px; height: 15px; transform: translate(-50%, -50%); }
@keyframes ytStarTwinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.85); }
  50%      { opacity: 1;    transform: scale(1.15); }
}

/* ---- graceful shooting stars: long tapered streak, sweeps across the sky ---- */
.yt-shooting {
  position: absolute; opacity: 0; pointer-events: none;
  width: 190px; height: 2px; border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(200,216,255,0.35) 55%, rgba(255,252,238,0.98) 100%);
  filter: drop-shadow(0 0 6px rgba(220,232,255,0.6));
}
.yt-shooting::before {
  content: ""; position: absolute; right: -3px; top: -2.5px; width: 8px; height: 8px; border-radius: 50%;
  background: radial-gradient(circle at 45% 45%, #ffffff 0%, #ffeecb 45%, rgba(255,238,203,0) 75%);
  box-shadow: 0 0 16px 5px rgba(255,246,214,0.8);
}
.ys1 { top: 8%;  left: 4%;  animation: ytShoot1 26s cubic-bezier(0.25,0.1,0.35,1) infinite; }
.ys2 { top: 5%;  left: 46%; animation: ytShoot2 33s cubic-bezier(0.25,0.1,0.35,1) infinite; animation-delay: -14s; }
.ys3 { top: 24%; left: 20%; animation: ytShoot3 41s cubic-bezier(0.25,0.1,0.35,1) infinite; animation-delay: -27s; }
@keyframes ytShoot1 {
  0%, 100% { opacity: 0; transform: translate3d(0,0,0) rotate(24deg) scaleX(0.4); }
  86%      { opacity: 0; transform: translate3d(0,0,0) rotate(24deg) scaleX(0.4); }
  87.5%    { opacity: 1; }
  93%      { opacity: 0.9; transform: translate3d(46vw,20.5vw,0) rotate(24deg) scaleX(1.1); }
  95%      { opacity: 0; transform: translate3d(54vw,24vw,0) rotate(24deg) scaleX(0.65); }
}
@keyframes ytShoot2 {
  0%, 100% { opacity: 0; transform: translate3d(0,0,0) rotate(30deg) scaleX(0.4); }
  73%      { opacity: 0; transform: translate3d(0,0,0) rotate(30deg) scaleX(0.4); }
  74.4%    { opacity: 1; }
  79%      { opacity: 0.85; transform: translate3d(32vw,18.4vw,0) rotate(30deg) scaleX(1.05); }
  80.8%    { opacity: 0; transform: translate3d(38vw,22vw,0) rotate(30deg) scaleX(0.6); }
}
@keyframes ytShoot3 {
  0%, 100% { opacity: 0; transform: translate3d(0,0,0) rotate(19deg) scaleX(0.35); }
  90%      { opacity: 0; transform: translate3d(0,0,0) rotate(19deg) scaleX(0.35); }
  91.2%    { opacity: 0.95; }
  96%      { opacity: 0.8; transform: translate3d(40vw,13.7vw,0) rotate(19deg) scaleX(1); }
  97.6%    { opacity: 0; transform: translate3d(46vw,16vw,0) rotate(19deg) scaleX(0.6); }
}

/* ---- rocket: cinematic flypast — enters left, arcs over/around the moon, exits right ---- */
.yt-rocket, .yt-ufo { position: absolute; pointer-events: none; z-index: 2; }
.yt-rocket {
  top: 40px; left: -180px; width: 140px; height: 60px; opacity: 0;
  animation: ytRocketFly 38s cubic-bezier(0.45,0.05,0.55,0.95) infinite;
  will-change: transform, opacity;
}
.yt-rocket-tilt { display: block; width: 100%; height: 100%; animation: ytRocketTilt 38s ease-in-out infinite; }
.yt-rocket svg { width: 140px; height: 60px; filter: drop-shadow(0 0 18px rgba(255,206,120,0.30)) drop-shadow(0 4px 10px rgba(0,0,0,0.35)); }
.yt-rk-flame { transform-box: fill-box; transform-origin: right center; animation: ytFlame 0.16s ease-in-out infinite alternate; }
@keyframes ytFlame { from { transform: scaleX(0.78) scaleY(0.9); opacity: 0.85; } to { transform: scaleX(1.12) scaleY(1.06); opacity: 1; } }
.yt-rk-puff { transform-box: fill-box; transform-origin: center; animation: ytPuff 1.1s ease-out infinite; }
.yt-rk-puff.p2 { animation-delay: 0.35s; } .yt-rk-puff.p3 { animation-delay: 0.7s; }
@keyframes ytPuff {
  0%   { opacity: 0.45; transform: translateX(14px) scale(0.5); }
  100% { opacity: 0;    transform: translateX(-22px) scale(1.5); }
}
.yt-rk-line { stroke-dasharray: 26; animation: ytLine 0.8s linear infinite; }
.yt-rk-line.l2 { animation-delay: 0.4s; }
@keyframes ytLine { from { stroke-dashoffset: 0; opacity: 0.4; } to { stroke-dashoffset: 52; opacity: 0; } }
/* Path is expressed relative to the viewport so it works on every screen size:
   enters low-left, climbs, crests above the moon (top-right area), dips behind it, exits right. */
@keyframes ytRocketFly {
  0%, 54%  { opacity: 0; transform: translate3d(0, 24vh, 0); }
  55%      { opacity: 0; transform: translate3d(-2vw, 25vh, 0); }
  57%      { opacity: 1; }
  63%      { transform: translate3d(22vw, 17vh, 0); }
  70%      { transform: translate3d(46vw, 9vh, 0); }
  77%      { transform: translate3d(68vw, 4.5vh, 0); }
  84%      { transform: translate3d(86vw, 6vh, 0); opacity: 1; }
  90%      { transform: translate3d(101vw, 11vh, 0); opacity: 1; }
  92%, 100%{ transform: translate3d(112vw, 14vh, 0); opacity: 0; }
}
@keyframes ytRocketTilt {
  0%, 55% { transform: rotate(-16deg); }
  66%     { transform: rotate(-13deg); }
  77%     { transform: rotate(-2deg); }
  86%     { transform: rotate(9deg); }
  100%    { transform: rotate(13deg); }
}

/* ---- UFO: slips out from behind the moon, glides, cloaks away, de-cloaks ahead ---- */
.yt-ufo {
  top: 96px; right: 130px; width: 120px; height: 64px; opacity: 0;
  animation: ytUfoVoyage 44s ease-in-out infinite; will-change: transform, opacity;
}
.yt-ufo-hover { display: block; width: 100%; height: 100%; animation: ytUfoHover 3.4s ease-in-out infinite; }
.yt-ufo svg { width: 120px; height: 64px; filter: drop-shadow(0 0 14px rgba(125,225,255,0.35)) drop-shadow(0 4px 8px rgba(0,0,0,0.4)); }
.yt-ufo-lights circle { animation: ytUfoLight 1.4s linear infinite; }
.yt-ufo-lights circle:nth-child(1) { animation-delay: 0s; }
.yt-ufo-lights circle:nth-child(2) { animation-delay: 0.28s; }
.yt-ufo-lights circle:nth-child(3) { animation-delay: 0.56s; }
.yt-ufo-lights circle:nth-child(4) { animation-delay: 0.84s; }
.yt-ufo-lights circle:nth-child(5) { animation-delay: 1.12s; }
@keyframes ytUfoLight { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
.yt-ufo-beam { animation: ytUfoBeam 3.4s ease-in-out infinite; transform-box: fill-box; transform-origin: top center; }
@keyframes ytUfoBeam { 0%, 100% { opacity: 0.25; transform: scaleY(0.85); } 50% { opacity: 0.6; transform: scaleY(1.05); } }
@keyframes ytUfoHover { 0%, 100% { transform: translateY(0) rotate(-1.2deg); } 50% { transform: translateY(-8px) rotate(1.2deg); } }
@keyframes ytUfoVoyage {
  /* parked behind the moon (moon has higher z-index, so it's hidden) */
  0%, 8%   { opacity: 0;    transform: translate3d(30px, 8px, 0) scale(0.55); }
  /* slides out from behind the moon, small -> grows as it approaches */
  12%      { opacity: 0.9;  transform: translate3d(-40px, 2px, 0) scale(0.7); }
  18%      { opacity: 1;    transform: translate3d(-16vw, -1vh, 0) scale(0.85); }
  /* cloaks (advanced alien tech) */
  24%      { opacity: 0;    transform: translate3d(-26vw, -2.2vh, 0) scale(0.9); }
  /* stays invisible while "travelling" */
  34%      { opacity: 0;    transform: translate3d(-46vw, 1vh, 0) scale(0.95); }
  /* de-cloaks further ahead */
  39%      { opacity: 1;    transform: translate3d(-54vw, 2.4vh, 0) scale(1); }
  47%      { opacity: 1;    transform: translate3d(-68vw, 0.4vh, 0) scale(1); }
  /* drifts down-left and fades out for the long night */
  54%      { opacity: 0;    transform: translate3d(-80vw, 4vh, 0) scale(0.92); }
  55%, 100%{ opacity: 0;    transform: translate3d(30px, 8px, 0) scale(0.55); }
}

/* ---- soft bluish morning-sky tint + kawaii clouds (day only) ---- */
.yt-daysky { top: 0; left: 0; right: 0; height: 70%;
  background: linear-gradient(180deg, rgba(139,187,231,0.42) 0%, rgba(171,206,238,0.24) 28%, rgba(214,231,245,0.1) 55%, rgba(255,255,255,0) 100%);
  pointer-events: none; }
[data-theme="dark"] .yt-daysky { display: none; }

.yt-cloud { top: 13%; left: -260px; width: 140px; height: 83px; opacity: 0.95;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27132%27%20height%3D%2778%27%20viewBox%3D%270%200%20132%2078%27%3E%3Cg%20fill%3D%27%23ffffff%27%3E%3Ccircle%20cx%3D%2740%27%20cy%3D%2746%27%20r%3D%2724%27%2F%3E%3Ccircle%20cx%3D%2766%27%20cy%3D%2734%27%20r%3D%2729%27%2F%3E%3Ccircle%20cx%3D%2794%27%20cy%3D%2746%27%20r%3D%2724%27%2F%3E%3Crect%20x%3D%2734%27%20y%3D%2744%27%20width%3D%2770%27%20height%3D%2728%27%20rx%3D%2714%27%2F%3E%3C%2Fg%3E%3Cellipse%20cx%3D%2750%27%20cy%3D%2752%27%20rx%3D%276%27%20ry%3D%274.5%27%20fill%3D%27%23f7b8c8%27%2F%3E%3Cellipse%20cx%3D%2784%27%20cy%3D%2752%27%20rx%3D%276%27%20ry%3D%274.5%27%20fill%3D%27%23f7b8c8%27%2F%3E%3Ccircle%20cx%3D%2758%27%20cy%3D%2744%27%20r%3D%273.4%27%20fill%3D%27%23433f43%27%2F%3E%3Ccircle%20cx%3D%2776%27%20cy%3D%2744%27%20r%3D%273.4%27%20fill%3D%27%23433f43%27%2F%3E%3Cpath%20d%3D%27M61%2050%20Q67%2056%2073%2050%27%20stroke%3D%27%23433f43%27%20stroke-width%3D%272.4%27%20fill%3D%27none%27%20stroke-linecap%3D%27round%27%2F%3E%3C%2Fsvg%3E");
  filter: drop-shadow(0 6px 10px rgba(120,150,180,0.18)); animation: yt-drift linear infinite; }
.yt-cloud.c1 { top: 10%; width: 160px; height: 95px; animation-duration: 78s;  animation-delay: -8s; }
.yt-cloud.c2 { top: 24%; width: 116px; height: 69px; animation-duration: 104s; animation-delay: -46s; opacity: 0.7; }
.yt-cloud.c3 { top: 17%; width: 92px;  height: 55px; animation-duration: 132s; animation-delay: -86s; opacity: 0.56; }
@keyframes yt-drift { from { transform: translateX(0); } to { transform: translateX(calc(100vw + 320px)); } }
[data-theme="dark"] .yt-clouds { display: none; }

/* ---- drifting hot-air balloon (day only) ---- */
[data-theme="dark"] .yt-balloons { display: none; }
.yt-balloons { top: 0; right: 0; bottom: 0; left: 0; }
.yt-balloon {
  position: absolute; top: 34%; left: -90px; width: 58px; height: 84px; opacity: 0.9;
  animation: ytBalloonDrift 120s linear infinite; will-change: transform;
}
.yt-balloon svg { width: 100%; height: 100%;
  filter: drop-shadow(0 8px 12px rgba(150,110,80,0.22)); animation: ytBalloonSway 7s ease-in-out infinite; }
@keyframes ytBalloonSway { 0%,100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
@keyframes ytBalloonDrift {
  0%   { transform: translate3d(0, 0, 0); }
  25%  { transform: translate3d(27vw, -6vh, 0); }
  50%  { transform: translate3d(54vw, -1vh, 0); }
  75%  { transform: translate3d(80vw, -8vh, 0); }
  100% { transform: translate3d(108vw, -3vh, 0); }
}

/* ---- owl perched ON the KPI bar (anchored to the bar itself, night only) ---- */
.kpi-bar { position: relative; }
.yt-owl { display: none; position: absolute; top: -62px; right: 56px; width: 62px; height: 71px;
  pointer-events: none; z-index: 1;
  transform-origin: bottom center; animation: yt-owl-bob 6.5s ease-in-out infinite; }
[data-theme="dark"] .yt-owl { display: block; }
.yt-owl svg { width: 100%; height: 100%; overflow: visible; opacity: 0.92;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,0.45)); }
.yt-owl-eyes { transform-box: fill-box; transform-origin: center; animation: yt-blink 5.5s infinite; }
.yt-owl-glow { animation: yt-eye-glow 5.5s ease-in-out infinite; }
@keyframes yt-owl-bob { 0%,100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-6px) rotate(1.5deg); } }
@keyframes yt-blink { 0%,90%,100% { transform: scaleY(1); } 94%,97% { transform: scaleY(0.08); } }
@keyframes yt-eye-glow { 0%,100% { opacity: 0.5; } 50% { opacity: 0.95; } }

/* order amount on the main card */
.oc-amount { font-family: var(--font-mono); font-size: 13px; font-weight: 800; color: var(--ink); white-space: nowrap; letter-spacing: -0.01em; }

@media (max-width: 720px) { .yt-sun { width: 230px; height: 230px; } .yt-moon { width: 96px; height: 96px; right: 40px; } .yt-owl { right: 16px; top: -50px; width: 50px; height: 58px; } .yt-ufo { right: 60px; top: 80px; } }
@media (prefers-reduced-motion: reduce) {
  .yt-sun, .yt-bird, .yt-firefly, .yt-moon, .yt-star, .yt-shooting, .yt-rocket, .yt-rocket-tilt, .yt-ufo, .yt-ufo-hover, .yt-owl, .yt-sun-rays, .yt-balloon { animation: none !important; }
  .yt-bird, .yt-shooting, .yt-rocket, .yt-ufo, .yt-balloon { display: none; }
}

/* ============================================================================
   RESPONSIVE REFINEMENTS (top bar + cards across screen sizes)
   ========================================================================== */
@media (max-width: 1180px) {
  .tb-synced { display: none; }              /* free up room before things crowd */
}
@media (max-width: 1024px) {
  .tb-section { display: none; }
}
@media (max-width: 760px) {
  .tb-select { display: none; }              /* keep just the Refresh button */
  .tb-refresh span:last-child { display: none; }  /* icon-only refresh */
  .tb-refresh { padding: 7px 9px; }
  .oc-meta { padding: 8px 14px; }
  .o-bulk-actions { width: 100%; }
}
@media (min-width: 1500px) {
  .o-page, .tb-inner { max-width: 1400px; }  /* use big screens a bit more */
}

/* ============================================================================
   2026-07 mobile / clouds / modal refinements
   ========================================================================== */
html, body { max-width: 100%; overflow-x: hidden; }
.yt-clouds { top: 0; right: 0; bottom: 0; left: 0; display: block; }
.yt-cloud { position: absolute; z-index: 1; }
.yt-daysky { z-index: 0; }
.yt-sun, .yt-birds, .yt-butterflies { z-index: 2; }
.app-main { width: 100%; }

@media (max-width: 760px) {
  .tb { overflow: hidden; }
  .tb-inner { max-width: 100%; min-width: 0; height: 54px; padding: 0 10px; gap: 8px; }
  .tb-logo { height: 24px; max-width: 138px; }
  .tb-brand { gap: 8px; min-width: 0; }
  .tb-sep, .tb-user, .tb-section, .tb-submark, .tb-user-name, .tb-select, .tb-synced { display: none !important; }
  .tb-right { gap: 6px; margin-left: auto; flex-shrink: 0; }
  .tb-refresh, .tb-theme, .tb-nav, .tb-logout { width: 34px; height: 34px; padding: 0; justify-content: center; }
  .tb-refresh { font-size: 0; gap: 0; }
  .tb-refresh svg { width: 17px; height: 17px; }

  .o-page { max-width: 100%; padding: 22px 12px 86px; overflow-x: hidden; }
  .o-head { margin-bottom: 16px; }
  .o-title { font-size: 28px; line-height: 1.05; }
  .o-subtitle { font-size: 12.5px; }
  .kpi-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 8px; border-radius: 18px; }
  .kpi-tile { min-width: 0; padding: 10px 8px; }
  .kpi-divider { display: none; }
  .kpi-value { font-size: 21px; }
  .kpi-label { font-size: 9px; letter-spacing: 0.08em; overflow-wrap: anywhere; }

  .o-filter-bar { max-width: 100%; padding: 8px 10px; border-radius: 16px; gap: 4px; -webkit-overflow-scrolling: touch; }
  .o-filter-left { gap: 6px; }
  .o-chip-group { padding: 0 2px; }
  .o-filter-label { font-size: 9px; }
  .o-seg, .o-chip { padding: 6px 10px; font-size: 12px; }
  .o-search { padding: 0 12px; border-radius: 15px; }
  .o-search-input { min-width: 0; font-size: 13px; }

  .o-bulk { padding: 11px 12px; border-radius: 16px; }
  .o-bulk-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
  .o-bulk-btn { justify-content: center; padding: 10px 8px; font-size: 13px; }
  .o-bulk-close { width: 100%; margin-left: 0; text-align: center; }

  .o-selectall { flex-direction: column; align-items: stretch; gap: 8px; }
  .o-selectall-right { justify-content: space-between; }
  .o-select-entire { max-width: 58vw; overflow: hidden; text-overflow: ellipsis; }

  .oc-main { grid-template-columns: 28px minmax(0, 1fr) 26px; grid-template-areas: 'chk num exp' 'badges badges badges'; gap: 8px 10px; padding: 13px 12px; }
  .oc-check-cell { grid-area: chk; }
  .oc-num { grid-area: num; }
  .oc-expand { grid-area: exp; width: 26px; height: 26px; }
  .oc-badges { grid-area: badges; flex-wrap: wrap; gap: 6px; justify-content: flex-start; min-width: 0; }
  .oc-badge { font-size: 10px; padding: 3px 8px; }
  .oc-amount, .oc-item-count { font-size: 11px; }
  .oc-meta { flex-direction: column; align-items: flex-start; gap: 7px; padding: 9px 12px; }
  .oc-meta-left, .oc-meta-right { width: 100%; justify-content: flex-start; }
  .oc-fraud-result { flex-wrap: wrap; gap: 3px 8px; }
  .oc-detail { padding: 12px; }
  .oc-li { grid-template-columns: 42px 1fr auto; }

  .pm-topbar { flex-wrap: wrap; gap: 9px; padding: 10px 12px; align-items: stretch; }
  .pm-close { flex: 1 1 122px; justify-content: center; padding: 10px 9px; }
  .pm-center { order: 3; width: 100%; text-align: left; }
  .pm-title { font-size: 20px; }
  .pm-meta { font-size: 11px; white-space: normal; line-height: 1.3; }
  .pm-actions { flex: 1 1 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pm-wa, .pm-csv, .pm-thermal, .pm-print { width: 100%; justify-content: center; padding: 10px 8px; font-size: 12.5px; }
  .pm-preview { padding: 16px 8px 44px; overflow-x: hidden; }
  .pm-preview-label { font-size: 10px; line-height: 1.45; }
  .pm-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
  .pm-tab { flex: 0 0 auto; }
  .pm-a4 { width: 100%; max-width: 100%; padding: 8mm 6mm; overflow: hidden; }
}

@media (max-width: 380px) {
  .kpi-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pm-actions { grid-template-columns: 1fr; }
  .o-bulk-actions { grid-template-columns: 1fr; }
}

/* Holiday calendars; retain the existing report styling. */
.cal-shop{margin-top:18px;padding-top:16px;border-top:1px solid var(--line)}
.cal-shop h3{font-size:14px;margin-bottom:6px}.cal-week{display:flex;flex-wrap:wrap;gap:10px;margin:10px 0}
.cal-week label{display:flex;gap:5px;align-items:center;font-size:12px}.cal-range{display:flex;gap:6px;flex-wrap:wrap;margin:8px 0;align-items:center}
.cal-range input{min-width:0;padding:7px;font-size:12px;border:1px solid var(--line-strong);border-radius:6px;background:var(--surface-2);color:var(--ink)}
.cal-range input[type=text]{flex:1;min-width:110px}.cal-buttons{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}.cal-buttons button,.cal-remove{padding:7px 9px;border:1px solid var(--line-strong);border-radius:6px;background:var(--surface);color:var(--ink);font-size:12px}
.cal-label{font-size:12px;font-weight:700;margin-top:12px}.oc-repeat-tag{display:block;font-size:10px;color:var(--amber);font-weight:700;margin-top:4px}

.oc-meta-left { flex-wrap: wrap; }
