/* ─── Shree Ganesh Solution — Main Styles ──────────────────────── */
:root {
  --bg:         #080614;
  --bg2:        #0e0a22;
  --bg3:        #141030;
  --sidebar-w:  260px;
  --violet:     #6c3fd4;
  --violet-l:   #8b60f0;
  --violet-gl:  rgba(108,63,212,0.2);
  --gold:       #f5c842;
  --lavender:   #b9a4e8;
  --white:      #f0ecff;
  --surface:    #13102a;
  --border:     rgba(108,63,212,0.25);
  --text-muted: rgba(185,164,232,0.6);
  --success:    #4ade80;
  --danger:     #f87171;
  --warning:    #fbbf24;
  --topbar-h:   60px;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow-y: auto;
  transition: transform 0.25s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border);
}

.brand-icon {
  font-size: 1.4rem;
  color: var(--gold);
  flex-shrink: 0;
}

.brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
}

.nav-section-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  padding: 14px 8px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--lavender);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 400;
  transition: all 0.18s;
  margin-bottom: 2px;
}

.nav-item i { font-size: 1rem; flex-shrink: 0; }
.nav-item:hover { background: var(--violet-gl); color: var(--white); }
.nav-item.active { background: var(--violet); color: #fff; font-weight: 500; }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

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

.user-avatar {
  width: 36px; height: 36px;
  background: var(--violet);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; flex-shrink: 0;
}

.user-name  { font-size: 0.82rem; font-weight: 600; }
.user-role  { font-size: 0.68rem; color: var(--text-muted); }

/* ─── Main Wrap ───────────────────────────────────────────────── */
.main-wrap {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  transition: margin-left 0.25s ease;
}

/* ─── Topbar ──────────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.sidebar-toggle {
  background: none; border: none;
  color: var(--lavender);
  font-size: 1.4rem;
  cursor: pointer;
  display: none;
  padding: 4px;
}

.topbar-title {
  font-size: 1rem;
  font-weight: 600;
  flex: 1;
}

.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-date { font-size: 0.78rem; color: var(--text-muted); }

/* ─── Page Content ────────────────────────────────────────────── */
.page-content {
  padding: 28px 28px 48px;
  max-width: 1400px;
}

/* ─── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border) !important;
  border-radius: 14px !important;
  color: var(--white) !important;
}

.card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 16px 20px !important;
  font-weight: 600;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header .card-icon {
  width: 30px; height: 30px;
  background: var(--violet-gl);
  border: 1px solid var(--border);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
}

.card-body { padding: 20px !important; }

/* ─── Stat Cards ──────────────────────────────────────────────── */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  background: radial-gradient(circle, var(--violet-gl), transparent 70%);
  pointer-events: none;
}

.stat-label  { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); margin-bottom: 6px; }
.stat-value  { font-family: 'Cormorant Garamond', serif; font-size: 2.4rem; font-weight: 700; color: var(--gold); line-height: 1; }
.stat-sub    { font-size: 0.78rem; color: var(--lavender); margin-top: 4px; }
.stat-icon   { position: absolute; top: 20px; right: 20px; font-size: 1.6rem; color: var(--violet-l); opacity: 0.6; }

/* ─── Number Display ──────────────────────────────────────────── */
.num-display {
  background: linear-gradient(135deg, #1a0a3b, #2d1260);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
}

.num-display .label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-muted); margin-bottom: 6px; }
.num-display .value { font-family: 'Cormorant Garamond', serif; font-size: 3.5rem; font-weight: 700; color: var(--gold); text-shadow: 0 0 30px rgba(245,200,66,0.4); line-height: 1; }
.num-display .sub   { font-size: 0.78rem; color: var(--lavender); margin-top: 6px; }

/* ─── Forms ───────────────────────────────────────────────────── */
.form-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--lavender); margin-bottom: 6px; }

.form-control, .form-select {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  color: var(--white) !important;
  padding: 10px 14px !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 0.88rem !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus, .form-select:focus {
  border-color: var(--violet-l) !important;
  box-shadow: 0 0 0 3px rgba(108,63,212,0.25) !important;
  background: rgba(255,255,255,0.06) !important;
}

.form-control::placeholder { color: rgba(185,164,232,0.3) !important; }
.form-select option { background: var(--bg2); }

/* ─── Buttons ─────────────────────────────────────────────────── */
.btn-primary {
  background: linear-gradient(135deg, var(--violet), var(--violet-l)) !important;
  border: none !important;
  box-shadow: 0 4px 20px rgba(108,63,212,0.35) !important;
  font-weight: 500 !important;
  font-size: 0.88rem !important;
  padding: 10px 22px !important;
  border-radius: 8px !important;
  transition: all 0.2s !important;
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 28px rgba(108,63,212,0.5) !important; }
.btn-outline-secondary { border-color: var(--border) !important; color: var(--lavender) !important; border-radius: 8px !important; }
.btn-outline-secondary:hover { background: var(--violet-gl) !important; color: var(--white) !important; }
.btn-outline-danger { border-radius: 8px !important; }
.btn-sm { padding: 6px 14px !important; font-size: 0.78rem !important; }

/* ─── Tables ──────────────────────────────────────────────────── */
.table { color: var(--white) !important; }
.table th { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted) !important; border-color: var(--border) !important; font-weight: 600; padding: 10px 14px !important; }
.table td { border-color: rgba(108,63,212,0.1) !important; padding: 12px 14px !important; font-size: 0.86rem; vertical-align: middle; }
.table tbody tr:hover td { background: rgba(108,63,212,0.06) !important; }

