:root {
  --ink: #14221c;
  --leaf: #1b4332;
  --leaf-2: #24543f;
  --gold: #c4a35a;
  --gold-2: #e8d5a3;
  --cream: #fbf8f3;
  --paper: #f3eee6;
  --clay: #e7d7c1;
  --line: rgba(20, 34, 28, 0.1);
  --muted: #6f675e;
  --white: #fffdf9;
  --hot: #8c3a3a;
  --ok: #1f6b45;
  --warn: #9a6b12;
  --shadow: 0 18px 50px rgba(20, 34, 28, 0.08);
  --shadow-sm: 0 8px 24px rgba(20, 34, 28, 0.06);
  --radius: 18px;
  --sidebar: 272px;
  --font: "Outfit", sans-serif;
  --display: "Fraunces", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  min-height: 100vh;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

.mark {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-name {
  font-family: var(--display);
  font-weight: 560;
  letter-spacing: 0.14em;
  font-size: 15px;
}
.brand-name span { color: var(--gold-2); }
.brand-sub {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(251, 248, 243, 0.62);
  font-family: var(--font);
}

/* Auth */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(300px, 1.08fr) minmax(340px, 0.92fr);
}
.auth-brand {
  position: relative;
  overflow: hidden;
  color: var(--cream);
  background:
    radial-gradient(circle at 18% 20%, rgba(196, 163, 90, 0.22), transparent 28%),
    radial-gradient(circle at 80% 80%, rgba(232, 213, 163, 0.12), transparent 32%),
    linear-gradient(165deg, #102019 0%, var(--leaf) 52%, #0e1a15 100%);
  padding: 36px 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-brand::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(196, 163, 90, 0.28);
  border-radius: 50%;
  right: -120px;
  bottom: -140px;
  animation: ring 14s linear infinite;
}
.steam {
  position: absolute;
  left: 12%;
  bottom: 22%;
  width: 8px;
  height: 90px;
  border-radius: 99px;
  background: linear-gradient(transparent, rgba(232, 213, 163, 0.7), transparent);
  filter: blur(0.4px);
  animation: steam 3.4s ease-in-out infinite;
}
.steam.s2 { left: 18%; height: 120px; animation-delay: .6s; }
.steam.s3 { left: 24%; height: 70px; animation-delay: 1.1s; }
.auth-copy h1 {
  font-family: var(--display);
  font-weight: 520;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 0.95;
  margin: 28px 0 16px;
  max-width: 10ch;
}
.auth-copy p {
  max-width: 36ch;
  color: rgba(251, 248, 243, 0.78);
  font-size: 16px;
  line-height: 1.6;
}
.auth-foot {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(251, 248, 243, 0.55);
}
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(196, 163, 90, 0.16), transparent 28%),
    var(--cream);
}
.panel-card {
  width: min(440px, 100%);
  animation: rise 0.6s ease both;
}
.kicker {
  color: var(--warn);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 650;
  margin-bottom: 8px;
}
.panel-card h2 {
  font-family: var(--display);
  font-weight: 560;
  font-size: 36px;
  margin: 0 0 8px;
}
.lede { color: var(--muted); margin: 0 0 28px; line-height: 1.55; }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 13px; font-weight: 600; }
.field label.req::after { content: " *"; color: #8c3a3a; }
.field input[readonly] { background: #eef1f4; color: #6f675e; }
.radios { display: flex; gap: 18px; align-items: center; min-height: 38px; }
.radios label { font-weight: 500; display: flex; gap: 6px; align-items: center; }
.form-actions.start { justify-content: flex-start; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 10px;
  padding: 0 12px;
  height: 38px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { height: 72px; min-height: 72px; padding: 8px 12px; resize: vertical; }
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 48px; }
.pass-peek {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 28px;
  border: 0;
  border-radius: 9px;
  background: #14221c;
  color: #e8d5a3;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.pass-peek svg { width: 18px; height: 18px; display: block; }
.pass-peek .peek-steam { opacity: 0; transform: translateY(3px); transition: .2s ease; }
.pass-peek .peek-lid { stroke: #fbf8f3; }
.pass-peek.is-shown { background: #c4a35a; color: #14221c; }
.pass-peek.is-shown .peek-lid { stroke: #14221c; }
.pass-peek.is-shown .peek-steam { opacity: 1; transform: none; animation: steam 1.6s ease-in-out infinite; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: #b68b3d;
  box-shadow: 0 0 0 4px rgba(196, 163, 90, 0.18);
}
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.link {
  color: var(--leaf);
  font-weight: 650;
  text-decoration: none;
  font-size: 13px;
}
.link:hover { text-decoration: underline; }
.btn {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 13px 18px;
  font-weight: 650;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--ink);
  color: var(--cream);
  box-shadow: 0 10px 24px rgba(20, 34, 28, 0.18);
}
.btn-gold {
  background: linear-gradient(180deg, #e8d5a3, var(--gold));
  color: var(--ink);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-wide { width: 100%; }
.note-ok {
  display: none;
  background: #eef6f0;
  border: 1px solid rgba(31, 107, 69, 0.18);
  color: var(--ok);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.note-ok.show { display: block; animation: rise .4s ease; }
.preview-pill {
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
}

/* Branch */
.desk-page {
  background:
    radial-gradient(circle at 12% 18%, rgba(232, 213, 163, 0.16), transparent 28%),
    radial-gradient(circle at 88% 82%, rgba(196, 163, 90, 0.12), transparent 26%),
    linear-gradient(160deg, #101c17 0%, #1b4332 52%, #0c1713 100%);
}
.branch-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 20px;
}
.desk-board {
  position: relative;
  width: min(980px, 100%);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  background: rgba(251, 248, 243, 0.96);
  border-radius: 32px;
  padding: 36px 36px 28px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}
.desk-board::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(196, 163, 90, 0.42);
  border-radius: 22px;
  pointer-events: none;
}
.desk-lock { color: var(--ink); margin-bottom: 28px; position: relative; z-index: 1; }
.desk-lock .brand-name span { color: #9a6b12; }
.desk-lock .brand-sub { color: var(--muted); }
.desk-board .gold-rule {
  width: 48px;
  height: 2px;
  margin: 0 0 14px;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.branch-head { position: relative; z-index: 1; margin-bottom: 22px; flex: 0 0 auto; }
.branch-head h1 {
  font-family: var(--display);
  font-weight: 560;
  font-size: clamp(34px, 4vw, 48px);
  margin: 0 0 8px;
  max-width: 14ch;
}
.branch-head .lede { margin-bottom: 0; max-width: 42ch; }
.branch-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #c4a35a transparent;
}
.branch-grid::-webkit-scrollbar { width: 8px; }
.branch-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #e8d5a3, #c4a35a);
  border-radius: 99px;
}
.shop-card {
  text-align: left;
  background: var(--white);
  border: 1px solid rgba(196, 163, 90, 0.22);
  border-radius: 18px;
  padding: 20px 18px 16px;
  cursor: pointer;
  transition: transform .2s, background .2s, color .2s, box-shadow .2s;
  animation: rise .55s ease both;
}
.shop-card:nth-child(2) { animation-delay: .08s; }
.shop-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.shop-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.shop-seal {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--warn);
  border: 1px solid rgba(196, 163, 90, 0.45);
  border-radius: 999px;
  padding: 4px 8px;
}
.shop-state {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-2);
  opacity: 0;
}
.shop-card.is-on {
  background: linear-gradient(165deg, #163028, #1b4332 70%);
  color: var(--cream);
  border-color: var(--gold-2);
  box-shadow: 0 16px 36px rgba(16, 28, 23, 0.28);
}
.shop-card.is-on .shop-state { opacity: 1; }
.shop-card.is-on .shop-seal { color: var(--gold-2); border-color: rgba(232, 213, 163, 0.5); }
.shop-card h3 { margin: 14px 0 6px; font-family: var(--display); font-size: 28px; font-weight: 560; }
.shop-meta { color: var(--muted); font-size: 14px; line-height: 1.5; }
.shop-card.is-on .shop-meta,
.shop-card.is-on .shop-stats span { color: rgba(251, 248, 243, 0.68); }
.shop-stats {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(196, 163, 90, 0.22);
}
.shop-card.is-on .shop-stats { border-top-color: rgba(232, 213, 163, 0.22); }
.shop-stats strong { display: block; font-size: 20px; }
.shop-stats span { font-size: 12px; color: var(--muted); }
.branch-actions {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.branch-actions p { margin: 0; color: var(--muted); font-size: 13px; }
.desk-board .shine { position: relative; overflow: hidden; }
.desk-board .shine::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.22), transparent 70%);
  transform: translateX(-120%);
  animation: sheen 3.4s ease-in-out infinite;
}

/* App shell */
.app { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) 1fr; }
.sidebar {
  background:
    radial-gradient(circle at 20% 0%, rgba(196, 163, 90, 0.16), transparent 32%),
    linear-gradient(180deg, #122019, #0e1914 40%, #16281f);
  color: var(--cream);
  padding: 22px 16px 18px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #c4a35a transparent;
}
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-track {
  background: transparent;
  margin: 18px 0;
}
.sidebar::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #e8d5a3, #c4a35a);
  border-radius: 99px;
  border: 2px solid #122019;
}
.sidebar .brand-name { color: var(--cream); letter-spacing: 0.16em; font-size: 13px; }
.nav { margin-top: 22px; display: grid; gap: 4px; align-content: start; }
.nav-group {
  width: 100%;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: transparent;
  border: 0;
  color: rgba(251, 248, 243, 0.55);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 650;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
}
.nav-group .chev { transition: transform .2s ease; }
.g-mark { display: none; }
.g-mark svg { width: 18px; height: 18px; display: block; }
.nav-group.is-open { color: var(--gold-2); background: rgba(255, 255, 255, 0.04); }
.nav-group.is-open .chev { transform: rotate(180deg); }
.nav-sub { display: none; padding: 2px 0 6px 8px; }
.nav-sub.is-open { display: grid; gap: 2px; }
.nav-link {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: rgba(251, 248, 243, 0.82);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  position: relative;
}
.nav-link.sub { padding: 8px 12px; font-size: 14px; }
.nav-link svg { width: 18px; height: 18px; flex: 0 0 auto; opacity: 0.8; }
.nav-link:hover { background: rgba(255, 255, 255, 0.05); }
a.nav-link { text-decoration: none; }
button.linkish {
  background: none;
  border: 0;
  padding: 0;
  color: var(--leaf);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-align: left;
}
button.linkish:hover { text-decoration: underline; }
.req-expand td { background: #f6f3ec; padding: 6px 12px 14px; }
.portal { margin-top: auto; padding: 12px 4px 0; }
.portal-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--cream);
  background: rgba(196, 163, 90, 0.14);
  border: 1px solid rgba(232, 213, 163, 0.28);
  border-radius: 14px;
  padding: 10px 12px;
}
.portal-link:hover { background: rgba(196, 163, 90, 0.24); }
.portal-link svg { width: 18px; height: 18px; flex: 0 0 auto; }
.portal-link span { display: grid; line-height: 1.15; }
.portal-link strong { font-size: 13px; letter-spacing: 0.08em; }
.portal-link small { color: rgba(251, 248, 243, 0.62); font-size: 11px; }
.nav-link.is-active {
  background: rgba(196, 163, 90, 0.16);
  color: var(--gold-2);
}
.nav-link.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 99px;
  background: var(--gold);
}
.side-foot {
  padding: 10px 12px 4px;
  font-size: 12px;
  color: rgba(251, 248, 243, 0.45);
}
.rail-tip {
  position: fixed;
  z-index: 40;
  transform: translateY(-50%);
  padding: 7px 10px;
  border-radius: 10px;
  background: #14221c;
  color: var(--gold-2);
  border: 1px solid rgba(232, 213, 163, 0.4);
  box-shadow: 0 12px 28px rgba(16, 28, 23, 0.28);
  font-size: 12px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
}
.rail-tip.is-on { opacity: 1; }
.rail-fly {
  position: fixed;
  z-index: 40;
  min-width: 220px;
  padding: 12px 12px 12px 18px;
  border-radius: 16px;
  background: #14221c;
  color: var(--cream);
  border: 1px solid rgba(232, 213, 163, 0.38);
  box-shadow: 0 18px 40px rgba(8, 14, 12, 0.4);
}
.rail-fly p {
  margin: 2px 8px 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-2);
}
.rail-fly button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--cream);
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  text-align: left;
}
.rail-fly button svg { width: 16px; height: 16px; flex: 0 0 auto; }
.rail-fly button:hover,
.rail-fly button.is-active { background: rgba(196, 163, 90, 0.18); color: var(--gold-2); }
.rail-fly::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 0;
  bottom: 0;
  width: 20px;
}
@media (min-width: 981px) {
  .app.is-collapsed { --sidebar: 88px; }
  .app.is-collapsed .sidebar {
    padding: 18px 0 14px;
    overflow-x: hidden;
    align-items: center;
  }
  .app.is-collapsed .brand {
    justify-content: center;
    width: 46px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(232, 213, 163, 0.22);
  }
  .app.is-collapsed .brand div,
  .app.is-collapsed .side-foot,
  .app.is-collapsed .portal-link span,
  .app.is-collapsed .nav-link span,
  .app.is-collapsed .nav-group span,
  .app.is-collapsed .nav-group .chev,
  .app.is-collapsed .nav-sub { display: none; }
  .app.is-collapsed .g-mark {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    margin: 0 auto;
  }
  .app.is-collapsed .nav,
  .app.is-collapsed .portal {
    width: 100%;
    margin: 16px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
  }
  .app.is-collapsed .nav > .nav-link,
  .app.is-collapsed .nav > .nav-group,
  .app.is-collapsed .portal > .portal-link {
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .app.is-collapsed .nav-sub { display: none !important; }
  .app.is-collapsed .nav-group {
    display: grid !important;
    place-items: center;
    justify-content: center;
    align-self: center !important;
    width: 44px !important;
    height: 44px;
    margin: 0 auto !important;
    padding: 0 !important;
    border-radius: 14px;
    color: var(--gold-2);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(232, 213, 163, 0.28);
    position: relative;
    overflow: hidden;
  }
  .app.is-collapsed .nav-group::before { content: none; }
  .app.is-collapsed .nav-group:hover,
  .app.is-collapsed .nav-group.is-open {
    background: rgba(196, 163, 90, 0.2);
    border-color: rgba(232, 213, 163, 0.5);
  }
  .app.is-collapsed .nav-link,
  .app.is-collapsed .nav-link.sub {
    width: 44px;
    height: 44px;
    align-self: center;
    margin: 0 auto;
    padding: 0;
    display: grid;
    place-items: center;
    gap: 0;
    border-radius: 14px;
    border: 1px solid rgba(232, 213, 163, 0.28);
    background: rgba(255, 255, 255, 0.04);
    color: var(--gold-2);
    overflow: hidden;
  }
  .app.is-collapsed .nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(232, 213, 163, 0.2);
  }
  .app.is-collapsed .nav-link.is-active {
    background: rgba(196, 163, 90, 0.22);
    box-shadow: inset 0 0 0 1px rgba(232, 213, 163, 0.5);
  }
  .app.is-collapsed .nav-link.is-active::before { display: none; }
  .app.is-collapsed .nav-link svg { opacity: 1; }
  .app.is-collapsed .portal { padding: 12px 0 0; }
  .app.is-collapsed .portal-link {
    display: grid;
    place-items: center;
    align-self: center;
    padding: 0;
    width: 44px;
    height: 44px;
    margin: 0 auto;
    border-radius: 14px;
  }
}
.main { min-width: 0; }
.topbar {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 248, 243, 0.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 5;
}
.top-left, .top-right { display: flex; align-items: center; gap: 10px; }
.icon-btn, .menu-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.menu-btn { display: none; }
.branch-chip, .user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px 7px 8px;
  font-size: 13px;
  text-decoration: none;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3d8f62;
  box-shadow: 0 0 0 4px rgba(61, 143, 98, 0.15);
}
.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--leaf);
  color: var(--gold-2);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}
