/* ==========================================================================
   Maa Guljari Bharat Institute - LMS Prototype
   Shared stylesheet for website, login and all dashboards
   ========================================================================== */

:root {
  --primary: #2952e3;
  --primary-dark: #1d3fc4;
  --primary-light: #eaf0ff;
  --accent: #0ea5a5;
  --accent-light: #e2f7f5;

  --ink: #101828;
  --ink-soft: #475467;
  --ink-faint: #98a2b3;

  --bg: #f5f7fb;
  --surface: #ffffff;
  --border: #e4e7ec;

  --success: #1a8f5e;
  --success-bg: #e7f7ef;
  --warning: #b25e09;
  --warning-bg: #fdf1e0;
  --danger: #c0293c;
  --danger-bg: #fbe8ea;
  --info: #2952e3;
  --info-bg: #eaf0ff;

  --sidebar-bg: #0f1a3c;
  --sidebar-ink: #c4cbe6;
  --sidebar-ink-active: #ffffff;
  --sidebar-active-bg: #1c2b5e;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
  --shadow: 0 4px 16px rgba(16, 24, 40, .08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .14);

  --sidebar-w: 250px;
  --topbar-h: 68px;
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5 {
  margin: 0 0 8px;
  line-height: 1.25;
  font-weight: 700;
}

p {
  margin: 0 0 12px;
  color: var(--ink-soft);
}

button {
  font-family: inherit;
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 550;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(41, 82, 227, 0.05), 0 2px 4px rgba(41, 82, 227, 0.08);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(41, 82, 227, 0.16);
}

.btn-outline {
  background: #ffffff;
  border-color: var(--border);
  color: var(--ink-soft);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.btn-outline:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.04);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 2px rgba(14, 165, 165, 0.05), 0 2px 4px rgba(14, 165, 165, 0.08);
}

.btn-accent:hover {
  background: #0c8a8a;
  box-shadow: 0 4px 12px rgba(14, 165, 165, 0.16);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
}

.btn-ghost:hover {
  background: var(--bg);
  color: var(--ink);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 1px 2px rgba(192, 41, 60, 0.05), 0 2px 4px rgba(192, 41, 60, 0.08);
}

.btn-danger:hover {
  background: #ab2232;
  box-shadow: 0 4px 12px rgba(192, 41, 60, 0.16);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
  border-radius: 6px;
}

.btn-block {
  width: 100%;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge-success {
  background: var(--success-bg);
  color: var(--success);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.badge-info {
  background: var(--info-bg);
  color: var(--info);
}

.badge-neutral {
  background: var(--bg);
  color: var(--ink-soft);
  border: 1px solid var(--border);
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.card-header h3 {
  margin: 0;
  font-size: 16px;
}

.card-body {
  padding: 20px;
}

.card-body.no-pad {
  padding: 0;
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: 16px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.form-control,
select.form-control,
textarea.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink);
  background: #fff;
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-hint {
  font-size: 12px;
  color: var(--ink-faint);
  margin-top: 4px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table thead th {
  text-align: left;
  padding: 12px 20px;
  background: var(--bg);
  color: var(--ink-soft);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table tbody td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  vertical-align: middle;
  white-space: nowrap;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: #fafbff;
}

.cell-sub {
  display: block;
  font-size: 12px;
  color: var(--ink-faint);
  font-weight: 400;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  margin-right: 10px;
  vertical-align: middle;
}

.row-actions {
  display: flex;
  gap: 8px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.icon-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ---------- Toolbar above tables/pages ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.toolbar .search {
  position: relative;
}

.toolbar .search input {
  padding-left: 36px;
  min-width: 240px;
}

.toolbar .search::before {
  content: "⌕";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-faint);
  font-size: 16px;
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--ink-soft);
}

.pagination .pages {
  display: flex;
  gap: 6px;
}

.pagination .pages a {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.pagination .pages a.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ---------- Progress ---------- */
.progress {
  height: 8px;
  border-radius: 999px;
  background: var(--bg);
  overflow: hidden;
}

.progress>span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
}

/* ==========================================================================
   PUBLIC WEBSITE
   ========================================================================== */
.site-navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.site-navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  color: var(--ink);
}

.brand .brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.brand small {
  display: block;
  font-weight: 500;
  font-size: 11px;
  color: var(--ink-faint);
}

.site-nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-soft);
}

