/* ========================================
   EduNova - Enterprise School Management Platform
   Main Stylesheet
   ======================================== */

/* --- CSS Variables / Design Tokens --- */
:root {
  --primary: #1B4FD8;
  --primary-dark: #1340B0;
  --primary-light: #3B6FFF;
  --secondary: #0EA5E9;
  --accent: #F59E0B;
  --accent-dark: #D97706;
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --info: #3B82F6;

  --dark: #0F172A;
  --dark-2: #1E293B;
  --dark-3: #334155;
  --mid: #64748B;
  --light-mid: #94A3B8;
  --light: #CBD5E1;
  --lighter: #E2E8F0;
  --lightest: #F1F5F9;
  --white: #FFFFFF;

  --bg: #F8FAFC;
  --card-bg: #FFFFFF;
  --sidebar-bg: #0F172A;
  --sidebar-text: #CBD5E1;
  --sidebar-active: #1B4FD8;

  --font-display: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow: 0 4px 16px rgba(15,23,42,0.10);
  --shadow-lg: 0 8px 32px rgba(15,23,42,0.14);
  --shadow-xl: 0 20px 60px rgba(15,23,42,0.18);

  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
  --sidebar-width: 260px;
  --header-height: 64px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 700; line-height: 1.25; color: var(--dark); }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }
p { color: var(--mid); line-height: 1.75; }

/* --- Utility Classes --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-mid { color: var(--mid); }
.text-white { color: var(--white); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-gap { display: flex; align-items: center; gap: 12px; }
.grid { display: grid; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.p-8 { padding: 32px; }
.w-full { width: 100%; }
.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.shadow { box-shadow: var(--shadow); }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 600; font-family: var(--font-body);
  transition: all var(--transition); cursor: pointer; border: 2px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary); color: var(--white); border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--white); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(27,79,216,0.35); }
.btn-secondary { background: var(--white); color: var(--primary); border-color: var(--primary); }
.btn-secondary:hover { background: var(--primary); color: var(--white); transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: var(--white); border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--white); transform: translateY(-1px); }
.btn-success { background: var(--success); color: var(--white); border-color: var(--success); }
.btn-danger { background: var(--danger); color: var(--white); border-color: var(--danger); }
.btn-ghost { background: transparent; color: var(--mid); border-color: var(--lighter); }
.btn-ghost:hover { background: var(--lightest); color: var(--dark); }
.btn-sm { padding: 7px 16px; font-size: 0.82rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-icon { padding: 8px; border-radius: var(--radius); }
.btn-full { width: 100%; justify-content: center; }

/* --- Cards --- */
.card {
  background: var(--card-bg); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); border: 1px solid var(--lighter);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow); }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-body { padding: 24px; }
.card-header { padding: 20px 24px; border-bottom: 1px solid var(--lighter); }
.card-footer { padding: 16px 24px; border-top: 1px solid var(--lighter); background: var(--lightest); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* --- Badges --- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 0.75rem; font-weight: 600;
}
.badge-primary { background: rgba(27,79,216,0.1); color: var(--primary); }
.badge-success { background: rgba(16,185,129,0.1); color: var(--success); }
.badge-warning { background: rgba(245,158,11,0.1); color: var(--accent-dark); }
.badge-danger { background: rgba(239,68,68,0.1); color: var(--danger); }
.badge-info { background: rgba(59,130,246,0.1); color: var(--info); }
.badge-mid { background: var(--lightest); color: var(--mid); }

/* --- Form Elements --- */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.875rem; font-weight: 600; color: var(--dark-3); margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--lighter); border-radius: var(--radius);
  font-size: 0.9rem; color: var(--dark); background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(27,79,216,0.12); }
.form-control::placeholder { color: var(--light-mid); }
.form-control.error { border-color: var(--danger); }
.form-hint { font-size: 0.8rem; color: var(--mid); margin-top: 4px; }
.form-error { font-size: 0.8rem; color: var(--danger); margin-top: 4px; }
.input-group { position: relative; }
.input-group .form-control { padding-left: 42px; }
.input-group .input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--light-mid); font-size: 1rem; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748B' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

