/* GIMS — Grain Inventory Management System (brand palette + light/dark) */
:root {
  --palette-maroon: #801b1b;
  --palette-red: #e32626;
  --palette-coral: #f9a8a8;
  --palette-taupe: #7d6363;
  --palette-bg-dark: #0b1120;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Inter", system-ui, -apple-system, sans-serif;
  --radius: 10px;
}

:root,
[data-theme="light"] {
  --bg0: #faf6f5;
  --bg1: #f3eceb;
  --surface: #ffffff;
  --surface2: #fdf8f7;
  --border: #e8d8d6;
  --text: #1a1214;
  --muted: #7d6363;
  --accent: #e32626;
  --accent2: #801b1b;
  --accent-dim: #5c1414;
  --accent-soft: rgba(249, 168, 168, 0.45);
  --danger: #c41e1e;
  --ok: #15803d;
  --gradient-nav: #ffffff;
  --gradient-btn: linear-gradient(180deg, #e32626, #801b1b);
  --shadow: 0 1px 2px rgba(26, 18, 20, 0.05), 0 4px 20px rgba(128, 27, 27, 0.08);
  --shadow-sm: 0 1px 2px rgba(26, 18, 20, 0.06);
  --chart-1: #e32626;
  --chart-2: #801b1b;
  --chart-3: #f9a8a8;
  --chart-4: #7d6363;
  --input-fill: #eef4fc;
  --input-border: #c5d9f0;
  --input-placeholder: #7d6363;
  --heading-accent: #801b1b;
  --link-accent: #e32626;
  --link-accent-hover: #5c1414;
  --focus-border: #e32626;
  --focus-ring: rgba(227, 38, 38, 0.15);
}

[data-theme="dark"] {
  --bg0: #0b1120;
  --bg1: #121a2a;
  --surface: #1a2234;
  --surface2: #222c42;
  --border: #2e3a52;
  --text: #f5f0ef;
  --muted: #c4a8a8;
  --accent: #f9a8a8;
  --accent2: #e32626;
  --accent-dim: #f9a8a8;
  --accent-soft: rgba(227, 38, 38, 0.18);
  --danger: #f87171;
  --ok: #4ade80;
  --gradient-nav: #1a2234;
  --gradient-btn: linear-gradient(180deg, #e32626, #801b1b);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --chart-1: #e32626;
  --chart-2: #f9a8a8;
  --chart-3: #801b1b;
  --chart-4: #7d6363;
  --input-fill: #222c42;
  --input-border: #3d4d66;
  --input-placeholder: #9a8a8a;
  --heading-accent: #f9a8a8;
  --link-accent: #f9a8a8;
  --link-accent-hover: #ffb8b8;
  --focus-border: #e32626;
  --focus-ring: rgba(249, 168, 168, 0.22);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  background: var(--bg0);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body {
  background: var(--bg0);
}

[data-theme="dark"] body {
  background: var(--bg0);
}

#root {
  min-height: 100vh;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

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

button {
  cursor: pointer;
}

.app-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.25rem 3rem;
}

.top-nav {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #1e3a5a;
  text-decoration: none;
}
[data-theme="dark"] .brand {
  color: #f1f5f9;
}
.brand:hover {
  color: var(--accent-dim);
  text-decoration: none;
}
[data-theme="dark"] .brand:hover {
  color: var(--accent2);
}

.nav-cluster {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-end;
}

.nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  justify-content: flex-end;
  max-width: 720px;
}

.nav-links a,
.nav-links .nav-pill {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.55rem;
  border-radius: 8px;
  text-decoration: none;
}
.nav-links a:hover {
  color: var(--accent);
  background: var(--surface2);
  text-decoration: none;
}
.nav-links a.active {
  color: #fff;
  background: var(--accent);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(29, 78, 216, 0.25);
}

.nav-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}

.grid2 {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.flow-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
}
.flow-steps li {
  counter-increment: step;
  position: relative;
  padding: 0.85rem 0 0.85rem 2.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.flow-steps li:last-child {
  border-bottom: none;
}
.flow-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 1.75rem;
  height: 1.75rem;
  line-height: 1.75rem;
  text-align: center;
  font-weight: 800;
  font-size: 0.75rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
}

