@import url('https://api.fontshare.com/v2/css?f[]=satoshi@400,500,600,700&display=swap');

/* tcg.crm — warm, editorial SaaS interface.
   The authenticated screens and SaaS flows share the same tokens below. */

:root {
  color-scheme: light;
  --bg: #f7f5f0;
  --panel: #ffffff;
  --panel-soft: #fcfbf8;
  --panel2: #f1ede5;
  --border: #e8e2d7;
  --border2: #d9d0c2;
  --text: #1b1b18;
  --muted: #6f6a61;
  --faint: #999287;
  --accent: #1b1b18;
  --accent-h: #38372f;
  --accent-fg: #1b1b18;
  --accent-soft: #ece9e1;
  --ring: rgba(27, 27, 24, 0.16);
  --ok: #207759;
  --ok-soft: #e1f3e9;
  --warn: #9b6618;
  --warn-soft: #fbefcf;
  --danger: #b74b42;
  --danger-soft: #f9e6e3;
  --info: #526d91;
  --info-soft: #e8eef5;
  --purple: #7e5b8f;
  --purple-soft: #f0e8f4;
  --hover: #f6f3ed;
  --shadow: 0 18px 45px rgba(52, 46, 35, 0.07), 0 2px 8px rgba(52, 46, 35, 0.035);
  --shadow-raised: 0 24px 60px rgba(52, 46, 35, 0.12), 0 3px 12px rgba(52, 46, 35, 0.05);
  --radius-s: 12px;
  --radius: 22px;
  --radius-l: 32px;
}

/* The current header still exposes a theme toggle, so keep it usable while
   retaining the warm character of the light design. */
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1e1e1a;
  --panel: #292824;
  --panel-soft: #302f2a;
  --panel2: #38362f;
  --border: #403d35;
  --border2: #575247;
  --text: #f7f5f0;
  --muted: #c6bfb3;
  --faint: #978f83;
  --accent: #f7f5f0;
  --accent-h: #ffffff;
  --accent-fg: #f7f5f0;
  --accent-soft: #403e37;
  --ring: rgba(247, 245, 240, 0.18);
  --ok: #79cfaa;
  --ok-soft: #203e31;
  --warn: #e6bd67;
  --warn-soft: #453a22;
  --danger: #ee9188;
  --danger-soft: #482c2a;
  --info: #a8c3e8;
  --info-soft: #29394c;
  --purple: #d1ade1;
  --purple-soft: #3e3044;
  --hover: #34322c;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.24);
  --shadow-raised: 0 24px 60px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }

html,
body { min-height: 100%; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Satoshi', sans-serif;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button { -webkit-tap-highlight-color: transparent; }

b,
strong { font-weight: 650; }

a { color: var(--accent-fg); text-decoration: underline; text-decoration-color: var(--border2); text-underline-offset: 3px; }
a:hover { color: var(--text); text-decoration-color: currentColor; }

:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; }

.container { width: min(1240px, 100%); margin: 0 auto; padding-inline: 28px; }
.hidden { display: none !important; }
.mt { margin-top: 18px; }
.mt-s { margin-top: 10px; }
.text-ok { color: var(--ok); }
.text-danger { color: var(--danger); }
.nowrap { white-space: nowrap; }

/* ------------------------------------------------------------------- chrome */

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
}

.site-header,
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 88%, transparent);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.site-header-inner,
.site-header .container,
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

.site-header-inner { width: min(1240px, 100%); margin: 0 auto; padding-inline: 28px; }

.brand,
.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.04em;
  text-decoration: none;
  white-space: nowrap;
}

.brand:hover { color: var(--text); text-decoration: none; }

.brand-mark,
.brand-badge {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 11px;
  background: var(--accent);
  color: var(--panel);
  font-size: 0.69rem;
  font-weight: 750;
  letter-spacing: -0.06em;
  box-shadow: 0 5px 12px rgba(27, 27, 24, 0.12);
}

.brand-wordmark,
.brand-name { font-size: 1.025rem; }
.brand-sub { color: var(--faint); font-weight: 500; letter-spacing: -0.02em; }

.site-nav,
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.site-nav a,
.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.site-nav a:hover,
.nav-link:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.site-nav a[aria-current="page"],
.site-nav a.active,
.nav-link.active { background: var(--accent); color: var(--panel); }

.topbar-right,
.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-menu {
  min-height: 42px;
  padding: 5px 8px 5px 5px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  font-size: 0.83rem;
  font-weight: 650;
}

.user-menu img,
.user-menu-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent-soft);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 27px;
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-badge::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-badge.is-neutral,
.status-badge.is-pending { background: var(--accent-soft); color: var(--muted); }
.status-badge.is-warning { background: var(--warn-soft); color: var(--warn); }
.status-badge.is-danger { background: var(--danger-soft); color: var(--danger); }

.theme-toggle {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  transition: border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.theme-toggle:hover { border-color: var(--border2); color: var(--text); transform: translateY(-1px); }

.content-shell,
main.container {
  width: min(1240px, 100%);
  flex: 1;
  margin: 0 auto;
  padding: 44px 28px 76px;
}

.page-kicker {
  margin: 0 0 8px;
  color: var(--faint);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}

/* ------------------------------------------------------------ dashboard UI */

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 30px;
  min-height: 240px;
  margin-bottom: 28px;
  padding: clamp(28px, 5vw, 54px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  background:
    radial-gradient(circle at 100% 0%, var(--ok-soft) 0, transparent 34%),
    var(--panel);
  box-shadow: var(--shadow);
}

.dashboard-hero > div { min-width: 0; }
.dashboard-hero h1 { max-width: 680px; margin: 0; font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.02; letter-spacing: -0.065em; }
.dashboard-hero p:not(.page-kicker) { max-width: 580px; margin: 15px 0 0; color: var(--muted); font-size: 1rem; }
.dashboard-hero .btn { margin-top: 24px; }

.dashboard-hero-aside,
.dashboard-hero .hero-stat {
  min-width: 175px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel) 78%, transparent);
}

.dashboard-hero-aside span,
.dashboard-hero .hero-stat span { display: block; color: var(--muted); font-size: 0.75rem; }
.dashboard-hero-aside b,
.dashboard-hero .hero-stat b { display: block; margin-top: 5px; font-size: 1.75rem; letter-spacing: -0.05em; }

.metric-grid,
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 24px; }
.stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 24px; }

.metric,
.stat {
  min-width: 0;
  padding: 21px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 2px 5px rgba(52, 46, 35, 0.02);
}

.metric-label,
.stat-label {
  color: var(--faint);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.105em;
  line-height: 1.2;
  text-transform: uppercase;
}

.metric-value,
.stat-value { display: block; margin-top: 9px; font-size: clamp(1.45rem, 2.4vw, 2rem); font-weight: 700; letter-spacing: -0.055em; line-height: 1; }
.metric-sub,
.stat-sub { display: block; margin-top: 9px; color: var(--muted); font-size: 0.79rem; line-height: 1.4; }

/* The activity cards have a fixed visual rhythm: label, primary number, context. */
.activity-card .metric { display: flex; min-height: 138px; flex-direction: column; justify-content: center; padding: 24px 28px; }
.activity-card .metric-label { display: block; }
.activity-card .metric-value { display: block; margin-top: 11px; font-size: clamp(1.75rem, 2.55vw, 2.25rem); }
.activity-card .metric-sub { display: block; margin-top: 8px; }

