/* Winamore design system — mobile-first, dark-mode-first.
   Single source of truth for the new UI. The legacy app.css is not used here. */

:root {
  color-scheme: light dark;

  /* Spacing scale (8pt-ish) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;

  /* Radii */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-full: 999px;

  /* Type */
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', Roboto, sans-serif;

  /* Touch target minimum (Fitts) */
  --tap: 52px;

  /* Motion */
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 140ms;
  --dur: 220ms;
  --dur-slow: 380ms;

  /* Brand — Midnight Slate navy */
  --brand-deep: #0c1526; /* deep base for button/fab gradients */
  --brand: #1f3c72; /* main navy accent (borders, chips, LEDs, glow) */
  --brand-2: #6088dd; /* lighter navy-blue for pill text / sheen (stays readable) */
  --brand-ink: #ffffff;
}

/* ---- Dark theme (default look) ---- */
:root,
[data-theme='dark'] {
  /* Match native controls (date picker, etc.) to the app theme, not the OS. */
  color-scheme: dark;
  --bg: #0e0f14;
  --bg-elev: #171922;
  --bg-elev-2: #1f2230;
  --surface: #171922;
  --line: #2a2e3d;
  --line-soft: #23273400;
  --ink: #f2f3f7;
  --ink-2: #aeb4c6;
  --ink-3: #767d92;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.35);
}

/* ---- Light theme ---- */
[data-theme='light'] {
  color-scheme: light;
  --bg: #f4f5f8;
  --bg-elev: #ffffff;
  --bg-elev-2: #ffffff;
  --surface: #ffffff;
  --line: #e6e8ef;
  --ink: #14161d;
  --ink-2: #4d5468;
  --ink-3: #8a90a2;
  --ok: #059669;
  --warn: #d97706;
  --danger: #dc2626;
  --shadow: 0 12px 40px rgba(20, 22, 40, 0.14);
  --shadow-soft: 0 4px 18px rgba(20, 22, 40, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}


/* ---------- Auth / centered screens ---------- */
.auth-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: var(--sp-6);
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(31, 60, 114, 0.32), transparent 60%),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: var(--sp-8) var(--sp-6) var(--sp-6);
  animation: rise var(--dur-slow) var(--ease-spring) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.auth-logo {
  width: 56px;
  height: 56px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  margin: 0 auto var(--sp-5);
  background: linear-gradient(135deg, var(--brand-deep), var(--brand));
  color: var(--brand-ink);
  font-weight: 800;
  font-size: 26px;
  box-shadow: 0 8px 24px rgba(31, 60, 114, 0.5);
}

/* Winamore wordmark: a precise vector (SVG, traced from the printed logo) painted
   in brand navy via a CSS mask, so it re-tints per theme and is resolution-free. */
.auth-wordmark {
  width: min(62vw, 236px);
  aspect-ratio: 952 / 188;
  margin: 0 auto var(--sp-3);
  background: #ffffff; /* dark theme: crisp white */
  -webkit-mask: url(/icons/wordmark.svg) center / contain no-repeat;
  mask: url(/icons/wordmark.svg) center / contain no-repeat;
  /* Elegant layered halo (follows the glyphs via the mask) — dark mode only. */
  filter: drop-shadow(0 0 7px rgba(255, 255, 255, 0.55))
    drop-shadow(0 0 22px rgba(130, 170, 255, 0.6));
}
/* Light theme: same brand gradient as the "Giriş yap" button, no glow. */
[data-theme='light'] .auth-wordmark {
  background: linear-gradient(135deg, var(--brand-deep), var(--brand));
  filter: none;
}

.auth-title {
  margin: 0 0 var(--sp-1);
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-sub {
  margin: 0 0 var(--sp-6);
  text-align: center;
  color: var(--ink-3);
  font-size: 14px;
}

/* ---------- Fields ---------- */
.field {
  margin-bottom: var(--sp-4);
}

.field label {
  display: block;
  margin-bottom: var(--sp-2);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

.input {
  width: 100%;
  min-height: var(--tap);
  padding: 0 var(--sp-4);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--ink);
  font-size: 16px; /* >=16px prevents iOS zoom-on-focus */
  transition: border-color var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast);
}