/* ─── Badges ──────────────────────────────────────────────────── */
.badge { font-size: 0.7rem !important; font-weight: 600 !important; padding: 4px 10px !important; border-radius: 100px !important; }
.badge.bg-success { background: rgba(74,222,128,0.15) !important; color: var(--success) !important; border: 1px solid rgba(74,222,128,0.3) !important; }
.badge.bg-danger  { background: rgba(248,113,113,0.15) !important; color: var(--danger) !important; border: 1px solid rgba(248,113,113,0.3) !important; }
.badge.bg-warning { background: rgba(251,191,36,0.15) !important; color: var(--warning) !important; border: 1px solid rgba(251,191,36,0.3) !important; }
.badge.bg-primary { background: rgba(108,63,212,0.2) !important; color: var(--violet-l) !important; border: 1px solid var(--border) !important; }
.badge.bg-secondary { background: rgba(148,163,184,0.15) !important; color: #94a3b8 !important; border: 1px solid rgba(148,163,184,0.3) !important; }

/* ─── Compat Meter ────────────────────────────────────────────── */
.compat-meter { background: rgba(255,255,255,0.06); border-radius: 100px; height: 8px; overflow: hidden; }
.compat-fill  { height: 100%; border-radius: 100px; background: linear-gradient(90deg, var(--violet), var(--gold)); transition: width 1s ease; }

/* ─── Planet Chip ─────────────────────────────────────────────── */
.planet-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(108,63,212,0.12);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.82rem;
}

.planet-symbol { font-size: 1.1rem; }

/* ─── Letter grid ─────────────────────────────────────────────── */
.letter-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.letter-chip {
  width: 44px; height: 44px;
  background: rgba(108,63,212,0.12);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 0.78rem;
}
.letter-chip .lc { font-size: 1rem; font-weight: 700; color: var(--violet-l); line-height: 1; }
.letter-chip .lv { font-size: 0.65rem; color: var(--text-muted); }

/* ─── Alerts / Toasts ─────────────────────────────────────────── */
.alert { border-radius: 10px !important; font-size: 0.86rem !important; border: none !important; }
.alert-success { background: rgba(74,222,128,0.12) !important; color: var(--success) !important; }
.alert-danger   { background: rgba(248,113,113,0.12) !important; color: var(--danger) !important; }
.alert-warning  { background: rgba(251,191,36,0.12) !important; color: var(--warning) !important; }
.alert-info     { background: rgba(108,63,212,0.12) !important; color: var(--lavender) !important; }

/* ─── Tabs ────────────────────────────────────────────────────── */
.nav-tabs { border-color: var(--border) !important; }
.nav-tabs .nav-link { color: var(--text-muted) !important; font-size: 0.84rem !important; border: none !important; padding: 10px 18px !important; }
.nav-tabs .nav-link.active { color: var(--white) !important; background: rgba(108,63,212,0.2) !important; border-bottom: 2px solid var(--violet-l) !important; border-radius: 6px 6px 0 0 !important; }
.tab-content { padding-top: 20px; }

/* ─── Modal ───────────────────────────────────────────────────── */
.modal-content { background: var(--bg2) !important; border: 1px solid var(--border) !important; border-radius: 16px !important; color: var(--white) !important; }
.modal-header  { border-bottom: 1px solid var(--border) !important; }
.modal-footer  { border-top: 1px solid var(--border) !important; }
.btn-close     { filter: invert(1) !important; }

/* ─── Pagination ──────────────────────────────────────────────── */
.page-link { background: var(--surface) !important; border-color: var(--border) !important; color: var(--lavender) !important; font-size: 0.82rem !important; }
.page-link:hover { background: var(--violet-gl) !important; color: var(--white) !important; }
.page-item.active .page-link { background: var(--violet) !important; border-color: var(--violet) !important; color: #fff !important; }
.page-item.disabled .page-link { opacity: 0.4 !important; }

/* ─── Responsive ──────────────────────────────────────────────── */
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-wrap { margin-left: 0 !important; }
  .sidebar-toggle { display: block !important; }
  .page-content { padding: 20px 16px 48px; }
}

/* ─── Login page ──────────────────────────────────────────────── */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.login-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 40px; width: 100%; max-width: 420px; }
.login-logo  { text-align: center; margin-bottom: 28px; }
.login-logo .icon { font-size: 2rem; color: var(--gold); }
.login-logo h1 { font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; margin-top: 8px; }
.login-logo p  { font-size: 0.78rem; color: var(--text-muted); }

/* ─── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 100px; }