.dot { display: inline-block; width: 7px; height: 7px; margin: 0 4px 1px 0; border-radius: 50%; }
.dot-ok { background: var(--ok); }
.dot-warn { background: var(--warn); }

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.quick-card {
  position: relative;
  display: flex;
  min-height: 176px;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.quick-card:hover { border-color: var(--border2); box-shadow: var(--shadow); color: var(--text); text-decoration: none; transform: translateY(-3px); }
.quick-card .bi,
.quick-card-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: var(--accent);
  color: var(--panel);
  font-size: 1.05rem;
}
.quick-card h2,
.quick-card h3 { margin: 22px 0 5px; font-size: 1.05rem; letter-spacing: -0.035em; }
.quick-card p { margin: 0; color: var(--muted); font-size: 0.84rem; }
.quick-card .quick-card-link { margin-top: 19px; color: var(--text); font-size: 0.79rem; font-weight: 700; }

.activity-card {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 2px 5px rgba(52, 46, 35, 0.02);
}

.activity-card-header,
.activity-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.activity-card h2,
.activity-card h3 { margin: 0; font-size: 1.05rem; letter-spacing: -0.035em; }
.activity-list { margin: 0; padding: 0; list-style: none; }
.activity-item { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--border); }
.activity-item-icon { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 50%; background: var(--ok-soft); color: var(--ok); }
.activity-item-main { min-width: 0; flex: 1; }
.activity-item-main b { display: block; font-size: 0.86rem; }
.activity-item-main span { display: block; overflow: hidden; color: var(--muted); font-size: 0.77rem; text-overflow: ellipsis; white-space: nowrap; }
.activity-item time { color: var(--faint); font-size: 0.74rem; white-space: nowrap; }

/* ------------------------------------------------------------- page basics */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 24px;
}

h1,
h2,
h3,
h4 { color: var(--text); font-weight: 700; letter-spacing: -0.045em; }
h1 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.55rem); line-height: 1.08; }
h2 { font-size: 1.2rem; line-height: 1.2; }
h3 { font-size: 1rem; line-height: 1.3; }

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 2px 5px rgba(52, 46, 35, 0.02);
}

/* ---------------------------------------------------------------- messages */

.flash,
.notice {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.86rem;
  transition: opacity 400ms ease, transform 400ms ease;
}

.flash .bi,
.notice .bi { flex: 0 0 auto; margin-top: 2px; font-size: 1rem; }
.flash-ok,
.notice.is-success,
.notice-success { border-color: color-mix(in srgb, var(--ok) 35%, var(--border)); background: var(--ok-soft); color: var(--ok); }
.flash-err,
.notice.is-error,
.notice.is-danger,
.notice-error { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); background: var(--danger-soft); color: var(--danger); }
.notice.is-warning,
.notice-warning { border-color: color-mix(in srgb, var(--warn) 35%, var(--border)); background: var(--warn-soft); color: var(--warn); }
.notice.is-info,
.notice-info { border-color: color-mix(in srgb, var(--info) 30%, var(--border)); background: var(--info-soft); color: var(--info); }
.flash-hide { opacity: 0; transform: translateY(-7px); }

/* -------------------------------------------------------------- filters/table */

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.toolbar-search { min-width: 220px; flex: 1 1 260px; }
/* Compact brand creation beside the catalogue filters. */
.term-add { position: relative; display: inline-block; margin: -8px 0 18px; }
.term-add summary { display: inline-flex; min-height: 34px; align-items: center; gap: 7px; padding: 7px 11px; border: 1px solid var(--border2); border-radius: 999px; background: var(--panel); color: var(--text); cursor: pointer; font-size: 0.76rem; font-weight: 700; list-style: none; }
.term-add summary::-webkit-details-marker { display: none; }
.term-add summary:hover, .term-add[open] summary { border-color: var(--text); }
.term-add-form { position: absolute; z-index: 25; top: calc(100% + 8px); left: 0; display: flex; width: 330px; gap: 8px; padding: 9px; border: 1px solid var(--border); border-radius: 15px; background: var(--panel); box-shadow: var(--shadow-raised); }
.term-add-form input { min-width: 0; flex: 1; }
.term-add-form .btn { flex: 0 0 auto; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; min-width: 860px; border-collapse: collapse; }
.table th {
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--faint);
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.table td { padding: 14px 18px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background 140ms ease; }
.table tbody tr:hover td { background: var(--hover); }
.table .num,
.table th.num { text-align: right; }
.th-img { width: 68px; }
.th-actions { width: 118px; }
.th-actions-wide { width: 162px; }
.td-details { min-width: 150px; }
.col-prod { min-width: 210px; }
.cost-parts { white-space: nowrap; }
.td-actions { text-align: right; white-space: nowrap; }
.td-actions form { display: inline-block; margin-left: 6px; }
.td-when { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }
.row-dim td { opacity: 0.5; }
.table-hint { margin-top: 11px; }

.thumb {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel2);
  object-fit: cover;
}
.thumb .bi { color: var(--faint); font-size: 1.1rem; }
.thumb-sm { width: 36px; height: 36px; border-radius: 11px; }
.thumb-sm .bi { font-size: 0.9rem; }
.prod-name { color: var(--text); font-weight: 700; text-decoration: none; }
.prod-name:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--border2); }
.meta { color: var(--faint); font-size: 0.78rem; }

.stock-num { display: inline-block; min-width: 22px; font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; }
.s-inv { color: var(--ok); }
.s-uninv { color: var(--warn); }

.move { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.move .bi { font-size: 0.875rem; }
.move-in { color: var(--ok); }
.move-out { color: var(--muted); }

/* --------------------------------------------------------------- pills/chips */

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 31px;
  padding: 5px 12px;
  border: 1px solid var(--border2);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.pill:hover { border-color: var(--text); color: var(--text); text-decoration: none; }
.pill-ok { border-color: transparent; background: var(--ok-soft); color: var(--ok); }
.pill-off { background: var(--panel-soft); border-color: var(--border); color: var(--faint); }
.pill-active { border-color: var(--accent); background: var(--accent); color: var(--panel); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.69rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
}
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-info { background: var(--info-soft); color: var(--info); }
.chip-accent { background: var(--danger-soft); color: var(--danger); }
.chip-purple { background: var(--purple-soft); color: var(--purple); }
.chip-off { background: var(--accent-soft); color: var(--muted); }

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  transition: background 170ms ease, border-color 170ms ease, color 170ms ease, box-shadow 170ms ease, transform 170ms ease;
}

.btn:hover { color: var(--text); text-decoration: none; transform: translateY(-1px); }
.btn .bi { font-size: 0.9em; line-height: 1; }
.btn-primary { border-color: var(--accent); background: var(--accent); color: var(--panel); box-shadow: 0 5px 13px rgba(27, 27, 24, 0.12); }
.btn-primary:hover { border-color: var(--accent-h); background: var(--accent-h); color: var(--panel); box-shadow: 0 8px 18px rgba(27, 27, 24, 0.16); }
.btn-ghost { border-color: var(--border2); background: var(--panel); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); background: var(--panel); color: var(--text); }
.btn-danger { min-height: 34px; padding: 7px 10px; color: var(--faint); }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger); transform: none; }
.btn-sm { min-height: 34px; padding: 7px 11px; font-size: 0.76rem; }
.btn-lg { min-height: 48px; padding: 13px 22px; font-size: 0.9rem; }
.btn-block { width: 100%; }

.btn-step {
  display: inline-grid;
  width: 29px;
  height: 29px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--border2);
  border-radius: 9px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  line-height: 1;
  transition: border-color 150ms ease, background 150ms ease;
}
.btn-step:hover:not(:disabled) { border-color: var(--text); background: var(--hover); }
.btn-step:disabled { cursor: default; opacity: 0.35; }