.input::placeholder {
  color: var(--ink-3);
}

.input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(31, 60, 114, 0.35);
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group .input {
  padding-right: 56px;
}

.input-affix {
  position: absolute;
  right: 6px;
  height: 40px;
  min-width: 44px;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--r-sm);
  cursor: pointer;
}

.input-affix:active {
  color: var(--ink);
}

/* ---------- Buttons ---------- */
.btn {
  -webkit-tap-highlight-color: transparent;
  width: 100%;
  min-height: var(--tap);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: transform var(--dur-fast) var(--ease-spring),
    filter var(--dur-fast), background var(--dur-fast), opacity var(--dur-fast);
}

.btn:active {
  transform: scale(0.975);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-deep), var(--brand));
  /* Clip the gradient to the padding box so the 1px transparent border doesn't
     sample a lighter slice of it and show a bright rim on the edge. */
  background-clip: padding-box;
  color: var(--brand-ink);
  box-shadow: 0 10px 22px -8px rgba(31, 60, 114, 0.6);
}

.btn-ghost {
  background: var(--bg-elev);
  border-color: var(--line);
  color: var(--ink);
}

/* ---------- Feedback ---------- */
.form-error {
  min-height: 20px;
  margin: calc(var(--sp-2) * -1) 0 var(--sp-4);
  color: var(--danger);
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity var(--dur), transform var(--dur) var(--ease-out);
}

.form-error.show {
  opacity: 1;
  transform: none;
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.theme-toggle {
  position: fixed;
  top: calc(env(safe-area-inset-top) + var(--sp-3));
  right: calc(env(safe-area-inset-right) + var(--sp-3));
  width: 44px;
  height: 44px;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-soft);
}

/* ---------- App shell ---------- */
.app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: calc(env(safe-area-inset-top) + var(--sp-3)) var(--sp-4) var(--sp-3);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.app-header .brand {
  font-weight: 800;
  letter-spacing: -0.01em;
  font-size: 17px;
  margin-right: auto;
  color: #ffffff; /* dark theme: white */
}
[data-theme='light'] .app-header .brand {
  /* Match the logo: same brand gradient as the "Giriş yap" button. */
  background: linear-gradient(135deg, var(--brand-deep), var(--brand));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Header wordmark: the vector logo used as an app-header title (e.g. the panel).
   Same theme-tinted mask as the login/drawer marks, sized to the header. */
.app-header .brand-logo {
  height: 20px;
  aspect-ratio: 952 / 188;
  margin-right: auto;
  background: #ffffff; /* dark theme: white */
  -webkit-mask: url(/icons/wordmark.svg) left center / contain no-repeat;
  mask: url(/icons/wordmark.svg) left center / contain no-repeat;
  /* Elegant layered halo (follows the glyphs) — dark mode only. */
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5))
    drop-shadow(0 0 10px rgba(130, 170, 255, 0.6));
}
/* Light theme: same brand gradient as the "Giriş yap" button, no glow. */
[data-theme='light'] .app-header .brand-logo {
  background: linear-gradient(135deg, var(--brand-deep), var(--brand));
  filter: none;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-spring), background var(--dur-fast);
}
.icon-btn:active {
  transform: scale(0.92);
}

.header-ico {
  width: 20px;
  height: 20px;
  display: block;
}

