:root {
  --bg: #0b1020;
  --bg-soft: #121a32;
  --panel: rgba(18, 26, 50, 0.7);
  --panel-border: rgba(255, 255, 255, 0.1);
  --text: #e9eefc;
  --muted: #9aa7cf;
  --accent: #42e6c9;
  --accent-2: #4f7cff;
  --danger: #ff5d7a;
  --success: #2ed8a3;
}

body[data-theme="light"] {
  --bg: #f4f8ff;
  --bg-soft: #ffffff;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-border: rgba(15, 23, 42, 0.12);
  --text: #0f172a;
  --muted: #64748b;
  --accent: #0ea5e9;
  --accent-2: #22c55e;
  --danger: #dc2626;
  --success: #059669;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1000px 500px at 10% -10%, rgba(66, 230, 201, 0.2), transparent 60%),
    radial-gradient(1000px 500px at 100% -20%, rgba(79, 124, 255, 0.2), transparent 60%),
    var(--bg);
}

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

.sidebar {
  padding: 24px 16px;
  border-right: 1px solid var(--panel-border);
  background: linear-gradient(180deg, rgba(17, 27, 55, 0.92), rgba(10, 16, 33, 0.92));
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 18px rgba(66, 230, 201, 0.7);
}

.side-section {
  margin-top: 28px;
}

.side-title {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.side-link {
  display: block;
  text-decoration: none;
  color: var(--text);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  transition: 0.2s ease;
}

.side-link:hover {
  border-color: var(--panel-border);
  background: rgba(255, 255, 255, 0.05);
}

.main {
  padding: 26px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.welcome h1 {
  margin: 0 0 6px;
  font-size: 30px;
}

.welcome p {
  margin: 0;
  color: var(--muted);
}

.pill {
  cursor: pointer;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--panel-border);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  text-decoration: none;
  font-size: 14px;
}

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

.grid-kpi {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.kpi {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 16px;
  backdrop-filter: blur(8px);
}

.kpi-label {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.kpi-value {
  font-size: 30px;
  font-weight: 700;
}

.kpi-trend {
  font-size: 12px;
  margin-top: 6px;
}

.up {
  color: var(--success);
}

.down {
  color: var(--danger);
}

.content-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 16px;
  backdrop-filter: blur(8px);
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.chart-wrap {
  height: 230px;
}

.chart-canvas {
  width: 100%;
  height: 220px;
  border: 1px dashed var(--panel-border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 10px 8px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

th {
  color: var(--muted);
  font-weight: 500;
}

.tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--panel-border);
}

.tag-new {
  background: rgba(79, 124, 255, 0.2);
}

.tag-progress {
  background: rgba(255, 179, 79, 0.2);
}

.tag-done {
  background: rgba(46, 216, 163, 0.2);
}

.tag-cancelled {
  background: rgba(255, 93, 122, 0.2);
}

.quick-actions {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.action {
  display: block;
  background: linear-gradient(135deg, rgba(79, 124, 255, 0.2), rgba(66, 230, 201, 0.1));
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 14px;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
}

.action + .action {
  margin-top: 10px;
}

.premium-shortcuts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--panel-border);
  }
  .grid-kpi,
  .quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
}