/* -------------------------------------------------------------------- forms */

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="submit"]):not([type="button"]),
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--border2);
  border-radius: 12px;
  outline: none;
  background: var(--panel);
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.4;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

textarea { min-height: 110px; resize: vertical; }
input[type="date"] { appearance: none; -webkit-appearance: none; }
input[type="date"]::-webkit-datetime-edit { padding: 0; font-family: inherit; line-height: 1.4; }
input[type="date"]::-webkit-datetime-edit-fields-wrapper { padding: 0; }
input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.55; transition: opacity 150ms ease; }
input[type="date"]:hover::-webkit-calendar-picker-indicator,
input[type="date"]:focus::-webkit-calendar-picker-indicator { opacity: 1; }
select { cursor: pointer; }
.toolbar select,
.toolbar input { width: auto; }
.toolbar input.toolbar-search { width: auto; flex: 1 1 260px; }
input:focus,
select:focus,
textarea:focus { border-color: var(--text); box-shadow: 0 0 0 4px var(--ring); }
input::placeholder,
textarea::placeholder { color: var(--faint); }

.field { margin-bottom: 19px; }
.field label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.095em;
  text-transform: uppercase;
}
.label-note { color: var(--faint); font-size: inherit; font-weight: 500; letter-spacing: 0; text-transform: none; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.field-label-row > label { margin-bottom: 7px; }
.term-manager { position: relative; margin: 0 0 7px; }
.term-manager summary { display: inline-flex; align-items: center; gap: 5px; min-height: 25px; color: var(--faint); cursor: pointer; font-size: 0.69rem; font-weight: 750; letter-spacing: 0.045em; list-style: none; text-transform: uppercase; transition: color 150ms ease; }
.term-manager summary::-webkit-details-marker { display: none; }
.term-manager summary:hover, .term-manager[open] summary { color: var(--text); }
.term-manager-panel { position: absolute; z-index: 40; top: calc(100% + 8px); right: 0; width: min(360px, calc(100vw - 44px)); max-height: 330px; overflow: auto; padding: 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--panel); box-shadow: var(--shadow-raised); }
.term-manager-head { margin-bottom: 11px; padding-bottom: 11px; border-bottom: 1px solid var(--border); }
.term-manager-head > div { display: grid; gap: 2px; }
.term-manager-head b { font-size: 0.81rem; }
.term-manager-head span, .term-manager-empty, .term-manager-feedback { margin: 0; color: var(--faint); font-size: 0.72rem; line-height: 1.4; }
.term-manager-list { display: grid; gap: 7px; }
.term-manager-row { display: grid; grid-template-columns: minmax(0, 1fr) 32px 32px; gap: 5px; align-items: center; }
.term-manager-row input { min-height: 36px; padding: 7px 9px; font-size: 0.78rem; }
.term-manager-action { display: inline-grid; width: 32px; height: 32px; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: 9px; background: var(--panel); color: var(--muted); cursor: pointer; font-family: inherit; transition: border-color 150ms ease, background 150ms ease, color 150ms ease; }
.term-manager-action:hover:not(:disabled) { border-color: var(--text); background: var(--hover); color: var(--text); }
.term-manager-action:disabled { cursor: wait; opacity: 0.5; }
.term-manager-delete:hover:not(:disabled) { border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); background: var(--danger-soft); color: var(--danger); }
.term-manager-empty { padding: 5px 0 2px; }
.term-manager-feedback { min-height: 18px; margin-top: 9px; color: var(--ok); }
.term-manager-feedback.is-error { color: var(--danger); }
.hint { margin: 6px 0 0; color: var(--faint); font-size: 0.78rem; line-height: 1.45; }

.form-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.85fr); gap: 20px; align-items: start; }
.form-card { padding: clamp(22px, 4vw, 32px); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.form-title { margin: 0 0 4px; }
.form-sub { margin-bottom: 18px; }
.entry-form { margin-bottom: 28px; }
.entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.entry-grid .span-2 { grid-column: 1 / -1; }

.entry-total {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 4px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel-soft);
}
.et-item { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.et-label,
.pp-label,
.lp-label { color: var(--faint); font-size: 0.66rem; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; }
.entry-total b { color: var(--text); font-size: 1.35rem; letter-spacing: -0.045em; }
.et-sub { color: var(--faint); font-size: 0.74rem; }
.et-gain.et-pos b,
.et-gain.et-pos .et-sub { color: var(--ok); }
.et-gain.et-thin b,
.et-gain.et-thin .et-sub { color: var(--warn); }
.et-gain.et-neg b,
.et-gain.et-neg .et-sub { color: var(--danger); }

.input-btn { display: flex; align-items: stretch; gap: 8px; }
.input-btn .btn { flex: 0 0 auto; }
.ext-link { margin-left: 6px; color: var(--faint); font-size: 0.75rem; text-decoration: none; vertical-align: 1px; }
.ext-link:hover { color: var(--text); }
.first-stock { margin-top: 6px; padding-top: 22px; border-top: 1px solid var(--border); }
.lots-section { margin-top: 42px; }
.lots-section .page-head h2 { margin: 0; }

.switch-row { display: flex !important; align-items: center; gap: 10px; cursor: pointer; color: var(--text) !important; font-size: 0.875rem !important; font-weight: 650 !important; letter-spacing: 0 !important; text-transform: none !important; }
.switch-row input { position: absolute; width: 0; height: 0; opacity: 0; }
.switch-row > span:last-child { display: grid; min-width: 0; gap: 2px; }
.switch-row > span:last-child b { display: block; line-height: 1.25; }
.switch-row > span:last-child small { display: block; color: var(--muted); font-size: 0.78rem; font-weight: 500; line-height: 1.35; }
.switch { position: relative; width: 44px; height: 25px; flex: 0 0 44px; border: 1px solid var(--border2); border-radius: 999px; background: var(--panel2); transition: background 160ms ease, border-color 160ms ease; }
.switch::after { position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: var(--faint); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); content: ""; transition: transform 160ms ease, background 160ms ease; }
.switch-row input:checked + .switch { border-color: var(--ok); background: var(--ok-soft); }
.switch-row input:checked + .switch::after { background: var(--ok); transform: translateX(18px); }
.switch-row input:focus-visible + .switch { box-shadow: 0 0 0 4px var(--ring); }

/* ----------------------------------------------------------------- dropzone */

.dropzone {
  position: relative;
  display: grid;
  min-height: 250px;
  place-items: center;
  padding: 18px;
  border: 1.5px dashed var(--border2);
  border-radius: 18px;
  background: var(--panel-soft);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}