label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field {
  margin-bottom: 0.9rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: var(--surface2);
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(227, 38, 38, 0.35);
  outline-offset: 0;
  border-color: var(--accent2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 0.8rem;
  box-shadow: var(--shadow-sm);
}
.btn:hover:not(.btn-primary):not(.btn-danger) {
  border-color: var(--accent2);
  background: var(--accent-soft);
}
.btn-primary {
  background: var(--gradient-btn);
  background-color: var(--accent);
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(128, 27, 27, 0.25);
}
.btn-primary:hover {
  background: var(--accent2);
  filter: none;
  box-shadow: 0 4px 14px rgba(227, 38, 38, 0.35);
}
[data-theme="dark"] .btn-primary:hover {
  background: var(--palette-red);
  box-shadow: 0 4px 14px rgba(227, 38, 38, 0.35);
}
.btn-danger {
  background: rgba(248, 113, 113, 0.15);
  border-color: var(--danger);
  color: var(--danger);
}
.btn-ghost {
  background: transparent;
}
.btn-theme,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.theme-toggle-icon {
  font-size: 0.95rem;
  line-height: 1;
}
[data-theme="light"] .theme-toggle-icon--moon,
[data-theme="dark"] .theme-toggle-icon--sun {
  display: none;
}
.store-topbar .theme-toggle {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}
.store-topbar .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
th,
td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
th {
  background: var(--surface2);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-pending {
  background: rgba(245, 158, 11, 0.2);
  color: #b45309;
}
[data-theme="dark"] .badge-pending {
  color: #fcd34d;
}
.badge-approved {
  background: rgba(52, 211, 153, 0.2);
  color: var(--ok);
}
.badge-rejected {
  background: rgba(248, 113, 113, 0.2);
  color: var(--danger);
}
.badge-draft {
  background: var(--surface2);
  color: var(--muted);
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.88rem;
}
.alert-error {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid var(--danger);
}
.alert-info {
  background: var(--accent-soft);
  border: 1px solid rgba(227, 38, 38, 0.25);
  color: var(--accent-dim);
}
[data-theme="dark"] .alert-info {
  background: rgba(227, 38, 38, 0.12);
  border-color: var(--border);
  color: var(--accent);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.line-table {
  margin-top: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.line-head {
  display: grid;
  grid-template-columns: 2fr 0.75fr 1fr 1fr 1fr 44px;
  gap: 0.5rem;
  padding: 0.75rem 0.85rem;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}

.line-th {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

.line-row {
  display: grid;
  grid-template-columns: 2fr 0.75fr 1fr 1fr 1fr 44px;
  gap: 0.5rem;
  padding: 0.85rem;
  align-items: end;
  border-bottom: 1px solid var(--border);
}
.line-row:last-child {
  border-bottom: none;
}

.line-row .field {
  margin-bottom: 0;
}
.line-row label {
  display: none;
}

.line-remove {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--muted);
}
.line-remove:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: rgba(248, 113, 113, 0.08);
}
.line-remove:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Sales line table: product, qty, cost/unit, cost total, sell/unit, line total, remove */
.line-table--sales .line-head,
.line-table--sales .line-row {
  grid-template-columns: 1.6fr 0.55fr 0.72fr 0.72fr 0.65fr 0.65fr 0.72fr 44px;
}
.line-table--sales input[readonly] {
  background: var(--surface2);
  color: var(--muted);
  cursor: default;
}

.line-table--sales .sale-line-remove-field {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.2rem;
  padding-bottom: 0.5rem;
  text-align: center;
}

.line-table--sales .sale-line-remove-btn {
  border: 1px solid #e5e7eb;
  background: transparent;
  color: var(--muted);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.line-table--sales .sale-line-remove-btn:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: rgba(248, 113, 113, 0.08);
}

.sale-line-row.is-removed {
  display: none;
}

@media (max-width: 768px) {
  .line-table {
    border-radius: 12px;
  }
  .line-head {
    display: none;
  }
  .line-row {
    grid-template-columns: 1fr;
  }
  .line-row label {
    display: block;
  }
  .line-remove {
    width: 100%;
  }
}

.help-callout {
  font-size: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--accent);
  margin-bottom: 1rem;
}
[data-theme="dark"] .help-callout {
  border-color: var(--border);
  border-left-color: var(--accent2);
}

.report-block {
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  background: var(--bg0);
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  white-space: pre-wrap;
  word-break: break-word;
}

.hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

/* --- Store shell (maroon sidebar, red accents) --- */
.store-app {
  --st-sidebar-active: #f9a8a8;
  --st-topbar-bg: #801b1b;
  --st-bg: var(--bg0);
  --st-card: var(--surface);
  --st-border: var(--border);
  --st-text: var(--text);
  --st-muted: var(--muted);
  --st-primary: #e32626;
  --st-primary-hover: #801b1b;
  --st-success: #15803d;
  --st-success-bg: #dcfce7;
  --st-accent-soft: var(--accent-soft);
  font-family: var(--font-body);
  display: flex;
  min-height: 100vh;
  background: var(--st-bg);
  color: var(--st-text);
  position: relative;
}

.store-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #0b1120 0%, #5c1414 38%, #801b1b 100%);
  color: rgba(255, 255, 255, 0.92);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 0;
  z-index: 40;
  transition: transform 0.2s ease;
}

.store-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.store-sidebar-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(145deg, #e32626, #801b1b);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.store-sidebar-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.store-sidebar-name {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.store-sidebar-tagline {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.store-sidebar-nav {
  flex: 1;
  padding: 0.75rem 0;
  overflow-y: auto;
}

.store-sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.1rem 0.65rem;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  border-left: none;
}
.store-sidebar-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
}
.store-sidebar-link--active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-left: none;
}

