:root {
  --bg: #f2efe7;
  --bg-deep: #e9e4d8;
  --paper: #fbfaf6;
  --paper-strong: #ffffff;
  --ink: #1d2921;
  --ink-soft: #3c483e;
  --muted: #728075;
  --muted-light: #98a197;
  --line: #dedbcf;
  --line-strong: #cbc6b8;
  --forest: #1b2c21;
  --forest-2: #27422f;
  --moss: #42624a;
  --sage: #dbe6d9;
  --sage-soft: #edf3eb;
  --amber: #cf8a4d;
  --amber-deep: #a9612e;
  --amber-soft: #f5e5d2;
  --blue-soft: #e7edf3;
  --blue-ink: #4b6682;
  --violet-soft: #eee8f2;
  --violet-ink: #70567c;
  --red: #ae5548;
  --red-soft: #f6e5e1;
  --cream: #f8f2e7;
  --shadow-sm: 0 1px 2px rgba(29, 41, 33, 0.04), 0 6px 18px rgba(29, 41, 33, 0.03);
  --shadow-md: 0 16px 48px rgba(24, 35, 28, 0.1), 0 2px 8px rgba(24, 35, 28, 0.05);
  --shadow-lg: 0 30px 80px rgba(19, 29, 22, 0.18), 0 4px 14px rgba(19, 29, 22, 0.08);
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;
  --font: "Avenir Next", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", "Georgia", "Songti SC", "STSong", serif;
  --mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas, monospace;
  --sidebar-width: 250px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 74% -8%, rgba(207, 138, 77, 0.1), transparent 32%),
    radial-gradient(ellipse at 10% 100%, rgba(66, 98, 74, 0.07), transparent 36%),
    var(--bg);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll {
  overflow: hidden;
}

::selection {
  background: var(--amber-soft);
  color: var(--ink);
}

h1, h2, h3, h4, p {
  margin: 0;
}

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

button {
  cursor: pointer;
}

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

svg {
  display: block;
}

.icon-sprite {
  position: fixed;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

.icon-lg {
  width: 26px;
  height: 26px;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--muted);
}

.text-danger {
  color: var(--red);
}

.text-success {
  color: var(--moss);
}

.nowrap {
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   Shell
   -------------------------------------------------------------------------- */

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sidebar-width);
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 18px 18px;
  color: #e9e4d7;
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 22%),
    radial-gradient(ellipse at 50% 105%, rgba(187, 134, 76, 0.2), transparent 44%),
    var(--forest);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.19;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.sidebar > * {
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px 28px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #1b2c21;
  background: #e6b576;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.5), 0 5px 18px rgba(0, 0, 0, 0.15);
  transform: rotate(-2deg);
}

.brand-mark svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-copy strong {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #faf5e9;
}

.brand-copy small {
  margin-top: 6px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.21em;
  color: #9ba798;
}

.sidebar-section-label {
  padding: 16px 12px 8px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: #788678;
}

.main-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 12px;
  color: #b8c1b4;
  font-size: 13.5px;
  font-weight: 550;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.nav-item .icon {
  width: 19px;
  height: 19px;
  color: #82927f;
  transition: color 160ms ease;
}

.nav-item:hover {
  color: #f7f2e7;
  background: rgba(255, 255, 255, 0.055);
}

.nav-item.active {
  color: #fff9ed;
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: #e6b576;
}

.nav-item.active .icon {
  color: #e6b576;
}

.nav-badge {
  margin-left: auto;
  min-width: 21px;
  height: 20px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 99px;
  background: #e2ab69;
  color: #1d2c22;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.sidebar-spacer {
  flex: 1;
  min-height: 30px;
}

.sidebar-note {
  display: flex;
  gap: 10px;
  margin: 10px 5px 14px;
  padding: 13px 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
}

.local-dot {
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: #88aa83;
  box-shadow: 0 0 0 4px rgba(136, 170, 131, 0.12);
}

.sidebar-note strong {
  display: block;
  margin-bottom: 3px;
  color: #d9ded4;
  font-size: 11.5px;
}

.sidebar-note p {
  color: #899687;
  font-size: 10.5px;
  line-height: 1.5;
}

.sidebar-backup {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  color: #aab5a7;
  background: transparent;
  font-size: 11.5px;
  text-align: left;
  transition: background 150ms ease, color 150ms ease;
}

.sidebar-backup:hover {
  color: #f5efe4;
  background: rgba(255, 255, 255, 0.055);
}

.sidebar-backup .icon {
  width: 16px;
  height: 16px;
}

.sidebar-backup .arrow {
  width: 13px;
  height: 13px;
  margin-left: auto;
  opacity: 0.55;
}

.sidebar-foot {
  padding: 14px 10px 0;
  color: #637363;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.sidebar-scrim {
  display: none;
}

.app-main {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 82px;
  padding: 14px 36px;
  border-bottom: 1px solid rgba(203, 198, 184, 0.62);
  background: rgba(242, 239, 231, 0.86);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.page-heading {
  min-width: 0;
}

.page-heading span {
  display: block;
  margin-bottom: 2px;
  color: var(--amber-deep);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.23em;
}

.page-heading h1 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.015em;
  line-height: 1.18;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.today-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--muted);
  background: rgba(251, 250, 246, 0.65);
  font-size: 11px;
  white-space: nowrap;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(207, 138, 77, 0.12);
}

.mobile-menu {
  display: none !important;
}

.main-content {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 28px 36px 70px;
  outline: none;
}

.content-stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
  animation: reveal 360ms ease both;
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   Shared components
   -------------------------------------------------------------------------- */

.card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 250, 246, 0.86);
  box-shadow: var(--shadow-sm);
}

.card-pad {
  padding: 22px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 2px;
}

.section-head-copy {
  min-width: 0;
}

.section-head h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.section-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12.5px;
}

.section-head .actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--amber-deep);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 15px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.btn .icon {
  width: 16px;
  height: 16px;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  color: #fffaf0;
  background: var(--forest);
  box-shadow: 0 6px 16px rgba(27, 44, 33, 0.15);
}

.btn-primary:hover {
  background: #29412f;
}

.btn-secondary {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--paper);
}

.btn-secondary:hover {
  border-color: #afa996;
  background: #fff;
}

.btn-amber {
  color: #3b270f;
  background: #efbf84;
  box-shadow: 0 5px 14px rgba(207, 138, 77, 0.18);
}

.btn-amber:hover {
  background: #f4cb9a;
}

.btn-ghost {
  color: var(--muted);
  background: transparent;
}

.btn-ghost:hover {
  color: var(--ink);
  background: rgba(29, 41, 33, 0.055);
}

.btn-danger {
  color: var(--red);
  border-color: #e7c7c1;
  background: #fff8f6;
}

.btn-danger:hover {
  background: var(--red-soft);
}

.btn-sm {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 11.5px;
}

.btn-lg {
  min-height: 46px;
  padding: 0 19px;
  border-radius: 13px;
  font-size: 13.5px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  background: var(--paper);
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.icon-button:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: #fff;
}

.icon-button.danger:hover {
  color: var(--red);
  border-color: #e3c0ba;
  background: var(--red-soft);
}

.icon-button .icon {
  width: 17px;
  height: 17px;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  color: var(--moss);
  background: none;
  font-size: 11.5px;
  font-weight: 650;
}

