/* ================================================================
   QUIPPER MABDC — UI REDESIGN v2.0
   Modern education platform theme — clean, vibrant, professional
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ── DESIGN TOKENS OVERRIDE ── */
:root {
  --hrm-bg1: #0f0c29;
  --hrm-bg2: #1a1560;
  --hrm-panel: #f0f4ff;
  --hrm-panel2: #f8faff;
  --hrm-stroke: rgba(99,102,241,.18);
  --hrm-shadow: 0 20px 40px rgba(0,0,0,.25);
  --hrm-shadow2: 0 8px 20px rgba(99,102,241,.2);
  --hrm-glass: rgba(255,255,255,.08);
  --hrm-glass2: rgba(255,255,255,.05);
  --hrm-text: #0f172a;
  --hrm-muted: #64748b;
  --hrm-blue: #6366f1;
  --hrm-blue2: #4f46e5;
  --hrm-teal: #06b6d4;
  --hrm-green: #10b981;
  --hrm-amber: #f59e0b;
  --hrm-red: #ef4444;
  --hrm-white: #ffffff;
  --hrm-navText: rgba(255,255,255,.92);
  --hrm-navText2: rgba(255,255,255,.55);
  --hrm-navActive: rgba(139,92,246,.35);
  --hrm-navStroke: rgba(255,255,255,.1);
  
  /* New tokens */
  --q-primary: #6366f1;
  --q-primary2: #4f46e5;
  --q-accent: #f97316;
  --q-accent2: #ea580c;
  --q-purple: #8b5cf6;
  --q-pink: #ec4899;
  --q-success: #10b981;
  --q-warn: #f59e0b;
  --q-danger: #ef4444;
  --q-surface: #ffffff;
  --q-bg: #f8fafc;
  --q-sidebar: linear-gradient(160deg, #1e1b4b 0%, #312e81 40%, #1e1b4b 100%);
  --q-radius: 16px;
  --q-radius-sm: 10px;
  --q-font: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
}

/* ── BASE ── */
*, *::before, *::after {
  box-sizing: border-box;
}

body, html {
  font-family: var(--q-font) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

/* ── SCROLLBARS ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(99,102,241,.3); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99,102,241,.5); }

/* ── APP SHELL ── */
.hrm-app {
  background:
    radial-gradient(ellipse 80% 60% at 5% 0%, rgba(99,102,241,.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 95% 100%, rgba(139,92,246,.12) 0%, transparent 60%),
    linear-gradient(135deg, #0f0c29 0%, #1a1560 50%, #0f0c29 100%) !important;
  gap: 20px !important;
  padding: 16px !important;
}

.hrm-app::before {
  background-image:
    radial-gradient(circle, rgba(255,255,255,.06) 1px, transparent 1px) !important;
  background-size: 40px 40px !important;
  opacity: 0.6 !important;
}

/* ── SIDEBAR ── */
.hrm-sidebar {
  background: var(--q-sidebar) !important;
  border-radius: 20px !important;
  border: 1px solid rgba(139,92,246,.25) !important;
  box-shadow:
    0 25px 50px rgba(0,0,0,.4),
    inset 0 1px 0 rgba(255,255,255,.1) !important;
  backdrop-filter: blur(20px) !important;
}

/* Sidebar top / user area */
.hrm-sideTop {
  background: linear-gradient(180deg, rgba(139,92,246,.2), transparent) !important;
  border-bottom: 1px solid rgba(255,255,255,.08) !important;
  padding: 20px 18px 16px !important;
}

.hrm-avatar {
  background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
  border: 2px solid rgba(255,255,255,.3) !important;
  box-shadow: 0 8px 20px rgba(99,102,241,.4) !important;
  font-size: 18px !important;
  width: 48px !important;
  height: 48px !important;
}

.hrm-who .hrm-name {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #fff !important;
  text-shadow: 0 2px 8px rgba(0,0,0,.3) !important;
}

.hrm-who .hrm-mail {
  font-size: 11.5px !important;
  color: rgba(255,255,255,.55) !important;
}

/* Nav items */
.hrm-navItem, .hrm-navGroupBtn {
  border-radius: 12px !important;
  padding: 10px 14px !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
  color: rgba(255,255,255,.75) !important;
}

.hrm-navItem:hover, .hrm-navGroupBtn:hover {
  background: rgba(139,92,246,.2) !important;
  color: #fff !important;
  transform: translateX(2px) !important;
}

.hrm-navItem[data-active="true"],
.hrm-navItem.active,
.hrm-navItem[aria-current="page"] {
  background: linear-gradient(90deg, rgba(99,102,241,.4), rgba(139,92,246,.2)) !important;
  color: #fff !important;
  border: 1px solid rgba(139,92,246,.3) !important;
  box-shadow: 0 4px 12px rgba(99,102,241,.2) !important;
}

/* ── MAIN CONTENT AREA ── */
.hrm-main, [class*="hrm-main"] {
  background: transparent !important;
}

/* ── CARDS / PANELS ── */
[class*="card"], [class*="Card"],
[class*="panel"], [class*="Panel"],
.hrm-card, .hrm-panel {
  background: rgba(255,255,255,.07) !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  border-radius: var(--q-radius) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.2) !important;
  backdrop-filter: blur(10px) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

[class*="card"]:hover, [class*="Card"]:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 12px 32px rgba(0,0,0,.3) !important;
}

/* ── BUTTONS ── */
button[class*="primary"], [class*="btn-primary"], .btn-primary {
  background: linear-gradient(135deg, var(--q-primary), var(--q-purple)) !important;
  border: none !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
  box-shadow: 0 4px 14px rgba(99,102,241,.4) !important;
  transition: all 0.2s ease !important;
}

button[class*="primary"]:hover, [class*="btn-primary"]:hover {
  box-shadow: 0 6px 20px rgba(99,102,241,.5) !important;
  transform: translateY(-1px) !important;
}

/* ── BADGES & TAGS ── */
[class*="badge"], [class*="Badge"], [class*="tag"], [class*="Tag"] {
  border-radius: 99px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.03em !important;
  padding: 3px 10px !important;
}

/* ── STATS / METRIC CARDS ── */
[class*="stat"], [class*="Stat"], [class*="metric"], [class*="Metric"] {
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  border-radius: var(--q-radius) !important;
  backdrop-filter: blur(10px) !important;
}

/* ── TABLES ── */
table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

th {
  background: rgba(255,255,255,.05) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: rgba(255,255,255,.5) !important;
  border-bottom: 1px solid rgba(255,255,255,.08) !important;
  padding: 12px 16px !important;
}

td {
  border-bottom: 1px solid rgba(255,255,255,.05) !important;
  padding: 12px 16px !important;
  font-size: 13.5px !important;
}

tr:hover td {
  background: rgba(255,255,255,.03) !important;
}

/* ── INPUTS & FORMS ── */
input, select, textarea {
  background: rgba(255,255,255,.08) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 10px !important;
  color: #fff !important;
  font-family: var(--q-font) !important;
  font-size: 14px !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--q-primary) !important;
  box-shadow: 0 0 0 3px rgba(99,102,241,.2) !important;
  outline: none !important;
}

input::placeholder, textarea::placeholder {
  color: rgba(255,255,255,.3) !important;
}

/* ── PAGE HEADER ── */
[class*="pageHeader"], [class*="PageHeader"],
[class*="page-header"] {
  margin-bottom: 24px !important;
}

[class*="pageTitle"], [class*="PageTitle"],
h1[class*="title"], h2[class*="title"] {
  font-size: 24px !important;
  font-weight: 800 !important;
  color: #fff !important;
  letter-spacing: -0.03em !important;
}

/* ── PROGRESS BARS ── */
[class*="progress"], [class*="Progress"] {
  background: rgba(255,255,255,.08) !important;
  border-radius: 99px !important;
  overflow: hidden !important;
}

[class*="progressFill"], [class*="progress-fill"],
[class*="Progress"] > div {
  background: linear-gradient(90deg, var(--q-primary), var(--q-purple)) !important;
  border-radius: 99px !important;
  box-shadow: 0 0 10px rgba(99,102,241,.4) !important;
}

/* ── TABS ── */
[class*="tab"], [class*="Tab"] {
  border-radius: 10px !important;
  font-weight: 600 !important;
  transition: all 0.2s !important;
}

[class*="tab"][aria-selected="true"],
[class*="tab"].active,
[class*="tab-active"] {
  background: linear-gradient(135deg, var(--q-primary), var(--q-purple)) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(99,102,241,.3) !important;
}

/* ── ICONS GLOW ── */
[class*="icon"] svg, [class*="Icon"] svg {
  filter: drop-shadow(0 0 4px rgba(99,102,241,.3));
}

/* ── QUIPPER BRAND — LOGO AREA ── */
.hrm-sideTop::before {
  content: "🎓";
  display: block;
  font-size: 28px;
  margin-bottom: 10px;
  filter: drop-shadow(0 4px 8px rgba(99,102,241,.5));
}

/* ── NOTIFICATION / ALERTS ── */
[class*="alert"], [class*="Alert"],
[class*="notification"], [class*="Notification"],
[class*="toast"], [class*="Toast"] {
  border-radius: 14px !important;
  backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255,255,255,.15) !important;
}

/* ── MODAL / DIALOG ── */
[class*="modal"], [class*="Modal"],
[class*="dialog"], [class*="Dialog"],
[role="dialog"] {
  background: rgba(15,12,41,.95) !important;
  backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(139,92,246,.3) !important;
  border-radius: 24px !important;
  box-shadow: 0 40px 80px rgba(0,0,0,.5) !important;
}

/* ── DIVIDERS ── */
hr, [class*="divider"], [class*="Divider"] {
  border-color: rgba(255,255,255,.08) !important;
}

/* ── LOADING / SPINNER ── */
[class*="spinner"], [class*="Spinner"],
[class*="loader"], [class*="Loader"] {
  border-top-color: var(--q-primary) !important;
}

/* ── AVATAR COLORS ── */
[class*="avatar"]:nth-child(1) { background: linear-gradient(135deg, #6366f1, #8b5cf6) !important; }
[class*="avatar"]:nth-child(2) { background: linear-gradient(135deg, #06b6d4, #0891b2) !important; }
[class*="avatar"]:nth-child(3) { background: linear-gradient(135deg, #10b981, #059669) !important; }
[class*="avatar"]:nth-child(4) { background: linear-gradient(135deg, #f59e0b, #d97706) !important; }
[class*="avatar"]:nth-child(5) { background: linear-gradient(135deg, #ec4899, #db2777) !important; }

/* ── GLOW EFFECTS ON KEY ELEMENTS ── */
[class*="highlight"], [class*="featured"] {
  box-shadow: 0 0 0 1px rgba(99,102,241,.3), 0 8px 24px rgba(99,102,241,.15) !important;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .hrm-app {
    grid-template-columns: 1fr !important;
    padding: 10px !important;
  }
  .hrm-sidebar {
    border-radius: 14px !important;
  }
}

/* ── ANIMATIONS ── */
@keyframes q-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes q-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,.4); }
  50%       { box-shadow: 0 0 0 8px rgba(99,102,241,0); }
}

[class*="card"], [class*="Card"] {
  animation: q-fade-in 0.3s ease both;
}

/* ── TITLE BAR OVERRIDE ── */
title { display: none; }

/* ── CUSTOM QUIPPER BRANDING ── */
.hrm-who .hrm-name::before {
  content: "";
}

/* Bottom nav glow */
.hrm-sidebar::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,.6), transparent);
}