.store-sidebar-icon {
  width: 1.25rem;
  text-align: center;
  opacity: 0.85;
  font-size: 0.9rem;
}

.store-sidebar-group {
  margin: 0.15rem 0;
}

.store-sidebar-group-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: calc(100% - 1.3rem);
  margin: 0.1rem 0.65rem;
  padding: 0.6rem 0.9rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.store-sidebar-group-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.store-sidebar-chevron {
  margin-left: auto;
  font-size: 0.65rem;
  opacity: 0.7;
}

.store-sidebar-sub {
  padding-bottom: 0.35rem;
}

.store-sidebar-sublink {
  display: block;
  padding: 0.45rem 1.25rem 0.45rem 2.85rem;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.82rem;
  text-decoration: none;
}
.store-sidebar-sublink:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}
.store-sidebar-sublink--active {
  color: var(--st-sidebar-active);
  font-weight: 600;
}

.store-sidebar-foot {
  padding: 1rem 1.25rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.store-sidebar-foot-link {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
  text-decoration: none;
}
.store-sidebar-foot-link:hover {
  color: #fff;
}

.store-sidebar-foot-btn {
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  padding: 0;
}

.store-sidebar-scrim {
  display: none;
}

.store-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

.store-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  background: var(--st-topbar-bg);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  flex-wrap: wrap;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

.store-topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.store-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 1.1rem;
  cursor: pointer;
  color: #fff;
}

.store-breadcrumb {
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.store-topbar .store-breadcrumb-muted {
  color: rgba(255, 255, 255, 0.72);
}

.store-topbar .store-breadcrumb-sep {
  color: rgba(255, 255, 255, 0.4);
}

.store-topbar .store-breadcrumb-current {
  font-weight: 600;
  color: #fff;
}

.store-topbar .store-back-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
}
.store-topbar .store-back-link:hover {
  text-decoration: underline;
  color: #fff;
}

.store-topbar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.store-user-meta {
  text-align: right;
  line-height: 1.25;
}

.store-topbar .store-user-name {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
}

.store-topbar .store-user-phone {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
}

.store-topbar .store-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), #e0e7ff);
  border: 2px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.store-content {
  flex: 1;
  padding: 1.5rem;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.store-footer {
  text-align: center;
  padding: 1rem 1.5rem 1.25rem;
  font-size: 0.8125rem;
  color: var(--st-muted);
}
.store-footer a {
  color: var(--st-primary);
  font-weight: 600;
  text-decoration: none;
}
.store-footer a:hover {
  text-decoration: underline;
  color: var(--st-primary-hover);
}

.store-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--st-topbar-bg);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
  z-index: 30;
}
.store-fab:hover {
  background: var(--st-primary-hover);
  color: #fff;
}

/* Page hero + panel */
.store-page-hero {
  background: var(--st-card);
  border-radius: 10px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--st-border);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.store-page-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  color: var(--st-text);
}

.store-page-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--st-muted);
  line-height: 1.55;
  max-width: 720px;
}

.store-panel {
  background: var(--st-card);
  border-radius: 10px;
  border: 1px solid var(--st-border);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

/* Stacked panels (e.g. dashboard) — consistent vertical rhythm */
.store-app .store-panel + .store-panel {
  margin-top: 1.75rem;
}

.store-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--st-border);
}