.dropzone:hover { border-color: var(--text); background: var(--panel); }
.dropzone.drag { border-color: var(--ok); background: var(--ok-soft); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 12%, transparent); }
.dropzone.drag .dz-icon { border-color: var(--ok); color: var(--ok); transform: translateY(-3px); }
.dz-prompt { display: grid; justify-items: center; gap: 5px; color: var(--muted); text-align: center; }
.dz-prompt b { font-size: 0.92rem; }
.dz-prompt span { color: var(--faint); font-size: 0.78rem; }
.dz-icon { display: grid; width: 48px; height: 48px; place-items: center; margin-bottom: 6px; border-radius: 50%; background: var(--panel); border: 1px solid var(--border); color: var(--text); font-size: 1.15rem; transition: border-color 160ms ease, color 160ms ease, transform 160ms ease; }
#dzPreview { display: none; max-width: 100%; max-height: 280px; border-radius: 13px; }
.dropzone.has-image .dz-prompt { display: none; }
.dropzone.has-image #dzPreview { display: block; }
.dz-remove { position: absolute; top: 10px; right: 10px; display: none; width: 30px; height: 30px; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: var(--panel); color: var(--muted); cursor: pointer; font-size: 0.72rem; box-shadow: var(--shadow); }
.dz-remove:hover { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.dropzone.has-image .dz-remove { display: grid; }

/* --------------------------------------------------------------- quick sale */

.sale-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.sale-workspace { display: block; width: min(100%, 920px); margin: 0 auto; }
.sale-workspace .page-head { margin-bottom: 22px; }
.sale-workspace .sale-card { margin-top: 18px; }
.side-title { margin: 16px 0 10px; color: var(--faint); font-size: 0.68rem; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; }
.search-box { position: relative; }
.search-ic { position: absolute; top: 50%; left: 15px; z-index: 1; color: var(--faint); font-size: 0.95rem; line-height: 1; pointer-events: none; transform: translateY(-50%); }
#saleSearch { min-height: 54px; padding: 14px 94px 14px 44px; border-radius: 16px; font-size: 1rem; }
.sale-scan-btn { position: absolute; top: 50%; right: 7px; z-index: 1; min-height: 38px; padding: 7px 11px; transform: translateY(-50%); }

.barcode-scanner { margin-top: 16px; padding: 18px; }
.barcode-scanner-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.barcode-scanner-head h2 { margin: 0; font-size: 1rem; }
.barcode-scanner-head .hint { margin-top: 3px; }
.barcode-camera { min-height: 190px; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: var(--panel2); }
.barcode-camera video,
.barcode-camera img { display: block; width: 100% !important; max-width: 100%; }
.barcode-camera > div { border: 0 !important; }
.barcode-scanner-actions { display: flex; justify-content: flex-end; margin-top: 13px; }

.ac-panel { position: absolute; top: calc(100% + 8px); right: 0; left: 0; z-index: 40; max-height: 420px; overflow-y: auto; padding: 6px; border: 1px solid var(--border); border-radius: 18px; background: var(--panel); box-shadow: var(--shadow-raised); }
/* Results are actual buttons, so reset browser button chrome before applying the row layout. */
.ac-item { width: 100%; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 13px; margin: 0; padding: 11px 12px; border: 1px solid transparent; border-bottom-color: var(--border); border-radius: 12px; appearance: none; background: transparent; color: var(--text); cursor: pointer; font-family: inherit; text-align: left; transition: background 140ms ease, border-color 140ms ease; }
.ac-item:last-child { border-bottom-color: transparent; }
.ac-item:hover,
.ac-item.active { border-color: transparent; background: var(--hover); }
.ac-item.ac-disabled { cursor: default; opacity: 0.48; }
.ac-item.ac-disabled:hover { border-color: transparent; background: transparent; }
.ac-thumb { display: grid; width: 46px; height: 46px; place-items: center; overflow: hidden; border: 1px solid var(--border); border-radius: 13px; background: var(--panel2); object-fit: cover; }
.ac-thumb .bi { color: var(--faint); font-size: 1.1rem; }
.ac-main { display: grid; min-width: 0; gap: 3px; text-align: left; }
.ac-name { display: block; overflow: hidden; font-size: 0.92rem; font-weight: 700; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.ac-meta { display: block; overflow: hidden; color: var(--faint); font-size: 0.75rem; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.ac-item > .chip { justify-self: end; }
.ac-side { display: grid; justify-items: end; gap: 3px; text-align: right; }
.ac-empty { padding: 18px; color: var(--faint); text-align: center; }

.empty-mini { padding: 20px; color: var(--faint); font-size: 0.84rem; text-align: center; }
div.card.empty-mini { padding: 20px; }
.sale-card { margin-top: 16px; padding: 24px; }
.sale-cart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sale-cart-head h2 { margin: 0; font-size: 1.03rem; }
.sale-cart-items { border-top: 1px solid var(--border); }
.sale-cart-item { display: grid; grid-template-columns: minmax(150px, 1fr) 70px 106px auto 34px; align-items: end; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.sale-cart-product { display: grid; min-width: 0; align-self: center; gap: 5px; }
.sale-cart-product b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sale-cart-product .chip { justify-self: start; }
.sale-cart-source { width: auto; justify-self: start; padding: 3px 8px; font-size: 0.72rem; }
.sale-cart-field { min-width: 0; }
.sale-cart-field > span { display: block; margin-bottom: 5px; color: var(--faint); font-size: 0.62rem; font-weight: 750; letter-spacing: 0.1em; text-transform: uppercase; }
.sale-cart-field input { min-height: 38px; padding: 7px 8px; text-align: right; }
.sale-cart-line-total { align-self: center; font-size: 0.88rem; font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; white-space: nowrap; }
.sale-cart-item > .btn { align-self: center; min-height: 34px; padding: 6px 8px; }
.sale-cart-total { display: flex; align-items: baseline; justify-content: space-between; margin: 16px 0 20px; color: var(--muted); }
.sale-cart-total b { color: var(--text); font-size: 1.45rem; font-variant-numeric: tabular-nums; letter-spacing: -0.045em; }

.source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.source-card { display: block; cursor: pointer; letter-spacing: 0 !important; text-transform: none !important; }
.source-card input { position: absolute; opacity: 0; }
.source-card .sc-box { display: block; padding: 12px 13px; border: 1px solid var(--border2); border-radius: 14px; background: var(--panel); transition: border-color 150ms ease, background 150ms ease; }
.source-card .sc-title { display: block; color: var(--text); font-size: 0.84rem; font-weight: 700; }
.source-card .sc-sub { display: block; margin-top: 2px; color: var(--faint); font-size: 0.75rem; }
.source-card input:checked + .sc-box { border-color: var(--ok); background: var(--ok-soft); }
.source-card input:checked + .sc-box .sc-title { color: var(--ok); }
.source-card input:focus-visible + .sc-box { box-shadow: 0 0 0 4px var(--ring); }
.source-card.disabled { cursor: default; opacity: 0.4; }

.stepper { display: flex; align-items: center; gap: 8px; }
.stepper input { text-align: center; }
.stepper .btn-step { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; font-size: 0.94rem; }

.lot-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 11px; padding: 11px 14px; border: 1px dashed var(--border2); border-radius: 14px; background: var(--panel-soft); }
.lp-list { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-lot { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--panel); font-size: 0.78rem; }
.lp-date { color: var(--faint); font-size: 0.71rem; }

.price-tips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.price-tip { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 11px; border: 1px solid var(--border2); border-radius: 999px; background: var(--panel); color: var(--muted); cursor: pointer; font-family: inherit; font-size: 0.76rem; transition: border-color 150ms ease, background 150ms ease, color 150ms ease; }
.price-tip:hover { border-color: var(--text); background: var(--hover); color: var(--text); }
.price-tip b { color: var(--text); font-weight: 700; }
.price-tip:hover b { color: var(--text); }
.pt-label { color: var(--faint); font-size: 0.71rem; }

.price-panel { margin: 3px 0 18px; overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: var(--panel-soft); }
.pp-cols { display: grid; grid-template-columns: 1fr auto 1fr 1fr; align-items: center; gap: 12px; padding: 16px; }
.pp-col { min-width: 0; }
.pp-value { margin-top: 3px; font-size: 1.35rem; font-weight: 700; letter-spacing: -0.05em; }
.pp-sub { color: var(--faint); font-size: 0.73rem; }
.pp-arrow { padding: 0 2px; color: var(--faint); font-size: 0.88rem; }
.pp-gain.pp-pos .pp-value,
.pp-gain.pp-pos .pp-sub { color: var(--ok); }
.pp-gain.pp-thin .pp-value,
.pp-gain.pp-thin .pp-sub { color: var(--warn); }
.pp-gain.pp-neg .pp-value,
.pp-gain.pp-neg .pp-sub { color: var(--danger); }
.pp-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 7px 14px; padding: 12px 16px; border-top: 1px solid var(--border); }
.pp-charge { color: var(--muted); }
.pp-charge b { margin-left: 6px; color: var(--text); font-size: 1.25rem; letter-spacing: -0.04em; }
.pp-room { margin: 0; color: var(--faint); font-size: 0.79rem; text-align: right; }
.pp-room-pos { color: var(--ok); }
.pp-room-thin { color: var(--warn); }
.pp-room-neg { color: var(--danger); }

.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg-item { cursor: pointer; }
.seg-item input { position: absolute; opacity: 0; }
.seg-item span { display: inline-block; padding: 8px 15px; border: 1px solid var(--border2); border-radius: 999px; background: var(--panel); color: var(--muted); font-size: 0.78rem; font-weight: 700; transition: background 150ms ease, border-color 150ms ease, color 150ms ease; }
.seg-item:hover span { border-color: var(--text); color: var(--text); }
.seg-item input:checked + span { border-color: var(--accent); background: var(--accent); color: var(--panel); }
.seg-item input:focus-visible + span { box-shadow: 0 0 0 4px var(--ring); }

.recent-col .btn { margin-top: 14px; }
.recent-list { padding: 4px 18px; }
.recent-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.recent-item:last-child { border-bottom: none; }
.recent-main b { display: block; font-size: 0.84rem; }
.recent-amt { font-weight: 700; white-space: nowrap; }

/* -------------------------------------------------------------- stock cards */

.stock-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1180px) { .stock-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 820px) { .stock-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stock-card { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius); transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease; }
.stock-card:hover { border-color: var(--border2); box-shadow: var(--shadow); transform: translateY(-2px); }
.stock-card.is-out { opacity: 0.58; }
.stock-card.is-out:hover { opacity: 1; }

.sk-media { position: relative; display: block; flex: 0 0 auto; aspect-ratio: 1 / 1; overflow: hidden; border-bottom: 1px solid var(--border); background: var(--panel2); }
.sk-media img,
.sk-noimg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.sk-media img { padding: 18px; object-fit: contain; }
.sk-noimg { display: grid; place-items: center; }
.sk-noimg .bi { color: var(--faint); font-size: 2.1rem; }
.sk-qty { position: absolute; top: 12px; right: 12px; min-width: 32px; padding: 4px 9px; border: 1px solid var(--border); border-radius: 999px; background: color-mix(in srgb, var(--panel) 92%, transparent); color: var(--text); font-size: 0.72rem; font-weight: 750; text-align: center; }
.sk-body { display: flex; min-height: 164px; flex: 1; flex-direction: column; gap: 7px; padding: 18px 19px 20px; }
.sk-name { margin: 0; font-size: 1rem; font-weight: 700; letter-spacing: -0.035em; line-height: 1.32; }
.sk-name a { color: var(--text); text-decoration: none; }
.sk-name a:hover { color: var(--text); text-decoration: underline; text-decoration-color: var(--border2); }
.sk-meta { color: var(--faint); font-size: 0.76rem; }
.sk-summary { display: flex; flex-direction: column; gap: 9px; margin-top: auto; padding-top: 19px; }
.sk-sale-row,
.sk-stock-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sk-status { font-size: 0.78rem; font-weight: 700; }
.sk-status.is-in { color: var(--ok); }
.sk-status.is-out { color: var(--danger); }
.sk-price { color: var(--text); font-size: 0.96rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; white-space: nowrap; }
.sk-price a { border-bottom: 1px dotted currentColor; color: var(--muted); font-size: 0.77rem; font-weight: 600; letter-spacing: 0; text-decoration: none; }
.sk-price a:hover { color: var(--text); text-decoration: none; }
.sk-units { color: var(--muted); font-size: 0.78rem; }
.sk-units b { color: var(--text); font-variant-numeric: tabular-nums; font-weight: 700; }
.sk-stock-row .chip { margin-left: auto; }

/* -------------------------------------------------------------- auth screens */

.auth-shell,
.onboarding-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(20px, 5vw, 64px);
  background:
    radial-gradient(circle at 10% 10%, var(--ok-soft) 0, transparent 24%),
    var(--bg);
}