.site-nav-links a:hover,
.site-nav-links a.active {
  color: var(--primary);
}

.nav-cta {
  display: flex;
  gap: 10px;
}

.hero {
  background: radial-gradient(1100px 480px at 80% -10%, var(--primary-light), transparent), var(--bg);
  padding: 72px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  background: var(--info-bg);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: 42px;
  letter-spacing: -.02em;
}

.hero p.lead {
  font-size: 16px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 40px;
}

.hero-stats div b {
  display: block;
  font-size: 24px;
  color: var(--ink);
}

.hero-stats div span {
  font-size: 13px;
  color: var(--ink-soft);
}

.hero-art {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px;
}

.section {
  padding: 64px 0;
}

.section-head {
  max-width: 620px;
  margin: 0 auto 40px;
  text-align: center;
}

.section-head h2 {
  font-size: 30px;
}

.section.alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.feature-card .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--info-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}

.course-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.course-card .thumb {
  height: 130px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

.course-card .body {
  padding: 18px;
}

.course-card .tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.gallery-grid .g-item {
  height: 150px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  font-size: 13px;
}

.notice-list {
  display: flex;
  flex-direction: column;
}

.notice-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.notice-item:last-child {
  border-bottom: none;
}

.notice-date {
  width: 64px;
  text-align: center;
  background: var(--info-bg);
  color: var(--primary);
  border-radius: var(--radius-sm);
  padding: 8px 0;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.notice-date span {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
}

.cta-band {
  background: linear-gradient(135deg, var(--primary), #1d3fc4);
  border-radius: var(--radius-lg);
  padding: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
}

.cta-band h2 {
  color: #fff;
}

.cta-band p {
  color: #dbe3ff;
}

.site-footer {
  background: var(--sidebar-bg);
  color: #aeb6d6;
  padding: 56px 0 24px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 32px;
}

.footer-grid h4 {
  color: #fff;
  font-size: 14px;
  margin-bottom: 14px;
}

.footer-grid a {
  display: block;
  padding: 5px 0;
  font-size: 14px;
  color: #aeb6d6;
}

.footer-grid a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #26305c;
  margin-top: 36px;
  padding-top: 20px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  color: #7d86ac;
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 32px;
}

.contact-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 32px;
}

.info-item {
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
}

.info-item .icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--info-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ==========================================================================
   AUTH / LOGIN
   ========================================================================== */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-visual {
  background: linear-gradient(160deg, var(--sidebar-bg), #1d3fc4 120%);
  color: #fff;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-visual .brand {
  color: #fff;
}

.auth-visual h2 {
  font-size: 28px;
  margin-top: 32px;
  max-width: 420px;
}

.auth-visual p {
  color: #c4cbe6;
  max-width: 420px;
}

.auth-visual-points {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-visual-points li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: #dbe1f7;
  font-size: 14px;
}

.check-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
}

.auth-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.auth-box {
  width: 100%;
  max-width: 400px;
}

.role-tabs {
  display: flex;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 28px;
}

.role-tabs a {
  flex: 1;
  text-align: center;
  padding: 9px 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}

.role-tabs a.active {
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.auth-foot {
  text-align: center;
  margin-top: 22px;
  font-size: 13px;
  color: var(--ink-soft);
}

.divider-text {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-faint);
  font-size: 12px;
  margin: 20px 0;
}

.divider-text::before,
.divider-text::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ==========================================================================
   DASHBOARD SHELL (Admin / Student / Faculty)
   ========================================================================== */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar-bg);
  color: var(--sidebar-ink);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  padding-bottom: 24px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px;
  border-bottom: 1px solid #22305e;
  color: #fff;
  font-weight: 800;
}