/* ---- Notifications (header bell) ---- */
.notif-btn {
  position: relative;
  flex-shrink: 0;
}
.notif-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--r-full);
  border: 2px solid var(--bg);
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  pointer-events: none;
}
.notif-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-fast);
}
.notif-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.notif-panel {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 56px);
  right: var(--sp-4);
  left: auto;
  width: min(360px, calc(100vw - var(--sp-4) * 2));
  max-height: min(70vh, 520px);
  z-index: 46;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform-origin: top right;
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
  transition:
    opacity var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-spring);
}
.notif-panel.open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-bottom: 1px solid var(--line);
}
.notif-head-title {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.notif-mark-all {
  border: 0;
  background: none;
  color: var(--brand-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.notif-mark-all:active {
  opacity: 0.6;
}
.notif-mark-all[hidden] {
  display: none;
}
.notif-list {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--sp-2);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.notif-empty {
  margin: 0;
  padding: var(--sp-8) var(--sp-4);
  text-align: center;
  color: var(--ink-3);
  font-size: 14px;
}
.notif-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: var(--r-md);
  padding: var(--sp-3);
  cursor: pointer;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  column-gap: var(--sp-3);
  row-gap: 2px;
  color: var(--ink);
  transition: background var(--dur-fast);
}
.notif-item:active {
  background: color-mix(in srgb, var(--brand) 10%, transparent);
}
.notif-ico {
  grid-row: 1 / span 2;
  width: 34px;
  height: 34px;
  border-radius: var(--r-full);
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand-2);
  align-self: center;
}
.notif-ico svg {
  width: 17px;
  height: 17px;
}
.notif-ico.is-ok {
  background: color-mix(in srgb, var(--ok) 16%, transparent);
  color: var(--ok);
}
.notif-ico.is-danger {
  background: color-mix(in srgb, var(--danger) 16%, transparent);
  color: var(--danger);
}
.notif-ico.is-warn {
  background: color-mix(in srgb, var(--warn) 18%, transparent);
  color: var(--warn);
}
.notif-title {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.25;
}
.notif-msg {
  grid-column: 2;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.3;
}
.notif-time {
  grid-column: 2;
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 2px;
}

.container {
  flex: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: var(--sp-4) var(--sp-4) 132px; /* room for sticky total */
}

/* ---------- Cards / sections ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  margin-bottom: var(--sp-4);
  box-shadow: var(--shadow-soft);
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 var(--sp-3);
}

/* progressive disclosure */
.reveal {
  overflow: hidden;
  animation: reveal var(--dur) var(--ease-out) both;
}
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.hidden {
  display: none !important;
}

.muted {
  color: var(--ink-3);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

/* ---------- Segmented / chips ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.chip {
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
  padding: 0 var(--sp-4);
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: var(--bg-elev);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-spring),
    background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.chip:active {
  transform: scale(0.95);
}
.chip[aria-pressed='true'] {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-ink);
}

.select {
  width: 100%;
  min-height: var(--tap);
  padding: 0 var(--sp-4);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--ink);
  font-size: 16px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%),
    linear-gradient(135deg, var(--ink-3) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% - 2px), calc(100% - 15px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(31, 60, 114, 0.35);
}

/* ---------- Measurement rows ---------- */
.meas {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--sp-3);
  margin-bottom: var(--sp-3);
  background: var(--bg-elev);
  animation: reveal var(--dur) var(--ease-out) both;
}
.meas-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-2);
}
.meas-no {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
}
.meas-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2);
}
.meas .input {
  text-align: center;
  min-height: 48px;
}
.mini-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: var(--sp-1);
  text-align: center;
}
.meas-price {
  margin-top: var(--sp-2);
  text-align: right;
  font-size: 13px;
  font-weight: 700;
  color: var(--ok);
  min-height: 18px;
}
.meas-price.err {
  color: var(--danger);
}

/* adet stepper */
.stepper {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.step-btn {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-spring);
}
.step-btn:active {
  transform: scale(0.9);
}
.step-val {
  flex: 1;
  text-align: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--bg-elev);
  font-size: 16px;
  font-weight: 700;
  width: 100%;
}

.row-remove {
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font-size: 13px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--r-sm);
}
.row-remove:active {
  color: var(--danger);
}

.add-row {
  width: 100%;
  min-height: 48px;
  border: 1.5px dashed var(--line);
  border-radius: var(--r-md);
  background: transparent;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--dur-fast), color var(--dur-fast);
}
.add-row:active {
  border-color: var(--brand);
  color: var(--brand);
}

