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

:root {
  /* Default LIGHT theme - similar to sample screenshot */
  --bg: #e6f1ff;
  --bg-elevated: #ffffff;
  --bg-soft: #f4f7ff;
  --accent: #2563eb;
  --accent-soft: rgba(59, 130, 246, 0.12);
  --accent-strong: #1d4ed8;
  --accent-alt: #14b8a6;
  --border-subtle: rgba(148, 163, 184, 0.45);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --danger: #ef4444;
  --success: #16a34a;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-full: 999px;
  --shadow-soft: 0 18px 50px rgba(15, 23, 42, 0.12);
  --blur-glass: 18px;
  --transition-fast: 0.18s ease-out;
  --transition-med: 0.25s ease-out;
  --sidebar-width: 260px;
}

/* DARK THEME when body has .dark */
body.dark {
  --bg: #050816;
  --bg-elevated: rgba(15, 23, 42, 0.96);
  --bg-soft: rgba(15, 23, 42, 0.92);
  --accent: #22d3ee;
  --accent-soft: rgba(34, 211, 238, 0.16);
  --accent-strong: #38bdf8;
  --accent-alt: #a855f7;
  --border-subtle: rgba(148, 163, 184, 0.35);
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --danger: #fb7185;
  --success: #4ade80;
  --shadow-soft: 0 24px 60px rgba(15, 23, 42, 0.8);
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Inter", sans-serif;
  background: radial-gradient(circle at 0% 0%, #e0f2fe 0, #e5e7eb 35%, #e0ecff 80%);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.3s ease;
}

/* Animated background orbits */
.bg-orbit {
  position: fixed;
  inset: -30%;
  background:
    radial-gradient(circle at 10% 0%, rgba(59, 130, 246, 0.18) 0, transparent 60%),
    radial-gradient(circle at 90% 0%, rgba(236, 72, 153, 0.16) 0, transparent 55%),
    radial-gradient(circle at 50% 100%, rgba(45, 212, 191, 0.18) 0, transparent 55%);
  opacity: 0.5;
  mix-blend-mode: screen;
  filter: blur(1px);
  z-index: -3;
  animation: orbit 45s linear infinite;
}

.orbit-two {
  animation-duration: 60s;
  opacity: 0.4;
}

.orbit-three {
  animation-duration: 90s;
  opacity: 0.3;
}

body.dark {
  background: radial-gradient(circle at 0% 0%, #0f172a 0, #020617 60%, #000 100%);
}

@keyframes orbit {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-40px, 20px, 0) scale(1.03);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
}


/* Animated background specifically for login page */
.auth-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 20;
  backdrop-filter: blur(26px);
  overflow: hidden;
}

.auth-screen::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 0% 0%, rgba(59, 130, 246, 0.35), transparent 55%),
    radial-gradient(circle at 100% 0%, rgba(236, 72, 153, 0.35), transparent 55%),
    radial-gradient(circle at 50% 120%, rgba(45, 212, 191, 0.35), transparent 60%);
  opacity: 1;
  filter: blur(0.5px);
  animation: loginFloat 20s ease-in-out infinite alternate;
  z-index: -1;
}

@keyframes loginFloat {
  0% {
    transform: translate3d(-30px, 20px, 0) scale(1);
  }
  50% {
    transform: translate3d(20px, -10px, 0) scale(1.05);
  }
  100% {
    transform: translate3d(-10px, 10px, 0) scale(1.02);
  }
}

/* Auth screen */
.auth-screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 20;
  backdrop-filter: blur(26px);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.98),
      rgba(226, 232, 240, 0.98)
    );
  border-radius: 28px;
  padding: 24px 24px 20px;
  border: 1px solid rgba(129, 140, 248, 0.85);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.55);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.4);
  position: relative;
  overflow: hidden;
}

body.dark .auth-card {
  background: radial-gradient(
      circle at 0 0,
      rgba(56, 189, 248, 0.22),
      transparent 60%
    ),
    radial-gradient(circle at 100% 100%, rgba(129, 140, 248, 0.18), transparent 60%),
    rgba(15, 23, 42, 0.95);
  border-color: rgba(148, 163, 184, 0.6);
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(
    circle at 0 0,
    rgba(56, 189, 248, 0.4),
    transparent 65%
  );
  opacity: 0.12;
  pointer-events: none;
}

.auth-logo-orbit {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
}