.auth-shell { grid-template-rows: 1fr auto; }

.auth-card {
  display: grid;
  width: min(100%, 1040px);
  grid-template-columns: minmax(280px, 0.86fr) minmax(360px, 1fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  background: var(--panel);
  box-shadow: var(--shadow-raised);
}

.auth-card > * { min-width: 0; }
.auth-card-main,
.auth-card-form { padding: clamp(28px, 5vw, 58px); }
.auth-card-main { display: flex; flex-direction: column; justify-content: space-between; background: var(--accent); color: var(--panel); }
.auth-card-main .auth-brand { color: var(--panel); }
.auth-card-main .brand-mark { background: var(--panel); color: var(--accent); box-shadow: none; }
.auth-card-main h1,
.auth-card-main h2 { max-width: 360px; margin: 54px 0 12px; color: var(--panel); font-size: clamp(2rem, 4vw, 3.2rem); line-height: 1; }
.auth-card-main p { max-width: 340px; margin: 0; color: color-mix(in srgb, var(--panel) 68%, transparent); }
.auth-card-form h1,
.auth-card-form h2 { margin: 0 0 8px; font-size: 1.75rem; }
.auth-card-form > p { margin: 0 0 28px; color: var(--muted); }
.auth-card:not(:has(.auth-card-main)) { display: block; width: min(100%, 480px); }
.auth-card:not(:has(.auth-card-main)) .auth-card-form { padding: clamp(28px, 7vw, 48px); }
.auth-brand { font-size: 1.05rem; }
.auth-footer { width: min(100%, 1040px); margin-top: 22px; color: var(--faint); font-size: 0.76rem; text-align: center; }
.auth-footer a { color: inherit; }

/* ---------------------------------------------------------- onboarding flow */

.onboarding-shell { align-content: center; }
.onboarding-card { width: min(100%, 900px); padding: clamp(28px, 6vw, 60px); border: 1px solid var(--border); border-radius: var(--radius-l); background: var(--panel); box-shadow: var(--shadow); }
.onboarding-card > header { max-width: 620px; margin-bottom: 34px; }
.onboarding-card h1 { margin: 0 0 10px; }
.onboarding-card header p { margin: 0; color: var(--muted); font-size: 1rem; }

.steps { display: flex; align-items: flex-start; gap: 0; margin: 0 0 38px; padding: 0; list-style: none; }
.steps li { position: relative; flex: 1; min-width: 0; padding: 38px 14px 0 0; color: var(--faint); font-size: 0.74rem; font-weight: 700; }
.steps li::before { position: absolute; top: 0; left: 0; z-index: 1; display: grid; width: 26px; height: 26px; place-items: center; border: 1px solid var(--border2); border-radius: 50%; background: var(--panel); content: counter(step); counter-increment: step; font-size: 0.7rem; }
.steps { counter-reset: step; }
.steps li::after { position: absolute; top: 12px; right: 0; left: 26px; height: 1px; background: var(--border); content: ""; }
.steps li:last-child::after { display: none; }
.steps li.is-active,
.steps li.active { color: var(--text); }
.steps li.is-active::before,
.steps li.active::before { border-color: var(--accent); background: var(--accent); color: var(--panel); }
.steps li.is-complete::before { border-color: var(--ok); background: var(--ok); color: var(--panel); content: "✓"; }
.steps li.is-complete::after { background: var(--ok); }

/* ------------------------------------------------------------- plans/billing */

.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.plan-card { position: relative; display: flex; min-height: 100%; flex-direction: column; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.plan-card.is-featured,
.plan-card.is-selected { border-color: var(--text); box-shadow: 0 0 0 1px var(--text), var(--shadow); }
.plan-card .status-badge { position: absolute; top: 18px; right: 18px; }
.plan-card h2,
.plan-card h3 { margin: 0; font-size: 1.1rem; }
.plan-price { margin: 20px 0 6px; font-size: 2.25rem; font-weight: 700; letter-spacing: -0.065em; line-height: 1; }
.plan-price small { color: var(--muted); font-size: 0.78rem; font-weight: 500; letter-spacing: 0; }
.plan-card > p { min-height: 42px; margin: 0 0 18px; color: var(--muted); font-size: 0.82rem; }
.plan-card ul { display: grid; gap: 9px; margin: 0 0 24px; padding: 0; color: var(--muted); font-size: 0.81rem; list-style: none; }
.plan-card li { display: flex; gap: 8px; align-items: baseline; }
.plan-card li::before { color: var(--ok); content: "✓"; font-weight: 750; }
.plan-card .btn { margin-top: auto; }

.billing-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr); gap: 22px; align-items: start; }
.billing-layout > .card,
.billing-layout > section { padding: clamp(22px, 4vw, 32px); }
.billing-summary { display: grid; gap: 18px; }
.billing-summary-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.billing-summary-row:last-child { padding-bottom: 0; border-bottom: 0; }
.billing-summary-row span { color: var(--muted); }
.billing-summary-row b { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ empty/footer */

.empty,
.empty-state { padding: clamp(42px, 8vw, 76px) 24px; text-align: center; }
.empty-icon,
.empty-state-icon { display: grid; width: 54px; height: 54px; place-items: center; margin: 0 auto 16px; border: 1px solid var(--border); border-radius: 50%; background: var(--panel-soft); color: var(--text); font-size: 1.25rem; }
.empty h2,
.empty-state h2,
.empty-state h3 { margin: 0 0 8px; }
.empty p,
.empty-state p { max-width: 510px; margin: 0 auto 21px; color: var(--muted); }
.empty-state .btn { margin-top: 2px; }

.footer {
  width: min(1240px, 100%);
  margin: auto auto 0;
  padding: 22px 28px;
  border-top: 1px solid var(--border);
  color: var(--faint);
  font-size: 0.75rem;
}
.footer-inner,
.footer .container { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 14px; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); text-decoration: underline; }

