:root {
  --bg: #f4f7fb;
  --bg-2: #eef4ff;
  --sidebar: #0f172a;
  --sidebar-2: #111c34;
  --text: #0f172a;
  --muted: #64748b;
  --card: #ffffff;
  --primary: #4f46e5;
  --secondary: #06b6d4;
  --success: #16a34a;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
  --border: rgba(226, 232, 240, 0.9);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(79, 70, 229, 0.08), transparent 25%),
    radial-gradient(circle at left, rgba(6, 182, 212, 0.07), transparent 25%),
    var(--bg);
  color: var(--text);
}
.auth-shell { background: #0b1120; }

a { text-decoration: none; }
.table > :not(caption) > * > * { padding: 1rem .75rem; white-space: nowrap; }
.table-responsive { border-radius: 18px; }
.form-control, .form-select {
  border-color: #dbe5f1;
  border-radius: 16px;
  padding: .85rem 1rem;
  box-shadow: none !important;
}
.form-control:focus, .form-select:focus {
  border-color: rgba(79,70,229,.35);
}
.input-group-text {
  background: #f8fafc;
  border-color: #dbe5f1;
}

.btn-gradient {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: 0;
  box-shadow: 0 14px 30px rgba(79,70,229,.25);
}
.btn-gradient:hover { color: white; opacity: .96; }
.rounded-4 { border-radius: 1rem !important; }

.auth-wrapper { min-height: 100vh; position: relative; overflow: hidden; }
.auth-background {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(79,70,229,.42), transparent 28%),
    radial-gradient(circle at 90% 20%, rgba(6,182,212,.32), transparent 24%),
    linear-gradient(135deg, #0b1120 0%, #172554 40%, #111827 100%);
}
.floating-shape {
  position: absolute;
  border-radius: 999px;
  filter: blur(4px);
  opacity: .35;
}
.shape-a { width: 320px; height: 320px; background: rgba(255,255,255,.12); top: 10%; right: 6%; }
.shape-b { width: 220px; height: 220px; background: rgba(6,182,212,.18); left: 8%; bottom: 8%; }

.auth-card {
  background: rgba(255,255,255,.96);
  border-radius: 32px;
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.2);
}
.auth-visual {
  min-height: 720px;
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.16), transparent 32%),
    radial-gradient(circle at right, rgba(255,255,255,.08), transparent 24%),
    linear-gradient(145deg, rgba(79,70,229,.95), rgba(6,182,212,.76));
}
.auth-visual-content {
  padding: 56px;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}
.auth-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.feature-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,.12);
  padding: 16px;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  font-weight: 600;
}
.auth-form-pane { padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.auth-logo {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  font-size: 1.75rem;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  box-shadow: var(--shadow);
}
.demo-box {
  background: linear-gradient(180deg, #f8fafc, #eff6ff);
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 18px;
}

.layout-wrapper { display: flex; min-height: 100vh; }
.sidebar {
  width: 310px;
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  color: #e2e8f0;
  padding: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.brand-panel {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-icon, .avatar-circle, .module-icon, .module-box-icon, .career-icon, .module-detail-icon {
  display: grid;
  place-items: center;
}
.brand-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(79,70,229,1), rgba(6,182,212,1));
  font-size: 1.25rem;
}
.brand-title { font-size: 1rem; font-weight: 800; }
.brand-subtitle { font-size: .82rem; color: #94a3b8; }

.user-mini-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px;
  margin-top: 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 20px;
}
.avatar-circle {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,.12);
  border-radius: 14px;
  font-weight: 700;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #cbd5e1;
  border-radius: 16px;
  padding: 12px 14px;
  font-weight: 500;
  transition: .2s ease;
}
.sidebar-link:hover, .sidebar-link:focus, .sidebar-link.active {
  background: rgba(255,255,255,.08);
  color: white;
}
.soft-info {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 18px;
  padding: 16px;
}

.main-content { flex: 1; min-width: 0; }
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 28px 28px 0;
}
.page-title { font-size: clamp(1.45rem, 3vw, 2rem); font-weight: 800; }
.page-subtitle { color: var(--muted); }
.topbar-meta { display: flex; flex-wrap: wrap; gap: 10px; }
.meta-chip, .pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 600;
  color: var(--muted);
}
.pill-tag {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.14);
  color: white;
  width: fit-content;
}
.pill-tag.dark { background: #eef2ff; border-color: transparent; color: var(--primary); }

.stat-card, .panel-card, .hero-panel, .career-card, .module-box, .module-tile, .message-card, .placeholder-surface {
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.stat-card {
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 96px;
}
.stat-card .icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
}
.stat-label { color: var(--muted); font-size: .9rem; }
.stat-value { font-size: 1.5rem; font-weight: 800; }
.panel-card { padding: 24px; }
.panel-card.secondary { margin-top: 24px; }
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.chart-box { position: relative; min-height: 320px; }
.module-tile, .module-box {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  transition: .2s ease;
}
.module-tile:hover, .module-box:hover, .career-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(15,23,42,.10);
}
.module-icon, .module-box-icon, .career-icon, .module-detail-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: #eef2ff;
  color: var(--primary);
  font-size: 1.25rem;
  flex-shrink: 0;
}
.hero-panel {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
}
.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  min-width: 340px;
}
.hero-meta > div {
  background: #f8fafc;
  border-radius: 20px;
  padding: 16px;
  text-align: center;
}
.hero-meta strong { display: block; font-size: 1.25rem; }
.hero-meta span { color: var(--muted); font-size: .9rem; }

