/* ============================================================================
   GAC Portal — module components (app.css).
   Linked AFTER design-tokens.css + app-shell.css. Consumes tokens only; never
   restyles shell classes (.title-row/.tab-row/.table/.btn/.input live in the
   shell). Only GAC-specific components here.
   ============================================================================ */

/* ============================================================================
   GAC brand overrides. Loaded after design-tokens.css, so these :root values win.
   Magenta accent + warm cream canvas + DM fonts, matching the login branding.
   ============================================================================ */
:root {
  --font-sans: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "DM Serif Display", Georgia, "Times New Roman", serif;

  /* GAC brand palette (from the login) */
  --gac-pink: #af0061;
  --gac-pink-dark: #8f004f;
  --gac-pink-tint: #fbeaf2;
  --gac-cream: #f7f1e7;
  --gac-choc: #2a1d16;
  --gac-mid: #7a6356;

  /* Retheme the Digit tokens to GAC brand */
  --color-accent: #af0061;
  --color-accent-bright: #c8327f;
  --btn-primary-bg: #af0061;
  --color-app-bg: #f7f1e7;          /* cream canvas for card views */
  --tab-active-color: var(--gac-choc);
  --color-ai: #af0061;              /* brand accent for hero/marks */

  /* Warm the shared neutrals so every table/input/card/hover is on-brand at once */
  --color-border: #e6ddd0;
  --color-border-faint: rgba(91, 58, 41, .08);
  --color-hover: #faf4ea;
  --color-surface-alt: #f3ebdd;
}