.link-btn:hover {
  color: var(--forest);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-btn .icon {
  width: 13px;
  height: 13px;
}

.text-link {
  color: var(--moss);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(66, 98, 74, 0.28);
  text-underline-offset: 3px;
}

.text-link:hover {
  text-decoration-color: currentColor;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 23px;
  padding: 1px 8px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.pill-dot::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.status-pending {
  color: #8c5826;
  background: #f8ead8;
}

.status-ready {
  color: var(--blue-ink);
  background: var(--blue-soft);
}

.status-forwarded {
  color: var(--violet-ink);
  background: var(--violet-soft);
}

.status-shipped {
  color: #38624a;
  background: #e2eee4;
}

.status-completed {
  color: #5d665d;
  background: #eaede7;
}

.status-cancelled {
  color: #91574d;
  background: var(--red-soft);
}

.status-new {
  color: #8c5826;
  background: var(--amber-soft);
}

.status-batched {
  color: var(--violet-ink);
  background: var(--violet-soft);
}

.status-sent {
  color: #38624a;
  background: #e2eee4;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 21px;
  padding: 0 7px;
  border-radius: 6px;
  color: var(--muted);
  background: #efede5;
  font-size: 9.5px;
  font-weight: 650;
  white-space: nowrap;
}

.tag-amber {
  color: #8c5826;
  background: var(--amber-soft);
}

.tag-green {
  color: #3e5f46;
  background: var(--sage-soft);
}

.tag-red {
  color: var(--red);
  background: var(--red-soft);
}

.tag-blue {
  color: var(--blue-ink);
  background: var(--blue-soft);
}

.divider {
  height: 1px;
  background: var(--line);
}

.dot-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.35;
  flex: none;
}

.inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.stack-xs {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* --------------------------------------------------------------------------
   Forms and toolbars
   -------------------------------------------------------------------------- */

.toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.toolbar-spacer {
  flex: 1;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 240px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.search-box:focus-within {
  border-color: #9ba78f;
  box-shadow: 0 0 0 3px rgba(66, 98, 74, 0.09);
}

.search-box .icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--muted-light);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  min-height: 38px;
  padding: 0 12px 0 36px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
}

.search-box input::placeholder {
  color: #9ca49a;
}

.select,
.input {
  width: 100%;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: var(--paper);
  font-size: 12px;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.select {
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23728075' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

.select-compact,
.input-compact {
  width: auto;
  min-width: 120px;
  min-height: 40px;
}

.input:hover,
.select:hover {
  border-color: var(--line-strong);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: #92a18d;
  box-shadow: 0 0 0 3px rgba(66, 98, 74, 0.09);
  background: #fff;
}

.input[type="date"],
.input[type="month"] {
  color-scheme: light;
}

.textarea {
  width: 100%;
  min-height: 88px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  resize: vertical;
  background: var(--paper);
  font-size: 12px;
  line-height: 1.6;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field > label,
.field-label {
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.field > label .req {
  color: var(--amber-deep);
}

.field-help {
  color: var(--muted-light);
  font-size: 10px;
  line-height: 1.5;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 14px;
}

.field.full,
.form-grid .full {
  grid-column: 1 / -1;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-soft);
  font-size: 11.5px;
  cursor: pointer;
  user-select: none;
}

.checkbox input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--moss);
}

.segmented {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #eeece4;
}

.segmented button {
  min-height: 32px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  font-size: 11.5px;
  font-weight: 650;
  transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.segmented button:hover {
  color: var(--ink);
}

.segmented button.active {
  color: var(--ink);
  background: var(--paper-strong);
  box-shadow: 0 1px 3px rgba(29, 41, 33, 0.1);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: var(--paper);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 150ms ease;
}

.toggle:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.toggle.active {
  color: var(--forest);
  border-color: #b8c7b4;
  background: var(--sage-soft);
}

.toggle .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}

.toggle.active .dot {
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: inherit;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.data-table th {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(222, 219, 207, 0.68);
  font-size: 12px;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 120ms ease;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.65);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.data-table .center {
  text-align: center;
}

.data-table th.num {
  text-align: right;
}

.data-table .actions-col {
  width: 56px;
  text-align: right;
}

.data-table.compact th {
  padding: 10px 12px;
}

.data-table.compact td {
  padding: 11px 12px;
}

.clickable-row {
  cursor: pointer;
}

.row-chevron {
  width: 27px;
  height: 27px;
  margin-left: auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted-light);
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.clickable-row:hover .row-chevron {
  color: var(--ink);
  background: #f0ede5;
  transform: translateX(2px);
}

.cell-main {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.4;
}

.cell-sub {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.35;
}

.order-number {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.avatar-mini {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  flex: none;
}

.account-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.amount {
  font-family: var(--serif);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.015em;
}

.amount-sm {
  font-family: var(--serif);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.amount-muted {
  color: var(--muted);
}

.money-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-end;
}

.money-block small {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 500;
}

.progress-line {
  width: 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: #e9e6dc;
}

.progress-line > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--moss);
  transition: width 300ms ease;
}

.progress-line.amber > span {
  background: var(--amber);
}

.received-cell {
  min-width: 92px;
}

.received-cell .received-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.received-cell .received-top small {
  color: var(--muted-light);
  font-size: 9px;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 5px 0;
  color: var(--muted);
  font-size: 10.5px;
}

.pagination .page-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}

.page-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: var(--paper);
}

.page-btn:hover:not(:disabled) {
  color: var(--ink);
  border-color: var(--line-strong);
}

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

.page-btn .icon {
  width: 14px;
  height: 14px;
}

/* --------------------------------------------------------------------------
   Dashboard
   -------------------------------------------------------------------------- */

.dashboard-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 14px;
}

.metric-card {
  position: relative;
  min-height: 156px;
  padding: 20px;
  overflow: hidden;
}

.metric-card .metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.metric-icon {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--moss);
  background: var(--sage-soft);
}

.metric-icon .icon {
  width: 17px;
  height: 17px;
}

.metric-value {
  margin-top: 14px;
  font-family: var(--serif);
  font-size: clamp(28px, 2.4vw, 38px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.metric-value .currency {
  margin-right: 2px;
  font-size: 0.5em;
  font-weight: 500;
  vertical-align: 0.5em;
  opacity: 0.65;
}

.metric-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 11px;
  color: var(--muted);
  font-size: 10.5px;
}

.metric-meta strong {
  color: var(--ink-soft);
}

.metric-card.primary {
  color: #f9f4e8;
  border-color: transparent;
  background:
    radial-gradient(circle at 90% 12%, rgba(225, 176, 109, 0.22), transparent 32%),
    linear-gradient(135deg, #203627, #17261c);
  box-shadow: 0 16px 38px rgba(27, 44, 33, 0.18);
}

.metric-card.primary::after {
  content: "";
  position: absolute;
  right: -16px;
  bottom: -48px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(234, 195, 140, 0.22);
  border-radius: 50%;
  box-shadow: 0 0 0 18px rgba(234, 195, 140, 0.045), 0 0 0 37px rgba(234, 195, 140, 0.03);
}

.metric-card.primary .metric-top {
  color: #a9b8a3;
}

.metric-card.primary .metric-value {
  color: #fbf5e9;
}

.metric-card.primary .metric-icon {
  color: #e6b576;
  background: rgba(255, 255, 255, 0.08);
}

.metric-card.primary .metric-meta {
  color: #9eaf99;
}

.metric-card.primary .metric-meta strong {
  color: #e8e2d5;
}

.metric-card.primary .currency {
  color: #dfae72;
  opacity: 1;
}

.metric-spark {
  position: absolute;
  right: 15px;
  bottom: 13px;
  width: 68px;
  height: 26px;
  opacity: 0.5;
}

.metric-link {
  position: absolute;
  right: 16px;
  bottom: 15px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 650;
}

.metric-link .icon {
  width: 12px;
  height: 12px;
}

.metric-card.primary .metric-link {
  color: #b9c4b2;
}

.dash-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, 0.8fr);
  gap: 18px;
}

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 22px 0;
}

.card-head h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
}

.card-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
}

.card-head .head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.chart-card {
  padding-bottom: 10px;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 9.5px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-swatch {
  width: 14px;
  height: 3px;
  border-radius: 3px;
  background: var(--moss);
}

.legend-swatch.amber {
  background: var(--amber);
}

.chart-wrap {
  position: relative;
  margin: 8px 12px 0;
  min-height: 214px;
}

.chart-svg {
  display: block;
  width: 100%;
  height: 224px;
  overflow: visible;
}

.chart-grid-line {
  stroke: #e6e2d8;
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.chart-axis-label {
  fill: #929d93;
  font-family: var(--font);
  font-size: 8.5px;
}

.chart-zero {
  display: grid;
  place-items: center;
  min-height: 210px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.chart-zero strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
}

.chart-summary {
  display: flex;
  gap: 24px;
  padding: 2px 22px 12px;
}

.chart-summary-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}

.chart-summary-item strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
}

.account-performance {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding-bottom: 8px;
}

.account-bars {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 18px 22px 12px;
}

.account-bar-row {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.account-bar-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.account-bar-top strong {
  font-size: 11.5px;
  font-weight: 650;
}

.account-bar-top span {
  margin-left: auto;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.account-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: #eae7dd;
}

.account-bar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.account-empty {
  padding: 34px 22px;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.dash-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(290px, 0.8fr);
  gap: 18px;
}

.dash-main-grid > *,
.dash-bottom-grid > *,
.labels-hero > *,
.tools-grid > *,
.account-grid > *,
.member-grid > *,
.inventory-metrics > * {
  min-width: 0;
}

.recent-orders .table-wrap {
  padding: 8px 8px 0;
}

.recent-orders .card-head {
  padding-bottom: 8px;
}

.attention-card {
  padding-bottom: 8px;
}

.attention-block {
  padding: 14px 20px 10px;
}

.attention-block + .attention-block {
  border-top: 1px solid var(--line);
}

.attention-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 700;
}

.attention-title .icon {
  width: 14px;
  height: 14px;
  color: var(--amber-deep);
}

.attention-title span {
  margin-left: auto;
  color: var(--muted);
  font-weight: 500;
}

.attention-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px dashed #e7e3d9;
}

.attention-row:first-of-type {
  border-top: 0;
}

.attention-row .file-mini {
  width: 26px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: var(--amber-deep);
  background: var(--amber-soft);
}

.attention-row .file-mini .icon {
  width: 14px;
  height: 14px;
}

.attention-row .copy {
  min-width: 0;
  flex: 1;
}

.attention-row .copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attention-row .copy span {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
}

.attention-row .stock-badge {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
}

.attention-footer {
  display: flex;
  justify-content: center;
  padding: 8px 0 7px;
}

.attention-empty {
  padding: 16px 0 12px;
  color: var(--muted);
  font-size: 10.5px;
  text-align: center;
}

.onboarding-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 24px;
  padding: 26px;
  color: #f4efe3;
  border: 0;
  background:
    radial-gradient(circle at 92% 18%, rgba(225, 176, 109, 0.2), transparent 28%),
    linear-gradient(130deg, #29422f, #1b2d21);
  box-shadow: 0 18px 46px rgba(27, 44, 33, 0.16);
}

.onboarding-card h2 {
  max-width: 480px;
  margin-top: 9px;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 500;
  line-height: 1.3;
}