.auth-logo {
  width: 60px;
  height: 60px;
  border-radius: 22px;
  background: conic-gradient(
    from 210deg,
    #2563eb,
    #14b8a6,
    #f97316,
    #2563eb
  );
  display: grid;
  place-items: center;
  color: #0b1220;
  font-weight: 900;
  font-size: 28px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.4);
}

.auth-title {
  text-align: center;
  font-size: 22px;
  margin-bottom: 4px;
}

.auth-subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.auth-form {
  margin-top: 4px;
}

.auth-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.auth-actions {
  margin-top: 10px;
}

.auth-error {
  font-size: 11px;
  color: var(--danger);
  margin-top: 8px;
  min-height: 14px;
}

/* Shell Layout */
.app-shell {
  display: flex;
  min-height: 100vh;
  padding: 20px;
  gap: 20px;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background:
    radial-gradient(circle at 0% 0%, rgba(191, 219, 254, 0.9), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(129, 140, 248, 0.8), transparent 60%),
    linear-gradient(180deg, #1d4ed8, #0ea5e9);
  border-radius: 30px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.55);
  backdrop-filter: blur(26px);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  color: #e5e7eb;
}

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

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: conic-gradient(
    from 210deg,
    #2563eb,
    #14b8a6,
    #f97316,
    #2563eb
  );
  display: grid;
  place-items: center;
  color: #0b1220;
  font-weight: 900;
  font-size: 20px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.7);
  overflow: hidden;
}

.brand-logo.has-image {
  background: #020617;
  background-size: cover;
  background-position: center;
  color: transparent;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 700;
  letter-spacing: 0.03em;
  font-size: 18px;
}

.brand-subtitle {
  font-size: 11px;
  text-transform: uppercase;
  color: #9ca3af;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.nav-item {
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #9ca3af;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast),
    transform 0.08s ease-out, border-color var(--transition-fast);
}

.nav-item .nav-icon {
  font-size: 16px;
}

.nav-item:hover {
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  border-color: rgba(55, 65, 81, 0.9);
  transform: translateY(-1px);
}

.nav-item.active {
  background:
    radial-gradient(circle at 0 0, rgba(255,255,255,0.9), transparent 55%),
    linear-gradient(135deg, #2563eb, #22c55e);
  color: #0f172a;
  border-color: rgba(59, 130, 246, 0.9);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.55);
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 0 0, #2563eb, #1d4ed8, #0f172a);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 700;
  font-size: 16px;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
}

.user-role {
  font-size: 11px;
  color: #4b5563;
}

.sidebar-footer-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.version-pill {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: rgba(15, 23, 42, 0.9);
  color: #9ca3af;
}

.btn-logout {
  padding: 4px 9px;
  font-size: 13px;
}

/* Main */
.main {
  flex: 1;
  background:
    radial-gradient(circle at 0 0, rgba(191, 219, 254, 0.9), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(165, 243, 252, 0.8), transparent 60%),
    rgba(255, 255, 255, 0.92);
  border-radius: 32px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow: 0 24px 60px rgba(148, 163, 184, 0.7);
  backdrop-filter: blur(24px);
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-title {
  font-size: 22px;
  letter-spacing: 0.02em;
  color: #1f2937;
}

.topbar-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

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


.topbar {
  position: relative;
}

.topbar::before {
  content: "";
  position: absolute;
  inset: -12px -16px auto auto;
  height: 80px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 0 0, rgba(59,130,246,0.35), transparent 60%),
    linear-gradient(135deg, rgba(59,130,246,0.12), rgba(34,197,94,0.12));
  z-index: -1;
}

/* Section titles */
.section-title {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
  margin: 6px 4px 4px;
}

/* Buttons */
.btn {
  border-radius: 999px;
  padding: 8px 16px;
  border: 1px solid transparent;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background var(--transition-fast), color var(--transition-fast),
    transform 0.08s ease-out, box-shadow var(--transition-fast),
    border-color var(--transition-fast);
}

.btn.primary {
  background-image: linear-gradient(120deg, #2563eb, #14b8a6);
  border: none;
  color: #f9fafb;
  font-weight: 600;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.35);
}

.btn.primary:hover {
  transform: translateY(-1px) translateZ(0);
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.5);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(148, 163, 184, 0.7);
  color: var(--text-main);
}

.btn.ghost:hover {
  background: rgba(241, 245, 249, 0.95);
}

.btn.full {
  width: 100%;
}

/* Views & Cards */
.view {
  display: none;
  flex-direction: column;
  gap: 18px;
}

.view.active {
  display: flex;
}