.sidebar-brand .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.sidebar-section {
  padding: 16px 20px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #5f6aa0;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--sidebar-ink);
  border-left: 3px solid transparent;
}

.sidebar-nav a .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .5;
  flex-shrink: 0;
}

.sidebar-nav a:hover {
  background: #16204a;
  color: #fff;
}

.sidebar-nav a.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-ink-active);
  border-left-color: var(--accent);
  font-weight: 700;
}

.main-area {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--topbar-h);
  flex-shrink: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-title h1 {
  font-size: 19px;
  margin: 0;
}

.topbar-title p {
  margin: 0;
  font-size: 12px;
  color: var(--ink-faint);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.topbar-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: #fff;
}

.topbar-icon .ping {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
}

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

.topbar-user .name {
  font-size: 13px;
  font-weight: 700;
}

.topbar-user .role {
  font-size: 11px;
  color: var(--ink-faint);
}

.page {
  padding: 28px;
}

.breadcrumb {
  font-size: 13px;
  color: var(--ink-faint);
  margin-bottom: 6px;
}

.breadcrumb a:hover {
  color: var(--primary);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.stat-card .top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.stat-card .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.stat-card .value {
  font-size: 26px;
  font-weight: 800;
}

.stat-card .label {
  font-size: 13px;
  color: var(--ink-soft);
}

.stat-card .delta {
  font-size: 12px;
  font-weight: 700;
}

.delta.up {
  color: var(--success);
}

.delta.down {
  color: var(--danger);
}

.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 22px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  height: 190px;
  padding: 10px 4px 0;
}

.bar-chart .bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.bar-chart .bar {
  width: 100%;
  border-radius: 6px 6px 0 0;
  background: var(--primary);
  flex-shrink: 0;
}

.bar-chart .bar-col span {
  font-size: 11px;
  color: var(--ink-faint);
}

.legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-soft);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.timeline {
  display: flex;
  flex-direction: column;
}

.timeline-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--info-bg);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.timeline-item .t {
  font-size: 11px;
  color: var(--ink-faint);
}

.list-plain {
  display: flex;
  flex-direction: column;
}

.list-plain li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.list-plain li:last-child {
  border-bottom: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  background: #fff;
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
}

.modal-box .card-header {
  border-bottom: 1px solid var(--border);
}

.modal-box .card-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ---------- Utility ---------- */
.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-8 {
  gap: 8px;
}

.gap-12 {
  gap: 12px;
}

.gap-16 {
  gap: 16px;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-8 {
  margin-bottom: 8px;
}

.mb-16 {
  margin-bottom: 16px;
}

.mb-24 {
  margin-bottom: 24px;
}

.text-sm {
  font-size: 13px;
}

.text-muted {
  color: var(--ink-soft);
}

.text-faint {
  color: var(--ink-faint);
}

.w-full {
  width: 100%;
}

/* ---------- Dropdown menus (topbar icons + user) ---------- */
.dropdown-wrap {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 240px;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
  overflow: hidden;
}

.dropdown-wrap.open .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel .dd-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  background: var(--bg);
}

.dropdown-panel a.dd-item,
.dropdown-panel .dd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}

.dropdown-panel a.dd-item:hover {
  background: var(--bg);
}

.dropdown-panel .dd-item.danger {
  color: var(--danger);
  font-weight: 600;
}

.dropdown-panel .dd-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.notif-panel .dd-list {
  max-height: 280px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 6px;
  flex-shrink: 0;
}

/* ---------- Hamburger (mobile sidebar toggle) ---------- */
.hamburger-btn {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fff;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
  margin-right: 12px;
  color: var(--ink);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, .45);
  z-index: 45;
}

.sidebar-backdrop.show {
  display: block;
}