.onboarding-card p {
  max-width: 500px;
  margin-top: 7px;
  color: #aab7a5;
  font-size: 11.5px;
}

.onboarding-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 17px;
}

.onboarding-actions .btn-secondary {
  color: #f7f1e5;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
}

.onboarding-actions .btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
}

.onboarding-steps {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
}

.onboarding-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #c7d0c2;
  background: rgba(255, 255, 255, 0.035);
  font-size: 10.5px;
}

.onboarding-step.done {
  color: #8c9e88;
  text-decoration: line-through;
}

.onboarding-step .step-index {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #e3b779;
  font-family: var(--serif);
  font-size: 10px;
}

.onboarding-step.done .step-index {
  color: #1d2f22;
  border-color: #e3b779;
  background: #e3b779;
}

/* --------------------------------------------------------------------------
   Page summaries & orders
   -------------------------------------------------------------------------- */

.page-summary {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 18px 22px;
}

.summary-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 110px;
}

.summary-stat .label {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 650;
}

.summary-stat .value {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.summary-stat .value small {
  margin-left: 3px;
  color: var(--muted);
  font-family: var(--font);
  font-size: 9.5px;
  font-weight: 500;
}

.summary-stat.accent .value {
  color: var(--amber-deep);
}

.summary-divider {
  width: 1px;
  align-self: stretch;
  background: var(--line);
}

.summary-spacer {
  flex: 1;
}

.summary-actions {
  display: flex;
  gap: 8px;
}

.filter-card {
  padding: 12px 14px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-label {
  padding: 0 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.date-range {
  display: flex;
  align-items: center;
  gap: 5px;
}

.date-range .input {
  width: 127px;
  min-height: 36px;
  padding: 0 8px;
  font-size: 10.5px;
}

.date-range span {
  color: var(--muted-light);
  font-size: 10px;
}

.orders-card {
  overflow: hidden;
}

.orders-card > .card-head {
  padding: 18px 20px 12px;
}

.order-table th:first-child,
.order-table td:first-child {
  padding-left: 20px;
}

.order-table th:last-child,
.order-table td:last-child {
  padding-right: 18px;
}

.item-cell {
  max-width: 245px;
}

.item-cell .cell-main {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.ghost-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
}

.ghost-icon:hover {
  color: var(--ink);
  background: #efede5;
}

.ghost-icon.danger:hover {
  color: var(--red);
  background: var(--red-soft);
}

.ghost-icon .icon {
  width: 14px;
  height: 14px;
}

/* --------------------------------------------------------------------------
   Inventory
   -------------------------------------------------------------------------- */

.inventory-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 13px;
}

.inv-metric {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 17px 18px;
}

.inv-metric .metric-icon {
  width: 39px;
  height: 39px;
}

.inv-metric .copy {
  min-width: 0;
}

.inv-metric .label {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 650;
}

.inv-metric .value {
  margin-top: 1px;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.inv-metric .value small {
  margin-left: 3px;
  color: var(--muted);
  font-family: var(--font);
  font-size: 9px;
  font-weight: 500;
}

.warehouse-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.warehouse-bar-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 2px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.warehouse-bar-label .icon {
  width: 13px;
  height: 13px;
}

.warehouse-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 99px;
  color: var(--ink-soft);
  background: #faf8f2;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.warehouse-chip:hover {
  border-color: var(--line-strong);
  background: #fff;
}

.warehouse-chip.active {
  border-color: var(--moss);
  color: #fff;
  background: var(--moss);
}

.warehouse-chip b {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  opacity: 0.7;
}

.warehouse-chip.active b {
  opacity: 0.85;
}

.warehouse-dot {
  display: inline-block;
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--moss);
}

.warehouse-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-soft);
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
}

.stock-warehouse-note {
  margin-top: 4px;
  color: var(--muted-light);
  font-size: 8.5px;
  line-height: 1.35;
}

.warehouse-stock-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #faf8f2;
}

.warehouse-stock-summary > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
}

.warehouse-stock-summary b {
  font-family: var(--mono);
  font-size: 10px;
}

.warehouse-manager {
  display: grid;
  gap: 8px;
}

.warehouse-manager-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fbfaf5;
}

.warehouse-manager-row.archived {
  opacity: 0.65;
  background: #f4f2ec;
}

.warehouse-swatch {
  flex: none;
  width: 12px;
  height: 32px;
  border-radius: 4px;
}

.warehouse-manager-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.warehouse-manager-copy strong {
  font-size: 12px;
  font-weight: 650;
}

.warehouse-manager-copy span,
.warehouse-manager-copy small {
  color: var(--muted);
  font-size: 9.5px;
}

.warehouse-color-input {
  width: 100%;
  min-height: 38px;
  padding: 4px;
  cursor: pointer;
}

.inventory-card {
  overflow: hidden;
}

.inventory-card > .card-head {
  padding: 18px 20px 12px;
}

.product-cell {
  min-width: 190px;
}

.sku-chip {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--muted);
  background: #efede5;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: -0.02em;
}

.stock-cell {
  min-width: 110px;
}

.stock-headline {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-bottom: 5px;
}

.stock-headline strong {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.stock-headline span {
  color: var(--muted);
  font-size: 9px;
}

.stock-bar {
  width: 92px;
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: #eae7de;
}

.stock-bar > i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--moss);
}

.stock-bar.low > i {
  background: var(--amber);
}

.stock-bar.empty > i {
  background: var(--red);
}

.quick-stock {
  display: inline-flex;
  gap: 3px;
}

.stock-btn {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: var(--paper);
  font-size: 14px;
  line-height: 1;
}

.stock-btn:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: #fff;
}

.stock-btn.plus:hover {
  color: var(--moss);
  border-color: #b9cbb7;
  background: var(--sage-soft);
}

.stock-btn.minus:hover {
  color: var(--amber-deep);
  border-color: #e1c7a7;
  background: var(--amber-soft);
}

.movement-qty {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.movement-qty.pos {
  color: var(--moss);
}

.movement-qty.neg {
  color: var(--amber-deep);
}

.movement-qty.zero {
  color: var(--muted);
}

.type-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.type-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--moss);
  background: var(--sage-soft);
}

.type-icon.out {
  color: var(--amber-deep);
  background: var(--amber-soft);
}

.type-icon.adjust {
  color: var(--blue-ink);
  background: var(--blue-soft);
}

.type-icon .icon {
  width: 13px;
  height: 13px;
}

.filter-strip {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   Labels and batches
   -------------------------------------------------------------------------- */

.labels-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, 0.8fr);
  gap: 18px;
}

.labels-intro {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  color: #f8f3e8;
  border: 0;
  background:
    radial-gradient(circle at 87% 18%, rgba(227, 176, 108, 0.2), transparent 25%),
    linear-gradient(130deg, #29432f, #1a2c20);
  box-shadow: 0 16px 42px rgba(27, 44, 33, 0.16);
  overflow: hidden;
}

.labels-intro::after {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  right: -80px;
  bottom: -120px;
  border: 1px solid rgba(231, 187, 128, 0.2);
  border-radius: 50%;
  box-shadow: 0 0 0 22px rgba(231, 187, 128, 0.035), 0 0 0 45px rgba(231, 187, 128, 0.02);
}

.labels-intro h2 {
  max-width: 440px;
  margin-top: 10px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.25;
}

.labels-intro p {
  max-width: 440px;
  margin-top: 7px;
  color: #a7b5a2;
  font-size: 11.5px;
}

.labels-intro .flow-steps {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 7px;
  align-items: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  color: #c7d0c2;
  background: rgba(255, 255, 255, 0.04);
  font-size: 9px;
}

.flow-step b {
  color: #e8b97c;
  font-family: var(--serif);
  font-size: 10px;
}

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 206px;
  padding: 22px;
  border: 1.5px dashed #c9c3b4;
  border-radius: 17px;
  color: var(--muted);
  background:
    repeating-linear-gradient(135deg, rgba(66, 98, 74, 0.016) 0 8px, transparent 8px 16px),
    rgba(251, 250, 246, 0.72);
  text-align: center;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
  cursor: pointer;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: var(--amber);
  background: rgba(245, 229, 210, 0.46);
}

.dropzone.dragover {
  transform: scale(1.008);
}

.dropzone .upload-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  border-radius: 14px;
  color: var(--amber-deep);
  background: var(--amber-soft);
  box-shadow: 0 6px 16px rgba(207, 138, 77, 0.12);
}

.dropzone .upload-icon .icon {
  width: 22px;
  height: 22px;
}

.dropzone strong {
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 650;
}

.dropzone p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.dropzone .browse-link {
  margin-top: 9px;
  color: var(--moss);
  font-size: 10.5px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dropzone.compact {
  min-height: 140px;
}

.upload-progress {
  width: min(260px, 90%);
  margin-top: 11px;
}

.upload-progress .progress-line {
  height: 3px;
}

.upload-progress p {
  margin-top: 5px;
  font-size: 9px;
}

.label-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 13px;
}

.label-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
}

.label-stat .copy .label {
  color: var(--muted);
  font-size: 9.5px;
}

.label-stat .copy .value {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  line-height: 1.2;
}

.label-stat .metric-icon {
  width: 35px;
  height: 35px;
}

.labels-card {
  overflow: hidden;
}

