:root {
  --cusrem-primary: #0d6efd;
  --cusrem-primary-dark: #0a58ca;
  --cusrem-teal: #0dcaf0;
  --cusrem-navy: #0b1f3a;
  --cusrem-bg: #f4f7fb;
  --cusrem-card-radius: 1rem;
}

body {
  background-color: var(--cusrem-bg);
  font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
}

[data-bs-theme="dark"] body,
body.dark-mode {
  background-color: #0f172a;
  color: #e2e8f0;
}

.cusrem-sidebar {
  width: 260px;
  height: 100vh;
  background: linear-gradient(180deg, var(--cusrem-navy) 0%, #123262 100%);
  color: #fff;
  position: fixed;
  top: 0;
  left: 0;
  overflow-y: auto;
  z-index: 1030;
  transition: transform .2s ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.3) transparent;
}
.cusrem-sidebar::-webkit-scrollbar { width: 8px; }
.cusrem-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); border-radius: 4px; }
.cusrem-sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.4); }

.cusrem-sidebar .brand {
  padding: 1.25rem 1.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: .5px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: .6rem;
}
.cusrem-sidebar .brand img {
  height: 30px;
  width: auto;
  flex-shrink: 0;
}

.cusrem-sidebar .nav-link {
  color: rgba(255,255,255,.75);
  padding: .65rem 1.5rem;
  border-radius: 0;
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: .92rem;
}

.cusrem-sidebar .nav-link:hover,
.cusrem-sidebar .nav-link.active {
  color: #fff;
  background: rgba(255,255,255,.08);
  border-left: 3px solid var(--cusrem-teal);
}

.cusrem-sidebar .nav-section-title {
  color: rgba(255,255,255,.4);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 1rem 1.5rem .35rem;
}

.cusrem-content {
  margin-left: 260px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

@media (max-width: 991.98px) {
  .cusrem-sidebar { transform: translateX(-100%); }
  .cusrem-sidebar.show { transform: translateX(0); }
  .cusrem-content { margin-left: 0; }
}

.cusrem-topbar {
  background: #fff;
  border-bottom: 1px solid #e5e9f0;
  padding: .75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 1020;
}

[data-bs-theme="dark"] .cusrem-topbar { background: #111827; border-color: #1f2937; }

.card {
  border: none;
  border-radius: var(--cusrem-card-radius);
  box-shadow: 0 2px 10px rgba(15, 23, 42, .06);
}

[data-bs-theme="dark"] .card { background: #111827; }

.stat-card {
  border-radius: var(--cusrem-card-radius);
  padding: 1.25rem 1.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.stat-card.bg-blue { background: linear-gradient(135deg, #0d6efd, #0a58ca); }
.stat-card.bg-teal { background: linear-gradient(135deg, #0dcaf0, #0aa2c0); }
.stat-card.bg-green { background: linear-gradient(135deg, #198754, #146c43); }
.stat-card.bg-orange { background: linear-gradient(135deg, #fd7e14, #d96b0d); }
.stat-card.bg-purple { background: linear-gradient(135deg, #6f42c1, #59339d); }
.stat-card.bg-red { background: linear-gradient(135deg, #dc3545, #b02a37); }

.stat-card .stat-value { font-size: 1.8rem; font-weight: 700; }
.stat-card .stat-label { font-size: .85rem; opacity: .9; }
.stat-card .stat-icon { position: absolute; right: 1rem; top: 1rem; font-size: 2.2rem; opacity: .35; }

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cusrem-navy), #16407a);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  border-radius: 1.25rem;
  overflow: hidden;
}

.auth-card-wide {
  max-width: 920px;
}

.auth-wrapper { padding-top: 2rem; padding-bottom: 2rem; }

.plan-choice {
  cursor: pointer;
  border: 2px solid #e5e9f0;
  border-radius: .75rem;
  padding: 1rem;
  height: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.plan-choice:hover { border-color: var(--cusrem-primary); }
.plan-choice.selected {
  border-color: var(--cusrem-primary);
  box-shadow: 0 0 0 3px rgba(13,110,253,.15);
}
.plan-choice input { position: absolute; opacity: 0; pointer-events: none; }

.badge-status-trial { background: #ffc107; color: #000; }
.badge-status-active { background: #198754; }
.badge-status-suspended { background: #dc3545; }
.badge-status-expired { background: #6c757d; }
.badge-status-cancelled { background: #212529; }

.table thead th {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #64748b;
  border-bottom-width: 1px;
}

.pill-nav .nav-link {
  border-radius: 2rem;
}