/* --- Tables --- */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-lg); }
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th {
  padding: 12px 16px; text-align: left;
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--mid); background: var(--lightest); border-bottom: 1px solid var(--lighter);
}
.table td { padding: 14px 16px; color: var(--dark); border-bottom: 1px solid var(--lightest); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--lightest); }
.table-striped tbody tr:nth-child(even) { background: rgba(241,245,249,0.5); }

/* --- Alerts --- */
.alert { padding: 14px 18px; border-radius: var(--radius); font-size: 0.875rem; display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; }
.alert-info { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.2); color: #1D4ED8; }
.alert-success { background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.2); color: #065F46; }
.alert-warning { background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.2); color: #92400E; }
.alert-danger { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2); color: #991B1B; }

/* --- Modal --- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,0.55);
  backdrop-filter: blur(4px); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; visibility: hidden; transition: all var(--transition);
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
  background: var(--white); border-radius: var(--radius-xl);
  width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-xl); transform: scale(0.94) translateY(10px);
  transition: transform var(--transition);
}
.modal-overlay.active .modal { transform: scale(1) translateY(0); }
.modal-header { padding: 24px 28px 20px; border-bottom: 1px solid var(--lighter); display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { font-size: 1.2rem; }
.modal-body { padding: 24px 28px; }
.modal-footer { padding: 20px 28px; border-top: 1px solid var(--lighter); display: flex; gap: 12px; justify-content: flex-end; }
.modal-close { width: 32px; height: 32px; border-radius: var(--radius); background: var(--lightest); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--mid); transition: all var(--transition); }
.modal-close:hover { background: var(--lighter); color: var(--dark); }

/* --- Sidebar Layout --- */
.app-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-width); background: var(--sidebar-bg);
  position: fixed; top: 0; left: 0; height: 100vh;
  overflow-y: auto; z-index: 100; transition: transform var(--transition);
  display: flex; flex-direction: column;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--dark-3); border-radius: 2px; }
.sidebar-brand {
  padding: 20px 20px; border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; gap: 12px;
}
.sidebar-brand .brand-logo { width: 36px; height: 36px; border-radius: 8px; }
.sidebar-brand .brand-name { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--white); letter-spacing: -0.02em; }
.sidebar-brand .brand-tagline { font-size: 0.7rem; color: var(--light-mid); }
.sidebar-nav { flex: 1; padding: 16px 0; }
.nav-section { margin-bottom: 8px; }
.nav-section-label { padding: 8px 20px 4px; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--dark-3); }
.nav-item { display: block; padding: 9px 20px; display: flex; align-items: center; gap: 10px; color: var(--sidebar-text); font-size: 0.875rem; font-weight: 500; border-radius: 0; transition: all var(--transition); cursor: pointer; border-left: 3px solid transparent; }
.nav-item:hover { background: rgba(255,255,255,0.06); color: var(--white); }
.nav-item.active { background: rgba(27,79,216,0.25); color: var(--white); border-left-color: var(--primary-light); }
.nav-item i { width: 18px; font-size: 1rem; flex-shrink: 0; }
.nav-item .nav-badge { margin-left: auto; background: var(--primary); color: white; font-size: 0.68rem; padding: 2px 7px; border-radius: 99px; font-weight: 700; }
.nav-submenu { overflow: hidden; max-height: 0; transition: max-height 0.3s ease; }
.nav-submenu.open { max-height: 400px; }
.nav-submenu .nav-item { padding-left: 48px; font-size: 0.84rem; }
.nav-item .chevron { margin-left: auto; font-size: 0.75rem; transition: transform var(--transition); }
.nav-item.has-children.open .chevron { transform: rotate(180deg); }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.sidebar-user .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 0.9rem; flex-shrink: 0; }
.sidebar-user .user-info { flex: 1; overflow: hidden; }
.sidebar-user .user-name { font-size: 0.85rem; font-weight: 600; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .user-role { font-size: 0.72rem; color: var(--light-mid); }

/* --- Main Content --- */
.main-content { margin-left: var(--sidebar-width); flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.top-bar {
  height: var(--header-height); background: var(--white);
  border-bottom: 1px solid var(--lighter); padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50; gap: 16px;
}
.top-bar-left { display: flex; align-items: center; gap: 16px; flex: 1; }
.search-bar { display: flex; align-items: center; gap: 10px; background: var(--lightest); border: 1.5px solid var(--lighter); border-radius: var(--radius-full); padding: 8px 16px; max-width: 360px; width: 100%; }
.search-bar input { background: none; border: none; outline: none; font-size: 0.875rem; color: var(--dark); width: 100%; }
.search-bar input::placeholder { color: var(--light-mid); }
.search-bar i { color: var(--light-mid); }
.top-bar-right { display: flex; align-items: center; gap: 8px; }
.top-bar-btn { width: 38px; height: 38px; border-radius: var(--radius); border: 1.5px solid var(--lighter); background: var(--white); display: flex; align-items: center; justify-content: center; color: var(--mid); cursor: pointer; transition: all var(--transition); position: relative; }
.top-bar-btn:hover { background: var(--lightest); color: var(--primary); }
.top-bar-btn .notif-dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; background: var(--danger); border-radius: 50%; border: 2px solid white; }
.user-menu { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: var(--radius); border: 1.5px solid var(--lighter); cursor: pointer; transition: all var(--transition); }
.user-menu:hover { background: var(--lightest); }
.user-menu .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 0.8rem; }
.user-menu .user-details { }
.user-menu .user-name { font-size: 0.82rem; font-weight: 600; color: var(--dark); }
.user-menu .user-role { font-size: 0.7rem; color: var(--mid); }
.page-content { padding: 28px; flex: 1; }

