[hidden] {
  display: none !important;
}

:root {
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #166534;
  --primary-hover: #14532d;
  --primary-light: #f0fdf4;
  --danger: #b91c1c;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(15,23,42,0.06), 0 6px 24px rgba(15,23,42,0.04);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
}

.dashboard-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.34), rgba(15, 23, 42, 0.28)),
    url('./assets/hero-shot.png');
  background-size: cover;
  background-position: center;
  pointer-events: none;
}

body.authed .dashboard-bg {
  background-image:
    linear-gradient(rgba(241, 245, 249, 0.42), rgba(241, 245, 249, 0.52)),
    url('./assets/hero-shot.png');
}

.dashboard-app {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* ── Typography ── */
.kicker {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 2px;
}

h1 { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 1.05rem; font-weight: 700; }

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

/* ── Status Pill ── */
.status-pill {
  display: inline-block;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  background: var(--line);
  color: var(--muted);
  transition: all 0.2s;
}

.status-pill.ok {
  background: var(--primary-light);
  color: var(--primary);
}

.status-pill.err {
  background: #fef2f2;
  color: var(--danger);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 0.84rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); }

.btn-muted {
  background: var(--line);
  color: var(--text);
}
.btn-muted:hover { background: #cbd5e1; }

.btn-small {
  padding: 5px 12px;
  font-size: 0.78rem;
  border-radius: 8px;
}

.btn-danger-soft {
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #fecaca;
  background: #fff;
  color: var(--danger);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.btn-danger-soft:hover { background: #fef2f2; }

.btn-revert {
  background: #f8fafc;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 5px 12px;
  font-size: 0.78rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: background 0.15s;
}
.btn-revert:hover { background: #f1f5f9; }

.btn[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Topbar ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 1px 4px rgba(15,23,42,0.10);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#btn-settings {
  width: 40px;
  height: 40px;
  padding: 0;
}

#btn-settings svg {
  display: block;
}

/* ── Login Gate ── */
.login-gate {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 70vh;
}

.login-gate-card {
  text-align: center;
  background: var(--card);
  border-radius: var(--radius);
  padding: 48px 40px;
  box-shadow: var(--shadow);
  max-width: 400px;
  width: 100%;
}

.login-brand-mark {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(15,23,42,0.12);
  margin-bottom: 16px;
}

.login-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.auth-error-note {
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 0.9rem;
  font-weight: 600;
}

/* ── Settings drawer ── */
.settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
}

.settings-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
}

.settings-drawer {
  position: relative;
  width: min(380px, 90vw);
  height: 100%;
  background: var(--card);
  box-shadow: -8px 0 30px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.settings-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px 12px;
  border-bottom: 1px solid var(--line);
}

.settings-drawer-header h2 {
  margin: 0;
  font-size: 1.15rem;
}

.settings-hint {
  padding: 10px 20px 0;
  margin: 0;
}

.settings-module-list {
  list-style: none;
  margin: 0;
  padding: 10px 20px;
  flex: 1;
  overflow-y: auto;
}

.settings-module-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.settings-module-item:last-child { border-bottom: none; }

.module-label {
  font-weight: 600;
  font-size: 0.92rem;
}

.settings-module-actions {
  display: flex;
  gap: 6px;
}

.settings-btn-arrow {
  padding: 4px 10px;
  font-size: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.settings-btn-arrow:hover { background: var(--bg); }

.settings-drawer-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}

/* ── Module Cards ── */
.modules {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.module-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.module-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.module-head h2 {
  margin-bottom: 2px;
}

.module-head p {
  font-size: 0.82rem;
  color: var(--muted);
}

.module-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.module-body {
  padding: 16px 20px;
  min-height: 80px;
}

.module-body.loading {
  color: var(--muted);
  font-size: 0.88rem;
  font-style: italic;
}

.module-body.error {
  color: var(--danger);
  font-size: 0.88rem;
}

/* ── Data Tables ── */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table, .module-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.data-table th, .module-body table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table td, .module-body table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.data-table tr:last-child td, .module-body table tr:last-child td {
  border-bottom: none;
}

/* ── Tags ── */
.tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.74rem;
  font-weight: 600;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--muted);
}