.labels-card > .card-head {
  align-items: center;
  padding: 16px 20px;
}

.labels-table th:first-child,
.labels-table td:first-child {
  padding-left: 18px;
}

.labels-table th:last-child,
.labels-table td:last-child {
  padding-right: 16px;
}

.checkbox-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.checkbox-wrap input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--moss);
  cursor: pointer;
}

.file-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
}

.file-icon {
  position: relative;
  width: 31px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid #e5d2bc;
  border-radius: 6px;
  color: var(--amber-deep);
  background: #fbf0e3;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.file-icon::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -1px;
  width: 9px;
  height: 9px;
  border-left: 1px solid #e5d2bc;
  border-bottom: 1px solid #e5d2bc;
  border-radius: 0 5px 0 4px;
  background: #f6e3cf;
}

.file-cell .copy {
  min-width: 0;
}

.file-cell .copy strong {
  display: block;
  max-width: 240px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-cell .copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.file-cell .copy .missing {
  color: var(--amber-deep);
}

.tracking-input {
  width: 150px;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  outline: 0;
  background: transparent;
  font-family: var(--mono);
  font-size: 9.5px;
}

.tracking-input:hover {
  border-color: var(--line);
  background: var(--paper);
}

.tracking-input:focus {
  border-color: #9ba78f;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(66, 98, 74, 0.08);
}

.tracking-input::placeholder {
  color: var(--muted-light);
}

.selection-bar {
  position: sticky;
  bottom: 18px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  margin: 12px 16px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  color: #f6f0e4;
  background: rgba(27, 44, 33, 0.96);
  box-shadow: 0 14px 34px rgba(27, 44, 33, 0.24);
  backdrop-filter: blur(10px);
  animation: slideUp 220ms ease both;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.selection-bar strong {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
}

.selection-bar span {
  color: #aeb9aa;
  font-size: 10px;
}

.selection-bar .selection-actions {
  display: flex;
  gap: 7px;
  margin-left: auto;
}

.batch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.batch-card {
  overflow: hidden;
  padding: 19px;
}

.batch-card::before {
  content: "";
  position: absolute;
  left: 19px;
  right: 19px;
  top: 0;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--amber);
  opacity: 0.75;
}

.batch-card.sent::before {
  background: var(--moss);
}

.batch-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.batch-no {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: -0.02em;
}

.batch-name {
  margin-top: 3px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
}

.batch-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 9px;
  color: var(--muted);
  font-size: 10px;
}

.batch-stats {
  display: flex;
  gap: 20px;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px dashed var(--line);
}

.batch-stat .label {
  color: var(--muted);
  font-size: 9px;
}

.batch-stat .value {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
}

.batch-actions {
  display: flex;
  gap: 7px;
  margin-top: 15px;
}

.batch-actions .btn {
  flex: 1;
}

.batch-empty {
  grid-column: 1 / -1;
}

/* --------------------------------------------------------------------------
   Accounts
   -------------------------------------------------------------------------- */

.account-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 23px 24px;
}

.account-hero-copy {
  max-width: 480px;
}

.account-hero h2 {
  margin-top: 7px;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
}

.account-hero p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
}

.account-hero .account-hero-stats {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-left: auto;
}

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

.account-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
}

.account-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--account-color, var(--moss));
}

.account-card-top {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.account-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 13px;
  color: #fff;
  background: var(--account-color, var(--moss));
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.18);
}

.account-card-name {
  min-width: 0;
}

.account-card-name strong {
  display: block;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-card-name span {
  color: var(--muted);
  font-size: 9.5px;
}

.account-card-actions {
  display: flex;
  gap: 2px;
  margin-left: auto;
}

.account-numbers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
  margin-top: 20px;
}

.account-number .label {
  color: var(--muted);
  font-size: 9px;
}

.account-number .value {
  margin-top: 1px;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.account-number .value small {
  margin-left: 2px;
  color: var(--muted);
  font-family: var(--font);
  font-size: 8.5px;
  font-weight: 500;
}

.account-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 9.5px;
}

.account-footer .outstanding {
  margin-left: auto;
  color: var(--amber-deep);
  font-weight: 650;
}

.add-account-card {
  min-height: 226px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  background: rgba(251, 250, 246, 0.4);
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.add-account-card:hover {
  border-color: #b7b19f;
  color: var(--ink);
  background: rgba(251, 250, 246, 0.78);
}

.add-account-card .plus-circle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e9e5da;
}

.add-account-card strong {
  font-size: 11.5px;
}

.add-account-card span {
  color: var(--muted-light);
  font-size: 9.5px;
}

/* --------------------------------------------------------------------------
   Tools
   -------------------------------------------------------------------------- */

.tools-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(270px, 0.7fr);
  gap: 20px;
  overflow: hidden;
  padding: 27px;
  color: #f8f3e8;
  border: 0;
  background:
    radial-gradient(circle at 90% 10%, rgba(225, 176, 109, 0.18), transparent 27%),
    linear-gradient(130deg, #29432f, #1a2c20);
  box-shadow: 0 18px 46px rgba(27, 44, 33, 0.16);
}

.tools-hero h2 {
  max-width: 600px;
  margin-top: 9px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.28;
}

.tools-hero p {
  max-width: 600px;
  margin-top: 7px;
  color: #a7b5a2;
  font-size: 11.5px;
}

.data-stack {
  position: relative;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.data-layer {
  position: absolute;
  width: 156px;
  height: 92px;
  border: 1px solid rgba(227, 180, 119, 0.35);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  transform: rotate(-7deg) translate(-16px, 11px);
}

.data-layer:nth-child(2) {
  transform: rotate(4deg) translate(14px, -5px);
  background: rgba(255, 255, 255, 0.065);
}

.data-layer:nth-child(3) {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 15px;
  transform: rotate(-1deg);
  background: #f2e8d8;
  border-color: #f2e8d8;
}

.data-layer:nth-child(3) span {
  display: block;
  height: 5px;
  border-radius: 99px;
  background: #cdbfa9;
}

.data-layer:nth-child(3) span:nth-child(1) {
  width: 40%;
  background: #35523c;
}

.data-layer:nth-child(3) span:nth-child(2) {
  width: 80%;
}

.data-layer:nth-child(3) span:nth-child(3) {
  width: 63%;
}

.data-layer:nth-child(3) span:nth-child(4) {
  width: 71%;
  background: #d5a369;
}

.tools-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.tool-card {
  padding: 23px;
}

.tool-card h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
}

.tool-card > p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.tool-card .tool-section {
  margin-top: 17px;
}

.import-zone {
  margin-top: 16px;
  min-height: 164px;
}

.import-file-summary {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 14px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}

.import-file-summary .file-icon {
  width: 27px;
  height: 33px;
}

.import-file-summary .copy {
  min-width: 0;
  flex: 1;
}

.import-file-summary .copy strong {
  display: block;
  overflow: hidden;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-file-summary .copy span {
  color: var(--muted);
  font-size: 9.5px;
}

.import-preview {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.import-preview-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: #f3f0e8;
  font-size: 9.5px;
}

.import-preview-head strong {
  color: var(--ink-soft);
}

.import-preview .table-wrap {
  max-height: 220px;
  overflow: auto;
}

.import-preview table {
  font-size: 9.5px;
}

.import-preview th,
.import-preview td {
  padding: 8px 10px;
  white-space: nowrap;
}

.import-actions {
  display: flex;
  gap: 8px;
  margin-top: 13px;
}

.import-result {
  margin-top: 15px;
  padding: 15px;
  border-radius: 12px;
  background: var(--sage-soft);
  border: 1px solid #cbd9c8;
}

.import-result.warn {
  background: #fcf2e6;
  border-color: #ead3b8;
}

.import-result h4 {
  color: var(--ink-soft);
  font-size: 12px;
}

.import-result p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
}

.import-result .result-grid {
  display: flex;
  gap: 18px;
  margin-top: 11px;
}

.import-result .result-grid div {
  display: flex;
  flex-direction: column;
}

.import-result .result-grid strong {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
}

.import-result .result-grid span {
  color: var(--muted);
  font-size: 9px;
}

.import-errors {
  margin-top: 12px;
  border-top: 1px solid #e5d2b9;
  padding-top: 9px;
  color: #8c5b32;
  font-size: 9.5px;
}

.import-errors p {
  margin: 3px 0;
}

.export-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 14px;
}

.export-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 8px;
  border: 0;
  border-bottom: 1px solid #ebe7dd;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  transition: background 150ms ease;
}

.export-row:last-child {
  border-bottom: 0;
}

.export-row:hover {
  background: #f2efe7;
}

.export-row .export-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 9px;
  color: var(--moss);
  background: var(--sage-soft);
}

.export-row .export-icon.amber {
  color: var(--amber-deep);
  background: var(--amber-soft);
}

.export-row .export-icon .icon {
  width: 16px;
  height: 16px;
}

.export-row .copy {
  flex: 1;
  min-width: 0;
}

.export-row .copy strong {
  display: block;
  font-size: 11px;
  font-weight: 650;
}

.export-row .copy span {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
}

.export-row > .icon {
  width: 15px;
  height: 15px;
  color: var(--muted-light);
}

.storage-note {
  margin-top: 14px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(242, 239, 231, 0.6);
  font-size: 9.5px;
  line-height: 1.55;
}