/* Shared branded components (tables / inputs / cards) used across every tab. */
.table th { background: #fbf7f0; color: var(--gac-choc); font-weight: 600; }
.input:focus, .search:focus, textarea.input:focus,
select.input:focus, .stepper-input:focus { outline: none; border-color: var(--gac-pink); box-shadow: 0 0 0 3px rgba(175, 0, 97, .12); }
.picker-card, .batch-card { border: 1px solid #ecdfce; }
.stat-card { border-color: #ecdfce; background: linear-gradient(135deg, #fff, #fdfaf4); }
.stat-value { font-family: var(--font-serif); font-weight: 400; color: var(--gac-choc); }
.msg-bubble-row.mine .msg-bubble { background: var(--gac-pink-tint); }
.banner--info { background: var(--gac-pink-tint); border-color: #f0c7dd; color: var(--gac-choc); }

/* Warm cream app canvas; sidebar + cards/tables stay crisp. */
.app { background: #fdfbf6; }
#sidebar { background: #ffffff; }
.btn--primary:hover { filter: none; background: var(--gac-pink-dark); }
.page-title { font-family: var(--font-serif); font-weight: 400; letter-spacing: 0; }

/* ---- App layout: left sidebar + main (original portal grammar) ----------- */
.layout { display: flex; min-height: 100vh; align-items: stretch; }

#sidebar {
  width: 244px; flex: none; background: var(--color-bg);
  border-right: 1px solid var(--color-border);
  display: flex; flex-direction: column; justify-content: space-between;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-body { flex: 1; overflow-y: auto; padding: var(--space-3) var(--space-2) var(--space-2); }
.sidebar-brand { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-2) var(--space-3); }
.brand-logo { width: 30px; height: 30px; object-fit: contain; }
.brand-name { font-size: var(--fs-md); font-weight: var(--fw-semibold); line-height: 1.2; }
.brand-sub { font-size: var(--fs-sm); color: var(--color-label); }
.sidebar-divider { height: 1px; background: var(--color-border); margin: 0 var(--space-2) var(--space-2); }
.sidebar-nav { display: flex; flex-direction: column; gap: var(--space-3); }
.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-group-header { font-size: 10px; font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: .06em; color: var(--color-label); opacity: .7; padding: var(--space-2) var(--space-2) var(--space-1); }

.nav-item {
  display: flex; align-items: center; gap: var(--space-2); width: 100%;
  appearance: none; background: none; border: none; cursor: pointer; text-align: left;
  font-family: inherit; font-size: var(--fs-base); font-weight: var(--fw-medium);
  color: var(--color-text); padding: 7px var(--space-2); border-radius: var(--radius-input);
}
.nav-item:hover { background: var(--color-hover); }
.nav-item--active { background: var(--color-surface-alt); color: var(--color-text); font-weight: var(--fw-semibold); }
.nav-icon { width: 16px; height: 16px; color: var(--color-label); flex: none; }
.nav-item--active .nav-icon { color: var(--color-text); }
.nav-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-soon { font-size: 9px; font-weight: var(--fw-semibold); text-transform: uppercase; letter-spacing: .04em; color: var(--color-label); border: 1px solid var(--color-border); border-radius: 5px; padding: 0 5px; }
.nav-item--soon .nav-label { color: var(--color-label); }

.sidebar-footer { position: relative; border-top: 1px solid var(--color-border); padding: var(--space-2); }
.user-btn { display: flex; align-items: center; gap: var(--space-2); width: 100%; appearance: none; background: none; border: none; cursor: pointer; padding: var(--space-2); border-radius: var(--radius-input); font-family: inherit; text-align: left; }
.user-btn:hover { background: var(--color-hover); }
.avatar-circle { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--btn-primary-bg); color: #fff; display: flex; align-items: center; justify-content: center; font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.user-meta { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.user-role { font-size: var(--fs-base); font-weight: var(--fw-medium); }
.user-name { font-size: var(--fs-sm); color: var(--color-label); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-caret { width: 14px; height: 14px; color: var(--color-label); }
.user-menu { position: absolute; bottom: calc(100% + 4px); left: var(--space-2); right: var(--space-2); background: var(--color-bg); border: 1px solid var(--color-border-faint); border-radius: var(--radius-card); box-shadow: var(--shadow-md); padding: var(--space-1); z-index: 40; }
.user-menu-item { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2); border-radius: var(--radius-input); font-size: var(--fs-base); color: var(--color-text); text-decoration: none; }
.user-menu-item:hover { background: var(--color-hover); }
.user-menu-item .icon { width: 16px; height: 16px; color: var(--color-label); }
.user-menu-danger { color: var(--pill-red-text); }
.user-menu-danger .icon { color: var(--pill-red-text); }

/* ---- Main column --------------------------------------------------------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.main-header {
  position: sticky; top: 0; z-index: 20; background: var(--color-bg);
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-4) var(--space-8); border-bottom: 1px solid var(--color-border);
  min-height: 60px;
}
.main-header .page-title { margin: 0; font-size: 22px; color: var(--gac-choc); }
.main-header-actions { display: flex; align-items: center; gap: var(--space-2); }
.main .content { padding-top: var(--space-5); }
.view-body { padding-bottom: var(--space-8); }

/* ---- Home dashboard (GAC branded) ---------------------------------------- */
.home-hero {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  background: linear-gradient(135deg, #fff 0%, var(--gac-cream) 100%);
  border: 1px solid #ecdfce; border-radius: 16px;
  padding: var(--space-6) var(--space-8); margin-bottom: var(--space-6);
  box-shadow: 0 10px 30px rgba(91,58,41,.06);
}
.home-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gac-pink); margin-bottom: 6px; }
.home-greet { font-family: var(--font-serif); font-size: 34px; line-height: 1.1; color: var(--gac-choc); }
.home-sub { color: var(--gac-mid); margin-top: var(--space-2); font-size: var(--fs-md); }
.home-hero-img { width: 72px; height: 72px; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(175,0,97,.18)); }
.home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-4); }
.home-card { display: flex; align-items: center; gap: var(--space-3); text-align: left; appearance: none; cursor: pointer;
  background: var(--color-bg); border: 1px solid #ecdfce; border-radius: 14px; padding: var(--space-4); font-family: inherit;
  transition: box-shadow .15s, border-color .15s, transform .1s; }
.home-card:hover { box-shadow: 0 8px 22px rgba(91,58,41,.10); border-color: var(--gac-pink); transform: translateY(-1px); }
.home-card-icon { width: 42px; height: 42px; flex: none; border-radius: 11px; background: var(--gac-pink-tint); display: flex; align-items: center; justify-content: center; }
.home-card-icon .icon { width: 20px; height: 20px; color: var(--gac-pink); }
.home-card-body { flex: 1; min-width: 0; }
.home-card-title { font-weight: 600; color: var(--gac-choc); }
.home-card-sub { font-size: var(--fs-sm); color: var(--gac-mid); }
.home-card-caret { width: 16px; height: 16px; color: var(--gac-pink); }