.card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 22px;
  padding: 16px 16px 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 12px 30px rgba(148, 163, 184, 0.45);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -50%;
  background: radial-gradient(
    circle at top right,
    rgba(56, 189, 248, 0.16),
    transparent 55%
  );
  opacity: 0;
  transform: translate3d(0, 0, 0);
  transition: opacity 0.5s ease-out;
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.card-header h2 {
  font-size: 15px;
}

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

.badge {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.8);
  color: #1d4ed8;
  background: rgba(219, 234, 254, 0.9);
}

.badge.soft {
  border-color: rgba(148, 163, 184, 0.7);
  background: rgba(248, 250, 252, 0.96);
  color: var(--text-muted);
}

/* Grid */
.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: 1.25fr 1fr;
}

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

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

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

/* Stat cards like sample */
.stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  border-radius: 20px;
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 20px;
  color: #ffffff;
}

.stat-icon-blue {
  background: #2563eb;
}

.stat-icon-red {
  background: #ef4444;
}

.stat-icon-pink {
  background: #ec4899;
}

.stat-icon-amber {
  background: #f59e0b;
}

.stat-icon-yellow {
  background: #eab308;
}

.stat-icon-teal {
  background: #14b8a6;
}

.stat-icon-indigo {
  background: #4f46e5;
}

.stat-icon-orange {
  background: #fb923c;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

/* Tables */
.table-wrapper {
  margin-top: 8px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(248, 250, 252, 0.98);
  max-height: 270px;
  overflow: hidden auto;
}

.table-wrapper::-webkit-scrollbar {
  width: 6px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.8);
  border-radius: 999px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

thead th {
  text-align: left;
  padding: 10px 12px;
  background: rgba(241, 245, 249, 0.98);
  border-bottom: 1px solid rgba(148, 163, 184, 0.8);
  color: var(--text-muted);
  font-weight: 500;
}

tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.96);
}

tbody tr:hover td {
  background: rgba(219, 234, 254, 0.8);
}

.empty-row td {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
}

/* Form */
.form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.form-row .form-field.small {
  grid-template-columns: minmax(0, 1fr);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-field label {
  font-size: 11px;
  color: var(--text-muted);
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="tel"],
input[type="search"],
input[type="password"] {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(255, 255, 255, 0.96);
  padding: 7px 11px;
  font-size: 12px;
  color: var(--text-main);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast), transform 0.07s ease-out;
}

input::placeholder {
  color: rgba(148, 163, 184, 0.8);
}

input:focus {
  border-color: rgba(59, 130, 246, 0.9);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.7), 0 0 24px rgba(37, 99, 235, 0.35);
  transform: translateY(-1px);
}

/* Billing */
.bill-add-item {
  margin-top: 4px;
}

.form-row .form-field.small {
  grid-template-columns: 1fr;
}

.bill-table {
  margin-top: 8px;
}

.totals {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  gap: 12px;
  align-items: flex-start;
}

.totals-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
}

.totals-right {
  margin-left: auto;
  min-width: 230px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.9);
  padding: 10px 12px;
  background: linear-gradient(
    145deg,
    rgba(248, 250, 252, 0.98),
    rgba(226, 232, 240, 0.96)
  );
}

.totals-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
}

.totals-row span:first-child {
  color: var(--text-muted);
}

.totals-row.grand {
  font-size: 14px;
  font-weight: 600;
  margin-top: 4px;
  padding-top: 5px;
  border-top: 1px dashed rgba(148, 163, 184, 0.9);
}

/* Invoice preview */
.invoice-preview {
  margin-top: 8px;
  border-radius: 18px;
  border: 1px dashed rgba(148, 163, 184, 0.7);
  padding: 14px;
  min-height: 230px;
  background: rgba(248, 250, 252, 0.96);
  font-size: 12px;
}

/* Invoice layout (print) */
.invoice-paper {
  padding: 24px 26px 20px;
  max-width: 780px;
  margin: 12px auto;
  background: #ffffff;
  color: #020617;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Inter", sans-serif;
  font-size: 13px;
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.invoice-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.invoice-meta {
  text-align: right;
  font-size: 12px;
}

.invoice-meta div {
  margin-bottom: 2px;
}

.invoice-divider {
  border-top: 1px solid #e5e7eb;
  margin: 10px 0;
}

.invoice-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}

.invoice-row strong {
  font-weight: 600;
}

.invoice-items {
  margin-top: 8px;
}

.invoice-items table {
  width: 100%;
  border-collapse: collapse;
}