.storage-note strong {
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Modal
   -------------------------------------------------------------------------- */

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 30, 23, 0.42);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fadeIn 180ms ease both;
}

.modal {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(560px, calc(100vw - 40px));
  max-height: min(88vh, 920px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow-lg);
  animation: modalIn 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.modal-lg {
  width: min(760px, calc(100vw - 40px));
}

.modal-xl {
  width: min(1040px, calc(100vw - 40px));
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-header .modal-title {
  min-width: 0;
  flex: 1;
}

.modal-header h2 {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  line-height: 1.2;
}

.modal-header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
}

.modal-close {
  flex: none;
}

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: rgba(242, 239, 231, 0.45);
}

.modal-footer .footer-left {
  color: var(--muted);
  font-size: 9.5px;
}

.modal-footer .footer-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.modal-note {
  padding: 10px 11px;
  border-radius: 8px;
  color: #7b5a34;
  background: #fcf1e3;
  font-size: 10px;
  line-height: 1.6;
}

.modal-note.info {
  color: var(--blue-ink);
  background: var(--blue-soft);
}

.confirm-modal {
  width: min(430px, calc(100vw - 40px));
}

.confirm-body {
  padding: 23px 24px 20px;
}

.confirm-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 12px;
  color: var(--amber-deep);
  background: var(--amber-soft);
}

.confirm-icon.danger {
  color: var(--red);
  background: var(--red-soft);
}

.confirm-icon .icon {
  width: 20px;
  height: 20px;
}

.confirm-body h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
}

.confirm-body p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.65;
  white-space: pre-line;
}

.confirm-actions {
  display: flex;
  gap: 8px;
  margin-top: 19px;
}

.confirm-actions .btn {
  flex: 1;
}

.pdf-preview-modal .modal-body {
  padding: 0;
  height: min(74vh, 820px);
  background: #525a55;
}

.pdf-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

/* --------------------------------------------------------------------------
   Order drawer
   -------------------------------------------------------------------------- */

.drawer-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 30, 23, 0.34);
  backdrop-filter: blur(3px);
  animation: fadeIn 160ms ease both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.drawer {
  position: absolute;
  inset: 0 0 0 auto;
  display: flex;
  flex-direction: column;
  width: min(570px, 94vw);
  height: 100%;
  background: var(--paper);
  box-shadow: -20px 0 60px rgba(19, 29, 22, 0.2);
  animation: drawerIn 250ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes drawerIn {
  from { transform: translateX(34px); opacity: 0.8; }
  to { transform: translateX(0); opacity: 1; }
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 19px 22px 15px;
  border-bottom: 1px solid var(--line);
}

.drawer-header .drawer-title {
  min-width: 0;
  flex: 1;
}

.drawer-header .drawer-title .eyebrow {
  margin-bottom: 4px;
}

.drawer-header h2 {
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.drawer-header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px 24px;
}

.drawer-loading {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--muted);
  font-size: 11px;
}

.amount-banner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  margin-bottom: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--line);
}

.amount-cell {
  padding: 12px 13px;
  background: var(--paper);
}

.amount-cell .label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
}

.amount-cell .value {
  margin-top: 2px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.amount-cell .value.amber {
  color: var(--amber-deep);
}

.amount-cell .value.green {
  color: var(--moss);
}

.amount-progress {
  padding: 12px 13px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.amount-progress .progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
}

.amount-progress .progress-line {
  height: 5px;
}

.drawer-section {
  margin-top: 18px;
}

.drawer-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}

.drawer-section-head h3 {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.drawer-section-head .head-actions {
  display: flex;
  gap: 5px;
  margin-left: auto;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.32);
}

.detail-item .label {
  color: var(--muted);
  font-size: 9px;
}

.detail-item .value {
  margin-top: 1px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.5;
  word-break: break-word;
}

.detail-item.full {
  grid-column: 1 / -1;
}

.payment-list,
.label-list,
.movement-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.payment-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.4);
}

.payment-row .payment-icon {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 7px;
  color: var(--moss);
  background: var(--sage-soft);
}

.payment-row .payment-icon .icon {
  width: 13px;
  height: 13px;
}

.payment-row .copy {
  min-width: 0;
  flex: 1;
}

.payment-row .copy strong {
  display: block;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.payment-row .copy span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.payment-row .ghost-icon {
  opacity: 0;
}

.payment-row:hover .ghost-icon {
  opacity: 1;
}

.label-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.4);
}

.label-row .file-mini {
  width: 27px;
  height: 33px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 5px;
  color: var(--amber-deep);
  background: var(--amber-soft);
}

.label-row .file-mini .icon {
  width: 14px;
  height: 14px;
}

.label-row .copy {
  min-width: 0;
  flex: 1;
}

.label-row .copy strong {
  display: block;
  overflow: hidden;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.label-row .copy span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.mini-empty {
  padding: 13px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.inline-form {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  margin-top: 8px;
  padding: 11px;
  border: 1px solid #d4ddcf;
  border-radius: 10px;
  background: var(--sage-soft);
  animation: reveal 180ms ease both;
}

.inline-form .field {
  flex: 1;
}

.inline-form .input {
  min-height: 34px;
  font-size: 10.5px;
}

.inline-form .btn {
  min-height: 34px;
}

.drawer-footer {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 22px;
  border-top: 1px solid var(--line);
  background: rgba(242, 239, 231, 0.6);
}

.drawer-footer .footer-spacer {
  flex: 1;
}

.drawer-footer .btn {
  flex: none;
}

.order-status-select {
  min-height: 38px;
}

/* --------------------------------------------------------------------------
   Empty states, loading, toast
   -------------------------------------------------------------------------- */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 22px;
  text-align: center;
}

.empty-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 16px;
  color: var(--moss);
  background: var(--sage-soft);
  transform: rotate(-3deg);
}

.empty-icon .icon {
  width: 23px;
  height: 23px;
}

.empty-state h3 {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
}

.empty-state p {
  max-width: 350px;
  margin: 5px 0 15px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.65;
}

.empty-state .empty-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: center;
}

.page-loading {
  min-height: 58vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}

.loading-mark {
  width: 34px;
  height: 34px;
  border: 2px solid #d9d5c8;
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

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

.spinner-inline {
  width: 13px;
  height: 13px;
  border: 1.5px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 600ms linear infinite;
}

.toast-root {
  position: fixed;
  z-index: 200;
  right: 22px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(380px, calc(100vw - 40px));
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 11px;
  color: #f8f3e8;
  background: rgba(27, 44, 33, 0.97);
  box-shadow: 0 12px 34px rgba(19, 29, 22, 0.24);
  font-size: 11px;
  line-height: 1.45;
  pointer-events: auto;
  animation: toastIn 220ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.toast.leaving {
  animation: toastOut 180ms ease both;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(6px); }
}

.toast .toast-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 7px;
  color: #1e3023;
  background: #e6b576;
}

.toast.error .toast-icon {
  color: #fff;
  background: var(--red);
}

.toast.plain .toast-icon {
  color: #dbe4d7;
  background: rgba(255, 255, 255, 0.1);
}

.toast .toast-icon .icon {
  width: 13px;
  height: 13px;
}

/* --------------------------------------------------------------------------
   Product images, batch entry and logistics follow-up
   -------------------------------------------------------------------------- */

.product-cell-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
}

.product-cell-copy {
  min-width: 0;
}

.product-thumb {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: none;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ece9df;
  transition: transform 150ms ease, border-color 150ms ease;
}

a.product-thumb:hover {
  border-color: #b9c7b5;
  transform: translateY(-1px);
}

.product-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.product-thumb.placeholder {
  color: var(--muted-light);
  background:
    radial-gradient(circle at 65% 25%, rgba(255, 255, 255, 0.65), transparent 32%),
    #ece9df;
}

.product-thumb.placeholder .icon {
  width: 19px;
  height: 19px;
}

.product-images-field {
  gap: 7px;
}

.image-field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.image-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 9px;
  border: 1px dashed #d4cfc1;
  border-radius: 11px;
  background: rgba(242, 239, 231, 0.42);
}

.image-gallery-empty {
  grid-column: 1 / -1;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--muted-light);
  font-size: 9.5px;
  line-height: 1.55;
  text-align: center;
}

.image-gallery-empty .icon {
  width: 20px;
  height: 20px;
}

.image-tile {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #e9e6dc;
}

.image-tile > a {
  display: block;
  width: 100%;
  height: 100%;
}

.image-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-tile-actions {
  position: absolute;
  top: 5px;
  right: 5px;
  display: flex;
  gap: 3px;
  opacity: 0;
  transition: opacity 140ms ease;
}

.image-tile:hover .image-tile-actions,
.image-tile:focus-within .image-tile-actions {
  opacity: 1;
}

.image-tile-btn {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: #f3eee2;
  background: rgba(27, 44, 33, 0.82);
  box-shadow: 0 3px 8px rgba(19, 29, 22, 0.14);
}

.image-tile-btn:hover {
  background: rgba(27, 44, 33, 0.96);
}

.image-tile-btn.danger {
  background: rgba(147, 65, 55, 0.88);
}

.image-tile-btn .icon {
  width: 12px;
  height: 12px;
}

