:root {
  --bg: #0d1117;
  --bg-soft: #151b23;
  --panel: rgba(18, 25, 34, 0.92);
  --panel-alt: rgba(24, 31, 42, 0.94);
  --border: rgba(120, 140, 168, 0.18);
  --text: #ecf2ff;
  --muted: #99a7bf;
  --accent: #d4af37;
  --accent-soft: rgba(212, 175, 55, 0.12);
  --primary: #34d399;
  --primary-soft: rgba(52, 211, 153, 0.12);
  --danger: #f87171;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at top left, rgba(52, 211, 153, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(212, 175, 55, 0.12), transparent 24%),
    linear-gradient(180deg, #0b0f15 0%, #131925 100%);
  color: var(--text);
  font-family: "Manrope", "Segoe UI", sans-serif;
}

button,
input,
table {
  font: inherit;
}

.hidden {
  display: none !important;
}

.page-shell {
  padding: 24px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-shell {
  min-height: calc(100vh - 48px);
  display: grid;
  place-items: center;
}

.login-card {
  width: min(100%, 520px);
  padding: 32px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #08120f;
  background: linear-gradient(135deg, var(--accent), #f6da72);
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.04em;
}

.intro-copy {
  margin: 18px 0 24px;
  color: var(--muted);
  line-height: 1.65;
}

.form-stack,
.nav-stack,
.list-stack {
  display: grid;
  gap: 14px;
}

.field-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--muted);
}

.input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(153, 167, 191, 0.18);
  border-radius: var(--radius-sm);
  background: var(--panel-alt);
  color: var(--text);
  outline: none;
}

.input:focus {
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.12);
}

.primary-button,
.secondary-button,
.nav-tab {
  min-height: 46px;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.primary-button:hover,
.secondary-button:hover,
.nav-tab:hover {
  transform: translateY(-1px);
}

.primary-button {
  background: linear-gradient(135deg, var(--primary), #6ee7b7);
  color: #05241a;
  font-weight: 800;
}

.secondary-button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.status-message {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.content-status {
  margin-top: 18px;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  min-height: calc(100vh - 48px);
}

.sidebar {
  padding: 24px;
  display: grid;
  align-content: start;
  gap: 18px;
}

.sidebar-brand {
  margin-bottom: 8px;
}

.nav-tab {
  text-align: left;
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
}

.nav-tab.active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.14), rgba(212, 175, 55, 0.1));
  border-color: rgba(52, 211, 153, 0.22);
}

.sidebar-card,
.section-panel,
.table-panel,
.topbar {
  padding: 20px;
}

.sidebar-value {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
  word-break: break-word;
}

.content-shell {
  display: grid;
  align-content: start;
  gap: 20px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.topbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-input {
  min-width: 260px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metric-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(18, 25, 34, 0.88);
  border: 1px solid var(--border);
}

.metric-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

.metric-value {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
}

.metric-footnote {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.compact-heading {
  margin-bottom: 10px;
}

.data-count {
  color: var(--muted);
  font-size: 0.9rem;
}

.recent-business-item {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
}

.recent-business-item strong,
.table-name {
  display: block;
  margin-bottom: 4px;
}

.table-scroll {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 940px;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(153, 167, 191, 0.12);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

td {
  color: var(--text);
  font-size: 0.92rem;
}

.table-meta {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.badge-primary {
  background: var(--primary-soft);
  color: var(--primary);
}

.badge-accent {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge-danger {
  background: rgba(248, 113, 113, 0.14);
  color: var(--danger);
}

@media (max-width: 1180px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .page-shell {
    padding: 14px;
  }

  .login-card,
  .sidebar,
  .section-panel,
  .table-panel,
  .topbar {
    padding: 16px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input {
    min-width: 0;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }
}