/* --- Page Header --- */
.page-header { margin-bottom: 28px; }
.page-header .breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; color: var(--mid); margin-bottom: 8px; }
.page-header .breadcrumb a { color: var(--mid); }
.page-header .breadcrumb a:hover { color: var(--primary); }
.page-header .breadcrumb .sep { color: var(--light); }
.page-title { font-size: 1.6rem; font-weight: 800; color: var(--dark); letter-spacing: -0.02em; }
.page-subtitle { font-size: 0.9rem; color: var(--mid); margin-top: 4px; }
.page-actions { display: flex; align-items: center; gap: 10px; }

/* --- Stats Cards --- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 28px; }
.stat-card {
  background: var(--white); border-radius: var(--radius-lg);
  padding: 22px; border: 1px solid var(--lighter);
  display: flex; align-items: flex-start; gap: 16px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: all var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-card::after { content: ''; position: absolute; top: 0; right: 0; width: 80px; height: 80px; border-radius: 50%; opacity: 0.07; transform: translate(20px, -20px); }
.stat-card.blue::after { background: var(--primary); }
.stat-card.green::after { background: var(--success); }
.stat-card.orange::after { background: var(--accent); }
.stat-card.purple::after { background: #8B5CF6; }
.stat-card.red::after { background: var(--danger); }
.stat-card.cyan::after { background: var(--secondary); }
.stat-icon { width: 48px; height: 48px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.stat-icon.blue { background: rgba(27,79,216,0.1); color: var(--primary); }
.stat-icon.green { background: rgba(16,185,129,0.1); color: var(--success); }
.stat-icon.orange { background: rgba(245,158,11,0.1); color: var(--accent-dark); }
.stat-icon.purple { background: rgba(139,92,246,0.1); color: #8B5CF6; }
.stat-icon.red { background: rgba(239,68,68,0.1); color: var(--danger); }
.stat-icon.cyan { background: rgba(14,165,233,0.1); color: var(--secondary); }
.stat-content { flex: 1; min-width: 0; }
.stat-label { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--mid); }
.stat-value { font-size: 1.9rem; font-weight: 800; color: var(--dark); letter-spacing: -0.03em; line-height: 1.1; margin: 3px 0; font-family: var(--font-display); }
.stat-change { font-size: 0.78rem; font-weight: 600; display: flex; align-items: center; gap: 3px; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* --- Dashboard Grid --- */
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }

/* --- Charts Placeholder --- */
.chart-area { width: 100%; height: 220px; background: var(--lightest); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.chart-area canvas { max-width: 100%; }

/* --- Progress Bars --- */
.progress-bar-wrap { background: var(--lightest); border-radius: var(--radius-full); height: 8px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: var(--radius-full); transition: width 0.8s ease; }
.progress-bar.primary { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.progress-bar.success { background: linear-gradient(90deg, var(--success), #34D399); }
.progress-bar.warning { background: linear-gradient(90deg, var(--accent-dark), var(--accent)); }
.progress-bar.danger { background: linear-gradient(90deg, var(--danger), #F87171); }

/* --- Tabs --- */
.tabs { display: flex; border-bottom: 2px solid var(--lighter); margin-bottom: 24px; gap: 4px; overflow-x: auto; }
.tab { padding: 10px 20px; font-size: 0.875rem; font-weight: 600; color: var(--mid); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all var(--transition); white-space: nowrap; border-radius: var(--radius) var(--radius) 0 0; }
.tab:hover { color: var(--dark); background: var(--lightest); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); background: rgba(27,79,216,0.05); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* --- Pagination --- */
.pagination { display: flex; align-items: center; gap: 4px; }
.page-btn { width: 36px; height: 36px; border-radius: var(--radius); border: 1.5px solid var(--lighter); background: var(--white); display: flex; align-items: center; justify-content: center; font-size: 0.875rem; color: var(--mid); cursor: pointer; transition: all var(--transition); font-weight: 500; }
.page-btn:hover { background: var(--lightest); color: var(--dark); }
.page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* --- Landing Page --- */
.landing-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 0; background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--lighter);
  transition: all var(--transition);
}
.landing-nav .nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo-img { width: 40px; height: 40px; }
.brand-text { display: flex; flex-direction: column; }
.brand-text .name { font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--dark); letter-spacing: -0.02em; line-height: 1; }
.brand-text .tagline { font-size: 0.65rem; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: 0.08em; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-size: 0.875rem; font-weight: 500; color: var(--mid); transition: color var(--transition); }
.nav-links a:hover { color: var(--dark); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--dark); border-radius: 2px; transition: all var(--transition); }

/* --- Hero Section --- */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 40%, #0F172A 100%);
  position: relative; overflow: hidden; padding-top: 68px;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 60% 40%, rgba(27,79,216,0.25) 0%, transparent 65%);
}
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; position: relative; z-index: 1; padding: 80px 0; }
.hero-label { display: inline-flex; align-items: center; gap: 6px; background: rgba(27,79,216,0.2); border: 1px solid rgba(27,79,216,0.4); color: #93C5FD; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; padding: 6px 14px; border-radius: var(--radius-full); margin-bottom: 20px; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); color: var(--white); letter-spacing: -0.03em; line-height: 1.1; margin-bottom: 20px; }
.hero h1 .highlight { color: var(--accent); position: relative; }
.hero-desc { font-size: 1.05rem; color: #94A3B8; line-height: 1.75; max-width: 480px; margin-bottom: 36px; }
.hero-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 32px; margin-top: 48px; padding-top: 32px; border-top: 1px solid rgba(255,255,255,0.1); }
.hero-stat .value { font-size: 1.8rem; font-weight: 800; color: var(--white); font-family: var(--font-display); letter-spacing: -0.02em; }
.hero-stat .label { font-size: 0.78rem; color: #94A3B8; }
.hero-visual { position: relative; }
.hero-dashboard { background: var(--white); border-radius: 20px; box-shadow: 0 40px 100px rgba(0,0,0,0.4); overflow: hidden; }
.hero-dash-header { background: var(--lightest); padding: 14px 20px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--lighter); }
.hero-dash-header .dot { width: 12px; height: 12px; border-radius: 50%; }
.hero-dash-header .dot.red { background: #FF5F57; }
.hero-dash-header .dot.yellow { background: #FFBD44; }
.hero-dash-header .dot.green { background: #00CA4E; }
.hero-dash-content { padding: 20px; }
.hero-mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.hero-mini-stat { background: var(--lightest); border-radius: 10px; padding: 12px; }
.hero-mini-stat .mini-val { font-size: 1.3rem; font-weight: 800; color: var(--dark); }
.hero-mini-stat .mini-lbl { font-size: 0.7rem; color: var(--mid); }
.hero-mini-chart { background: var(--lightest); border-radius: 10px; height: 80px; display: flex; align-items: flex-end; gap: 4px; padding: 10px; }
.chart-bar { flex: 1; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--primary-light), var(--primary)); }

/* --- Section Styles --- */
.section { padding: 90px 0; }
.section-alt { background: var(--white); }
.section-dark { background: var(--dark); }
.section-header { text-align: center; max-width: 640px; margin: 0 auto 60px; }
.section-label { display: inline-block; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--primary); background: rgba(27,79,216,0.08); padding: 4px 14px; border-radius: var(--radius-full); margin-bottom: 14px; }
.section-header h2 { margin-bottom: 14px; letter-spacing: -0.02em; }
.section-header p { font-size: 1rem; color: var(--mid); }

/* --- Module Cards --- */
.modules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.module-card { background: var(--white); border-radius: var(--radius-lg); padding: 28px; border: 1.5px solid var(--lighter); transition: all var(--transition); cursor: default; }
.module-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.module-card:hover .module-icon { transform: scale(1.1); }
.module-icon { width: 56px; height: 56px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 16px; transition: transform var(--transition); }
.module-card h4 { font-size: 1rem; margin-bottom: 8px; }
.module-card p { font-size: 0.84rem; color: var(--mid); line-height: 1.6; }
.module-features { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.module-feature-tag { font-size: 0.72rem; font-weight: 600; color: var(--mid); background: var(--lightest); padding: 3px 10px; border-radius: var(--radius-full); }

/* --- Pricing Section --- */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; max-width: 1000px; margin: 0 auto; }
.pricing-card { background: var(--white); border-radius: var(--radius-xl); padding: 36px; border: 2px solid var(--lighter); transition: all var(--transition); position: relative; }
.pricing-card.popular { border-color: var(--primary); background: linear-gradient(135deg, #EFF6FF, var(--white)); }
.pricing-popular-badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--primary); color: white; font-size: 0.75rem; font-weight: 700; padding: 4px 16px; border-radius: var(--radius-full); }
.pricing-name { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mid); margin-bottom: 8px; }
.pricing-price { font-size: 2.6rem; font-weight: 800; color: var(--dark); letter-spacing: -0.03em; line-height: 1; font-family: var(--font-display); }
.pricing-price span { font-size: 1rem; font-weight: 500; color: var(--mid); }
.pricing-desc { font-size: 0.875rem; color: var(--mid); margin: 12px 0 24px; }
.pricing-features { list-style: none; margin-bottom: 28px; }
.pricing-features li { display: flex; align-items: center; gap: 10px; font-size: 0.875rem; color: var(--dark-3); padding: 7px 0; border-bottom: 1px solid var(--lightest); }
.pricing-features li i { color: var(--success); font-size: 0.9rem; }
.pricing-features li.no i { color: var(--light); }
.pricing-features li.no span { color: var(--light-mid); }