.image-primary-tag {
  position: absolute;
  left: 5px;
  bottom: 5px;
  padding: 2px 6px;
  border-radius: 4px;
  color: #403014;
  background: #efc38b;
  box-shadow: 0 2px 7px rgba(19, 29, 22, 0.15);
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.image-add-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.image-add-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #c9c4b5;
  border-radius: 8px;
  color: var(--ink-soft);
  background: #fffefa;
  font-size: 10.5px;
  font-weight: 650;
}

.image-add-button:hover:not(:disabled) {
  border-color: #9fae9a;
  background: var(--sage-soft);
}

.image-add-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.image-add-button .icon {
  width: 14px;
  height: 14px;
}

.batch-paste-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    repeating-linear-gradient(135deg, rgba(66, 98, 74, 0.016) 0 8px, transparent 8px 16px),
    #f7f4ec;
}

.batch-paste-copy p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.6;
}

.batch-paste-area {
  min-height: 74px;
  margin-top: 9px;
  background: #fffefa;
  font-family: var(--mono);
  font-size: 10px;
}

.batch-paste-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.batch-table-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 13px;
  flex-wrap: wrap;
  margin-top: 17px;
}

.batch-table-toolbar > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.batch-date-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.batch-date-field .input {
  width: 138px;
  min-height: 33px;
  padding: 0 8px;
  font-size: 10px;
}

.batch-table-wrap {
  max-height: 43vh;
  margin-top: 10px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffefa;
}

.batch-table {
  width: 100%;
  min-width: 1030px;
  border-collapse: collapse;
}

.batch-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 8px 7px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: #f0ede4;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-align: left;
  white-space: nowrap;
}

.batch-table th em {
  color: var(--amber-deep);
  font-style: normal;
}

.batch-table td {
  padding: 6px;
  border-bottom: 1px solid #eeeae1;
  vertical-align: middle;
}

.batch-table tbody tr:last-child td {
  border-bottom: 0;
}

.batch-table tbody tr:hover {
  background: rgba(238, 244, 236, 0.42);
}

.batch-input {
  min-height: 32px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 10.5px;
}

.batch-table .batch-name {
  min-width: 148px;
}

.batch-table .batch-number {
  width: 82px;
  min-width: 82px;
}

.batch-row-number {
  width: 27px;
  color: var(--muted-light);
  font-family: var(--mono);
  font-size: 9px;
  text-align: center;
}

.batch-errors {
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid #e8c9c2;
  border-radius: 9px;
  color: #8d4f45;
  background: var(--red-soft);
  font-size: 10px;
  line-height: 1.6;
}

.batch-errors strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
}

.batch-errors p {
  margin-top: 2px;
}

.logistics-card {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.36);
}

.logistics-card.abnormal {
  border-color: #e7c6bf;
  background: var(--red-soft);
}

.logistics-card.resolved {
  border-color: #ceddc9;
  background: var(--sage-soft);
}

.logistics-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  color: var(--muted);
  font-size: 9px;
}

.logistics-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
}

.logistics-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted-light);
}

.logistics-card.abnormal .logistics-state {
  color: var(--red);
}

.logistics-card.abnormal .logistics-dot {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(174, 85, 72, 0.1);
}

.logistics-card.resolved .logistics-state {
  color: var(--moss);
}

.logistics-card.resolved .logistics-dot {
  background: var(--moss);
}

.logistics-card > strong {
  display: block;
  margin-top: 7px;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 700;
}

.logistics-card > p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.logistics-card > small {
  display: block;
  margin-top: 7px;
  color: var(--muted-light);
  font-size: 8.5px;
}

.clickable-attention {
  cursor: pointer;
}

.clickable-attention:hover {
  color: var(--ink);
}

.clickable-attention:hover .copy strong {
  color: var(--amber-deep);
}

.shipment-groups {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.shipment-day {
  overflow: hidden;
}

.shipment-day-head {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 96% 10%, rgba(207, 138, 77, 0.08), transparent 28%),
    rgba(244, 241, 233, 0.58);
}

.shipment-day-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.shipment-day-icon {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 10px;
  color: var(--moss);
  background: var(--sage-soft);
}

.shipment-day-icon .icon {
  width: 17px;
  height: 17px;
}

.shipment-day-head h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.shipment-day-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
}

.shipment-day-head .inline {
  margin-left: auto;
}

.shipment-day .table-wrap {
  padding: 0 8px;
}

.shipment-table {
  min-width: 860px;
}

.shipment-table th {
  padding-top: 10px;
  padding-bottom: 10px;
}

.shipment-table td {
  padding-top: 11px;
  padding-bottom: 11px;
}

.shipment-file-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 210px;
}

.shipment-file-line .copy {
  min-width: 0;
}

.shipment-file-line strong {
  display: block;
  max-width: 230px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shipment-file-line .tracking-code {
  display: block;
  max-width: 230px;
  overflow: hidden;
  margin-top: 2px;
  color: var(--amber-deep);
  font-family: var(--mono);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-orders-card {
  overflow: hidden;
}

.quick-orders-card .card-head {
  padding-bottom: 4px;
}

.quick-order-list {
  padding: 0 14px 10px;
}

.quick-order-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 6px;
  border-bottom: 1px solid rgba(222, 219, 207, 0.7);
  border-radius: 7px;
  cursor: pointer;
  transition: background 130ms ease;
}

.quick-order-row:last-child {
  border-bottom: 0;
}

.quick-order-row:hover {
  background: rgba(238, 244, 236, 0.55);
}

.quick-order-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 8px;
  color: var(--moss);
  background: var(--sage-soft);
}

.quick-order-icon .icon {
  width: 14px;
  height: 14px;
}

.quick-order-row .copy {
  min-width: 0;
  flex: 1;
}

.quick-order-row .copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-order-row .copy span {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
}

/* --------------------------------------------------------------------------
   Team, presence and authentication
   -------------------------------------------------------------------------- */

.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #cbd9c8;
  border-radius: 99px;
  color: #3f6649;
  background: #edf3eb;
  font-size: 9.5px;
  font-weight: 650;
  white-space: nowrap;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5f9367;
  box-shadow: 0 0 0 4px rgba(95, 147, 103, 0.12);
  animation: livePulse 2.4s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(95, 147, 103, 0.1); }
  50% { box-shadow: 0 0 0 6px rgba(95, 147, 103, 0.04); }
}

.live-chip.offline {
  color: var(--muted);
  border-color: var(--line);
  background: rgba(251, 250, 246, 0.6);
}

.live-chip.offline .live-dot {
  background: var(--muted-light);
  box-shadow: none;
  animation: none;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 8px 4px 10px;
  padding: 9px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-user-avatar {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 9px;
  color: #fff;
  background: var(--moss);
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
}

.sidebar-user-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar-user-copy strong {
  overflow: hidden;
  color: #eef1e9;
  font-size: 10.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-copy span {
  overflow: hidden;
  color: #849185;
  font-size: 8.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-icon-btn {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  flex: none;
  border: 0;
  border-radius: 6px;
  color: #8d9c8c;
  background: transparent;
}

.sidebar-icon-btn:hover {
  color: #f3ede1;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-icon-btn .icon {
  width: 13px;
  height: 13px;
}

.team-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 24px;
  padding: 26px;
  color: #f7f2e7;
  border: 0;
  background:
    radial-gradient(circle at 88% 12%, rgba(225, 176, 109, 0.2), transparent 28%),
    linear-gradient(130deg, #29432f, #1a2c20);
  box-shadow: 0 18px 46px rgba(27, 44, 33, 0.16);
}

.team-hero h2 {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 500;
  line-height: 1.3;
}

.team-hero p {
  margin-top: 6px;
  color: #a7b5a2;
  font-size: 11.5px;
}

.team-hero .eyebrow {
  color: #e6b576;
}

.team-identity {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
}

.team-me-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 11px;
  color: #fff;
  font-family: var(--serif);
  font-size: 16px;
}

.team-identity > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.team-identity strong {
  font-size: 11px;
  font-weight: 650;
}

.team-identity span {
  color: #9faf9b;
  font-size: 9px;
}

.team-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-self: center;
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.1);
}

.team-hero-stats > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 15px 13px;
  background: rgba(28, 46, 34, 0.8);
}

.team-hero-stats strong {
  color: #f7f0e2;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.1;
}

.team-hero-stats span {
  color: #99a996;
  font-size: 8.5px;
}

.permission-note {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 15px;
  border: 1px solid #d8dfd2;
  border-radius: 11px;
  color: #52685a;
  background: var(--sage-soft);
  font-size: 10.5px;
}

.permission-note .icon {
  width: 16px;
  height: 16px;
  flex: none;
}

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

.member-card {
  padding: 18px;
}

.member-card.inactive {
  opacity: 0.6;
  background: rgba(242, 239, 231, 0.64);
}

.member-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.member-avatar {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 13px;
  color: #fff;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
}

.online-pip {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: #6ca172;
}

.member-name {
  min-width: 0;
  flex: 1;
}