/* ---------- Sticky live total ---------- */
.total-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: var(--sp-3) var(--sp-4) calc(env(safe-area-inset-bottom) + var(--sp-3));
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.total-info {
  flex: 1;
  min-width: 0;
}
.total-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.total-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.total-sub {
  font-size: 11px;
  color: var(--ink-3);
}
.total-bar .btn {
  width: auto;
  padding: 0 var(--sp-6);
  flex: none;
}

.bump {
  animation: bump var(--dur) var(--ease-spring);
}
@keyframes bump {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 96px);
  transform: translate(-50%, 20px);
  z-index: 60;
  max-width: 88vw;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-full);
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur), transform var(--dur) var(--ease-out);
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast-success {
  border-color: color-mix(in srgb, var(--ok) 50%, var(--line));
}
.toast-error {
  border-color: color-mix(in srgb, var(--danger) 50%, var(--line));
}

/* ---------- Header count badge ---------- */
.count-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--r-full);
  background: var(--brand);
  color: #ffffff;
  /* Stay solid white even when the parent title uses gradient (clip:text). */
  -webkit-text-fill-color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  vertical-align: middle;
  margin-left: 6px;
}

/* ---------- Filter chip row (horizontal scroll) ---------- */
.filter-row {
  position: sticky;
  top: calc(env(safe-area-inset-top) + 62px);
  z-index: 15;
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  padding: var(--sp-3) var(--sp-4);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  scrollbar-width: none;
}
.filter-row::-webkit-scrollbar {
  display: none;
}
.filter-row .chip {
  flex: none;
  min-height: 38px;
  font-size: 13px;
}

.search-wrap {
  padding: 0 var(--sp-4) var(--sp-2);
}

/* ---------- Order cards ---------- */
.orders {
  padding: var(--sp-2) var(--sp-4) 40px;
}

.order-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  margin-bottom: var(--sp-3);
  box-shadow: var(--shadow-soft);
  animation: reveal var(--dur) var(--ease-out) both;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-spring);
}
.order-card:active {
  transform: scale(0.99);
}

.oc-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
}
.oc-customer {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.oc-meta {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
}
.oc-price {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.oc-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

/* status pill */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
}
.pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.pill.brand { color: var(--brand-2); background: color-mix(in srgb, var(--brand) 16%, transparent); }
.pill.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 15%, transparent); }
.pill.warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 16%, transparent); }
.pill.info { color: var(--brand-2); background: color-mix(in srgb, var(--brand-2) 16%, transparent); }
.pill.danger { color: var(--danger); background: color-mix(in srgb, var(--danger) 15%, transparent); }
.pill.muted { color: var(--ink-3); background: color-mix(in srgb, var(--ink-3) 14%, transparent); }