/* --- Testimonials --- */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.testimonial-card { background: var(--white); border-radius: var(--radius-lg); padding: 28px; border: 1.5px solid var(--lighter); }
.testimonial-stars { color: var(--accent); margin-bottom: 14px; font-size: 0.9rem; }
.testimonial-text { font-size: 0.9rem; color: var(--dark-3); line-height: 1.7; font-style: italic; margin-bottom: 18px; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 1rem; flex-shrink: 0; }
.testimonial-name { font-size: 0.9rem; font-weight: 700; color: var(--dark); }
.testimonial-title { font-size: 0.78rem; color: var(--mid); }

/* --- CTA Section --- */
.cta-section { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); padding: 90px 0; position: relative; overflow: hidden; }
.cta-section::before { content: ''; position: absolute; top: -50%; right: -10%; width: 600px; height: 600px; border-radius: 50%; background: rgba(255,255,255,0.04); }
.cta-section::after { content: ''; position: absolute; bottom: -30%; left: -5%; width: 400px; height: 400px; border-radius: 50%; background: rgba(255,255,255,0.04); }
.cta-inner { position: relative; z-index: 1; text-align: center; max-width: 640px; margin: 0 auto; }
.cta-inner h2 { color: var(--white); margin-bottom: 16px; }
.cta-inner p { color: rgba(255,255,255,0.75); margin-bottom: 36px; font-size: 1.05rem; }
.cta-btns { display: flex; align-items: center; justify-content: center; gap: 16px; flex-wrap: wrap; }
.btn-white { background: var(--white); color: var(--primary); border: 2px solid var(--white); }
.btn-white:hover { background: transparent; color: var(--white); border-color: white; }
.btn-outline-white { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.4); }
.btn-outline-white:hover { background: rgba(255,255,255,0.12); border-color: white; }