/* -------------------------------------------------------------- responsive */

@media (max-width: 1100px) {
  .metric-grid,
  .stats,
  .stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-grid { grid-template-columns: 1fr; }
  .plan-card { min-height: 0; }
  .plan-card > p { min-height: 0; }
}

@media (max-width: 900px) {
  .site-header-inner,
  .site-header .container,
  .topbar-inner { min-height: 68px; gap: 14px; }
  .site-nav,
  .nav { order: 3; width: 100%; overflow-x: auto; padding-bottom: 10px; }
  .site-nav a,
  .nav-link { flex: 0 0 auto; }
  .dashboard-hero { grid-template-columns: 1fr; align-items: start; }
  .dashboard-hero-aside,
  .dashboard-hero .hero-stat { width: min(100%, 280px); }
  .form-grid,
  .sale-layout,
  .billing-layout { grid-template-columns: 1fr; }
  .auth-card { grid-template-columns: 1fr; }
  .auth-card-main { min-height: 250px; }
  .auth-card-main h1,
  .auth-card-main h2 { margin-top: 34px; }
}

@media (max-width: 640px) {
  .container,
  .site-header-inner { padding-inline: 18px; }
  .content-shell,
  main.container { padding: 28px 18px 54px; }
  .site-header-inner,
  .site-header .container,
  .topbar-inner { align-items: center; min-height: 62px; }
  .brand-sub { display: none; }
  .topbar-right { margin-left: auto; }
  .user-menu { max-width: 42px; padding: 5px; overflow: hidden; font-size: 0; }
  .site-nav,
  .nav { gap: 3px; margin-inline: -18px; width: calc(100% + 36px); padding-inline: 18px; }
  .site-nav a,
  .nav-link { min-height: 35px; padding: 7px 11px; font-size: 0.78rem; }
  .page-head { align-items: flex-start; flex-direction: column; margin-bottom: 20px; }
  .page-head > .btn { width: 100%; }
  .dashboard-hero { min-height: 0; margin-bottom: 20px; padding: 28px; border-radius: 24px; }
  .dashboard-hero h1 { font-size: 2.15rem; }
  .metric-grid,
  .stats,
  .stats-3,
  .stats-4,
  .quick-grid,
  .field-row,
  .entry-grid,
  .source-grid { grid-template-columns: 1fr; }
  .metric,
  .stat { padding: 19px; }
  .activity-card,
  .sale-card { padding: 19px; }
  .toolbar > * { flex: 1 1 100%; width: 100% !important; }
  .toolbar .btn { width: auto !important; flex: 0 1 auto; }
  .term-add { display: block; margin-top: -8px; }
  .term-add summary { width: 100%; justify-content: center; }
  .term-add-form { width: 100%; }
  .sale-cart-item { grid-template-columns: minmax(0, 1fr) 1fr auto; }
  .sale-cart-product { grid-column: 1 / -1; }
  .sale-cart-line-total { grid-row: 3; grid-column: 1 / 3; }
  .sale-cart-item > .btn { grid-row: 2; grid-column: 3; }
  .entry-total { grid-template-columns: 1fr; gap: 11px; }
  .pp-cols { grid-template-columns: 1fr 1fr; }
  .pp-arrow { display: none; }
  .pp-gain { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid var(--border); }
  .pp-room { text-align: left; }
  .stock-grid { grid-template-columns: 1fr; }
  .auth-shell,
  .onboarding-shell { padding: 14px; }
  .auth-card,
  .onboarding-card { border-radius: 23px; }
  .auth-card-main,
  .auth-card-form,
  .onboarding-card { padding: 28px 23px; }
  .auth-card-main { min-height: 220px; }
  .auth-card-main h1,
  .auth-card-main h2 { font-size: 2.1rem; }
  .steps { margin-bottom: 30px; overflow-x: auto; }
  .steps li { min-width: 108px; }
  .footer,
  .footer-inner,
  .footer .container { align-items: flex-start; flex-direction: column; }
  .footer { padding-inline: 18px; }
}

@media (max-width: 420px) {
  .brand-name { font-size: 0.94rem; }
  .brand-mark,
  .brand-badge { width: 31px; height: 31px; flex-basis: 31px; }
  .status-badge { padding-inline: 8px; font-size: 0.64rem; }
  .status-badge::before { display: none; }
  .dashboard-hero { padding: 24px; }
  .btn-lg { width: 100%; }
  .input-btn { flex-direction: column; }
  .input-btn .btn { width: 100%; }
}