.store-panel-kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--st-muted);
  text-transform: uppercase;
}

.store-panel-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--st-muted);
}

.store-panel-action .btn-primary {
  background: var(--st-primary);
  border: none;
  color: #fff;
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  font-weight: 600;
  font-size: 0.8125rem;
}
.store-panel-action .btn-primary:hover {
  background: var(--st-primary-hover);
  filter: none;
}

.store-panel-action .btn-ghost {
  background: var(--st-card);
  border: 1px solid var(--st-border);
  color: var(--st-text);
  border-radius: 8px;
}

.store-panel-body {
  padding: 0;
}

.store-panel-body .table-wrap {
  border: none;
  border-radius: 0;
}

.store-panel-body table th {
  background: #f8fafc;
  color: var(--st-muted);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--st-border);
}

.store-panel-body table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--st-border);
  font-size: 0.875rem;
  color: var(--st-text);
}

.store-panel-body table tr:last-child td {
  border-bottom: none;
}

.store-panel-body input,
.store-panel-body select {
  background: #fff;
  border: 1px solid var(--st-border);
  color: var(--st-text);
}

.store-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--st-success-bg);
  color: var(--st-success);
}

.store-inline-help {
  font-size: 0.85rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid rgba(227, 38, 38, 0.2);
  color: var(--palette-maroon);
}
[data-theme="dark"] .store-inline-help {
  background: rgba(227, 38, 38, 0.12);
  border-color: var(--st-border);
  color: var(--palette-coral);
}

.store-section-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--st-muted);
  text-transform: uppercase;
}

.store-section-blurb {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  color: var(--st-muted);
  line-height: 1.45;
}

.store-dash-quick-body {
  padding: 1.25rem 1.5rem;
}

.store-dash-analytics-body {
  padding: 1.25rem 1.5rem;
}

.store-dash-kpi-grid {
  margin-top: 0;
}

.store-dash-kpi {
  padding: 0.9rem 1rem;
}

.store-dash-kpi-label {
  font-size: 0.8rem;
}

.store-dash-kpi-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--st-text);
}

.store-dash-chart-grid {
  margin-top: 0.75rem;
  align-items: stretch;
}

.store-dash-chart-card {
  padding: 0.85rem 1rem;
}

.store-dash-chart-title {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--st-text);
}

.store-dash-chart-mount {
  min-height: 320px;
}

.store-dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.store-dash-card {
  display: block;
  background: var(--st-card);
  border: 1px solid var(--st-border);
  border-radius: 10px;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.04);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  --dash-stripe: var(--st-primary);
}
.store-dash-card--stripe {
  border-left: 4px solid var(--dash-stripe);
  padding-left: 1.15rem;
}
.store-dash-card--navy {
  --dash-stripe: var(--palette-maroon);
}
.store-dash-card--blue {
  --dash-stripe: var(--palette-coral);
}
.store-dash-card--purple {
  --dash-stripe: var(--palette-maroon);
}
.store-dash-card--green {
  --dash-stripe: var(--palette-red);
}
.store-dash-card--orange {
  --dash-stripe: var(--palette-taupe);
}
.store-dash-card--slate {
  --dash-stripe: var(--palette-taupe);
}
.store-dash-card:hover {
  border-color: var(--palette-coral);
  box-shadow: 0 8px 24px rgba(227, 38, 38, 0.12), 0 2px 6px rgba(15, 23, 42, 0.06);
  text-decoration: none;
  color: inherit;
}
[data-theme="dark"] .store-dash-card:hover {
  border-color: var(--palette-maroon);
}
.store-dash-kicker {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  color: var(--st-muted);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.store-dash-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--st-text);
}
.store-dash-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--st-muted);
  line-height: 1.45;
}

dialog.store-dash-modal {
  border: 1px solid var(--st-border);
  border-radius: 12px;
  padding: 0;
  max-width: 440px;
  width: calc(100vw - 2rem);
  background: var(--st-card);
  color: var(--st-text);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
}
dialog.store-dash-modal::backdrop {
  background: rgba(15, 23, 42, 0.4);
}
.store-dash-modal__body {
  padding: 1.25rem 1.35rem 1rem;
}
.store-dash-modal__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}
.store-dash-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.85rem 1.35rem 1.15rem;
  border-top: 1px solid var(--st-border);
  background: var(--st-surface);
  border-radius: 0 0 12px 12px;
}