.oc-actions {
  display: flex;
  gap: var(--sp-2);
}
/* Order cards: status pill on its own row, actions full-width beneath it. */
.oc-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}
#orders .oc-actions {
  margin-top: var(--sp-2);
}
#orders .oc-actions .btn {
  flex: 1;
}
.btn-sm {
  width: auto;
  min-height: 40px;
  padding: 0 var(--sp-4);
  font-size: 14px;
  border-radius: var(--r-md);
}
.btn-ok {
  /* Same gradient + glow "float" as the navy primary, so filled colored
     buttons feel like one family. Built from --ok so it follows the theme. */
  background: linear-gradient(135deg, color-mix(in srgb, var(--ok) 78%, #04120c), var(--ok));
  background-clip: padding-box;
  color: #04231a;
  box-shadow: 0 10px 22px -8px color-mix(in srgb, var(--ok) 55%, transparent);
}
/* Light theme's --ok is a deeper emerald, so switch to white ink for contrast. */
[data-theme='light'] .btn-ok {
  color: #ffffff;
}
.btn-danger {
  background: transparent;
  border-color: color-mix(in srgb, var(--danger) 50%, var(--line));
  color: var(--danger);
}

.oc-reason {
  margin-top: var(--sp-2);
  font-size: 12px;
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  border-radius: var(--r-sm);
  padding: 6px 10px;
}

/* Detail sheet: order lifecycle timeline. */
.timeline {
  margin: var(--sp-2) 0 var(--sp-1);
  border-left: 2px solid var(--line);
  padding-left: var(--sp-3);
}
.tl-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 13px;
}
.tl-dot {
  position: absolute;
  left: calc(-1 * var(--sp-3) - 5px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-2);
  box-shadow: 0 0 0 3px var(--surface);
}
.tl-label {
  color: var(--ink);
}
.tl-time {
  margin-left: auto;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* Archive: rating stars sit at the right end of the status row. */
.oc-status .oc-rating {
  margin-left: auto;
}
.oc-rating {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  line-height: 1;
}
.oc-rating span {
  width: 1em;
  font-size: 20px;
  line-height: 1;
  text-align: center;
  color: color-mix(in srgb, var(--ink-3) 45%, transparent);
}
.oc-rating .on {
  color: var(--warn);
}

/* Detail sheet: collapsible "Sipariş geçmişi" section. */
.sheet-collapse {
  margin-top: var(--sp-3);
  border-top: 1px solid var(--line);
}
.sheet-collapse > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) 0 var(--sp-2);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
}
.sheet-collapse > summary::-webkit-details-marker {
  display: none;
}
.sheet-collapse > summary::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ink-3);
  border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg);
  transition: transform var(--dur) ease;
}
.sheet-collapse[open] > summary::after {
  transform: rotate(-135deg);
}
/* Rating collapse: stars live in the summary (right side), comment inside. */
.rating-collapse > summary .sum-stars {
  margin-left: auto;
  margin-right: var(--sp-2);
  display: inline-flex;
}

/* Rating sheet: tappable 1–5 stars. */
.stars {
  display: flex;
  gap: 8px;
  margin: var(--sp-3) 0;
}
.stars .star {
  appearance: none;
  background: none;
  border: 0;
  padding: 2px;
  font-size: 34px;
  line-height: 1;
  color: var(--line);
  cursor: pointer;
  transition: transform 0.12s ease, color 0.12s ease;
}
.stars .star.on {
  color: var(--warn);
}
.stars .star:not(:disabled):active {
  transform: scale(0.88);
}
.stars .star:disabled {
  cursor: default;
}

/* ---------- Empty / skeleton ---------- */
.empty {
  text-align: center;
  color: var(--ink-3);
  padding: 60px var(--sp-4);
}
.empty-emoji {
  font-size: 34px;
  margin-bottom: var(--sp-3);
}
.skeleton {
  height: 96px;
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-3);
  background: linear-gradient(100deg, var(--bg-elev) 30%, var(--bg-elev-2) 50%, var(--bg-elev) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* ---------- FAB ---------- */
.fab {
  position: fixed;
  right: calc(env(safe-area-inset-right) + var(--sp-4));
  bottom: calc(env(safe-area-inset-bottom) + var(--sp-5));
  z-index: 40;
  height: 56px;
  padding: 0 var(--sp-5);
  border: 0;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--brand-deep), var(--brand));
  color: var(--brand-ink);
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(31, 60, 114, 0.55);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  transition: transform var(--dur-fast) var(--ease-spring);
}
.fab:active {
  transform: scale(0.94);
}
/* `display: inline-flex` above overrides the UA `[hidden]` rule — restore it
   so the FAB truly hides when the `hidden` attribute is set (e.g. for admins). */
.fab[hidden] {
  display: none;
}

/* ---------- Bottom sheet ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur);
}
.sheet-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 51;
  max-height: 85dvh;
  overflow-y: auto;
  background: var(--surface);
  border-top-left-radius: var(--r-lg);
  border-top-right-radius: var(--r-lg);
  border-top: 1px solid var(--line);
  padding: var(--sp-4) var(--sp-4) calc(env(safe-area-inset-bottom) + var(--sp-6));
  transform: translateY(100%);
  transition: transform var(--dur-slow) var(--ease-spring);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.4);
}
.sheet.open {
  transform: translateY(0);
}
.sheet-grip {
  width: 40px;
  height: 4px;
  border-radius: var(--r-full);
  background: var(--line);
  margin: 0 auto var(--sp-4);
}
.sheet h2 {
  margin: 0 0 var(--sp-1);
  font-size: 20px;
  letter-spacing: -0.02em;
}
.sheet .sub {
  color: var(--ink-3);
  font-size: 13px;
  margin: 0 0 var(--sp-4);
}
.kv {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
/* Direct children only — otherwise these leak into nested spans (e.g. the
   individual stars of an .oc-rating rendered inside a kv value cell). */