.member-name strong {
  display: block;
  overflow: hidden;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-name strong em {
  display: inline-block;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 4px;
  color: var(--moss);
  background: var(--sage-soft);
  font-family: var(--font);
  font-size: 8px;
  font-style: normal;
  vertical-align: 2px;
}

.member-name span {
  display: block;
  overflow: hidden;
  margin-top: 1px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 9px;
}

.member-actions {
  display: flex;
  gap: 5px;
  margin-top: 12px;
}

.member-actions .btn {
  min-height: 29px;
  font-size: 10px;
}

.member-add-card {
  min-height: 166px;
}

.member-activity {
  overflow: hidden;
}

.member-activity .card-head {
  padding-bottom: 10px;
}

.activity-list {
  padding: 0 20px 12px;
}

.activity-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #ebe7dd;
}

.activity-row:first-child {
  border-top: 0;
}

.activity-icon {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 8px;
  color: var(--moss);
  background: var(--sage-soft);
}

.activity-icon .icon {
  width: 14px;
  height: 14px;
}

.activity-copy {
  min-width: 0;
  flex: 1;
}

.activity-copy p {
  color: var(--ink-soft);
  font-size: 10.5px;
  line-height: 1.55;
}

.activity-copy p strong {
  font-weight: 650;
}

.activity-copy span {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 8.5px;
}

/* Auth */

body.auth-mode {
  background: var(--forest);
}

body.auth-mode #auth-root {
  min-height: 100vh;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(440px, 0.92fr);
  background: var(--paper);
}

.auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 34px 5vw 26px;
  overflow: hidden;
  color: #f6f1e6;
  background:
    radial-gradient(circle at 82% 18%, rgba(222, 166, 96, 0.18), transparent 27%),
    radial-gradient(circle at 12% 92%, rgba(109, 151, 112, 0.13), transparent 30%),
    linear-gradient(145deg, #263e2b 0%, #18291e 70%, #16251b 100%);
}

.auth-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.24;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.auth-visual::after {
  content: "";
  position: absolute;
  right: -130px;
  bottom: -170px;
  width: 480px;
  height: 480px;
  border: 1px solid rgba(226, 180, 115, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 0 42px rgba(226, 180, 115, 0.025), 0 0 0 92px rgba(226, 180, 115, 0.018);
}

.auth-visual > * {
  position: relative;
  z-index: 1;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
}

.auth-brand .brand-mark {
  width: 39px;
  height: 39px;
}

.auth-brand .brand-copy strong {
  font-size: 23px;
}

.auth-brand .brand-copy small {
  font-size: 7.5px;
}

.auth-visual-copy {
  max-width: 590px;
  margin-top: clamp(54px, 12vh, 120px);
}

.auth-visual-copy h1 {
  margin-top: 12px;
  font-family: var(--serif);
  font-size: clamp(42px, 4.6vw, 68px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.16;
}

.auth-visual-copy > p {
  max-width: 470px;
  margin-top: 17px;
  color: #a9b7a4;
  font-size: 12.5px;
  line-height: 1.8;
}

.auth-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 620px;
  margin-top: 32px;
}

.auth-point {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
}

.auth-point > span {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  flex: none;
  color: #e5b272;
}

.auth-point > span .icon {
  width: 17px;
  height: 17px;
}

.auth-point strong {
  display: block;
  color: #e7ebdf;
  font-size: 10px;
  font-weight: 650;
}

.auth-point p {
  margin-top: 3px;
  color: #849681;
  font-size: 8.5px;
  line-height: 1.55;
}

.auth-label-stack {
  position: relative;
  width: 300px;
  height: 128px;
  margin-top: auto;
  padding-top: 30px;
}

.auth-label-card {
  position: absolute;
  width: 244px;
  height: 116px;
  padding: 14px 16px;
  border-radius: 10px;
  transform: rotate(-5deg);
  background: #efe4d2;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.18);
}

.auth-label-card.back {
  top: 4px;
  left: 34px;
  color: #988d7b;
  transform: rotate(5deg);
  background: #d8c9b3;
}

.auth-label-card span {
  display: block;
  color: #9f927c;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.auth-label-card strong {
  display: block;
  margin-top: 8px;
  color: #2a392d;
  font-family: var(--serif);
  font-size: 18px;
}

.auth-label-card i {
  display: block;
  width: 88%;
  height: 3px;
  margin-top: 8px;
  border-radius: 99px;
  background: #d1c3ae;
}

.auth-label-card i.short {
  width: 54%;
}

.auth-label-card b {
  position: absolute;
  right: 15px;
  bottom: 12px;
  color: #7e897d;
  font-size: 6.5px;
  letter-spacing: 0.04em;
}

.auth-visual-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 27px;
  color: #6f826f;
  font-size: 7.5px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 7vw;
  background:
    radial-gradient(circle at 100% 0%, rgba(207, 138, 77, 0.08), transparent 28%),
    var(--paper);
}

.auth-card {
  width: min(398px, 100%);
}

.auth-mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 25px;
}

.auth-mobile-brand .brand-mark {
  width: 36px;
  height: 36px;
}

.auth-mobile-brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.1;
}