.store-app .flow-steps li {
  border-bottom-color: var(--st-border);
}
.store-app .flow-steps li::before {
  background: var(--st-primary);
  color: #fff;
}
.store-app .flow-steps a {
  color: var(--st-primary);
}

.store-row-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

/* Store shell — dark mode */
[data-theme="dark"] .store-sidebar {
  background: linear-gradient(180deg, #0b1120 0%, #1a1218 42%, #5c1414 100%);
}

[data-theme="dark"] .store-app {
  --st-topbar-bg: #5c1414;
  --st-bg: var(--palette-bg-dark);
  --st-card: #1a2234;
  --st-border: #2e3a52;
  --st-text: #f5f0ef;
  --st-muted: #c4a8a8;
  --st-primary: #e32626;
  --st-primary-hover: #f9a8a8;
  --st-success: #4ade80;
  --st-success-bg: rgba(34, 197, 94, 0.18);
  --st-sidebar-active: #f9a8a8;
}

[data-theme="dark"] .store-panel-body table th {
  background: var(--surface2);
}

[data-theme="dark"] .store-panel-body input,
[data-theme="dark"] .store-panel-body select {
  background: var(--surface2);
}

@media (max-width: 900px) {
  .store-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
  }
  .store-app--nav-open .store-sidebar {
    transform: translateX(0);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.2);
  }
  .store-app--nav-open .store-sidebar-scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 35;
  }
  .store-menu-btn {
    display: inline-flex;
  }
  .store-content {
    padding: 1rem;
  }
}

/* --- Auth pages (split login card) --- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem 3rem;
  background: var(--bg0);
}

.auth-page-toolbar {
  width: 100%;
  max-width: 920px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.auth-back-landing {
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}
.auth-back-landing:hover {
  color: var(--palette-red);
}

.auth-page > .alert {
  width: 100%;
  max-width: 920px;
  margin-bottom: 1rem;
}

.auth-card {
  display: grid;
  grid-template-columns: minmax(240px, 38%) 1fr;
  width: 100%;
  max-width: 920px;
  min-height: 420px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14), 0 8px 24px rgba(128, 27, 27, 0.08);
  border: 1px solid var(--border);
}

.auth-card-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem 2rem 2.25rem;
  background: linear-gradient(165deg, #5c1414 0%, #801b1b 45%, #9a2222 100%);
  color: #fff;
  overflow: hidden;
}

.auth-card-brand-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  position: relative;
  z-index: 1;
}

.auth-card-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
}

.auth-card-brand-name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.auth-card-brand-copy {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 3rem;
}

.auth-card-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.auth-card-headline {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.auth-card-decor {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 55%;
  pointer-events: none;
}

.auth-card-circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}
.auth-card-circle--1 {
  width: 140px;
  height: 140px;
  left: -28px;
  bottom: -40px;
}
.auth-card-circle--2 {
  width: 200px;
  height: 200px;
  left: 40px;
  bottom: -90px;
  background: rgba(255, 255, 255, 0.06);
}

.auth-card-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2.5rem 2.75rem;
  background: var(--surface);
}

.auth-card-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.auth-card-lead {
  margin: 0 0 1.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.auth-field {
  margin: 0;
}

.auth-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--input-border);
  background: var(--input-fill);
  color: var(--text);
  font-size: 0.9375rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.auth-input::placeholder {
  color: var(--input-placeholder);
  opacity: 0.9;
}
.auth-input:focus {
  outline: none;
  border-color: var(--focus-border);
  box-shadow: 0 0 0 3px var(--focus-ring);
  background: var(--surface);
}

.auth-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-password-wrap .auth-input {
  padding-right: 3rem;
}

.auth-password-toggle {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.auth-password-toggle:hover {
  color: var(--link-accent);
  background: var(--accent-soft);
}
.auth-eye {
  display: block;
  flex-shrink: 0;
}
.auth-eye[hidden] {
  display: none;
}

.auth-field-error {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--danger);
}

.auth-forgot-row {
  display: flex;
  justify-content: flex-end;
  margin: -0.15rem 0 0.35rem;
}

.auth-forgot-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--link-accent);
  text-decoration: none;
}
.auth-forgot-link:hover {
  text-decoration: underline;
  color: var(--link-accent-hover);
}

.auth-btn-signin {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.9rem 1.25rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, #e32626, #801b1b);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 20px rgba(128, 27, 27, 0.28);
  cursor: pointer;
}
.auth-btn-signin:hover {
  filter: brightness(1.05);
  box-shadow: 0 10px 24px rgba(128, 27, 27, 0.35);
}

.auth-card-foot {
  margin: 1.5rem 0 0;
  font-size: 0.8125rem;
  text-align: center;
}
.auth-card-foot a {
  font-weight: 600;
}

/* --- Marketing landing page --- */
.landing {
  min-height: 100vh;
  background: var(--bg0);
  color: var(--text);
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  max-width: 1160px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
  color: var(--text);
  text-decoration: none;
}
.landing-brand:hover {
  text-decoration: none;
  color: var(--link-accent);
}

