:root {
  --bg: #1f2329;
  --bg-soft: #2b3138;
  --panel: #303740;
  --panel-alt: #3a424c;
  --text: #f4f5f7;
  --muted: #b7bec8;
  --accent: #f5c542;
  --accent-soft: #ffdd75;
  --success: #59d18c;
  --warning: #ffb648;
  --danger: #ff6b6b;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: linear-gradient(135deg, #1b1f24 0%, #232930 100%);
  color: var(--text);
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.sidebar {
  background: rgba(20, 23, 27, 0.92);
  border-right: 1px solid var(--border);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

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

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), #e6a800);
  color: #1a1a1a;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.brand-title,
.brand-subtitle,
.sidebar-label,
.eyebrow,
.stat-label,
.panel-header h3,
.activity-list strong,
.alert-list strong,
.data-table th,
.data-table td,
.nav-link,
.primary-button,
.pill,
.status,
.metric-tile span,
.metric-tile strong,
.sidebar-card strong,
.sidebar-card span,
.lead,
.page-header h1 {
  margin: 0;
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.brand-subtitle,
.sidebar-card span,
.lead,
.muted,
.activity-list span,
.alert-list p,
.stat-card span {
  color: var(--muted);
}

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

.nav-link {
  text-decoration: none;
  color: var(--text);
  padding: 14px 16px;
  border-radius: 14px;
  background: transparent;
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(245, 197, 66, 0.14);
  border-color: rgba(245, 197, 66, 0.25);
  color: var(--accent-soft);
}

.sidebar-card,
.panel,
.stat-card {
  background: rgba(48, 55, 64, 0.88);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.sidebar-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.content {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.page-header,
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-soft);
  font-size: 0.75rem;
  margin-bottom: 10px;
}

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 8px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.auth-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(48, 55, 64, 0.88);
  border: 1px solid var(--border);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(245, 197, 66, 0.18);
  color: var(--accent-soft);
  font-weight: 700;
}

.auth-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-label {
  color: var(--muted);
  font-size: 0.8rem;
}

.ghost-button {
  text-decoration: none;
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(245, 197, 66, 0.35);
  padding: 14px 18px;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
}

.primary-button {
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent), #e3ab00);
  color: #1f2329;
  padding: 14px 18px;
  border-radius: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.stats-grid,
.tiles-grid {
  display: grid;
  gap: 20px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stats-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
  padding: 24px;
}

.stat-card.highlight {
  background: linear-gradient(135deg, rgba(245, 197, 66, 0.28), rgba(245, 197, 66, 0.1));
  border-color: rgba(245, 197, 66, 0.35);
}

.stat-card h2 {
  font-size: 2rem;
  margin: 10px 0 8px;
}

.tiles-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tile-panel,
.wide {
  grid-column: span 2;
}

.panel {
  padding: 24px;
}

.tile-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.metric-tile {
  min-height: 140px;
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-weight: 700;
}

.metric-tile.yellow {
  background: linear-gradient(135deg, var(--accent), #f09a00);
  color: #1f2329;
}

.metric-tile.dark {
  background: linear-gradient(135deg, #3e4652, #232930);
}

.metric-tile.yellow-soft {
  background: linear-gradient(135deg, #65522a, #8d6e18);
}

.metric-tile strong {
  font-size: 2rem;
}

.activity-list,
.alert-list {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.activity-list li,
.alert-list li {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.activity-list li:last-child,
.alert-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.alert-list li {
  display: flex;
  gap: 14px;
}

.alert-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  margin-top: 6px;
  flex-shrink: 0;
}

.alert-dot.warning {
  background: var(--warning);
}

.alert-dot.danger {
  background: var(--danger);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 16px 12px;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  color: var(--accent-soft);
  font-size: 0.85rem;
  font-weight: 700;
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}

.status.success {
  background: rgba(89, 209, 140, 0.16);
  color: var(--success);
}

.status.warning {
  background: rgba(255, 182, 72, 0.16);
  color: var(--warning);
}

.status.danger {
  background: rgba(255, 107, 107, 0.16);
  color: var(--danger);
}

.pill {
  color: #1f2329;
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 700;
}

.accounts-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tile-list-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tag-list {
  list-style: none;
  padding: 0;
  margin: 22px 0 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.tag-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(245, 197, 66, 0.08);
  border: 1px solid rgba(245, 197, 66, 0.12);
  border-radius: 14px;
  padding: 14px 16px;
}

.tag-list strong {
  color: var(--accent-soft);
}

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .stats-grid,
  .stats-grid.compact,
  .tiles-grid,
  .accounts-grid,
  .tile-list,
  .tile-list-compact,
  .tag-list {
    grid-template-columns: 1fr;
  }

  .tile-panel,
  .wide {
    grid-column: span 1;
  }
}

@media (max-width: 720px) {
  .content {
    padding: 20px;
  }

  .sidebar {
    padding: 20px;
  }

  .page-header,
  .panel-header {
    flex-direction: column;
  }

  .header-actions,
  .auth-box {
    width: 100%;
    justify-content: flex-start;
  }
}