/* tcg.crm component bindings */
.header-account { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.header-quick-sale { display: inline-flex; min-height: 38px; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; background: var(--accent); color: var(--panel); font-size: 0.76rem; font-weight: 750; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease; }
.header-quick-sale:hover { background: var(--accent-h); color: var(--panel); box-shadow: 0 7px 15px rgba(27, 27, 24, 0.15); text-decoration: none; transform: translateY(-1px); }
.header-quick-sale .bi { font-size: 0.85rem; }
.brand-wordmark { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-size: 1.03rem; font-weight: 750; letter-spacing: -0.05em; text-decoration: none; white-space: nowrap; }
.brand-wordmark:hover { color: var(--text); text-decoration: none; }
.brand-wordmark > span:last-child > span,
.auth-brand > span:last-child { color: var(--faint); }
.status-alert { background: var(--warn-soft); color: var(--warn); }
.user-menu { position: relative; padding: 0; border: 0; background: transparent; }
.user-menu summary { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 5px 10px 5px 5px; border: 1px solid var(--border); border-radius: 999px; background: var(--panel); cursor: pointer; list-style: none; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary .bi { color: var(--faint); font-size: 0.68rem; }
.user-initial { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 50%; background: var(--accent); color: var(--panel); font-size: 0.72rem; font-weight: 750; }
.user-name { max-width: 148px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-popover { position: absolute; top: calc(100% + 9px); right: 0; display: grid; width: 235px; padding: 8px; border: 1px solid var(--border); border-radius: 16px; background: var(--panel); box-shadow: var(--shadow-raised); }
.user-menu:not([open]) .user-menu-popover { display: none; }
.menu-identity { display: grid; gap: 2px; padding: 10px 11px 13px; border-bottom: 1px solid var(--border); }
.menu-identity b { font-size: 0.8rem; }.menu-identity span { overflow: hidden; color: var(--faint); font-size: 0.73rem; text-overflow: ellipsis; white-space: nowrap; }
.menu-label { padding: 11px 11px 4px; color: var(--faint); font-size: 0.64rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; }
.user-menu-popover a, .menu-org { display: flex; width: 100%; align-items: center; gap: 8px; padding: 9px 11px; border: 0; border-radius: 9px; background: transparent; color: var(--text); cursor: pointer; font-family: inherit; font-size: 0.78rem; font-weight: 650; text-align: left; text-decoration: none; }
.user-menu-popover a:hover, .menu-org:hover, .menu-org.selected { background: var(--hover); text-decoration: none; }

.activity-head, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.activity-card .metric-grid { margin-bottom: 0; }
.dashboard-title { margin: 8px 0 28px; }.dashboard-title h1 { font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.05; }

/* Sales analysis */
.dashboard-insights { display: grid; grid-template-columns: minmax(0, 1fr) 276px; gap: 18px; margin-top: 28px; }
.revenue-chart { min-height: 410px; padding: 27px 29px 20px; }
.insight-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.insight-heading h2 { margin: 0; font-size: 1.35rem; }
.chart-note { padding-top: 5px; color: var(--faint); font-size: 0.75rem; }
.monthly-chart { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; gap: 9px; height: 285px; margin-top: 24px; padding: 0 4px; border-bottom: 1px solid var(--border); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 70px, var(--border) 71px, transparent 72px); }
.chart-month { display: grid; grid-template-rows: 1fr auto; min-width: 0; gap: 10px; height: 100%; color: var(--faint); font-size: 0.68rem; font-weight: 700; text-align: center; }
.chart-bars { display: flex; align-items: end; justify-content: center; gap: 3px; min-height: 0; height: 100%; }
.chart-bar { position: relative; display: block; width: min(13px, 29%); min-height: 0; border-radius: 4px 4px 1px 1px; cursor: pointer; outline: none; transition: filter 160ms ease, transform 160ms ease; }
.chart-bar:hover, .chart-bar:focus { filter: brightness(.92); transform: translateY(-3px); }
.chart-bar:focus-visible { box-shadow: 0 0 0 3px var(--ring); }
.chart-tooltip { position: absolute; z-index: 20; bottom: calc(100% + 11px); left: 50%; display: grid; width: 238px; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 13px; background: var(--panel); box-shadow: var(--shadow-raised); color: var(--text); opacity: 0; pointer-events: none; text-align: left; transform: translate(-50%, 7px); transition: opacity 150ms ease, transform 150ms ease; visibility: hidden; }
.chart-tooltip::after { position: absolute; bottom: -5px; left: calc(50% - 5px); width: 9px; height: 9px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--panel); content: ''; transform: rotate(45deg); }
.chart-bar:hover .chart-tooltip, .chart-bar:focus .chart-tooltip { opacity: 1; transform: translate(-50%, 0); visibility: visible; }
.chart-tooltip-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-bottom: 9px; border-bottom: 1px solid var(--border); }.chart-tooltip-head b { font-size: 0.76rem; }.chart-tooltip-head strong { color: var(--ok); font-size: 0.82rem; white-space: nowrap; }
.tooltip-list { display: grid; gap: 7px; }.tooltip-product { display: flex; min-width: 0; align-items: baseline; justify-content: space-between; gap: 9px; }.tooltip-product b { overflow: hidden; font-size: 0.7rem; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }.tooltip-product > span { flex: 0 0 auto; color: var(--faint); font-size: 0.68rem; }
.chart-month:nth-child(-n+2) .chart-tooltip { left: 0; transform: translate(0, 7px); }.chart-month:nth-child(-n+2) .chart-bar:hover .chart-tooltip, .chart-month:nth-child(-n+2) .chart-bar:focus .chart-tooltip { transform: translate(0, 0); }.chart-month:nth-child(-n+2) .chart-tooltip::after { left: 4px; }
.chart-month:nth-last-child(-n+2) .chart-tooltip { right: 0; left: auto; transform: translate(0, 7px); }.chart-month:nth-last-child(-n+2) .chart-bar:hover .chart-tooltip, .chart-month:nth-last-child(-n+2) .chart-bar:focus .chart-tooltip { transform: translate(0, 0); }.chart-month:nth-last-child(-n+2) .chart-tooltip::after { right: 4px; left: auto; }
.chart-bar-0 { background: #e1e3e7; }.chart-bar-1 { background: #c9cdd4; }.chart-bar-2 { background: #7ecdad; }
.chart-legend { display: flex; justify-content: center; gap: 18px; margin-top: 18px; color: var(--muted); font-size: 0.75rem; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }.chart-legend i { display: block; width: 12px; height: 12px; border-radius: 4px; }
.chart-empty { display: grid; min-height: 280px; place-items: center; align-content: center; gap: 10px; color: var(--faint); font-size: 0.84rem; text-align: center; }.chart-empty .bi { font-size: 1.4rem; }
.period-summary { display: grid; gap: 13px; }
.period-card { display: grid; min-height: 92px; align-content: center; gap: 5px; padding: 18px 20px; }
.period-card > span { color: var(--muted); font-size: 0.78rem; font-weight: 700; }.period-card > b { font-size: 1.55rem; letter-spacing: -0.055em; line-height: 1.05; }.period-card small { font-size: 0.72rem; font-weight: 700; }.period-card small em { margin-left: 4px; color: var(--faint); font-style: normal; font-weight: 500; }.trend-up { color: var(--ok); }.trend-down { color: var(--danger); }.trend-neutral { color: var(--faint); }

.brand-leaders { margin-top: 38px; }.section-note { color: var(--faint); font-size: 0.76rem; }
.brand-leader-list { overflow: hidden; }.brand-leader { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 13px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }.brand-leader:last-child { border-bottom: 0; }
.brand-rank { color: var(--faint); font-size: 0.72rem; font-weight: 750; letter-spacing: 0.08em; }.brand-leader-main { display: grid; gap: 10px; min-width: 0; }.brand-leader-main > div:first-child { display: flex; justify-content: space-between; gap: 16px; }.brand-leader-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.brand-leader-main span { color: var(--faint); font-size: 0.76rem; white-space: nowrap; }.brand-progress { height: 6px; overflow: hidden; border-radius: 999px; background: var(--accent-soft); }.brand-progress i { display: block; height: 100%; border-radius: inherit; background: var(--ok); }.compact-empty { margin-top: 0; }

.dashboard-section { margin-top: 42px; }.dashboard-section h2 { margin: 0; font-size: 1.45rem; }.recent-dashboard { margin-top: 48px; }
@media (max-width: 980px) { .dashboard-insights { grid-template-columns: 1fr; }.period-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }.revenue-chart { min-height: 390px; } }
@media (max-width: 640px) { .dashboard-insights { gap: 14px; }.revenue-chart { min-height: 350px; padding: 22px 18px 17px; }.chart-note { display: none; }.monthly-chart { height: 225px; gap: 3px; margin-top: 20px; }.chart-month { font-size: 0.58rem; }.chart-bars { gap: 1px; }.chart-bar { width: min(9px, 31%); }.period-summary { grid-template-columns: 1fr; gap: 10px; }.period-card { min-height: 84px; }.brand-leader { grid-template-columns: 32px minmax(0, 1fr); padding: 15px; }.brand-leader-main > div:first-child { display: grid; gap: 3px; }.brand-leader-main span { overflow: hidden; text-overflow: ellipsis; }.section-note { display: none; } }
/* Fast actions: a deliberate top, message and action hierarchy. */
.quick-card { min-height: 226px; justify-content: flex-start; padding: 25px 27px 22px; }
.quick-card-top { display: flex; align-items: center; justify-content: space-between; }
.quick-icon { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 14px; background: var(--accent); color: var(--panel); }
.quick-icon .bi { display: block; width: auto; height: auto; background: transparent; color: inherit; font-size: 1.03rem; }
.quick-card-arrow { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--border); border-radius: 50%; color: var(--faint); transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease; }
.quick-card-arrow .bi { display: block; width: auto; height: auto; background: transparent; color: inherit; font-size: 0.78rem; }
.quick-card-body { min-width: 0; margin-top: 24px; }
.quick-card-body > p { margin: 0 0 9px; color: var(--faint); font-size: 0.66rem; font-weight: 750; letter-spacing: 0.11em; text-transform: uppercase; }
.quick-card-body > h3 { margin: 0 0 7px; font-size: 1.16rem; letter-spacing: -0.045em; }
.quick-card-body > small { display: block; max-width: 285px; color: var(--muted); font-size: 0.82rem; line-height: 1.45; }
.quick-card-cta { display: inline-flex; align-items: center; gap: 7px; margin-top: auto; padding-top: 18px; color: var(--text); font-size: 0.76rem; font-weight: 700; }
.quick-card-cta .bi { display: block; width: auto; height: auto; background: transparent; color: inherit; font-size: 0.76rem; transition: transform 180ms ease; }
.quick-card:hover .quick-card-arrow { border-color: var(--text); background: var(--text); color: var(--panel); transform: rotate(4deg); }
.quick-card:hover .quick-card-cta .bi { transform: translateX(4px); }
.quick-card-stock .quick-icon { background: var(--ok-soft); color: var(--ok); }
.quick-card-sale .quick-icon { background: var(--info-soft); color: var(--info); }
.empty-state { display: flex; align-items: center; gap: 16px; padding: 30px; border: 1px dashed var(--border2); border-radius: var(--radius); background: var(--panel-soft); text-align: left; }.empty-state > .bi { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 50%; background: var(--panel); color: var(--faint); }.empty-state > div { display: grid; gap: 3px; flex: 1; }.empty-state span { color: var(--muted); font-size: 0.82rem; }