.landing-brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(145deg, #e32626, #801b1b);
  color: #fff;
}

.landing-nav-links {
  display: flex;
  gap: 1.35rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.landing-nav-links a {
  color: var(--muted);
  text-decoration: none;
}
.landing-nav-links a:hover {
  color: var(--link-accent);
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.landing-btn-nav {
  font-size: 0.8125rem;
}

.landing-btn-cta,
.landing-btn-hero,
a.landing-btn-cta,
a.landing-btn-hero {
  background: linear-gradient(180deg, #e32626, #801b1b) !important;
  color: #ffffff !important;
  border: none !important;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(128, 27, 27, 0.25);
  text-decoration: none;
}
.landing-btn-cta:hover,
.landing-btn-hero:hover,
a.landing-btn-cta:hover,
a.landing-btn-hero:hover {
  filter: brightness(1.06);
  color: #ffffff !important;
  text-decoration: none;
  background: linear-gradient(180deg, #e32626, #801b1b) !important;
}

.landing-hero {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 42%);
  gap: 2.5rem;
  align-items: center;
  max-width: 1160px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.landing-hero-kicker {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--link-accent);
}

.landing-hero-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.landing-hero-desc {
  margin: 0 0 1.75rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 34rem;
}

.landing-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.landing-btn-hero {
  padding: 0.75rem 1.35rem;
  border-radius: 12px;
  font-size: 0.9375rem;
}

.landing-btn-hero-secondary {
  padding: 0.75rem 1.35rem;
  border-radius: 12px;
  font-size: 0.9375rem;
}

.landing-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.landing-hero-stats li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.landing-hero-stats strong {
  font-size: 0.95rem;
  color: var(--text);
}
.landing-hero-stats span {
  font-size: 0.8rem;
  color: var(--muted);
}

.landing-hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.landing-mock-card {
  width: 100%;
  max-width: 360px;
  padding: 1.25rem 1.35rem;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(128, 27, 27, 0.12), 0 8px 24px rgba(15, 23, 42, 0.08);
}

.landing-mock-head {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.landing-mock-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  height: 120px;
  margin-bottom: 1rem;
}
.landing-mock-bars span {
  flex: 1;
  height: var(--h);
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #f9a8a8, #e32626);
}

.landing-mock-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.landing-mock-kpis div {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
}
.landing-mock-kpis small {
  display: block;
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.landing-mock-kpis strong {
  font-size: 1.1rem;
  color: var(--heading-accent);
}

.landing-section {
  max-width: 1160px;
  margin: 0 auto;
  padding: 3.5rem 1.5rem;
}
.landing-section--alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  max-width: none;
}
.landing-section--alt .landing-section-title,
.landing-section--alt .landing-section-lead,
.landing-section--alt .landing-steps {
  max-width: 1160px;
  margin-left: auto;
  margin-right: auto;
}

.landing-section-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  text-align: center;
}

.landing-section-lead {
  text-align: center;
  margin: 0 auto 2.5rem;
  max-width: 32rem;
}

.landing-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.landing-feature {
  padding: 1.35rem 1.4rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--palette-red);
}
.landing-feature h3 {
  margin: 0.5rem 0 0.4rem;
  font-size: 1.05rem;
}
.landing-feature p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}

.landing-feature-icon {
  font-size: 1.25rem;
  color: var(--heading-accent);
}