@media (max-width: 760px) {
  .layout { flex-direction: column; }
  #sidebar { width: 100%; height: auto; position: static; flex-direction: column; }
  .sidebar-nav { flex-direction: row; overflow-x: auto; }
  .nav-group { flex-direction: row; }
  .nav-group-header { display: none; }
  .main-header { padding: var(--space-3) var(--space-4); }
}

/* ---- Status pills (module-defined per DESIGN.md) ------------------------- */
.pill {
  display: inline-flex; align-items: center; padding: 1px var(--space-2);
  border-radius: var(--radius-pill); font-size: var(--fs-sm); font-weight: var(--fw-medium);
  white-space: nowrap;
}
.pill--blue   { background: var(--pill-blue-bg);   color: var(--pill-blue-text); }
.pill--gray   { background: var(--pill-gray-bg);   color: var(--pill-gray-text); }
.pill--green  { background: var(--pill-green-bg);  color: var(--pill-green-text); }
.pill--red    { background: var(--pill-red-bg);    color: var(--pill-red-text); }
.pill--amber  { background: var(--pill-amber-bg);  color: var(--pill-amber-text); }
.pill--yellow { background: var(--pill-yellow-bg); color: var(--pill-yellow-text); }
.pill--violet { background: var(--pill-violet-bg); color: var(--pill-violet-text); }

/* ---- Field label/value (context strip, detail) --------------------------- */
.field-label { font-size: var(--fs-sm); color: var(--color-label); }
.field-value { font-size: var(--fs-base); color: var(--color-text); font-weight: var(--fw-medium); }
.ctx-strip {
  display: flex; gap: var(--space-8); flex-wrap: wrap;
  padding: var(--space-3) 0 var(--space-4);
}