.kv > span:first-child {
  color: var(--ink-3);
}
.kv > span:last-child {
  font-weight: 600;
  text-align: right;
}
.tel-link {
  color: inherit;
  text-decoration: none;
}
.tel-link:active {
  opacity: 0.7;
}
.meas-line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  font-variant-numeric: tabular-nums;
}
.sheet-note {
  margin: var(--sp-2) 0 var(--sp-3);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
}
.sheet-actions {
  display: flex;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}
.sheet-actions .btn {
  flex: 1;
}

/* ---------- Modal dialog (themed confirm/prompt) ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur);
  backdrop-filter: saturate(140%) blur(6px);
  -webkit-backdrop-filter: saturate(140%) blur(6px);
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  position: fixed;
  z-index: 71;
  left: 50%;
  top: 50%;
  width: min(420px, calc(100vw - var(--sp-8)));
  transform: translate(-50%, -46%) scale(0.96);
  opacity: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  box-shadow: var(--shadow);
  transition: transform var(--dur) var(--ease-spring), opacity var(--dur);
}
.modal.open {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}
.modal-title {
  margin: 0 0 var(--sp-2);
  font-size: 18px;
  letter-spacing: -0.01em;
}
.modal-msg {
  margin: 0 0 var(--sp-4);
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.45;
}
.modal-input {
  margin: 0 0 var(--sp-4);
}
.modal-actions {
  display: flex;
  gap: var(--sp-2);
}
.modal-actions .btn {
  flex: 1;
}

/* ---------- Nav drawer ---------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur);
}
.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 46;
  width: min(78vw, 300px);
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: calc(env(safe-area-inset-top) + var(--sp-6)) var(--sp-4) var(--sp-6);
  transform: translateX(-100%);
  transition: transform var(--dur-slow) var(--ease-spring);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.drawer.open {
  transform: translateX(0);
}
.drawer-brand {
  /* Same extracted Winamore wordmark as the login screen, tinted per theme. */
  width: 150px;
  aspect-ratio: 952 / 188;
  margin: 0 var(--sp-3) var(--sp-5);
  background: #ffffff; /* dark theme: crisp white */
  -webkit-mask: url(/icons/wordmark.svg) left center / contain no-repeat;
  mask: url(/icons/wordmark.svg) left center / contain no-repeat;
  /* Elegant layered halo (follows the glyphs) — dark mode only. */
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5))
    drop-shadow(0 0 16px rgba(130, 170, 255, 0.6));
}
/* Light theme: same brand gradient as the "Giriş yap" button, no glow. */
[data-theme='light'] .drawer-brand {
  background: linear-gradient(135deg, var(--brand-deep), var(--brand));
  filter: none;
}
/* Admin-only: the wordmark is the dashboard entry point. */
.drawer-brand-link {
  display: block;
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: opacity var(--dur-fast);
}
.drawer-brand-link:active {
  opacity: 0.65;
}
.drawer-brand-link.active {
  opacity: 0.85;
}
.drawer-link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: var(--tap);
  padding: 0 var(--sp-3);
  border: 0;
  border-radius: var(--r-md);
  background: transparent;
  color: var(--ink-2);
  font-size: 16px;
  font-weight: 600;
  text-align: left;
  width: 100%;
  cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.drawer-link:active {
  background: var(--bg-elev);
}
.drawer-link.active {
  background: color-mix(in srgb, var(--brand) 16%, transparent);
  color: var(--ink);
}
.drawer-ico {
  width: 20px;
  height: 20px;
  flex: none;
  opacity: 0.9;
}
.drawer-logout {
  margin-top: auto;
  color: var(--danger);
}