.landing-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
  max-width: 640px;
}
.landing-steps li {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
.landing-step-num {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #e32626, #801b1b);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
}
.landing-steps h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
.landing-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.landing-cta-band {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: linear-gradient(165deg, #5c1414 0%, #801b1b 50%, #9a2222 100%);
  color: #fff;
}
.landing-cta-band h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: #ffffff;
}
.landing-cta-band p {
  margin: 0 0 1.5rem;
  color: rgba(255, 255, 255, 0.9);
}
.landing-cta-band .landing-btn-hero {
  display: inline-flex;
}

.landing-hero-dotsinc {
  color: var(--link-accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.landing-hero-dotsinc:hover {
  color: var(--link-accent-hover);
}

.landing-problems {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.15rem;
  max-width: 1160px;
  margin: 0 auto;
}
.landing-problem {
  padding: 1.2rem 1.3rem;
  border-radius: 12px;
  background: var(--bg0);
  border: 1px solid var(--border);
}
.landing-problem h3 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
  color: var(--heading-accent);
}
.landing-problem p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.55;
}

.landing-dotsinc {
  padding: 4rem 1.5rem;
  background: linear-gradient(180deg, var(--bg0) 0%, var(--surface) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.landing-dotsinc-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: start;
}
.landing-dotsinc-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--link-accent);
}
.landing-dotsinc-title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.landing-dotsinc-copy p {
  margin: 0 0 1rem;
  font-size: 0.975rem;
  line-height: 1.65;
  color: var(--muted);
}
.landing-dotsinc-copy p strong {
  color: var(--text);
}
.landing-dotsinc-values {
  margin: 1.25rem 0 1.75rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
}
.landing-dotsinc-values li {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
  padding-left: 1.1rem;
  border-left: 3px solid var(--palette-coral);
}
.landing-dotsinc-values strong {
  color: var(--text);
}
.landing-dotsinc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.landing-dotsinc-aside {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.landing-quote {
  margin: 0;
  padding: 1.35rem 1.4rem;
  border-radius: 14px;
  background: linear-gradient(165deg, #5c1414 0%, #801b1b 100%);
  color: #fff;
  border: none;
}
.landing-quote p {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  line-height: 1.55;
  font-style: italic;
}
.landing-quote footer {
  font-size: 0.85rem;
  font-style: normal;
  color: rgba(255, 255, 255, 0.85);
}
.landing-quote a {
  color: #f9a8a8;
  font-weight: 600;
}
.landing-dotsinc-card {
  padding: 1.35rem 1.4rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.landing-dotsinc-card h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}
.landing-dotsinc-card ul {
  margin: 0;
  padding: 0 0 0 1.1rem;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}
.landing-dotsinc-card a {
  font-weight: 600;
}

.landing-audience {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.15rem;
}
.landing-audience-item {
  padding: 1.25rem 1.3rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
}
.landing-audience-item h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  color: var(--heading-accent);
}
.landing-audience-item p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.landing-steps {
  max-width: 720px;
}

.landing-benefits {
  padding: 3.5rem 1.5rem;
  background: var(--surface2);
  border-top: 1px solid var(--border);
}
.landing-benefits-inner {
  max-width: 1160px;
  margin: 0 auto;
}
.landing-benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}
.landing-benefit {
  padding: 1.35rem 1.25rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.landing-benefit-num {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--link-accent);
  margin-bottom: 0.5rem;
}
.landing-benefit h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}
.landing-benefit p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.landing-cta-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}
.landing-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
.landing-btn-cta-outline {
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.45) !important;
  background: transparent !important;
}
.landing-btn-cta-outline:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: #fff !important;
}