.user-menu { position: relative; }
.user-chip { cursor: pointer; border: 1px solid var(--line); }
.user-drop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 190px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 12;
}
.user-drop[hidden] { display: none; }
.user-drop button,
.user-drop a {
  width: 100%;
  display: block;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
}
.user-drop button:hover,
.user-drop a:hover { background: var(--paper); }
.view { padding: 28px; animation: rise .45s ease; }
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
}
.crumbs { font-size: 12px; color: var(--muted); letter-spacing: 0.04em; margin-bottom: 6px; }
.page-head h1 {
  font-family: var(--display);
  font-weight: 560;
  font-size: clamp(30px, 4vw, 42px);
  margin: 0;
  line-height: 1;
}
.page-head p { margin: 8px 0 0; color: var(--muted); }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.search-box {
  position: relative;
  width: 50%;
  min-width: 220px;
}
.search-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  stroke: var(--warn);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  pointer-events: none;
}
.search {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 16px 11px 38px;
  outline: none;
}
.search:focus { border-color: #b68b3d; box-shadow: 0 0 0 4px rgba(196, 163, 90, 0.16); }
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(20, 34, 28, 0.04);
}
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; min-width: 720px; }
table.data th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-weight: 650;
}
table.data td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  vertical-align: middle;
}
table.data tr:last-child td { border-bottom: 0; }
table.data th:last-child,
table.data td:last-child {
  position: sticky;
  right: 0;
  background: var(--white);
  box-shadow: -10px 0 14px rgba(251, 248, 243, 0.92);
}
table.data tbody tr:hover td:last-child { background: #fbf6ec; }
table.data tbody tr { transition: background .15s; }
table.data tbody tr:hover { background: #fbf6ec; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 650;
  background: var(--paper);
  color: var(--ink);
}
.pill-ok { background: #e7f4ec; color: var(--ok); }
.pill-warn { background: #f8efd8; color: var(--warn); }
.pill-hot { background: #f8e6e4; color: var(--hot); }
.pill-gold { background: #f3ead3; color: #7a5a1e; }
.pill-muted { background: #eeeae4; color: #665f57; }
.row-actions { display: flex; gap: 6px; }
.tiny {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.tiny:hover { border-color: var(--gold); }
.form-card { padding: 18px 18px 16px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.form-section {
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.field.full { grid-column: 1 / -1; }
.icon-act {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
}
.icon-act svg { width: 15px; height: 15px; }
.icon-act:hover { border-color: var(--gold); }
.icon-act.danger:hover { border-color: var(--hot); color: var(--hot); }
.chk { width: 36px; }
.slot-box { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.slot-head, .slot-row, .slot-labels {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.7fr 36px;
  gap: 8px;
  align-items: center;
}
.slot-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.slot-head p, .slot-labels { color: var(--muted); font-size: 12px; margin: 2px 0 0; }
.slot-labels { margin: 0 0 6px; letter-spacing: 0.08em; text-transform: uppercase; }
.slot-row { margin-bottom: 8px; }
.slot-row input, .slot-row select,
.part-row input, .part-row select { height: 38px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: var(--white); }
.part-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr 36px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.slot-title { margin: 18px 0 8px; font-size: 16px; }
.slot-table { min-width: 0; }
.plan-board, .kitchen-board { padding: 16px; }
.plan-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(196, 163, 90, 0.28);
}
.plan-meta strong {
  font-family: var(--display);
  letter-spacing: 0.08em;
  color: var(--leaf);
}
.plan-meta span { color: var(--muted); font-size: 13px; }
.plan-wrap { max-height: 62vh; }
.plan-grid th, .plan-grid td { white-space: nowrap; font-size: 12px; padding: 8px 6px; text-align: center; }
.plan-grid th:nth-child(-n+4),
.plan-grid td:nth-child(-n+4) { text-align: left; position: sticky; left: 0; background: var(--white); z-index: 1; }
.plan-grid thead th { background: #163028; color: var(--gold-2); }
.plan-grid td.is-zero { color: #b7aea3; }
.plan-note { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.kitchen-matrix thead th { background: #1b4332; color: var(--cream); }
.kitchen-matrix .total-row td { background: #f3eee6; }
table.data.kitchen-matrix thead th:last-child { background: #1b4332; color: var(--cream); box-shadow: none; }
table.data.daily-table thead th:last-child,
table.data.plan-grid thead th:last-child { background: #163028; color: var(--gold-2); box-shadow: none; }
table.data.kitchen-matrix .total-row td:last-child { background: #f3eee6; }
.plan-pick { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.plan-pick select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  background: var(--white);
  font: inherit;
}
.chip {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(196, 163, 90, 0.14);
  color: var(--leaf);
  font-size: 12px;
  font-weight: 600;
}
.daily-bar {
  padding: 18px 20px;
  margin-bottom: 14px;
  background:
    linear-gradient(135deg, rgba(232, 213, 163, 0.22), transparent 42%),
    var(--white);
}
.daily-bar-main {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(196, 163, 90, 0.22);
}
.daily-date-block em {
  display: block;
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.daily-date-block strong {
  display: block;
  font-family: var(--display);
  font-size: 34px;
  line-height: 1;
  color: var(--leaf);
}
.daily-date-block span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}
.daily-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.plan-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
}
.plan-field span {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}
.plan-field select {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: #fffdf8;
  font: inherit;
  color: var(--ink);
}
.daily-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.daily-kpis article {
  border: 1px solid rgba(196, 163, 90, 0.2);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 253, 248, 0.9);
}
.daily-kpis em {
  display: block;
  font-style: normal;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.daily-kpis strong {
  font-family: var(--display);
  font-size: 26px;
  color: var(--ink);
}
.daily-board { padding: 16px 18px 8px; }
.daily-table thead th {
  background: #163028;
  color: var(--gold-2);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.daily-table td { vertical-align: middle; }
.daily-table td.num { font-variant-numeric: tabular-nums; font-weight: 650; }
.daily-table tr.time-group td {
  background: #f3eee6;
  color: var(--leaf);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding-top: 10px;
  padding-bottom: 10px;
}
.size-tag {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(27, 67, 50, 0.08);
  color: var(--leaf);
  font-size: 12px;
  font-weight: 650;
}
@media (max-width: 900px) {
  .daily-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .daily-date-block strong { font-size: 28px; }
}
.slot-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.kitchen-matrix thead th, .delivery-table thead th { white-space: nowrap; }
.delivery-table .dm-man-cell { min-width: 176px; padding: 8px 10px; }
.delivery-table .dm-man-pick {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  min-width: 158px;
  height: 38px;
  padding: 0 34px 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(196, 163, 90, 0.28);
  background-color: #fffdf8;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--leaf) 50%),
    linear-gradient(135deg, var(--leaf) 50%, transparent 50%);
  background-position:
    calc(100% - 16px) calc(50% - 2px),
    calc(100% - 10px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  font: inherit;
  font-size: 13px;
  font-weight: 550;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.delivery-table .dm-man-pick:hover {
  border-color: rgba(196, 163, 90, 0.55);
  background-color: var(--white);
}
.delivery-table .dm-man-pick:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(196, 163, 90, 0.18);
  background-color: var(--white);
}
.matrix-group td { background: #f6f1e7; font-weight: 700; }
.matrix-child td:first-child { padding-left: 28px; color: #3f4a44; }
.invoice {
  max-width: 760px;
  background: var(--white);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.invoice header, .inv-brand, .inv-to, .invoice footer { display: flex; justify-content: space-between; gap: 16px; }
.inv-brand { align-items: center; }
.inv-brand img { width: 48px; height: 48px; }
.inv-brand strong { font-family: var(--display); letter-spacing: 0.12em; display: block; }
.inv-brand span, .inv-meta span, .inv-to p { color: var(--muted); font-size: 13px; line-height: 1.5; }
.inv-meta { text-align: right; }
.inv-meta em { display: block; font-style: normal; letter-spacing: 0.16em; font-size: 12px; color: var(--warn); }
.inv-meta b { display: block; font-size: 20px; margin: 4px 0; }
.inv-to { margin: 22px 0; }
.invoice table { width: 100%; border-collapse: collapse; }
.invoice th, .invoice td { text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); }
.invoice th:last-child, .invoice td:last-child { text-align: right; }
.inv-total strong { display: block; font-family: var(--display); font-size: 32px; }
.kitchen-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.detail-layout { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 16px; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 10px 16px; padding: 8px 4px; }
.kv dt { color: var(--muted); font-size: 13px; }
.kv dd { margin: 0; font-weight: 600; }
.side-card { padding: 18px; }
.side-card h3 { margin: 0 0 8px; font-family: var(--display); font-weight: 560; }
.side-card p { color: var(--muted); font-size: 14px; line-height: 1.5; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { padding: 18px; position: relative; overflow: hidden; }
.kpi em { font-style: normal; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.kpi strong {
  display: block;
  margin-top: 8px;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 560;
}
.kpi span { color: var(--muted); font-size: 13px; }
.kpi::after {
  content: "";
  position: absolute;
  right: -20px;
  top: -20px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 1px solid rgba(196, 163, 90, 0.45);
}
.split { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 16px; }
.pad { padding: 18px 18px 8px; }
.pad h2 { margin: 0 0 12px; font-size: 18px; font-family: var(--display); font-weight: 560; }
.note-item {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.note-item strong { display: block; margin-bottom: 4px; }
.note-item span { display: block; color: var(--muted); font-size: 13px; line-height: 1.45; }
.matrix { width: 100%; border-collapse: collapse; min-width: 640px; }
.matrix th, .matrix td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: center; font-size: 13px; }
.matrix th:first-child, .matrix td:first-child { text-align: left; }
.matrix input { width: 16px; height: 16px; accent-color: var(--leaf); }
.empty { padding: 36px; text-align: center; color: var(--muted); }

/* Premium busy / loader — login-style tea cup (no ring, no tech copy) */
.pt-busy {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 28% 18%, rgba(196, 163, 90, 0.18), transparent 34%),
    radial-gradient(circle at 72% 82%, rgba(232, 213, 163, 0.1), transparent 38%),
    rgba(14, 26, 21, 0.52);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
}
.pt-busy.is-on {
  opacity: 1;
  pointer-events: auto;
}
.pt-busy-card {
  width: min(300px, 100%);
  text-align: center;
  padding: 28px 26px 26px;
  border-radius: 24px;
  color: var(--cream);
  background: linear-gradient(165deg, rgba(27, 67, 50, 0.97) 0%, #102019 100%);
  border: 1px solid rgba(232, 213, 163, 0.22);
  box-shadow: 0 28px 60px rgba(8, 16, 12, 0.45);
}
.pt-busy-cup {
  position: relative;
  width: 132px;
  margin: 0 auto 10px;
}
.pt-busy-cup .cup-art {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.28));
  animation: pt-cup-float 2.6s ease-in-out infinite;
}
.pt-busy-cup .cup-body { fill: #fbf8f3; }
.pt-busy-cup .cup-shadow { fill: rgba(196, 163, 90, 0.2); }
.pt-busy-cup .cup-rim,
.pt-busy-cup .cup-line,
.pt-busy-cup .cup-handle,
.pt-busy-cup .cup-saucer {
  fill: none;
  stroke: #e8d5a3;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pt-busy-cup .cup-dot { fill: #c4a35a; }
.pt-busy-cup .vapor {
  position: absolute;
  left: 38%;
  bottom: 58%;
  width: 3px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(232, 213, 163, 0), rgba(232, 213, 163, 0.75), rgba(232, 213, 163, 0));
  animation: pt-cup-vapor 2.8s ease-in-out infinite;
  pointer-events: none;
}
.pt-busy-cup .vapor.v2 { left: 48%; height: 52px; animation-delay: .45s; }
.pt-busy-cup .vapor.v3 { left: 58%; height: 36px; animation-delay: .9s; }
.pt-busy-kicker {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(232, 213, 163, 0.72);
  margin-bottom: 4px;
}
.pt-busy-title {
  font-family: var(--display);
  font-weight: 560;
  font-size: 22px;
  color: var(--gold-2);
  margin: 0 0 4px;
}
.pt-busy-msg {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(251, 248, 243, 0.72);
}
.pt-panel-load {
  min-height: 420px;
  display: grid;
  place-items: center;
  padding: 48px 24px;
}
.pt-panel-load .pt-busy-card {
  background: linear-gradient(165deg, #163028 0%, #102019 100%);
  box-shadow: var(--shadow);
}

@keyframes pt-cup-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes pt-cup-vapor {
  0%, 100% { transform: translateY(8px) scaleY(0.85); opacity: 0.15; }
  50% { transform: translateY(-10px) scaleY(1.05); opacity: 0.9; }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(16px);
  background: var(--ink);
  color: var(--cream);
  padding: 12px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: .25s ease;
  z-index: 30;
  font-size: 14px;
}
.toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }
.confirm {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(14, 25, 20, 0.46);
  animation: rise .2s ease;
}
.confirm-card {
  width: min(420px, 100%);
  background: var(--cream);
  border-radius: 20px;
  padding: 22px 22px 18px;
  box-shadow: var(--shadow);
}
.confirm-card h3 {
  margin: 0 0 18px;
  font-family: var(--display);
  font-weight: 560;
  font-size: 28px;
  line-height: 1.15;
}
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
.overlay { display: none; }
.avatar-sm, .avatar-lg, .photo-preview {
  object-fit: cover;
  border: 1px solid rgba(196, 163, 90, 0.45);
  background: var(--paper);
}
.avatar-sm { width: 36px; height: 36px; border-radius: 50%; display: block; }
.avatar-lg, .photo-preview { width: 76px; height: 76px; border-radius: 18px; }
.avatar-empty, .photo-empty {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--leaf);
  color: var(--gold-2);
  font-size: 13px;
}
.photo-empty { width: 76px; height: 76px; border-radius: 18px; font-size: 12px; letter-spacing: 0.04em; }
.photo-field { display: flex; align-items: center; gap: 14px; }
.photo-actions { display: flex; gap: 8px; align-items: center; }
.photo-pick input { display: none; }
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px 14px;
  border-top: 1px solid rgba(196, 163, 90, 0.18);
  color: var(--muted);
  font-size: 13px;
}
.pager-controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pager-controls label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 6px;
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.pager-controls select {
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(196, 163, 90, 0.4);
  background: var(--cream);
  padding: 0 8px;
  color: var(--ink);
}
.pager-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 10px;
  border: 1px solid rgba(20, 34, 28, 0.08);
  background: var(--white);
  cursor: pointer;
}
.pager-btn:hover { border-color: rgba(196, 163, 90, 0.55); }
.pager-btn.is-on {
  background: var(--leaf);
  color: var(--gold-2);
  border-color: var(--leaf);
}
.pager-btn:disabled { opacity: 0.4; cursor: default; }
.pager-gap { padding: 0 2px; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes steam {
  0%, 100% { opacity: .2; transform: translateY(8px) scaleY(0.8); }
  50% { opacity: .85; transform: translateY(-10px) scaleY(1); }
}
@keyframes ring {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 980px) {
  .kpis, .split, .detail-layout, .branch-grid { grid-template-columns: 1fr; }
  .desk-board { padding: 28px 18px 20px; }
  .branch-actions { flex-direction: column; align-items: stretch; }
  .app { grid-template-columns: 1fr; }
  .menu-btn { display: inline-flex; }
  .topbar { height: auto; min-height: 64px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
  .sidebar {
    position: fixed;
    z-index: 20;
    width: min(84vw, 300px);
    transform: translateX(-105%);
    transition: transform .25s ease;
  }
  .sidebar.is-open { transform: none; }
  .overlay.show {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(14, 25, 20, 0.46);
    z-index: 15;
  }
  .view, .topbar { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { min-height: 240px; padding: 24px; }
  .auth-copy h1 { font-size: 40px; margin-top: 18px; }
  .steam { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 10px; }
}
@media (max-width: 640px) {
  .topbar { height: auto; min-height: 64px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
  .top-right .btn { padding: 8px 10px; font-size: 13px; }
  .auth-foot { flex-direction: column; }
  .shop-stats { flex-wrap: wrap; }
  .kpis { gap: 10px; }
  .kpi strong { font-size: 28px; }
  .search-box { width: 100%; min-width: 0; }
  .toolbar { flex-wrap: wrap; }
  .pager { align-items: flex-start; }
}
.login-page .auth-brand {
  justify-content: space-between;
  align-items: stretch;
  padding: 44px 52px 28px;
  background:
    radial-gradient(circle at 78% 62%, rgba(196, 163, 90, 0.16), transparent 28%),
    linear-gradient(160deg, #101c17 0%, #1b4332 55%, #0c1713 100%);
}
.login-page .auth-brand::after,
.login-page .wash,
.login-page .motes,
.login-page .watermark,
.login-page .seal { display: none; }
.login-page .auth-brand::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(232, 213, 163, 0.38);
  border-radius: 28px;
  pointer-events: none;
  z-index: 2;
}
.login-page .wash {
  position: absolute;
  width: 420px;
  height: 420px;
  left: 18%;
  top: 8%;
  background: radial-gradient(circle, rgba(196, 163, 90, 0.28), transparent 62%);
  filter: blur(8px);
  animation: drift 9s ease-in-out infinite;
  pointer-events: none;
}
.login-page .watermark { display: none; }
.login-page .motes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.login-page .motes i {
  position: absolute;
  bottom: -10px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold-2);
  opacity: 0;
  animation: mote 7s linear infinite;
}
.login-page .motes i:nth-child(1) { left: 18%; animation-delay: 0s; }
.login-page .motes i:nth-child(2) { left: 32%; animation-delay: 1.4s; }
.login-page .motes i:nth-child(3) { left: 48%; animation-delay: 2.6s; }
.login-page .motes i:nth-child(4) { left: 61%; animation-delay: .8s; }
.login-page .motes i:nth-child(5) { left: 74%; animation-delay: 3.2s; }
.login-page .motes i:nth-child(6) { left: 86%; animation-delay: 2s; }
.login-page .stage {
  position: relative;
  z-index: 1;
  width: min(520px, 72%);
  margin: auto 0;
  display: grid;
  justify-items: start;
  text-align: left;
  gap: 22px;
}
.login-page .left-lock {
  display: flex;
  align-items: center;
  gap: 12px;
}
.login-page .left-lock img { width: 46px; height: 46px; border-radius: 14px; }
.login-page .left-lock > span {
  font-family: var(--display);
  letter-spacing: 0.18em;
  font-size: 18px;
}
.login-page .left-lock span span { color: var(--gold-2); }
.login-page .cup-stage {
  position: absolute;
  right: 6%;
  bottom: 14%;
  width: min(380px, 48%);
  z-index: 0;
}
.login-page .cup-art { width: 100%; height: auto; display: block; filter: drop-shadow(0 28px 36px rgba(0, 0, 0, 0.28)); }
.login-page .vapor {
  position: absolute;
  left: 34%;
  bottom: 62%;
  width: 10px;
  height: 72px;
  border-radius: 99px;
  background: linear-gradient(transparent, rgba(232, 213, 163, 0.95), transparent);
  animation: vapor 2.8s ease-in-out infinite;
}
.login-page .vapor.v2 { left: 46%; height: 96px; animation-delay: .45s; }
.login-page .vapor.v3 { left: 58%; height: 64px; animation-delay: .9s; }
.login-page .cup-body { fill: #fbf8f3; }
.login-page .cup-shadow { fill: rgba(196, 163, 90, 0.16); }
.login-page .cup-rim, .login-page .cup-line, .login-page .cup-handle, .login-page .cup-saucer {
  fill: none;
  stroke: #e8d5a3;
  stroke-width: 3.2;
  stroke-linecap: round;
}
.login-page .cup-dot { fill: #c4a35a; }
.login-page .seal {
  position: relative;
  width: 250px;
  height: 250px;
  display: grid;
  place-items: center;
}
.login-page .seal-mark {
  width: 148px;
  height: 148px;
  position: relative;
  z-index: 2;
  border-radius: 42px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35), 0 0 0 8px rgba(232, 213, 163, 0.08);
  animation: floaty 4.6s ease-in-out infinite;
}
.login-page .glow {
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 213, 163, 0.5), transparent 68%);
  filter: blur(8px);
  animation: pulse 3.2s ease-in-out infinite;
}
.login-page .orbit {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px solid rgba(232, 213, 163, 0.5);
  animation: ring 16s linear infinite;
}
.login-page .orbit.delay { inset: -16px; border-style: dashed; border-color: rgba(196, 163, 90, 0.35); animation-duration: 24s; animation-direction: reverse; }
.login-page .spark {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  animation: ring 16s linear infinite;
}
.login-page .spark::after {
  content: "";
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-2);
  box-shadow: 0 0 16px var(--gold-2);
}
.login-page .plume {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 8px;
  height: 70px;
  margin-left: -28px;
  border-radius: 99px;
  background: linear-gradient(transparent, rgba(232, 213, 163, 0.95), transparent);
  animation: steam 2.6s ease-in-out infinite;
  z-index: 3;
}
.login-page .plume.p2 { margin-left: -4px; height: 92px; animation-delay: .45s; }
.login-page .plume.p3 { margin-left: 18px; height: 60px; animation-delay: .9s; }
.login-page .gold-rule {
  width: 56px;
  height: 2px;
  margin: 0 0 16px;
  background: linear-gradient(90deg, var(--gold-2), transparent);
  animation: sheen 2.8s ease-in-out infinite;
}
.login-page .auth-copy { position: relative; z-index: 1; text-align: left; max-width: 440px; }
.login-page .auth-copy h1 { margin: 0 0 12px; max-width: 11ch; animation: rise .8s ease both; }
.login-page .auth-copy p { margin: 0; animation: rise 1s ease both; }
.login-page .auth-foot { position: relative; z-index: 1; width: 100%; }
.login-page .auth-panel { padding: 40px 48px; }
.login-page .login-card {
  position: relative;
  width: min(480px, 100%);
  background: rgba(255, 253, 249, 0.92);
  border: 1px solid rgba(196, 163, 90, 0.28);
  border-radius: 28px;
  padding: 40px 36px 36px;
  box-shadow: 0 30px 70px rgba(20, 34, 28, 0.08);
  overflow: hidden;
}
.login-page .login-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: sheen 3.6s ease-in-out infinite;
}
.login-page .lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-bottom: 22px;
}
.login-page .lockup img {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(20, 34, 28, 0.12);
}
.login-page .lockup > span {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 560;
  letter-spacing: 0.16em;
  color: var(--ink);
  line-height: 1;
}
.login-page .lockup > span span { color: #9a6b12; }
.login-page .login-card .field input { height: 46px; border-radius: 12px; }
.login-page .shine { position: relative; overflow: hidden; }
.login-page .shine::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  left: -50%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  animation: sweep 3.8s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes pulse {
  0%, 100% { opacity: .45; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes sheen {
  0%, 100% { opacity: .35; }
  50% { opacity: 1; }
}
@keyframes sweep {
  0% { left: -50%; }
  55%, 100% { left: 130%; }
}
@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(30px, 18px, 0) scale(1.08); }
}
@keyframes vapor {
  0% { opacity: 0; transform: translateY(16px) scaleX(0.7); }
  20% { opacity: .9; }
  100% { opacity: 0; transform: translateY(-78px) scaleX(1.25); }
}
@keyframes mote {
  0% { transform: translateY(0); opacity: 0; }
  15% { opacity: .8; }
  100% { transform: translateY(-88vh); opacity: 0; }
}
@media (max-width: 860px) {
  .login-page .seal { width: 170px; height: 170px; }
  .login-page .seal-mark { width: 100px; height: 100px; }
  .login-page .plume, .login-page .watermark, .login-page .motes, .login-page .cup-stage { display: none; }
  .login-page .stage { width: 100%; }
}
@media print {
  .sidebar, .topbar, .toast, .no-print, .overlay { display: none !important; }
  .app { display: block; }
  .view { padding: 0; }
  .invoice { box-shadow: none; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

.form-error {
  margin: 0 0 10px;
  color: var(--hot);
  font-size: 13px;
  font-weight: 550;
}
.field-hint {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.branch-chip:not([href^='branch']) {
  cursor: default;
}

.req-labels, .req-line {
  display: grid;
  grid-template-columns: 1.3fr 1.2fr 0.85fr 0.8fr 1fr 1.6fr 36px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.req-labels {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 6px;
}
.req-line input, .req-line select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 8px;
  background: var(--white);
  min-width: 0;
  font: inherit;
}
.req-box .slot-head { margin-bottom: 12px; }
.rq-rates { display: grid; grid-template-columns: 0.8fr 1fr 1fr; gap: 8px; min-width: 0; }
.rq-rates input, .rq-rates select { width: 100%; min-width: 0; }
.req-line .rq-price { display: none; }
.req-line.is-thermos .rq-cups,
.req-line.is-thermos .rq-cupsize,
.req-line.is-thermos .rq-cuprate { display: none; }
.req-line input.from-card { background: #f1f6f2; color: var(--leaf); font-weight: 650; cursor: not-allowed; }
.req-line.is-thermos .rq-price { display: block; grid-column: 1 / -1; }
.req-line .rq-bill { font-weight: 650; color: var(--leaf); background: #fbf6ec; }
.req-line input.is-invalid, .form-grid .is-invalid { border-color: var(--hot); background: #fdf3f2; }
@media (max-width: 980px) {
  .req-labels { display: none; }
  .req-line {
    grid-template-columns: 1fr 1fr;
  }
  .req-line .rq-rates { grid-column: 1 / -1; }
}

/* List filters and totals */
.toolbar-left { display: flex; gap: 10px; align-items: center; flex: 1; flex-wrap: wrap; min-width: 0; }
.toolbar-left .search-box { width: auto; flex: 1 1 260px; max-width: 420px; }
.list-filter { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.list-filter select {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: var(--white);
  font: inherit;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
}
.sum-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.sum-strip article {
  background: var(--white);
  border: 1px solid rgba(196, 163, 90, 0.2);
  border-radius: 14px;
  padding: 12px 16px;
}
.sum-strip em { display: block; font-style: normal; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.sum-strip strong { font-family: var(--display); font-size: 22px; font-weight: 560; }
.sum-strip .is-due strong { color: var(--hot); }

/* Purchase bill lines */
.pur-head-right { display: flex; align-items: center; gap: 14px; }
.pur-total { text-align: right; }
.pur-total span { display: block; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.pur-total strong { font-family: var(--display); font-size: 22px; color: var(--leaf); }
.pur-total small { display: block; font-size: 12px; color: var(--muted); }
.pur-labels, .pur-line {
  display: grid;
  grid-template-columns: 1.6fr 0.8fr 0.6fr 0.8fr 0.9fr 36px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.pur-labels { color: var(--muted); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 6px; }
.pur-line input, .pur-line select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
  background: var(--white);
  min-width: 0;
  font: inherit;
}
.pur-line input[readonly] { background: #f7f3ec; color: var(--leaf); font-weight: 600; }
.pur-line .is-invalid { border-color: var(--hot); background: #fdf3f2; }

/* Change request highlight */
.cr-notice {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  margin-bottom: 14px;
  border-radius: 14px;
  border: 1px solid rgba(196, 163, 90, 0.5);
  background: linear-gradient(90deg, #fbf1d9, #fffaf0);
}
.cr-notice > div { flex: 1; }
.cr-notice strong { display: block; color: #6b4d12; }
.cr-notice span { display: block; color: var(--muted); font-size: 13px; }
.cr-dot { width: 10px; height: 10px; border-radius: 50%; background: #c98a1b; box-shadow: 0 0 0 5px rgba(201, 138, 27, 0.18); flex: none; }
.cr-chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  margin-left: 6px;
  border-radius: 999px;
  background: #c98a1b;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
  white-space: nowrap;
}
.cr-chip.is-skip { background: var(--hot); }
table.data tr.row-changed td { background: #fdf5e2; }
table.data tr.row-changed td:first-child { box-shadow: inset 4px 0 0 #c98a1b; }
table.data tr.row-changed:hover td { background: #faedcc; }
table.data tr.row-skip td { color: #9a8f84; }
table.data tr.row-skip td:not(:first-child) { text-decoration: line-through; }
.plan-grid td.is-changed { background: #f6e3b4; color: #6b4d12; font-weight: 700; }

/* Dashboard thermos stock */
.dash-row { margin-bottom: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.panel-head h2 { margin: 0; }
.note-item strong .pill { display: inline-flex; margin-left: 6px; font-size: 11px; vertical-align: middle; }
.th-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.th-tiles article { border-radius: 14px; padding: 12px 14px; border: 1px solid var(--line); }
.th-tiles em { display: block; font-style: normal; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.th-tiles strong { display: block; font-family: var(--display); font-size: 32px; font-weight: 560; line-height: 1.1; margin: 4px 0 2px; }
.th-tiles span { font-size: 12px; color: var(--muted); }
.th-office { background: #edf5ef; }
.th-office strong { color: var(--leaf); }
.th-route { background: #fbf3df; }
.th-route strong { color: #8a6417; }
.th-client { background: #f8ebe8; }
.th-client strong { color: var(--hot); }
.th-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; margin: 14px 0 10px; background: var(--line); }
.th-bar i { display: block; height: 100%; }
.th-bar .b-office { background: var(--leaf); }
.th-bar .b-route { background: #c98a1b; }
.th-bar .b-client { background: var(--hot); }
.th-sizes { width: 100%; border-collapse: collapse; margin-bottom: 10px; font-size: 13px; }
.th-sizes th { text-align: left; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 8px 6px; border-bottom: 1px solid var(--line); }
.th-sizes td { padding: 8px 6px; border-bottom: 1px solid var(--line); }
.th-sizes tr:last-child td { border-bottom: 0; }

/* Generate monthly bills */
.gen-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 16px 18px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(232, 213, 163, 0.22), transparent 42%), var(--white);
}
.gen-controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.gen-search input {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: #fffdf8;
  font: inherit;
  min-width: 220px;
}
.gen-summary { display: flex; align-items: center; gap: 18px; }
.gen-summary em { display: block; font-style: normal; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.gen-summary strong { font-family: var(--display); font-size: 24px; font-weight: 560; color: var(--leaf); }
.gen-table td.num { font-variant-numeric: tabular-nums; }
.gen-table .gen-items { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; max-width: 420px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gen-table tr.is-picked td { background: #f3f8f4; }
.gen-table tr.is-done td { color: var(--muted); }
/* Delivery board: one block per delivery man */
.dm-filters {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.dm-filters .plan-field { min-width: 170px; }
.dm-filters input[type='date'] {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: #fffdf8;
  font: inherit;
  color: var(--ink);
}
.dm-filters .dm-tools { margin-left: auto; }
.dm-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: #efe8dc; }
.seg button {
  border: 0;
  background: transparent;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.seg button.is-on { background: var(--white); color: var(--leaf); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.dm-card { padding: 0; overflow: hidden; }
.dm-board { border-collapse: collapse; width: 100%; min-width: max-content; font-size: 13px; }
.dm-board th, .dm-board td {
  border: 1px solid #d9cfbf;
  padding: 7px 12px;
  text-align: center;
  white-space: nowrap;
}
.dm-board .dm-end { border-right: 2px solid var(--leaf); }
.dm-board th.dm-man {
  background: #1b4332;
  color: var(--cream);
  font-family: var(--display);
  font-size: 15px;
  font-weight: 560;
  letter-spacing: 0.02em;
  padding: 10px 12px;
  border-right: 2px solid var(--leaf);
}
.dm-board tr.dm-sub th {
  background: #f3eee6;
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  min-width: 150px;
}
.dm-board tbody td { min-width: 150px; height: 34px; }
.dm-board tbody tr:nth-child(even) td { background: #fdfbf7; }
.dm-board td small { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; }
.dm-board td.dm-changed { background: #fdf5e2 !important; }
.dm-board td.dm-cust.dm-changed { box-shadow: inset 4px 0 0 #c98a1b; }
.dm-board td.dm-skip { color: #9a8f84; text-decoration: line-through; }
.dm-board td.dm-skip .cr-chip { text-decoration: none; }
@media print {
  .dm-board th.dm-man { background: #1b4332 !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .dm-filters, .cr-notice { display: none !important; }
}
.list-foot { padding: 12px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.inv-total small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
@media (max-width: 900px) {
  .sum-strip, .th-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pur-labels { display: none; }
  .pur-line { grid-template-columns: 1fr 1fr; }
}

/* Material lines (recipe, stock used) */
.mat-labels, .mat-line {
  display: grid;
  grid-template-columns: 2fr 1fr 0.8fr 36px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  max-width: 720px;
}
.mat-labels { color: var(--muted); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 6px; }
.mat-line input, .mat-line select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
  background: var(--white);
  min-width: 0;
  font: inherit;
}
.mat-line input[readonly] { background: #f7f3ec; color: var(--leaf); font-weight: 600; }
.mat-line .is-invalid { border-color: var(--hot); background: #fdf3f2; }
.form-grid .field[hidden] { display: none; }
.req-line .rq-make { font-variant-numeric: tabular-nums; }
.line-summary { display: inline-block; max-width: 520px; color: var(--muted); font-size: 13px; line-height: 1.45; white-space: normal; }

/* Estimate, cups, daily sales */
.plan-field input[type='number'],
.plan-field input[type='date'] {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: #fffdf8;
  font: inherit;
  color: var(--ink);
  min-width: 0;
}
.est-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 16px; align-items: start; }
.est-grid .card, .sales-sheet { padding: 0; overflow: hidden; }
.est-grid .plan-meta, .sales-sheet .plan-meta { padding: 14px 18px 0; }
.est-grid td.num, .sales-sheet td.num { font-variant-numeric: tabular-nums; }
.sales-sheet td small { color: var(--muted); font-size: 11px; }
.sales-sheet td[rowspan] { vertical-align: top; background: #fffdf8; }
table.data tr.total-row td { background: #f3eee6; }
.make-tag {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #1b4332;
  color: var(--cream);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Notes strip on Kitchen / Delivery */
.note-strip {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 16px;
  margin-bottom: 14px;
  border-radius: 14px;
  border: 1px solid rgba(27, 67, 50, 0.18);
  background: linear-gradient(90deg, #edf5ef, #fbfdfb);
}
.note-strip-head { display: flex; align-items: center; gap: 8px; color: var(--leaf); white-space: nowrap; padding-top: 2px; }
.note-strip-head svg { width: 18px; height: 18px; }
.note-strip-list { display: flex; flex-wrap: wrap; gap: 10px; flex: 1; }
.note-strip-list article { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; flex: 1 1 240px; }
.note-strip-list strong { display: block; font-size: 13px; }
.note-strip-list strong em { font-style: normal; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-left: 6px; }
.note-strip-list span { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; }
@media print {
  .note-strip { border: 1px solid #999; background: #fff; }
}
@media (max-width: 1100px) {
  .est-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .mat-labels { display: none; }
  .note-strip { flex-direction: column; }
}

/* Tabbed forms (Customer Master) */
.form-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: #f3eee6;
  overflow-x: auto;
}
.form-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 0;
  justify-content: center;
  min-width: max-content;
  height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  color: var(--muted);
  cursor: pointer;
}
.form-tab b {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(27, 67, 50, 0.1);
  color: var(--leaf);
  font-size: 12px;
}
.form-tab.is-on { background: var(--white); color: var(--leaf); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08); }
.form-tab.is-on b { background: var(--leaf); color: var(--cream); }
.tab-pane[hidden] { display: none; }
.tab-pane > .slot-box:first-child { margin-top: 0; }
.check-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}
.check-field input { width: 18px; height: 18px; accent-color: var(--leaf); margin: 0; }
.ct-labels, .ct-row {
  display: grid;
  grid-template-columns: 1fr 1fr 36px;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  width: 100%;
}
.ct-labels { color: var(--muted); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 6px; }
.ct-labels .req::after { content: " *"; color: var(--hot); }
.ct-row input {
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  background: var(--white);
  min-width: 0;
  font: inherit;
}
.ct-row .is-invalid { border-color: var(--hot); background: #fdf3f2; }
.ct-row .ct-remove:disabled { opacity: 0.35; cursor: not-allowed; }
.addr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.addr-card { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: #fffdf8; }
.addr-card .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.addr-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.addr-head strong { font-family: var(--display); font-size: 17px; font-weight: 560; color: var(--leaf); }
.addr-head .check-field { min-height: 0; font-size: 13px; font-weight: 600; }
.addr-card.is-same input:disabled, .addr-card.is-same select:disabled { background: #f3eee6; color: var(--muted); }
.addr-card .is-invalid { border-color: var(--hot) !important; background: #fdf3f2 !important; }
.addr-view { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.addr-view article { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: #fffdf8; }
.addr-view em { display: block; font-style: normal; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.addr-view p { margin: 0; line-height: 1.5; }
@media (max-width: 900px) {
  .addr-grid, .addr-view, .addr-card .form-grid { grid-template-columns: 1fr; }
  .form-tab { flex: 0 0 auto; }
}

/* Customer rate card */
.rate-box { border-top: 0; margin-top: 4px; padding-top: 0; }
.rate-note {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fbf6ec;
  border: 1px solid #efe2c6;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 14px;
}
.rate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; min-width: 0; }
.rate-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: var(--white);
  opacity: 0.78;
  min-width: 0;
  overflow-x: auto;
}
.rate-card.is-main { opacity: 1; border-color: var(--leaf); box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.08); }
.rate-card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.rate-card header strong { display: block; font-size: 15px; }
.rate-card header p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.rate-badge {
  display: none;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--leaf);
  color: #fff;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.rate-card.is-main .rate-badge { display: inline-block; }
table.data.rate-table { width: 100%; min-width: 0; }
table.data.rate-table th:last-child, table.data.rate-table td:last-child { position: static; box-shadow: none; }
.rate-table td, .rate-table th { padding: 8px 6px; }
.rate-in-wrap { display: flex; align-items: center; gap: 6px; }
.rate-in-wrap span { color: var(--muted); font-weight: 600; }
.rate-in-wrap input { width: 100%; max-width: 110px; min-width: 70px; height: 36px; }
.rate-in[readonly] { background: #f1f6f2; color: var(--leaf); font-weight: 700; cursor: not-allowed; }
.rate-lock, .rate-open {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
}
.rate-lock { background: rgba(27, 67, 50, 0.1); color: var(--leaf); }
.rate-open { background: #f4f1ea; color: var(--muted); }
@media (max-width: 900px) {
  .rate-grid { grid-template-columns: 1fr; }
}
.rate-table .size-tag, .rate-lock, .rate-open { white-space: nowrap; }

/* Holiday bulk add */
.bulk-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
.bulk-btns { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.bulk-table input[type='date'], .bulk-table input[type='text'] { width: 100%; height: 36px; min-width: 140px; }
.bulk-table tr.is-dup td { opacity: 0.6; }
.bulk-hol .form-actions { align-items: center; }
.bulk-hol .form-actions .field-hint { margin-right: auto; }

/* Route customers popup */
.chk-wrap { display: inline-flex; align-items: center; gap: 8px; }
table.data th.chk, table.data td.chk { white-space: nowrap; }
.route-people { width: 30px; height: 30px; color: var(--leaf); }
.route-card { width: min(640px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; overflow: hidden; }
.route-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.route-head h3 { margin: 2px 0 2px; }
.route-head p { margin: 0; color: var(--muted); font-size: 13px; }
.route-card .route-sec { overflow-y: auto; margin-bottom: 12px; }
.route-card .route-sec:first-of-type { flex: 1 1 auto; min-height: 120px; }
.route-card .route-sec + .route-sec { max-height: 32vh; border-top: 1px solid var(--line); padding-top: 12px; }
.route-sec-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; position: sticky; top: 0; background: var(--cream); z-index: 1; padding-bottom: 4px; }
.route-sec-head span { color: var(--muted); font-size: 12px; }
.route-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.route-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}
#rtList .route-item { cursor: grab; }
.route-item.is-drag { opacity: 0.45; }
.route-item.is-over { border-color: var(--leaf); box-shadow: 0 0 0 2px rgba(27, 67, 50, 0.12); }
.route-item label, .route-item .rt-name { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; }
.route-item label > span, .route-item .rt-name > span { display: flex; flex-direction: column; min-width: 0; font-weight: 600; }
.route-item small { color: var(--muted); font-weight: 500; font-size: 11px; }
.drag-handle { color: var(--muted); letter-spacing: -2px; font-weight: 700; user-select: none; }
.stop-no {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--leaf);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  margin-right: 6px;
}
.route-move { display: inline-flex; gap: 4px; }
.route-move .icon-act { width: 28px; height: 28px; font-size: 13px; }
.route-move .icon-act:disabled { opacity: 0.35; cursor: default; }
.route-empty { padding: 12px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted); font-size: 13px; }
.route-list.is-spare .route-item { background: #fbf8f2; }
.route-search { width: 100%; height: 38px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: var(--white); }
#rtList .route-item { touch-action: none; user-select: none; }
#rtList .route-item.is-drag { opacity: 1; border-color: var(--leaf); box-shadow: 0 8px 22px rgba(20, 34, 28, 0.18); cursor: grabbing; position: relative; z-index: 2; }

/* Cup Dispatch */
.btn.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 10px; white-space: nowrap; }
.cup-card { margin-bottom: 16px; }
.muted { color: var(--muted); font-weight: 400; }
.print-only { display: none; }
.cup-sent-on { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.cup-stock-table td.is-short { color: var(--hot); font-weight: 650; }
table.data.cup-stock-table, table.data.cup-disp-table { min-width: 860px; }
.cup-send { max-width: 520px; width: 100%; text-align: left; }
.cup-send .form-grid { margin: 14px 0 6px; }
.cup-send-sub { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.cup-send-stock { margin: 6px 0 10px; font-size: 13px; color: var(--muted); }
.cup-send-stock strong { color: var(--leaf); }
.dm-summary-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}
.dm-summary-grid article {
  min-width: 72px;
}
.dm-summary-grid em {
  display: block;
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}
.dm-summary-grid strong {
  font-size: 18px;
}
.kitchen-prep .prep-manual {
  max-width: 120px;
}
.sticker-sheet {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
}
.cup-sticker {
  width: 180px;
  border: 1px solid #222;
  padding: 10px 12px;
  page-break-inside: avoid;
}
.cup-sticker strong {
  display: block;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.cup-sticker span, .cup-sticker em {
  display: block;
  font-size: 12px;
  font-style: normal;
  margin-top: 4px;
}
@media print {
  .print-only { display: inline; }
  .cup-stock-table th:last-child, .cup-stock-table td:last-child { position: static; }
  .sticker-sheet.print-only, #stickerSheet {
    display: flex !important;
  }
  .dm-summary, .dm-filters, .kitchen-prep .form-actions { display: none !important; }
}