/* ---- Category chips ------------------------------------------------------ */
.cat-row { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.chip {
  appearance: none; border: 1px solid #e6ddd0; background: var(--color-bg);
  color: var(--gac-mid); font-family: inherit; font-size: var(--fs-sm); font-weight: 500;
  height: 30px; padding: 0 var(--space-3); border-radius: var(--radius-pill); cursor: pointer;
}
.chip:hover { background: var(--gac-cream); color: var(--gac-choc); }
.chip--active { background: var(--gac-pink); border-color: var(--gac-pink); color: #fff; }

/* ---- Catalog layout ------------------------------------------------------ */
.catalog-layout { display: grid; grid-template-columns: 1fr 320px; gap: var(--space-6); align-items: start; }
.catalog-main { min-width: 0; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-4); }

.item-card {
  border: 1px solid #ecdfce; border-radius: 14px;
  background: var(--color-bg); overflow: hidden; display: flex; flex-direction: column;
  transition: box-shadow .12s ease, border-color .12s ease;
}
.item-card:hover { box-shadow: 0 8px 20px rgba(91,58,41,.08); border-color: #dcc9b0; }
.item-card--in-cart { border-color: var(--gac-pink); box-shadow: 0 0 0 1px var(--gac-pink); }
.item-img { width: 100%; height: 128px; object-fit: cover; display: block; background: var(--color-surface-alt); }
.item-img--ph { display: flex; align-items: center; justify-content: center; color: var(--color-muted); }
.item-img--ph .icon { width: 32px; height: 32px; }
.item-body { padding: var(--space-3); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.item-name { font-size: var(--fs-base); font-weight: var(--fw-medium); line-height: var(--lh-tight); }
.item-meta { display: flex; gap: var(--space-2); align-items: center; font-size: var(--fs-sm); }
.item-code { color: var(--color-label); font-variant-numeric: tabular-nums; }
.item-tags { display: flex; gap: var(--space-1); flex-wrap: wrap; }
.item-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.item-price { font-weight: var(--fw-semibold); }
.muted-small { font-size: var(--fs-sm); color: var(--color-muted); }

.stepper { display: inline-flex; align-items: center; gap: var(--space-1); }
.stepper-input {
  width: 44px; height: 28px; text-align: center; border: 1px solid var(--color-border);
  border-radius: var(--radius-input); font-family: inherit; font-size: var(--fs-sm);
  -moz-appearance: textfield;
}
.stepper-input::-webkit-outer-spin-button, .stepper-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---- Cart panel ---------------------------------------------------------- */
.cart-panel {
  position: sticky; top: calc(60px + var(--space-4));
  border: 1px solid #ecdfce; border-radius: 14px;
  background: var(--color-bg); padding: var(--space-4); box-shadow: 0 8px 24px rgba(91,58,41,.07);
  display: flex; flex-direction: column; gap: var(--space-3);
}
.cart-head { display: flex; align-items: center; gap: var(--space-2); font-family: var(--font-serif); font-weight: 400; font-size: var(--fs-lg); color: var(--gac-choc); }
.cart-head .icon { color: var(--gac-pink); }
.cart-head .cart-count { margin-left: auto; background: var(--gac-pink-tint); color: var(--gac-pink);
  border-radius: var(--radius-pill); font-size: var(--fs-xs); font-weight: 600; padding: 1px 8px; }
.cart-empty { color: var(--color-muted); font-size: var(--fs-sm); }
.cart-lines { display: flex; flex-direction: column; gap: var(--space-2); max-height: 40vh; overflow-y: auto; }
.cart-line { display: grid; grid-template-columns: 1fr auto auto; gap: var(--space-2); align-items: center; }
.cart-line-name { font-size: var(--fs-sm); }
.cart-line-amt { font-variant-numeric: tabular-nums; font-size: var(--fs-sm); }
.cart-totals { border-top: 1px solid var(--color-border); padding-top: var(--space-2); display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-sm); }
.cart-totals > div { display: flex; justify-content: space-between; }
.cart-total-row { font-weight: var(--fw-semibold); font-size: var(--fs-base); }
.cart-label { font-size: var(--fs-sm); color: var(--color-label); }
.cart-week { width: 100%; }
.cart-note { font-size: var(--fs-xs); color: var(--color-label); min-height: 14px; }
.cart-place, .cart-panel .btn { width: 100%; justify-content: center; }

@media (max-width: 860px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .cart-panel { position: static; }
}

/* ---- Order history sub-lines --------------------------------------------- */
.row-caret { width: 13px; height: 13px; color: var(--color-muted); margin-right: 4px; vertical-align: -2px; }
.row-actions { display: flex; gap: var(--space-2); justify-content: flex-end; }
.lines-row td { background: var(--color-hover); }
.sub-lines { display: flex; flex-direction: column; gap: 4px; padding: var(--space-2) 0; }
.sub-line { display: grid; grid-template-columns: 1fr 1fr auto; gap: var(--space-3); font-size: var(--fs-sm); }

/* ---- Login screen (original GAC branded split-screen) --------------------- */
.login-wrapper {
  --cream:#f7f1e7; --pink:#AF0061; --pink-dark:#8f004f; --dark:#2a1d16; --mid:#7a6356; --light:#b8a99b;
  --shadow:0 20px 60px rgba(91,58,41,.18);
  display: flex; height: 100vh; overflow: hidden; font-family: 'DM Sans', sans-serif; background: var(--cream);
}
/* left panel */
.login-wrapper .left-panel { width: 50%; position: relative; background: #8f3f20 url('assets/img/login-cover.webp') center/cover no-repeat; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
.login-wrapper .left-panel::after { content:''; position:absolute; inset:0; background: linear-gradient(160deg, rgba(40,20,10,.30) 0%, rgba(40,20,10,.20) 55%, rgba(40,20,10,.45) 100%); z-index:0; }
.login-wrapper .left-panel > * { position: relative; z-index: 1; }
.login-wrapper .left-brand { position: absolute; top: 20px; left: 24px; display: flex; align-items: center; gap: 10px; }
.login-wrapper .left-brand-mark { font-size: 30px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.3)); }
.login-wrapper .left-brand-name { font-family: 'DM Serif Display', serif; font-size: 18px; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.35); letter-spacing: .03em; }
.login-wrapper .card-stack { position: relative; width: 320px; height: 380px; }
.login-wrapper .float-card { position: absolute; background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 16px; width: 260px; animation: floatCard linear infinite; }
.login-wrapper .float-card:nth-child(1){ top:80px; left:60px; --r:-6deg; animation-duration:6s; z-index:1; }
.login-wrapper .float-card:nth-child(2){ top:40px; left:30px; --r:-2deg; animation-duration:7s; animation-delay:.8s; z-index:2; }
.login-wrapper .float-card:nth-child(3){ top:0; left:0; --r:2deg; animation-duration:5.5s; animation-delay:.3s; z-index:3; }
@keyframes floatCard { 0%{ transform: translateY(0) rotate(var(--r,2deg)); } 50%{ transform: translateY(-10px) rotate(var(--r,2deg)); } 100%{ transform: translateY(0) rotate(var(--r,2deg)); } }
.login-wrapper .card-icon { width: 100%; height: 90px; border-radius: 10px; margin-bottom: 12px; display: flex; align-items: center; justify-content: center; font-size: 36px; }
.login-wrapper .card-title { font-family: 'DM Serif Display', serif; font-size: 18px; color: var(--dark); margin-bottom: 4px; }
.login-wrapper .card-desc { font-size: 13px; color: var(--mid); line-height: 1.4; margin-bottom: 12px; }
.login-wrapper .card-tags { display: flex; gap: 6px; }
.login-wrapper .tag { font-size: 9px; font-weight: 600; letter-spacing: .05em; padding: 3px 8px; border-radius: 20px; text-transform: uppercase; }
.login-wrapper .tag-teal { background: #d4f4f2; color: #1a9a94; }
.login-wrapper .tag-orange { background: #fde8da; color: #c45e1e; }
.login-wrapper .tag-berry { background: #fcdfe4; color: #b22640; }
.login-wrapper .notif { width: 320px; margin-top: 20px; background: rgba(255,255,255,.22); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.30); border-radius: 12px; padding: 12px 14px; display: flex; gap: 10px; align-items: center; box-shadow: 0 4px 20px rgba(0,0,0,.15); }
.login-wrapper .notif-avatar { width: 36px; height: 36px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 26px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.3)); }
.login-wrapper .notif-text { font-size: 10.5px; color: rgba(255,255,255,.92); line-height: 1.45; }
/* right panel */
.login-wrapper .right-panel { width: 50%; background: #fcfcfc; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 60px 56px; position: relative; }
.login-wrapper .right-panel-inner { width: 100%; max-width: 400px; }
.login-wrapper .login-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .12em; color: var(--pink); text-transform: uppercase; margin-bottom: 10px; }
.login-wrapper .login-title { font-family: 'DM Serif Display', serif; font-size: 36px; line-height: 1.15; color: var(--dark); margin-bottom: 8px; }
.login-wrapper .login-title em { font-style: italic; color: var(--pink); }
.login-wrapper .login-sub { font-size: 13.5px; color: var(--mid); font-weight: 300; margin-bottom: 36px; }
.login-wrapper .login-error { display: none; margin: 0 0 16px; padding: 12px 14px; background: #fbeaec; border: 1px solid #e7b6bd; border-radius: 10px; color: #a01b30; font-size: 13.5px; line-height: 1.5; }
.login-wrapper .login-error.show { display: block; }
.login-wrapper .gac-form-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--mid); margin-bottom: 8px; }
.login-wrapper .gac-input-wrap { position: relative; margin-bottom: 20px; }
.login-wrapper .gac-input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--light); pointer-events: none; font-size: 15px; line-height: 1; }
.login-wrapper .gac-form-control { width: 100%; padding: 13px 14px 13px 40px; background: #fff; border: 1.5px solid #e6ddd0; border-radius: 10px; font-family: 'DM Sans', sans-serif; font-size: 14px; color: var(--dark); outline: none; transition: border-color .2s, box-shadow .2s; appearance: none; }
.login-wrapper .gac-form-control:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(175,0,97,.15); }
.login-wrapper .gac-form-control::placeholder { color: var(--light); }
.login-wrapper .btn-login { width: 100%; padding: 14px; background: var(--pink); color: #fff; font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 600; letter-spacing: .04em; border: none; border-radius: 10px; cursor: pointer; transition: background .2s, transform .1s; position: relative; }
.login-wrapper .btn-login::after { content: '→'; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); transition: right .2s; }
.login-wrapper .btn-login:hover { background: var(--pink-dark); } .login-wrapper .btn-login:hover::after { right: 14px; }
.login-wrapper .btn-login:active { transform: scale(.99); }
.login-wrapper .enter-hint { text-align: center; font-size: 11px; color: var(--light); margin-top: 14px; }
.login-wrapper kbd { background: #ece2d4; border: 1px solid #d6c8b6; border-radius: 4px; padding: 1px 5px; font-size: 10px; color: var(--mid); }
@media (max-width: 768px) { .login-wrapper .left-panel { display: none; } .login-wrapper .right-panel { width: 100%; padding: 40px 28px; } }

/* ---- Picker modal -------------------------------------------------------- */
.overlay { position: fixed; inset: 0; background: rgba(12,10,9,.35); display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; z-index: 100; }
.picker-card { width: 480px; max-width: 92vw; background: var(--color-bg); border-radius: var(--radius-card); box-shadow: var(--shadow-md); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.picker-head { display: flex; align-items: center; justify-content: space-between; font-weight: var(--fw-semibold); }
.picker-card .input { width: 100%; }
.picker-results { max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; }
.picker-row { text-align: left; background: none; border: none; border-bottom: 1px solid var(--color-border-faint); padding: var(--space-2) var(--space-1); cursor: pointer; font-family: inherit; display: flex; flex-direction: column; gap: 2px; }
.picker-row:hover { background: var(--color-hover); }
.picker-empty { padding: var(--space-4); text-align: center; }

/* ---- States: spinner, empty, toast, banner ------------------------------ */
.center-row { display: flex; justify-content: center; margin-top: var(--space-4); }
.spinner { display: flex; align-items: center; gap: var(--space-2); color: var(--color-label); padding: var(--space-8); justify-content: center; }
.spinner-dot { width: 14px; height: 14px; border: 2px solid var(--color-border); border-top-color: var(--color-accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); padding: 64px var(--space-4); text-align: center; }
.empty-icon { width: 32px; height: 32px; color: var(--color-muted); }
.empty-title { font-weight: var(--fw-semibold); }
.empty-sub { color: var(--color-label); font-size: var(--fs-sm); max-width: 360px; }

.banner { padding: var(--space-3) var(--space-4); border-radius: var(--radius-input); font-size: var(--fs-base); }
.banner--info { background: var(--banner-bg); border: 1px solid var(--banner-border); color: var(--banner-text); }
.banner--error { background: var(--pill-red-bg); border: 1px solid #fca5a5; color: var(--pill-red-text); }

.toast-host { position: fixed; bottom: var(--space-4); right: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); z-index: 200; }
.toast { display: flex; align-items: center; gap: var(--space-3); background: var(--color-text); color: #fff; padding: var(--space-2) var(--space-3); border-radius: var(--radius-input); box-shadow: var(--shadow-md); font-size: var(--fs-sm); max-width: 360px; }
.toast .icon-ghost { color: rgba(255,255,255,.7); }
.toast .icon-ghost:hover { color: #fff; background: rgba(255,255,255,.15); }
.toast--error { background: #7f1d1d; }
.toast--success { background: var(--color-golive-live); }

/* ---- Load-sheet batch detail + campaigns --------------------------------- */
.batch-card { width: 640px; max-width: 94vw; }
.batch-detail { max-height: 70vh; overflow-y: auto; }
.batch-section-title { font-weight: var(--fw-semibold); font-size: var(--fs-sm); color: var(--color-label); margin: var(--space-3) 0 var(--space-2); }
.table--inset th:first-child, .table--inset td:first-child { padding-left: var(--space-2); }
.table--inset { margin: 0; width: 100%; }

.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-4); }
.stat-card { border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: var(--space-4); }
.stat-label { font-size: var(--fs-sm); color: var(--color-label); }
.stat-value { font-size: var(--fs-2xl); font-weight: var(--fw-semibold); }
.campaign-kind { display: inline-flex; gap: var(--space-2); align-items: center; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: var(--space-5) 0 var(--space-3); }
.section-head h2 { font-family: var(--font-serif); font-size: var(--fs-lg); font-weight: 400; color: var(--gac-choc); margin: 0; }

/* Pre-order zone + auto-add callout on the catalog */
.zone { border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: var(--space-4); margin-bottom: var(--space-4); }
.zone--preorder { border-color: var(--pill-blue-text); }
.zone--lto { border-color: var(--pill-violet-text); }
.zone-title { font-weight: var(--fw-semibold); display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); }
.zone-sub { font-size: var(--fs-sm); color: var(--color-label); margin-bottom: var(--space-3); }
.autoadd-callout { background: var(--grad-ai-tint); border: 1px solid var(--color-border); border-radius: var(--radius-card); padding: var(--space-3) var(--space-4); margin-bottom: var(--space-4); font-size: var(--fs-sm); }
.autoadd-callout .zone-title { color: var(--color-ai); }

.family-total td { background: var(--color-surface-alt); }

/* ---- Messaging (MSG-1) two-pane ------------------------------------------ */
.msg-layout { display: grid; grid-template-columns: 300px 1fr; gap: 0; border: 1px solid var(--color-border); border-radius: var(--radius-card); overflow: hidden; height: calc(100vh - 160px); }
.msg-list { border-right: 1px solid var(--color-border); overflow-y: auto; display: flex; flex-direction: column; }
.msg-list-head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-3); font-weight: var(--fw-semibold); border-bottom: 1px solid var(--color-border-faint); }
.msg-twoway { padding: var(--space-2) var(--space-3); font-size: var(--fs-sm); border-bottom: 1px solid var(--color-border-faint); }
.msg-thread { text-align: left; background: none; border: none; border-bottom: 1px solid var(--color-border-faint); padding: var(--space-3); cursor: pointer; font-family: inherit; }
.msg-thread:hover { background: var(--color-hover); }
.msg-thread--active { background: var(--color-surface-alt); }
.msg-thread-top { display: flex; align-items: center; justify-content: space-between; }
.msg-thread-name { font-weight: var(--fw-medium); font-size: var(--fs-base); }
.msg-thread-sub { font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-pane { display: flex; flex-direction: column; min-width: 0; }
.msg-pane-head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--color-border-faint); }
.msg-log { flex: 1; overflow-y: auto; padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.msg-bubble-row { display: flex; }
.msg-bubble-row.mine { justify-content: flex-end; }
.msg-bubble { max-width: 70%; padding: var(--space-2) var(--space-3); border-radius: var(--radius-card); background: var(--color-surface-alt); font-size: var(--fs-base); }
.msg-bubble-row.mine .msg-bubble { background: var(--pill-blue-bg); }
.msg-meta { font-size: var(--fs-xs); color: var(--color-label); margin-bottom: 2px; }
.msg-compose { display: flex; gap: var(--space-2); padding: var(--space-3); border-top: 1px solid var(--color-border-faint); align-items: flex-end; }
.msg-compose textarea { flex: 1; }
@media (max-width: 760px) { .msg-layout { grid-template-columns: 1fr; height: auto; } }

/* ---- Announcements feed (home) ------------------------------------------- */
.home-feed { margin-top: var(--space-6); }
.ann-card { border: 1px solid #ecdfce; background: #fff; border-radius: var(--radius-card); padding: var(--space-4); margin-bottom: var(--space-3); }
.ann-head { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); }
.ann-title { font-weight: var(--fw-semibold); }
.ann-date { margin-left: auto; font-size: var(--fs-sm); }
.ann-body { font-size: var(--fs-base); color: var(--color-text); white-space: pre-wrap; }
textarea.input { min-height: 80px; }

/* ---- Campaign authoring form --------------------------------------------- */
.form-body { display: flex; flex-direction: column; gap: var(--space-3); padding-top: var(--space-2); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.form-field { display: flex; flex-direction: column; gap: 4px; }
.form-field .input { width: 100%; }
.form-label { font-size: var(--fs-sm); color: var(--color-label); }
.form-check { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-base); }
.items-wrap { display: flex; flex-direction: column; gap: var(--space-2); }
.item-row { display: flex; gap: var(--space-2); align-items: center; }
.item-row .input:first-child { flex: 1; }
.route-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px var(--space-3); max-height: 180px; overflow-y: auto; border: 1px solid var(--color-border); border-radius: var(--radius-input); padding: var(--space-2); }
.route-check { font-size: var(--fs-sm); }
.form-foot { display: flex; gap: var(--space-2); justify-content: flex-end; padding-top: var(--space-3); border-top: 1px solid var(--color-border); margin-top: var(--space-3); }
.form-errors { background: var(--pill-red-bg); border: 1px solid #fca5a5; color: var(--pill-red-text); border-radius: var(--radius-input); padding: var(--space-2) var(--space-3); margin-bottom: var(--space-2); font-size: var(--fs-sm); }
.form-errors > div { margin: 2px 0; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }

/* Slim custom scrollbars app-wide */
* { scrollbar-width: thin; scrollbar-color: var(--color-border) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