/* --- Footer --- */
.footer { background: var(--dark); color: var(--sidebar-text); padding: 70px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-brand .brand { margin-bottom: 16px; }
.footer-brand .brand-text .name { color: white; }
.footer-desc { font-size: 0.875rem; color: #94A3B8; line-height: 1.7; max-width: 280px; }
.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.social-btn { width: 36px; height: 36px; border-radius: var(--radius); background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center; color: #94A3B8; transition: all var(--transition); font-size: 0.9rem; }
.social-btn:hover { background: var(--primary); color: white; }
.footer-col h5 { font-size: 0.875rem; font-weight: 700; color: var(--white); margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { font-size: 0.84rem; color: #94A3B8; transition: color var(--transition); }
.footer-col ul li a:hover { color: var(--white); }
.footer-bottom { padding: 20px 0; display: flex; align-items: center; justify-content: space-between; }
.footer-bottom p { font-size: 0.8rem; color: #64748B; }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { font-size: 0.8rem; color: #64748B; transition: color var(--transition); }
.footer-bottom-links a:hover { color: #94A3B8; }

/* --- Dashboard-specific --- */
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.quick-action { background: var(--white); border: 1.5px solid var(--lighter); border-radius: var(--radius-lg); padding: 18px; text-align: center; cursor: pointer; transition: all var(--transition); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.quick-action:hover { border-color: var(--primary); background: rgba(27,79,216,0.03); }
.quick-action i { font-size: 1.4rem; }
.quick-action span { font-size: 0.8rem; font-weight: 600; color: var(--dark-3); }

/* --- Notifications Dropdown --- */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--white); border: 1.5px solid var(--lighter);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-xl);
  min-width: 320px; z-index: 200; display: none;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-header { padding: 14px 18px; border-bottom: 1px solid var(--lighter); display: flex; align-items: center; justify-content: space-between; }
.dropdown-header h6 { font-size: 0.9rem; }
.dropdown-item { padding: 12px 18px; display: flex; align-items: flex-start; gap: 12px; cursor: pointer; transition: background var(--transition); border-bottom: 1px solid var(--lightest); }
.dropdown-item:hover { background: var(--lightest); }
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item .notif-icon { width: 36px; height: 36px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.dropdown-item .notif-title { font-size: 0.83rem; font-weight: 600; color: var(--dark); }
.dropdown-item .notif-time { font-size: 0.75rem; color: var(--mid); }
.dropdown-footer { padding: 12px 18px; text-align: center; }
.dropdown-footer a { font-size: 0.84rem; font-weight: 600; color: var(--primary); }

/* --- Charts.js styled containers --- */
.chart-container { position: relative; padding: 4px 0; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 0.78rem; color: var(--mid); }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* --- Loader --- */
.loader { display: inline-block; width: 20px; height: 20px; border: 2.5px solid var(--lighter); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.page-loader { position: fixed; inset: 0; background: var(--white); z-index: 9999; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 16px; transition: opacity 0.4s; }
.page-loader.hidden { opacity: 0; pointer-events: none; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--lightest); }
::-webkit-scrollbar-thumb { background: var(--light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--light-mid); }

/* --- Animations --- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { transform: translateX(-20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.animate-fade { animation: fadeIn 0.5s ease both; }
.animate-slide { animation: slideIn 0.4s ease both; }

/* --- Toasts --- */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--dark); color: var(--white); padding: 14px 18px; border-radius: var(--radius); display: flex; align-items: center; gap: 12px; font-size: 0.875rem; box-shadow: var(--shadow-xl); animation: fadeIn 0.3s ease; max-width: 340px; }
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--info); }
.toast.warning { border-left: 3px solid var(--accent); }
.toast i { font-size: 1.1rem; }
.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.info i { color: var(--info); }
.toast.warning i { color: var(--accent); }

/* --- Login/Auth Pages --- */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-left { background: linear-gradient(135deg, #0F172A, #1E293B); display: flex; align-items: center; justify-content: center; padding: 60px 40px; position: relative; overflow: hidden; }
.auth-left::before { content: ''; position: absolute; top: -20%; left: -20%; width: 600px; height: 600px; border-radius: 50%; background: radial-gradient(circle, rgba(27,79,216,0.2), transparent); }
.auth-right { display: flex; align-items: center; justify-content: center; padding: 60px 40px; background: var(--bg); }
.auth-form-box { width: 100%; max-width: 420px; }
.auth-logo { margin-bottom: 36px; }
.auth-title { font-size: 1.7rem; font-weight: 800; color: var(--dark); letter-spacing: -0.02em; margin-bottom: 6px; }
.auth-subtitle { font-size: 0.9rem; color: var(--mid); margin-bottom: 32px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.auth-divider span { font-size: 0.8rem; color: var(--mid); }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--lighter); }
.auth-footer { text-align: center; margin-top: 24px; font-size: 0.875rem; color: var(--mid); }
.auth-visual-content { position: relative; z-index: 1; text-align: center; }
.auth-visual-content h2 { color: white; font-size: 2rem; margin-bottom: 14px; }
.auth-visual-content p { color: #94A3B8; font-size: 0.95rem; line-height: 1.7; max-width: 360px; }
.auth-feature-list { list-style: none; margin-top: 28px; display: flex; flex-direction: column; gap: 12px; }
.auth-feature-list li { display: flex; align-items: center; gap: 10px; color: #CBD5E1; font-size: 0.875rem; }
.auth-feature-list li i { color: var(--accent); }

/* --- Empty State --- */
.empty-state { text-align: center; padding: 60px 24px; }
.empty-state i { font-size: 3rem; color: var(--light); margin-bottom: 16px; }
.empty-state h4 { color: var(--dark-3); margin-bottom: 8px; }
.empty-state p { font-size: 0.875rem; color: var(--mid); max-width: 320px; margin: 0 auto 20px; }

/* --- Mobile nav overlay --- */
.mobile-nav-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99; display: none; }
.mobile-nav-overlay.active { display: block; }
.sidebar-toggle { display: none; width: 36px; height: 36px; align-items: center; justify-content: center; border: 1.5px solid var(--lighter); border-radius: var(--radius); background: var(--white); color: var(--mid); cursor: pointer; font-size: 1.1rem; }

/* --- Responsive --- */
@media (max-width: 1200px) {
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .col-span-2 { grid-column: span 2; }
}
@media (max-width: 992px) {
  :root { --sidebar-width: 0px; }
  .sidebar { transform: translateX(-260px); width: 260px; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .top-bar { padding: 0 16px; }
  .page-content { padding: 20px 16px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .col-span-2, .col-span-3 { grid-column: span 1; }
  .auth-left { display: none; }
  .auth-page { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .modules-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .hero-stats { flex-wrap: wrap; gap: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
  .hero-actions { flex-direction: column; }
  .btn-lg { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