.auth-main, .onboarding-main { display: grid; width: min(100%, 500px); justify-items: center; }.auth-main { gap: 24px; }.auth-main .auth-brand, .onboarding-main .auth-brand { margin-bottom: 8px; }.auth-card { display: block; width: 100%; padding: clamp(28px, 7vw, 46px); }.auth-card h1 { margin: 0 0 8px; font-size: 2rem; }.auth-intro { margin: 0 0 28px; color: var(--muted); }.auth-switch { margin: 22px 0 0; color: var(--muted); font-size: 0.82rem; text-align: center; }.auth-card-wide { width: min(100%, 590px); }.plan-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }.plan-inline input, .plan-card input { position: absolute; opacity: 0; pointer-events: none; }.plan-inline label { position: relative; cursor: pointer; }.plan-inline span { display: grid; gap: 2px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--panel-soft); color: var(--muted); font-size: 0.77rem; }.plan-inline b { color: var(--text); }.plan-inline input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); color: var(--text); }
.onboarding-main { gap: 22px; }.onboarding-card { width: min(100%, 720px); }.onboarding-intro { max-width: 580px; margin: 0 0 30px; color: var(--muted); font-size: 0.96rem; }.onboarding-logout { color: var(--faint); font-size: 0.78rem; }.steps li.done::before { border-color: var(--ok); background: var(--ok); color: var(--panel); content: "✓"; }.steps li.done::after { background: var(--ok); }.steps li > div { display: grid; gap: 2px; }.steps li small { color: var(--faint); font-weight: 500; }.plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 22px; }.plan-card { padding: 0; cursor: pointer; }.plan-choice { display: grid; min-height: 164px; gap: 8px; padding: 22px; border: 1px solid transparent; border-radius: inherit; }.plan-choice b { font-size: 1.05rem; }.plan-choice strong { font-size: 1.65rem; letter-spacing: -0.055em; }.plan-choice strong small { color: var(--muted); font-size: 0.75rem; font-weight: 500; letter-spacing: 0; }.plan-choice em { margin-top: auto; color: var(--muted); font-size: 0.78rem; font-style: normal; }.plan-choice i { width: max-content; padding: 4px 7px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 0.62rem; font-style: normal; font-weight: 750; letter-spacing: 0.06em; }.plan-card input:checked + .plan-choice { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }.plan-grid.compact .plan-choice { min-height: 124px; }.secure-note { margin: 17px 0 0; color: var(--faint); font-size: 0.76rem; text-align: center; }.secure-note .bi { margin-right: 5px; color: var(--ok); }
.billing-status-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 15px; border-bottom: 1px solid var(--border); }.billing-status > p:not(.page-kicker) { color: var(--muted); }.billing-plans h2 { margin: 0 0 20px; }.billing-plans .plan-grid { margin-bottom: 16px; }

@media (max-width: 640px) { .header-account .status-badge { display: none; }.header-quick-sale { width: 38px; min-height: 38px; justify-content: center; padding: 0; border-radius: 50%; }.header-quick-sale span { display: none; }.user-name { display: none; }.user-menu { max-width: none; overflow: visible; }.user-menu summary { padding-right: 5px; }.user-menu summary .bi { display: none; }.empty-state { align-items: flex-start; flex-wrap: wrap; }.empty-state .btn { width: 100%; }.plan-inline, .plan-grid { grid-template-columns: 1fr; }.section-heading { align-items: flex-start; flex-direction: column; }.section-heading .btn { width: 100%; } }