.auth-mobile-brand small {
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.auth-kicker {
  color: var(--amber-deep);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.auth-card h2 {
  margin-top: 7px;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.auth-subtitle {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.auth-notice {
  margin-top: 16px;
  padding: 9px 11px;
  border: 1px solid #d9e1d4;
  border-radius: 8px;
  color: #45634b;
  background: var(--sage-soft);
  font-size: 10px;
}

.auth-error {
  margin-top: 15px;
  padding: 9px 11px;
  border: 1px solid #eccdc7;
  border-radius: 8px;
  color: #9b4c40;
  background: #fbedeb;
  font-size: 10px;
  line-height: 1.55;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-top: 23px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field label {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
}

.auth-field > input,
.auth-password input {
  width: 100%;
  min-height: 45px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: #fffefb;
  font-size: 12.5px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.auth-field > input:focus,
.auth-password input:focus {
  border-color: #92a18d;
  box-shadow: 0 0 0 3px rgba(66, 98, 74, 0.09);
}

.auth-password {
  position: relative;
}

.auth-password input {
  padding-right: 42px;
}

.auth-eye {
  position: absolute;
  right: 5px;
  top: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  color: var(--muted-light);
  background: transparent;
  transform: translateY(-50%);
}

.auth-eye:hover {
  color: var(--ink);
  background: #f2efe7;
}

.auth-eye .icon {
  width: 15px;
  height: 15px;
}

.auth-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 47px;
  margin-top: 5px;
  padding: 0 15px 0 17px;
  border: 0;
  border-radius: 11px;
  color: #fff9ed;
  background: var(--forest);
  box-shadow: 0 10px 24px rgba(27, 44, 33, 0.17);
  font-size: 12.5px;
  font-weight: 650;
  transition: background 150ms ease, transform 150ms ease;
}

.auth-submit:hover {
  background: #29412f;
  transform: translateY(-1px);
}

.auth-submit:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.auth-submit .icon {
  width: 16px;
  height: 16px;
}

.auth-hint {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 16px;
  padding: 10px 11px;
  border: 1px dashed #d7c2a7;
  border-radius: 8px;
  color: #8b6138;
  background: #fbf1e5;
  font-size: 9.5px;
  line-height: 1.6;
}

.auth-hint .icon {
  width: 13px;
  height: 13px;
  margin-top: 1px;
  flex: none;
}

.auth-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--muted-light);
  font-size: 8.5px;
}

.auth-panel-foot {
  position: absolute;
  bottom: 24px;
  color: var(--muted-light);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.auth-panel {
  position: relative;
}

.auth-panel-foot span {
  padding: 0 3px;
}

.auth-loading {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #eef0e7;
  background:
    radial-gradient(circle at 50% 45%, rgba(206, 151, 82, 0.12), transparent 23%),
    var(--forest);
}

.auth-loading-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #e6b576;
  background: rgba(255, 255, 255, 0.06);
  animation: authFloat 2s ease-in-out infinite;
}

.auth-loading-mark .icon {
  width: 24px;
  height: 24px;
}

@keyframes authFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.auth-loading > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.auth-loading strong {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
}

.auth-loading span {
  color: #8d9d89;
  font-size: 9.5px;
}

.auth-loading-error {
  padding: 24px;
  text-align: center;
}

.auth-loading-error .auth-loading-mark {
  color: #e7a99b;
  background: rgba(174, 85, 72, 0.18);
}

/* Small consistency fixes */

.amount-progress {
  grid-column: 1 / -1;
}

.confirm-modal .modal-body {
  padding: 0;
}

.modal-footer {
  flex-wrap: wrap;
}

.order-status-select {
  width: auto;
  min-width: 108px;
  flex: none;
}

.onboarding-step .step-index .icon {
  width: 11px;
  height: 11px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1280px) {
  :root {
    --sidebar-width: 228px;
  }

  .main-content {
    padding: 24px 26px 60px;
  }

  .topbar {
    padding: 13px 26px;
  }

  .dashboard-top {
    grid-template-columns: 1.35fr 1fr 1fr;
  }

  .dashboard-top .metric-card:nth-child(4) {
    grid-column: span 3;
    min-height: 100px;
  }

  .dashboard-top .metric-card:nth-child(4) .metric-value {
    margin-top: 8px;
  }

  .account-grid,
  .member-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1060px) {
  .team-hero {
    grid-template-columns: 1fr;
  }

  .team-hero-stats {
    width: 100%;
  }

  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;
    padding: 52px 8vw;
    background:
      radial-gradient(circle at 88% 8%, rgba(207, 138, 77, 0.12), transparent 26%),
      radial-gradient(circle at 8% 95%, rgba(66, 98, 74, 0.08), transparent 28%),
      var(--paper);
  }

  .auth-mobile-brand {
    display: flex;
  }

  .auth-panel-foot {
    position: static;
    margin-top: 44px;
  }

  .dash-main-grid,
  .dash-bottom-grid,
  .labels-hero,
  .tools-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .labels-hero .labels-intro {
    min-height: 208px;
  }

  .dashboard-top {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-top .metric-card:nth-child(4) {
    grid-column: auto;
    min-height: 156px;
  }

  .inventory-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .batch-grid {
    grid-template-columns: 1fr;
  }

  .tools-hero {
    grid-template-columns: 1fr;
  }

  .data-stack {
    display: none;
  }
}

@media (max-width: 900px) {
  :root {
    --sidebar-width: 250px;
  }

  .sidebar {
    transform: translateX(-102%);
    transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 20px 0 50px rgba(19, 29, 22, 0.24);
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: block;
    border: 0;
    background: rgba(20, 30, 23, 0.38);
    opacity: 0;
    visibility: hidden;
    transition: opacity 220ms ease, visibility 220ms ease;
  }

  body.sidebar-open .sidebar-scrim {
    opacity: 1;
    visibility: visible;
  }

  .app-main {
    margin-left: 0;
  }

  .mobile-menu {
    display: inline-grid !important;
  }

  .topbar {
    min-height: 74px;
  }

  .account-grid,
  .member-grid {
    grid-template-columns: 1fr;
  }

  .account-hero .account-hero-stats {
    margin-left: 0;
  }
}

@media (max-width: 720px) {
  .image-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .image-field-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .image-tile-actions {
    opacity: 1;
  }

  .image-add-row {
    flex-wrap: wrap;
  }

  .batch-table-toolbar {
    align-items: flex-start;
  }

  .batch-date-field {
    flex: 1;
  }

  .batch-date-field .input {
    width: 100%;
  }

  .batch-table-wrap {
    max-height: 40vh;
  }

  .batch-paste-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .logistics-card-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .product-thumb {
    width: 38px;
    height: 38px;
  }

  .shipment-day-head {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 14px 15px;
  }

  .shipment-day-head .inline {
    width: 100%;
    margin-left: 45px;
  }

  .shipment-day .table-wrap {
    padding: 0 4px;
  }

  .shipment-table {
    min-width: 680px;
  }

  .shipment-file-line {
    min-width: 175px;
  }

  .shipment-file-line strong,
  .shipment-file-line .tracking-code {
    max-width: 180px;
  }

  .quick-order-list {
    padding-left: 10px;
    padding-right: 10px;
  }

  .quick-order-row {
    flex-wrap: wrap;
  }

  .quick-order-row .copy {
    flex-basis: calc(100% - 42px);
  }

  .quick-order-row .amount-sm {
    margin-left: 37px;
  }

  .quick-order-row > .status-pending,
  .quick-order-row > .status-ready,
  .quick-order-row > .status-forwarded,
  .quick-order-row > .status-shipped,
  .quick-order-row > .status-completed,
  .quick-order-row > .status-cancelled {
    margin-left: 37px;
  }

  .topbar {
    gap: 12px;
    padding: 10px 16px;
  }

  .page-heading h1 {
    font-size: 22px;
  }

  .page-heading span {
    font-size: 7.5px;
  }

  .today-chip,
  .live-chip {
    display: none;
  }

  .quick-add {
    width: 38px;
    min-height: 38px;
    padding: 0;
    border-radius: 10px;
  }

  .quick-add span {
    display: none;
  }

  .main-content {
    padding: 18px 16px 52px;
  }

  .dashboard-top,
  .inventory-metrics {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .metric-card {
    min-height: 135px;
    padding: 16px;
  }

  .dashboard-top .metric-card:nth-child(4) {
    min-height: 135px;
  }

  .metric-value {
    font-size: 27px;
  }

  .metric-meta {
    font-size: 9.5px;
  }

  .metric-link {
    display: none;
  }

  .dash-main-grid,
  .dash-bottom-grid {
    gap: 12px;
  }

  .card-head {
    padding: 17px 17px 0;
  }

  .chart-summary {
    gap: 15px;
    padding-left: 17px;
    padding-right: 17px;
  }

  .chart-legend {
    display: none;
  }

  .account-bars {
    padding: 16px 17px 10px;
  }

  .attention-block {
    padding-left: 17px;
    padding-right: 17px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .section-head .actions {
    width: 100%;
    margin-left: 0;
    flex-wrap: wrap;
  }

  .section-head .actions .btn {
    flex: 1;
  }

  .page-summary {
    gap: 15px;
    padding: 15px 17px;
  }

  .summary-stat {
    min-width: 88px;
  }

  .summary-stat .value {
    font-size: 18px;
  }

  .summary-divider {
    display: none;
  }

  .summary-spacer {
    display: none;
  }

  .summary-actions {
    width: 100%;
  }

  .summary-actions .btn {
    flex: 1;
  }

  .search-box {
    min-width: 0;
    flex: 1;
  }

  .filter-card {
    padding: 10px;
  }

  .filter-row .select {
    flex: 1;
    min-width: 110px;
  }

  .date-range {
    width: 100%;
  }

  .date-range .input {
    flex: 1;
    width: auto;
  }

  .hide-mobile {
    display: none !important;
  }

  .data-table th,
  .data-table td {
    padding: 11px 10px;
  }

  .order-table th:first-child,
  .order-table td:first-child,
  .inventory-table th:first-child,
  .inventory-table td:first-child,
  .labels-table th:first-child,
  .labels-table td:first-child {
    padding-left: 12px;
  }

  .order-table th:last-child,
  .order-table td:last-child,
  .labels-table th:last-child,
  .labels-table td:last-child {
    padding-right: 10px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .field.full,
  .form-grid .full {
    grid-column: auto;
  }

  .modal-layer {
    padding: 0;
    align-items: flex-end;
  }

  .modal,
  .modal-lg,
  .modal-xl {
    width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    animation-name: sheetIn;
  }

  @keyframes sheetIn {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .modal-header {
    padding: 17px 17px 13px;
  }

  .modal-body {
    padding: 16px 17px;
  }

  .modal-footer {
    padding: 12px 17px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .modal-footer .footer-left {
    display: none;
  }

  .modal-footer .footer-actions {
    width: 100%;
  }

  .modal-footer .footer-actions .btn {
    flex: 1;
  }

  .drawer {
    width: 100%;
    max-width: none;
  }

  .drawer-header,
  .drawer-body {
    padding-left: 17px;
    padding-right: 17px;
  }

  .drawer-footer {
    padding: 10px 17px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    overflow-x: auto;
  }

  .amount-banner {
    grid-template-columns: 1fr 1fr;
  }

  .amount-cell:last-of-type {
    grid-column: span 2;
  }

  .amount-progress {
    grid-column: 1 / -1;
  }

  .label-stats {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .label-stat {
    padding: 11px 15px;
  }

  .form-actions-mobile {
    flex-direction: column;
  }

  .account-hero {
    padding: 19px 17px;
  }

  .account-hero h2 {
    font-size: 22px;
  }

  .account-hero .account-hero-stats {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }

  .batch-actions {
    flex-wrap: wrap;
  }

  .batch-actions .btn {
    min-width: 110px;
  }

  .team-hero {
    padding: 20px 17px;
  }

  .team-hero h2 {
    font-size: 23px;
  }

  .team-hero-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .team-hero-stats > div {
    padding: 12px 10px;
  }

  .team-hero-stats strong {
    font-size: 21px;
  }

  .member-actions .btn {
    flex: 1;
  }

  .activity-list {
    padding: 0 17px 10px;
  }

  .auth-panel {
    padding: 38px 22px 44px;
    justify-content: flex-start;
  }

  .auth-card {
    margin-top: 10px;
  }

  .auth-card h2 {
    font-size: 30px;
  }

  .auth-mobile-brand {
    margin-bottom: 32px;
  }

  .auth-panel-foot {
    margin-top: 38px;
    text-align: center;
  }

  .selection-bar {
    bottom: 10px;
    flex-wrap: wrap;
    margin: 10px;
  }

  .selection-bar .selection-actions {
    width: 100%;
    margin-left: 0;
  }

  .selection-bar .selection-actions .btn {
    flex: 1;
  }

  .toast-root {
    right: 12px;
    left: 12px;
    bottom: 12px;
    align-items: stretch;
  }

  .toast {
    max-width: none;
  }
}

@media (max-width: 460px) {
  .dashboard-top,
  .inventory-metrics {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 120px;
  }

  .dashboard-top .metric-card:nth-child(4) {
    min-height: 120px;
  }

  .dashboard-top .metric-value {
    font-size: 32px;
  }

  .account-grid {
    gap: 10px;
  }

  .account-numbers {
    gap: 10px;
  }

  .summary-stat {
    min-width: 70px;
    flex: 1;
  }

  .summary-stat .value {
    font-size: 16px;
  }

  .toolbar .search-box {
    flex-basis: 100%;
  }

  .toolbar .select {
    flex: 1;
    min-width: 0;
  }

  .onboarding-card {
    grid-template-columns: 1fr;
    padding: 21px 18px;
  }

  .onboarding-card h2 {
    font-size: 23px;
  }

  .batch-stats {
    gap: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