/* ---------- Reference photo ---------- */
.foto-preview {
  margin-top: var(--sp-3);
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
}
.foto-preview img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: cover;
}
.foto-preview .row-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: var(--r-full);
  padding: 6px 12px;
}
/* Small Amazon-style thumbnail by default; tap expands to a full inline view. */
.sheet-foto {
  display: inline-block;
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: var(--r-md);
  margin: var(--sp-3) var(--sp-2) var(--sp-2) 0;
  border: 1px solid var(--line);
  cursor: zoom-in;
  transition: width var(--dur) ease, height var(--dur) ease;
}
.sheet-foto.expanded {
  display: block;
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  cursor: zoom-out;
}

/* ---- Admin dashboard (/panel) — responsive command center -------------- */
.dash {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: 1fr;
  padding: var(--sp-4);
  padding-bottom: calc(env(safe-area-inset-bottom) + var(--sp-8));
}
@media (min-width: 760px) {
  .dash { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash .span2 { grid-column: span 2; }
}
@media (min-width: 1140px) {
  .dash {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 1240px;
    margin: 0 auto;
    padding: var(--sp-5) var(--sp-5) var(--sp-8);
  }
  .dash .span2 { grid-column: span 2; }
}

/* KPI strip: spans the full grid, tiles flow inside */
.dash-kpis {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
}
@media (min-width: 760px) { .dash-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  box-shadow: var(--shadow-soft);
}
.kpi[data-href] { cursor: pointer; }
.kpi[data-href]:active { opacity: 0.7; }
.kpi-num { font-size: 30px; font-weight: 800; line-height: 1.05; letter-spacing: -0.01em; color: var(--ink); }
.kpi-label { margin-top: var(--sp-1); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.kpi.accent {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 14%, var(--surface)), var(--surface));
}
.kpi.accent .kpi-num { color: var(--brand-2); }

/* Generic dashboard card */
.dash-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--sp-4);
  box-shadow: var(--shadow-soft);
  min-width: 0;
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.card-title { font-size: 13px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink-3); margin: 0; }
.card-sub { font-size: 13px; font-weight: 700; color: var(--brand-2); white-space: nowrap; }
.dash-scroll {
  max-height: 300px;
  overflow: auto;
  margin: 0 calc(var(--sp-4) * -1) calc(var(--sp-4) * -1);
  padding: 0 var(--sp-4) var(--sp-2);
}

/* Vertical bar chart (monthly) */
.vbars { display: flex; align-items: stretch; gap: var(--sp-2); height: 168px; }
.vbar-col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.vbar-val { font-size: 11px; font-weight: 700; color: var(--ink-2); height: 16px; line-height: 16px; white-space: nowrap; }
.vbar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.vbar-fill { width: 62%; max-width: 30px; border-radius: 6px 6px 0 0; background: color-mix(in srgb, var(--brand-2) 55%, var(--brand)); }
.vbar-fill.hot { background: var(--brand-2); }
.vbar-label { margin-top: 6px; font-size: 11px; color: var(--ink-3); }
.vbar-sub { font-size: 10px; color: var(--ink-3); opacity: 0.85; }