.tag.scheduled { background: #dbeafe; color: #1d4ed8; }
.tag.confirmed { background: #fef9c3; color: #854d0e; }
.tag.delivered { background: #dcfce7; color: #166534; }
.tag.pending { background: #f3f4f6; color: #4b5563; }
.tag.active { background: #dcfce7; color: #166534; }
.tag.cancelled { background: #fecaca; color: #991b1b; }

/* ── Pricing Editor ── */
.pricing-section { margin-bottom: 20px; }
.pricing-section:last-child { margin-bottom: 0; }

.pricing-section-title {
  font-size: 0.88rem;
  margin-bottom: 10px;
}

.pricing-product-cards {
  display: grid;
  gap: 12px;
}

.pricing-product-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
  overflow: hidden;
}

.pricing-card-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.pricing-card-head h3 {
  font-size: 0.94rem;
  font-weight: 700;
}

.pricing-card-head p {
  margin-top: 2px;
  font-size: 0.74rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pricing-card-actions {
  padding: 0 14px;
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.pricing-card-actions .btn-danger-soft {
  font-size: 0.72rem;
  padding: 3px 10px;
}

.product-actions {
  margin: 12px 0;
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-save-pricing {
  background: #16a34a;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  margin-left: auto;
}

.btn-save-pricing:disabled {
  background: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
}

.btn-save-pricing:not(:disabled):hover {
  background: #15803d;
}

.btn-revert-pricing {
  background: #f59e0b;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-revert-pricing:disabled {
  background: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
}

.btn-revert-pricing:not(:disabled):hover {
  background: #d97706;
}

/* Delete Product Modal */
.delete-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.15s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.delete-modal {
  background: #fff;
  border-radius: 16px;
  padding: 28px 32px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.delete-modal-icon {
  font-size: 2.4rem;
  margin-bottom: 8px;
}
.delete-modal-title {
  color: #dc2626;
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 10px;
}
.delete-modal-warning {
  color: #991b1b;
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0 0 20px;
}
.delete-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.btn-delete-cancel {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 9px 22px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-delete-cancel:hover { background: #e5e7eb; }
.btn-delete-confirm {
  background: #dc2626;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 22px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}
.btn-delete-confirm:hover { background: #b91c1c; }

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

.pricing-card-group {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}

.pricing-card-group-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 8px;
}

.pricing-tier-list {
  display: grid;
  gap: 7px;
}

.pricing-tier-row,
.pricing-field-row {
  display: grid;
  grid-template-columns: minmax(96px, 1fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.pricing-tier-label,
.pricing-field-row span {
  font-size: 0.78rem;
  color: var(--muted);
}

.pricing-tier-row-flat {
  grid-template-columns: minmax(120px, 1fr) minmax(0, 1fr);
}

.pricing-input {
  width: 90px;
  padding: 6px 8px;
  font-size: 0.84rem;
  font-family: inherit;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  transition: border-color 0.15s;
}

.pricing-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(22,101,52,0.1);
}

.pricing-select {
  padding: 6px 8px;
  font-size: 0.84rem;
  font-family: inherit;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.pricing-select:focus {
  outline: none;
  border-color: var(--primary);
}

.pricing-card-group .pricing-input,
.pricing-card-group .pricing-select {
  width: 100%;
}

.editor-table td strong {
  display: block;
}

.zone-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Odell Chat Panel ── */
.odell-module-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.odell-profile-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: var(--primary-light);
  border: 1px solid rgba(22,101,52,0.15);
  flex-shrink: 0;
}

.odell-profile-photo {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  object-fit: cover;
  object-position: center top;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(15,23,42,0.10);
}

.odell-profile-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.odell-profile-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
}

.odell-profile-role {
  font-size: 0.68rem;
  color: var(--muted);
}

.odell-chat-body {
  display: flex;
  flex-direction: column;
  height: 440px;
  padding: 0;
}

.odell-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8fafc;
}

.odell-msg {
  display: flex;
  flex-direction: row;
  gap: 8px;
  max-width: 90%;
}

.odell-msg.user {
  flex-direction: row-reverse;
  align-self: flex-end;
  max-width: 85%;
}

.odell-msg.assistant {
  align-self: flex-start;
}

.odell-msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  object-fit: cover;
  object-position: center top;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(15,23,42,0.10);
  flex-shrink: 0;
  align-self: flex-end;
  margin-bottom: 2px;
}

.odell-msg-content {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.89rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.odell-msg.user .odell-msg-content {
  background: #166534;
  color: #fff;
  border-bottom-right-radius: 4px;
}

.odell-msg.assistant .odell-msg-content {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}

.odell-msg-error .odell-msg-content {
  background: #fef2f2;
  color: var(--danger);
  border-color: #fecaca;
}

.odell-input-row {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.odell-input {
  flex: 1;
  padding: 10px 14px;
  font: inherit;
  font-size: 0.89rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  resize: none;
  background: #f8fafc;
  transition: border-color 0.15s;
}

.odell-input:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}

.odell-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.1s;
  align-self: flex-end;
}

.odell-send-btn:hover { background: var(--primary-hover); }
.odell-send-btn:active { transform: scale(0.95); }
.odell-send-btn[disabled] { opacity: 0.45; cursor: not-allowed; }

.odell-status {
  padding: 8px 16px;
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: #f0fdf4;
  display: flex;
  align-items: center;
  gap: 8px;
  font-style: italic;
  transition: background 0.3s;
}

.odell-status-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  object-position: center top;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(15,23,42,0.10);
  flex-shrink: 0;
}

.odell-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.odell-status-dot.online {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34,197,94,0.4);
  animation: odell-pulse 1.5s ease-in-out infinite;
}

@keyframes odell-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.odell-head-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ── Orders Pagination ── */
.orders-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
  margin-top: 10px;
}

.orders-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  padding: 0;
  font-family: inherit;
}

.orders-page-btn:hover:not(:disabled) {
  background: var(--bg);
  border-color: var(--primary);
  color: var(--primary);
}

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

.orders-page-btn:active:not(:disabled) {
  transform: scale(0.94);
}

.orders-page-info {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

/* ── Sales Card ── */
.sales-kpi-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.sales-kpi {
  flex: 1;
  text-align: center;
  background: #f8fafc;
  border-radius: 12px;
  padding: 16px 12px;
  border: 1px solid var(--line);
}

.sales-kpi-num {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.sales-kpi-label {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 4px;
}

.sales-breakdown-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.sales-breakdown-card {
  flex: 1;
  border-radius: 12px;
  padding: 16px;
  border: 1px solid;
}

.sales-breakdown-card.paid {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.sales-breakdown-card.pending {
  background: #fffbeb;
  border-color: #fde68a;
}

.sales-breakdown-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.sales-breakdown-card.paid .sales-breakdown-label {
  color: #15803d;
}

.sales-breakdown-card.pending .sales-breakdown-label {
  color: #a16207;
}

.sales-breakdown-num {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
}

.sales-breakdown-sub {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 2px;
}

.sales-section {
  margin-bottom: 14px;
}

.sales-section:last-child {
  margin-bottom: 0;
}

.sales-section-title {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 8px;
}

.sales-method-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sales-method-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.sales-method-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
}

.sales-method-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
}

.sales-method-name {
  font-size: 0.84rem;
  font-weight: 600;
}

.sales-method-rev {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}

.sales-method-sub {
  font-size: 0.72rem;
  color: var(--muted);
}

.sales-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sales-status-chip {
  display: inline-block;
  padding: 4px 10px;
  font-size: 0.74rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text);
  border: 1px solid var(--line);
}

.sales-status-chip strong {
  text-transform: capitalize;
}

/* ── Sales Analytics: Trends ── */
.sales-trend-row {
  display: flex;
  gap: 12px;
  margin: 12px 0;
}

.sales-trend-card {
  flex: 1;
  padding: 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  min-width: 0;
}

.sales-trend-head {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}

.sales-trend-nums {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.sales-trend-rev {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}

.sales-trend-orders {
  font-size: 0.8rem;
  color: var(--muted);
}

.sales-trend-comp {
  font-size: 0.76rem;
  color: var(--muted);
}

.trend-arrow { font-weight: 700; font-size: 0.78rem; }
.trend-arrow.up { color: #166534; }
.trend-arrow.down { color: #b91c1c; }
.trend-arrow.flat { color: var(--muted); }

/* ── Sales Analytics: Split two-column ── */
.sales-split-row {
  display: flex;
  gap: 16px;
  margin: 12px 0;
}

.sales-split-col {
  flex: 1;
  min-width: 0;
}

.sales-split-col .sales-section-title {
  margin-bottom: 8px;
}

.sales-method-cards.inset {
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 6px;
  gap: 4px;
}

/* ── Payment Health ── */
.sales-health-cards {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.sales-health-card {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.sales-health-card.ok {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.sales-health-card.warn {
  background: #fef9c3;
  border-color: #fde68a;
}

.sales-health-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 2px;
}

.sales-health-num {
  display: block;
  font-size: 1rem;
  font-weight: 800;
}

.sales-health-card.ok .sales-health-num { color: #166534; }
.sales-health-card.warn .sales-health-num { color: #92400e; }

.sales-health-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 1px;
}

/* ── Fulfillment Status ── */
.sales-fulfill-section {
  margin-top: 4px;
}

.sales-fulfill-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sales-fulfill-card {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
  font-size: 0.78rem;
}

.sales-fulfill-count {
  font-weight: 700;
}

.sales-fulfill-rev {
  color: var(--muted);
  font-size: 0.74rem;
}

/* ── Daily Orders ── */
.sales-daily-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sales-daily-card {
  flex: 1;
  min-width: 100px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  text-align: center;
}

.sales-daily-day {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 2px;
}

.sales-daily-count {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
}

.sales-daily-rev {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 1px;
}

/* ── Top Customers ── */
.sales-top-cust-table td:first-child {
  font-weight: 600;
}

/* ── County Picker ── */
.county-cell {
  position: relative;
  min-width: 160px;
}

.county-picker-btn {
  display: inline-block;
  padding: 6px 10px;
  font-size: 0.8rem;
  font-family: inherit;
  font-weight: 500;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: border-color 0.15s;
}

.county-picker-btn:hover {
  border-color: var(--primary);
}

.county-checkbox-popup {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  z-index: 100;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 0;
  box-shadow: 0 4px 16px rgba(15,23,42,0.12);
  min-width: 200px;
  max-height: 240px;
  overflow-y: auto;
}

.county-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.1s;
  font-family: inherit;
}

.county-checkbox-label:hover {
  background: var(--primary-light);
}

.county-checkbox {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

/* ── Approve / Deny Buttons ── */
.app-actions {
  display: flex;
  gap: 6px;
}

.btn-approve,
.btn-deny {
  padding: 4px 12px;
  font-size: 0.74rem;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, opacity 0.15s;
}

.btn-approve {
  background: var(--primary);
  color: #fff;
}

.btn-approve:hover {
  background: var(--primary-hover);
}

.btn-deny {
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
}

.btn-deny:hover {
  background: #fee2e2;
}

.btn-approve[disabled],
.btn-deny[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .odell-module-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .odell-head-right {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 8px;
  }

  .odell-profile-chip {
    display: flex !important;
  }

  .odell-head-right .btn {
    width: 100%;
  }

  .sales-kpi-row {
    flex-direction: column;
  }

  .sales-trend-row {
    flex-direction: column;
  }

  .sales-split-row {
    flex-direction: column;
  }

  .sales-health-cards {
    flex-direction: column;
  }

  .sales-daily-row {
    flex-wrap: wrap;
  }

  .sales-daily-card {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }

  .sales-fulfill-cards {
    flex-direction: column;
  }

  .sales-fulfill-card {
    width: 100%;
  }

  .odell-msg {
    max-width: 95%;
  }

  .odell-msg.user {
    max-width: 90%;
  }

  #module-orders .table-wrap,
  #module-contractors .table-wrap,
  #module-applications .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -20px;
    padding: 0 20px 6px;
  }

  #module-orders table,
  #module-contractors table,
  #module-applications table {
    min-width: 700px;
  }

  #module-orders th,
  #module-orders td,
  #module-contractors th,
  #module-contractors td,
  #module-applications th,
  #module-applications td {
    white-space: nowrap;
  }

  #module-orders td:nth-child(2),
  #module-contractors td:nth-child(1),
  #module-contractors td:nth-child(2),
  #module-applications td:nth-child(1),
  #module-applications td:nth-child(2),
  #module-applications td:nth-child(4) {
    white-space: normal;
    min-width: 140px;
  }

  #module-applications .app-actions {
    justify-content: flex-start;
    flex-wrap: nowrap;
  }

  #module-pricing .table-wrap {
    overflow: visible;
    margin: 0;
    padding: 0;
  }

  .pricing-card-grid {
    grid-template-columns: 1fr;
  }

  .pricing-tier-row,
  .pricing-field-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  #module-pricing .editor-table,
  #module-pricing .editor-table thead,
  #module-pricing .editor-table tbody,
  #module-pricing .editor-table tr,
  #module-pricing .editor-table th,
  #module-pricing .editor-table td {
    display: block;
    width: 100%;
  }

  #module-pricing .editor-table thead {
    display: none;
  }

  #module-pricing .editor-table tr {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    margin-bottom: 14px;
    padding: 6px 0;
    box-shadow: 0 8px 24px rgba(15,23,42,0.06);
  }

  #module-pricing .editor-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
  }

  #module-pricing .editor-table td:last-child {
    border-bottom: none;
  }

  #module-pricing .editor-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  #module-pricing .editor-table td[data-label="Product"]::before,
  #module-pricing .editor-table td[data-label="Action"]::before {
    margin-bottom: 8px;
  }

  #module-pricing .editor-table .pricing-input,
  #module-pricing .editor-table .pricing-select,
  #module-pricing .editor-table .county-picker-btn,
  #module-pricing .editor-table .btn-danger-soft {
    width: 100%;
  }

  #module-pricing .editor-table .pricing-input,
  #module-pricing .editor-table .pricing-select,
  #module-pricing .editor-table .county-picker-btn {
    min-height: 42px;
  }

  #module-pricing .editor-table .county-checkbox-popup {
    width: 100%;
    max-width: none;
    left: 0;
    right: 0;
  }
}

@media (max-width: 480px) {
  .dashboard-app {
    padding: 16px 12px 48px;
  }

  #module-pricing .editor-table td {
    padding: 9px 12px;
  }

  .pricing-input {
    width: 100%;
    padding: 8px 10px;
    font-size: 0.84rem;
  }
}