.message-card {
  padding: 16px;
  margin-bottom: 12px;
  background: linear-gradient(180deg, #fff, #fbfdff);
}
.career-card {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px;
  height: 100%;
}
.placeholder-surface {
  padding: 26px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.placeholder-surface.soft { background: linear-gradient(135deg, #eef2ff, #ecfeff); }

.stack-list { display: grid; gap: 12px; }
.stack-item {
  padding: 14px 16px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #e5edf6;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.sticky-card { position: sticky; top: 16px; }

@media (max-width: 1199px) {
  .sidebar { width: 280px; }
  .hero-panel { flex-direction: column; }
  .hero-meta { min-width: auto; }
}
@media (max-width: 991px) {
  .layout-wrapper { flex-direction: column; }
  .sidebar { position: relative; width: 100%; height: auto; }
  .topbar { padding: 22px 16px 0; flex-direction: column; align-items: flex-start; }
  .auth-form-pane { padding: 32px 24px; }
  .sticky-card { position: static; }
}
@media (max-width: 767px) {
  .hero-meta { grid-template-columns: 1fr; }
  .panel-card, .stat-card { padding: 18px; }
  .auth-card { border-radius: 22px; }
  .auth-feature-grid { grid-template-columns: 1fr; }
  .table > :not(caption) > * > * { white-space: normal; }
}

.sidebar-scroll { overflow-y: auto; padding-right: 4px; }
.sidebar-scroll::-webkit-scrollbar { width: 8px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(148,163,184,.35); border-radius: 999px; }
.table .btn { white-space: nowrap; }


.topbar-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.notif-btn, .profile-trigger {
  background: rgba(255,255,255,.9);
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  min-height: 48px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
}
.notif-btn { min-width: 50px; position: relative; }
.notif-btn:hover, .profile-trigger:hover { background: #fff; border-color: #cbd5e1; }
.notif-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: .72rem;
  font-weight: 700;
}
.topbar-dropdown { width: min(380px, calc(100vw - 32px)); border: 1px solid #e2e8f0; border-radius: 24px; box-shadow: 0 22px 44px rgba(15,23,42,.16); }
.dropdown-header-bar, .dropdown-footer-bar { padding: 14px 18px; background: #fff; border-bottom: 1px solid #edf2f7; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dropdown-footer-bar { border-bottom: 0; border-top: 1px solid #edf2f7; }
.notifications-list { max-height: 420px; overflow-y: auto; background: linear-gradient(180deg, #fff, #f8fbff); }
.notification-item { display: flex; gap: 14px; padding: 16px 18px; color: var(--text); border-bottom: 1px solid #eef2f7; }
.notification-item:hover { background: #f8fbff; color: var(--text); }
.notification-item.is-unread { background: linear-gradient(90deg, rgba(79,70,229,.06), rgba(6,182,212,.04)); }
.notification-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; }
.notification-body strong { display: block; font-size: .95rem; }
.notification-body p { color: var(--muted); font-size: .88rem; }
.notification-body small { color: #94a3b8; }
.avatar-photo { width: 44px; height: 44px; border-radius: 14px; object-fit: cover; object-position: center; flex-shrink: 0; border: 2px solid rgba(255,255,255,.25); }
.avatar-photo.sm { width: 40px; height: 40px; border-radius: 12px; }
.avatar-circle.sm { width: 40px; height: 40px; border-radius: 12px; }
.profile-trigger { display: flex; align-items: center; gap: 12px; color: var(--text); }
.profile-cover {
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, #1d4ed8, #4f46e5 45%, #06b6d4);
  box-shadow: var(--shadow);
}
.profile-cover-content { padding: 28px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.profile-avatar-wrap { width: 120px; height: 120px; }
.profile-avatar, .profile-avatar-fallback { width: 120px; height: 120px; border-radius: 28px; object-fit: cover; object-position: center; border: 4px solid rgba(255,255,255,.25); box-shadow: 0 14px 30px rgba(15,23,42,.18); }
.profile-avatar-fallback { display: grid; place-items: center; background: rgba(255,255,255,.18); color: #fff; font-size: 2rem; font-weight: 800; }
.profile-side-card { height: 100%; }
.profile-preview-card { border-radius: 22px; border: 1px dashed #cbd5e1; padding: 18px; min-height: 96px; background: linear-gradient(180deg, #f8fafc, #ffffff); display: flex; align-items: center; gap: 16px; }
.profile-preview-card.has-image { background-size: cover; background-position: center; min-height: 180px; color: #fff; position: relative; overflow: hidden; }
.profile-preview-card.has-image::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,23,42,.18), rgba(15,23,42,.62)); }
.profile-preview-card.has-image > * { position: relative; z-index: 1; }
.user-mini-card { color: inherit; }
.user-mini-card:hover { background: rgba(255,255,255,.09); }

@media (max-width: 991px) {
  .topbar-actions { width: 100%; justify-content: space-between; }
}
@media (max-width: 767px) {
  .profile-cover-content { padding: 22px; }
  .profile-avatar, .profile-avatar-fallback, .profile-avatar-wrap { width: 92px; height: 92px; border-radius: 22px; }
  .topbar-dropdown { width: min(100vw - 24px, 360px); }
  .notif-btn, .profile-trigger { padding: 10px 12px; }
}
