/* StoneVaults — premium minimal dashboard theme */
:root {
  --sv-dash-bg: #f6f5f2;
  --sv-dash-surface: #ffffff;
  --sv-dash-border: rgba(15, 23, 42, 0.08);
  --sv-dash-text: #0f172a;
  --sv-dash-muted: #64748b;
  --sv-dash-accent: #1e3a5f;
  --sv-dash-accent-soft: #e8eef4;
  --sv-dash-gold: #b8860b;
}

.dashboard-shell {
  background: var(--sv-dash-bg) !important;
  font-feature-settings: "ss01", "cv11";
}

.dashboard-shell aside {
  background: var(--sv-dash-surface) !important;
  border-color: var(--sv-dash-border) !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.dashboard-kpi {
  background: var(--sv-dash-surface);
  border: 1px solid var(--sv-dash-border);
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.dashboard-kpi:hover {
  border-color: rgba(30, 58, 95, 0.18);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.dashboard-kpi-icon {
  background: var(--sv-dash-accent-soft) !important;
  color: var(--sv-dash-accent) !important;
  box-shadow: none !important;
  border-radius: 0.75rem !important;
}

.dashboard-kpi-value {
  color: var(--sv-dash-text);
  letter-spacing: -0.02em;
}

.dashboard-kpi-label {
  color: var(--sv-dash-muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

.dashboard-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 55%, #334155 100%);
  color: #f8fafc;
  border-radius: 1.25rem;
  padding: 1.5rem 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-hero p {
  color: rgba(248, 250, 252, 0.75);
}

.add-product-shell {
  max-width: 72rem;
  margin: 0 auto;
}

.add-product-alert {
  border-radius: 0.875rem;
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  line-height: 1.45;
}

.add-product-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.add-product-alert-success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

/* Applied via site-dashboard-shell.js */
html[data-sv-area='admin'] #root,
html[data-sv-area='supplier'] #root,
html[data-sv-area='buyer'] #root {
  min-height: 100vh;
}

.dashboard-main {
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
}

.dashboard-shell header,
.dashboard-shell nav {
  border-color: var(--sv-dash-border) !important;
}

.dashboard-table-wrap {
  border-radius: 1rem;
  border: 1px solid var(--sv-dash-border);
  background: var(--sv-dash-surface);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.dashboard-table {
  width: 100%;
  font-size: 0.875rem;
}

.dashboard-table thead {
  background: var(--sv-dash-accent-soft);
  color: var(--sv-dash-accent);
}

.dashboard-table th,
.dashboard-table td {
  padding: 0.75rem 1rem;
}

@media (max-width: 768px) {
  .dashboard-table-wrap {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    border-radius: 0.75rem;
  }

  .dashboard-shell aside {
    max-width: 100vw;
  }

  .dashboard-kpi {
    padding: 1rem !important;
  }

  html[data-sv-area] button,
  html[data-sv-area] a[role='button'] {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dashboard-kpi {
    transition: none;
  }
}

.sv-load-more-btn {
  display: flex;
  margin-left: auto;
  margin-right: auto;
}