.invoice-items thead {
  background: #f1f5f9;
}

.invoice-items th,
.invoice-items td {
  font-size: 12px;
  border: 1px solid #e5e7eb;
  padding: 5px 6px;
  text-align: left;
}

.invoice-summary {
  width: 260px;
  margin-left: auto;
  margin-top: 10px;
  font-size: 12px;
}

.invoice-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.invoice-summary-row.grand {
  margin-top: 3px;
  padding-top: 3px;
  border-top: 1px solid #e5e7eb;
  font-weight: 600;
}

.invoice-footer {
  margin-top: 12px;
  font-size: 10px;
  color: #6b7280;
  display: flex;
  justify-content: space-between;
}

/* Print styles */
.invoice-print {
  display: none;
}

@media print {
  body {
    background: #ffffff !important;
  }

  .app-shell {
    display: none !important;
  }

  .auth-screen {
    display: none !important;
  }

  .invoice-print {
    display: block !important;
    padding: 0;
    margin: 0;
  }
}

/* Responsive */
@media (max-width: 1300px) {
  .grid-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    align-items: center;
    padding: 12px 14px;
  }

  .nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .sidebar-footer {
    margin-top: 0;
  }
}

@media (max-width: 960px) {
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 780px) {
  .grid-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .app-shell {
    padding: 10px;
  }

  .main {
    padding: 14px;
  }

  .grid-3,
  .grid-4,
  .grid-5 {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .sidebar {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* Dashboard boxed groups */
.dashboard-group {
  margin-bottom: 16px;
  background: radial-gradient(circle at top left, rgba(129, 140, 248, 0.25), transparent 55%),
              radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.18), transparent 60%),
              var(--bg-elevated);
  border-radius: 24px;
}

.dashboard-group .card-header {
  margin-bottom: 4px;
}

.dashboard-grid {
  margin-top: 8px;
}

/* Status pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
}

.status-pill.done {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}

.status-pill.left {
  background: rgba(248, 113, 113, 0.14);
  color: #dc2626;
}

/* Icon chips in sidebar for a more modern look */
.nav-item .nav-icon {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  margin-right: 6px;
  background: radial-gradient(circle at 0 0, rgba(255,255,255,0.9), transparent 60%),
              linear-gradient(135deg, #38bdf8, #6366f1);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.55);
  color: #0f172a;
}

/* When inactive, make icon chips softer */
.nav-item:not(.active) .nav-icon {
  background: radial-gradient(circle at 0 0, rgba(255,255,255,0.9), transparent 60%),
              linear-gradient(135deg, #e5e7eb, #cbd5f5);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.45);
  color: #0f172a;
}

.nav-item {
  color: #e2e8f0;
}

.nav-item:not(.active):hover {
  color: #111827;
  background: rgba(255, 255, 255, 0.85);
}

/* Make brand text brighter */
.brand-title {
  font-weight: 800;
  letter-spacing: 0.03em;
  font-size: 18px;
  color: #0f172a;
}

.brand-subtitle {
  font-size: 11px;
  text-transform: uppercase;
  color: #1e293b;
}

/* Dashboard hero section */
.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
  align-items: center;
}

.dashboard-hero-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: rgba(59, 130, 246, 0.07);
  color: #1d4ed8;
}

.hero-title {
  font-size: 20px;
  font-weight: 700;
}

.hero-title span {
  color: #2563eb;
}

.hero-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.dashboard-hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.hero-summary-pill {
  min-width: 180px;
  border-radius: 18px;
  padding: 10px 14px;
  background: radial-gradient(circle at 0 0, rgba(59, 130, 246, 0.16), transparent 55%),
              rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.7);
  box-shadow: 0 10px 24px rgba(148, 163, 184, 0.55);
}

.hero-summary-pill.soft {
  background: radial-gradient(circle at 100% 0, rgba(34, 197, 94, 0.16), transparent 55%),
              rgba(255, 255, 255, 0.95);
}

.pill-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.pill-value {
  font-size: 18px;
  font-weight: 700;
}

/* Responsive hero */
@media (max-width: 960px) {
  .dashboard-hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .dashboard-hero-right {
    align-items: flex-start;
  }
}

/* Dashboard charts layout */
.dashboard-charts {
  margin-top: 4px;
}

.chart-wrapper {
  position: relative;
  width: 100%;
  min-height: 220px;
}

/* Make canvas fill card nicely */
.chart-wrapper canvas {
  width: 100% !important;
  height: 220px !important;
}