.landing-footer {
  padding: 2.5rem 1.5rem 2rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.landing-footer-grid {
  max-width: 1160px;
  margin: 0 auto 2rem;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem 1.5rem;
}
.landing-footer-col h4 {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.landing-footer-col a:not(.btn) {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 0.4rem;
}
.landing-footer-col a:not(.btn):hover {
  color: var(--link-accent);
}
.landing-footer-col .btn.landing-btn-cta {
  display: inline-flex;
  margin-top: 0.35rem;
  margin-bottom: 0;
}
.landing-footer-brand {
  font-size: 1.15rem;
  color: var(--text);
  display: block;
  margin-bottom: 0.35rem;
}
.landing-footer-copy {
  max-width: 1160px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8125rem;
}
.landing-footer-copy a {
  color: var(--link-accent);
  font-weight: 600;
}

/* Landing + public auth — light/dark contrast */
.landing .muted,
.auth-page .muted,
.app-shell .muted {
  color: var(--muted);
}

.landing-hero-title,
.landing-section-title,
.landing-dotsinc-title,
.landing-card-title,
.landing-feature h3,
.landing-problem h3,
.landing-audience-item h3,
.landing-benefit h3,
.landing-steps h3,
.landing-dotsinc-card h3,
.landing-footer-brand,
.landing-footer-col h4,
.auth-page h1,
.auth-card-title,
.app-shell h1 {
  color: var(--text);
}

/* Maroon panels: always light text (overrides rules above) */
.landing .landing-cta-band,
.landing .landing-cta-band h2,
.landing .landing-cta-band p,
.landing .landing-cta-band .landing-cta-eyebrow {
  color: #ffffff;
}
.landing .landing-cta-band p {
  color: rgba(255, 255, 255, 0.9);
}
.landing .landing-cta-band .landing-cta-eyebrow {
  color: rgba(255, 255, 255, 0.85);
}

.landing .landing-quote,
.landing .landing-quote p,
.landing .landing-quote footer {
  color: #ffffff;
}
.landing .landing-quote footer {
  color: rgba(255, 255, 255, 0.88);
}

.landing a:not(.btn):not(.landing-brand):not(.landing-btn-hero):not(.landing-btn-cta),
.auth-card-foot a {
  color: var(--link-accent);
}
.landing a:not(.btn):hover,
.auth-card-foot a:hover {
  color: var(--link-accent-hover);
}

.landing-btn-hero-secondary {
  color: var(--text);
  border-color: var(--border);
  background: var(--surface);
}
.landing-btn-hero-secondary:hover {
  border-color: var(--link-accent);
  color: var(--link-accent);
  background: var(--accent-soft);
}

.landing-nav-actions .btn-ghost {
  color: var(--text);
  background: var(--surface);
  border-color: var(--border);
}
.landing-nav-actions .btn-ghost:hover {
  color: var(--link-accent);
  border-color: var(--link-accent);
  background: var(--accent-soft);
}

.landing-feature {
  border-left-color: var(--link-accent);
}

.landing-dotsinc-values li {
  border-left-color: var(--link-accent);
}

.landing-dotsinc-card a,
.landing-quote a {
  color: var(--link-accent-hover);
}

[data-theme="dark"] .landing-problem {
  background: var(--surface2);
  border-color: var(--border);
}

[data-theme="dark"] .landing-section--alt {
  background: var(--bg1);
}

[data-theme="dark"] .landing-benefits {
  background: var(--bg1);
}

[data-theme="dark"] .landing-audience-item,
[data-theme="dark"] .landing-benefit {
  background: var(--surface);
  border-color: var(--border);
}

[data-theme="dark"] .landing-mock-card {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .landing-mock-bars span {
  background: linear-gradient(180deg, #f9a8a8, #e32626);
}

[data-theme="dark"] .auth-card {
  border-color: var(--border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .auth-card-foot a {
  color: var(--link-accent);
}

[data-theme="dark"] .auth-back-landing {
  color: var(--muted);
}
[data-theme="dark"] .auth-back-landing:hover {
  color: var(--link-accent);
}

[data-theme="dark"] .app-shell .card {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

[data-theme="dark"] .app-shell input,
[data-theme="dark"] .app-shell select,
[data-theme="dark"] .app-shell textarea {
  background: var(--input-fill);
  border-color: var(--input-border);
  color: var(--text);
}

[data-theme="dark"] .app-shell input::placeholder,
[data-theme="dark"] .app-shell textarea::placeholder {
  color: var(--input-placeholder);
}

[data-theme="dark"] .top-nav {
  background: var(--surface);
  border-color: var(--border);
}

[data-theme="dark"] .top-nav .brand {
  color: var(--text);
}

@media (max-width: 900px) {
  .landing-nav-links {
    display: none;
  }
  .landing-dotsinc-inner {
    grid-template-columns: 1fr;
  }
  .landing-footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .landing-hero {
    grid-template-columns: 1fr;
    padding-top: 1.5rem;
  }
  .landing-hero-visual {
    order: -1;
  }
  .landing-mock-card {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .auth-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .auth-card-brand {
    min-height: 200px;
    padding: 1.5rem 1.5rem 1.75rem;
  }
  .auth-card-brand-copy {
    padding-top: 1.5rem;
  }
  .auth-card-headline {
    font-size: 1.35rem;
  }
  .auth-card-form {
    padding: 1.75rem 1.5rem 2rem;
  }
}