/* ---------- Colorful gradient stat icon variants ---------- */
.icon-grad-blue {
  background: linear-gradient(135deg, #2952e3, #5b7ffb) !important;
  color: #fff !important;
}

.icon-grad-teal {
  background: linear-gradient(135deg, #0ea5a5, #34d3c8) !important;
  color: #fff !important;
}

.icon-grad-orange {
  background: linear-gradient(135deg, #f5871f, #ffb347) !important;
  color: #fff !important;
}

.icon-grad-pink {
  background: linear-gradient(135deg, #e0357e, #ff7bb0) !important;
  color: #fff !important;
}

.icon-grad-purple {
  background: linear-gradient(135deg, #7c3aed, #a78bfa) !important;
  color: #fff !important;
}

.icon-grad-green {
  background: linear-gradient(135deg, #1a8f5e, #4ade80) !important;
  color: #fff !important;
}

/* ---------- Welcome banner (colorful dashboard header) ---------- */
.welcome-banner {
  background: linear-gradient(120deg, var(--primary) 0%, #6d3ff0 55%, var(--accent) 100%);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.welcome-banner::after {
  content: "";
  position: absolute;
  right: -50px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}

.welcome-banner::before {
  content: "";
  position: absolute;
  right: 60px;
  bottom: -70px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
}

.welcome-banner h2 {
  color: #fff;
  margin-bottom: 4px;
}

.welcome-banner p {
  color: rgba(255, 255, 255, .85);
  margin-bottom: 0;
}

/* ---------- Responsive ---------- */
@media (max-width:1080px) {

  .grid-3,
  .grid-4,
  .stat-grid,
  .two-col,
  .content-grid,
  .form-row,
  .footer-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    display: none;
  }
}

@media (max-width:720px) {

  .grid-3,
  .grid-4,
  .stat-grid,
  .two-col,
  .content-grid,
  .form-row,
  .footer-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .site-nav-links {
    display: none;
  }

  .sidebar {
    transform: translateX(-100%);
    transition: .2s;
    position: fixed;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-area {
    margin-left: 0;
  }

  .hamburger-btn {
    display: inline-flex;
  }

  .topbar {
    padding: 0 16px;
  }

  .page {
    padding: 16px;
  }

  .topbar-title p {
    display: none;
  }

  .topbar-user .role {
    display: none;
  }

  .dropdown-panel {
    min-width: 200px;
    right: -8px;
  }

  .welcome-banner {
    padding: 20px;
  }
}

@media (max-width:480px) {
  .topbar-user>div:last-child {
    display: none;
  }

  .stat-card .value {
    font-size: 20px;
  }
}

/* ---------- Logo ---------- */
.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .5);
}

.sidebar-brand .brand-logo {
  width: 34px;
  height: 34px;
}

.auth-visual .brand-logo {
  width: 38px;
  height: 38px;
}

/* ---------- Colorful stat-card accents (auto-cycled, works on every page) ---------- */
.stat-card {
  border-top: 3px solid transparent;
}

.stat-grid .stat-card:nth-child(4n+1),
.grid-3 .stat-card:nth-child(3n+1),
.grid-4 .stat-card:nth-child(4n+1) {
  border-top-color: #2952e3;
}

.stat-grid .stat-card:nth-child(4n+2),
.grid-3 .stat-card:nth-child(3n+2),
.grid-4 .stat-card:nth-child(4n+2) {
  border-top-color: #7c3aed;
}

.stat-grid .stat-card:nth-child(4n+3),
.grid-3 .stat-card:nth-child(3n+3),
.grid-4 .stat-card:nth-child(4n+3) {
  border-top-color: #f5871f;
}

.stat-grid .stat-card:nth-child(4n+4),
.grid-4 .stat-card:nth-child(4n+4) {
  border-top-color: #0ea5a5;
}

.stat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  transition: .15s ease;
}

/* Colorful card-header accent bar */
.card-header {
  position: relative;
  padding-left: 24px;
}

.card-header::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

/* ---------- Simple SVG donut / progress-ring chart ---------- */
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.donut-legend .legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
}

.donut-legend .legend-row b {
  color: var(--ink);
  margin-left: auto;
  padding-left: 14px;
}

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}