/* Sparkline (14-day activity) — cols stretch to full height so fill % resolves */
.spark { display: flex; align-items: stretch; gap: 3px; height: 64px; }
.spark-col { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.spark-fill { width: 100%; border-radius: 3px 3px 0 0; background: var(--brand-2); min-height: 2px; }

/* Horizontal bars (partners) */
.hbars { display: flex; flex-direction: column; gap: var(--sp-3); }
.hbar-row { display: grid; grid-template-columns: minmax(56px, 92px) 1fr auto; align-items: center; gap: var(--sp-3); }
.hbar-label { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { display: block; height: 10px; border-radius: var(--r-full); background: color-mix(in srgb, var(--ink-3) 20%, transparent); overflow: hidden; }
.hbar-fill { display: block; height: 100%; border-radius: var(--r-full); min-width: 4px; }
.hbar-val { font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; }

/* Donut + legend */
.donut-wrap { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.donut { flex: none; }
.donut-bg { stroke: color-mix(in srgb, var(--ink-3) 18%, transparent); }
.donut-top { fill: var(--ink); font-size: 30px; font-weight: 800; }
.donut-sub { fill: var(--ink-3); font-size: 12px; font-weight: 600; }
.legend { flex: 1; min-width: 130px; display: flex; flex-direction: column; gap: 6px; }
.lg-row { display: flex; align-items: center; gap: var(--sp-2); font-size: 13px; }
.lg-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.lg-label { flex: 1; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-val { font-weight: 700; color: var(--ink); }

/* Performance trio (ring / lead time / rating) */
.perf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-3); align-items: center; }
.perf-cell { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.perf-num { font-size: 30px; font-weight: 800; color: var(--ink); line-height: 1; }
.perf-num span { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-left: 3px; }
.perf-num.muted { color: var(--ink-3); }
.perf-lbl { font-size: 11.5px; color: var(--ink-3); }
.perf-stars { font-size: 18px; letter-spacing: 1px; color: var(--warn); font-family: system-ui, sans-serif; line-height: 1; }
.perf-stars .off { color: color-mix(in srgb, var(--ink-3) 40%, transparent); }
.ring-bg { stroke: color-mix(in srgb, var(--ink-3) 18%, transparent); }
.ring-val { fill: var(--ink); font-size: 22px; font-weight: 800; }
.ring-lbl { fill: var(--ink-3); font-size: 11px; font-weight: 600; }

/* Partner launchpad: single focused column */
.dash.solo { grid-template-columns: 1fr; max-width: 620px; margin: 0 auto; }
@media (min-width: 760px) { .dash.solo { grid-template-columns: 1fr; } }
.hero-cta { width: 100%; }
.pact-item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) 0; border-bottom: 1px solid var(--line);
}
.pact-item:last-child { border-bottom: 0; }
.pact-main { flex: 1; min-width: 0; }
.pact-name { display: block; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pact-sub { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.pact-item .btn-sm { flex: none; }

/* Ranked list (top customers) */
.rank-list { display: flex; flex-direction: column; }
.rank-row { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
.rank-row:last-child { border-bottom: 0; }
.rank-no {
  flex: none; width: 22px; height: 22px; border-radius: var(--r-full);
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
  color: var(--brand-2); background: color-mix(in srgb, var(--brand) 16%, transparent);
}
.rank-main { flex: 1; min-width: 0; }
.rank-name { display: block; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-sub { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.rank-val { font-weight: 700; color: var(--ink); white-space: nowrap; }

/* Finance rows */
.fin-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); }
.fin-row:last-child { border-bottom: 0; }
.fin-label { color: var(--ink-2); font-size: 14px; }
.fin-val { font-weight: 800; font-size: 18px; color: var(--ink); white-space: nowrap; }
.fin-row.muted .fin-val { color: var(--ink-2); font-weight: 700; }

/* Attention list */
.att-item { display: flex; align-items: center; gap: var(--sp-3); width: 100%; text-align: left; border: 0; background: transparent; padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); cursor: pointer; color: inherit; }
.att-item:last-child { border-bottom: 0; }
.att-item:active { opacity: 0.6; }
.att-main { flex: 1; min-width: 0; }
.att-name { display: block; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-sub { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.att-price { font-weight: 700; color: var(--ink); font-size: 14px; white-space: nowrap; }

/* Recent activity feed */
.act-item { display: flex; align-items: center; gap: var(--sp-3); width: 100%; text-align: left; border: 0; background: transparent; padding: var(--sp-3) 0; border-bottom: 1px solid var(--line); cursor: pointer; color: inherit; }
.act-item:last-child { border-bottom: 0; }
.act-item:active { opacity: 0.6; }
.act-main { flex: 1; min-width: 0; }
.act-name { display: block; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-status { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }
.act-time { font-size: 12px; color: var(--ink-3); flex: none; white-space: nowrap; }

.dash-empty { color: var(--ink-3); font-size: 14px; padding: var(--sp-2) 0; }
