/* ============================================
   Schooldhara.com MIS – Custom Styles
   ============================================ */

:root {
  color-scheme: light;
  --sidebar-width: 260px;
  --sidebar-bg: #ffffff;
  --sidebar-text: #5b6b7c;
  --sidebar-title: #1E293B;
  --sidebar-active: #0B4DBB;
  --sidebar-hover-bg: #E8F0FE;
  --sidebar-hover-text: #083A8F;
  --sidebar-border: #E2E8F0;
  --topbar-height: 60px;
  --primary: #0B4DBB;
  --primary-dark: #083A8F;
  --primary-light: #E8F0FE;
  --secondary: #FF7A00;
  --secondary-dark: #E06A00;
  --accent: #16A34A;
  --success: #16A34A;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;
  --body-bg: #F8FAFC;
  --card-bg: #FFFFFF;
  --card-muted-bg: #f8fafc;
  --text-dark: #1E293B;
  --text-muted: #64748B;
  --border-color: #E2E8F0;
  --input-bg: #ffffff;
  --input-text: #1E293B;
  --dropdown-bg: #ffffff;
  --dropdown-hover-bg: #f8fafc;
  --dropdown-text: #1E293B;
  --table-hover-bg: #f8fafc;
  --role-super-bg: #fef3c7;
  --role-super-text: #b45309;
  --role-reseller-bg: #ede9fe;
  --role-reseller-text: #7c3aed;
  --role-company-bg: #E8F0FE;
  --role-company-text: #0B4DBB;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow: 0 10px 40px rgba(11, 77, 187, 0.08);
  --shadow-md: 0 20px 60px rgba(11, 77, 187, 0.12);
  --gradient-primary: linear-gradient(135deg, #0B4DBB 0%, #1D6FE8 50%, #0B4DBB 100%);
  --gradient-secondary: linear-gradient(135deg, #FF7A00 0%, #FF9A3C 100%);
  --gradient-hero: linear-gradient(135deg, #0B4DBB 0%, #0A3D96 40%, #062A6B 100%);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --sidebar-bg: #0F172A;
  --sidebar-text: #94A3B8;
  --sidebar-title: #F1F5F9;
  --sidebar-active: #3B82F6;
  --sidebar-hover-bg: #1E3A5F;
  --sidebar-hover-text: #ffffff;
  --sidebar-border: #334155;
  --primary: #3B82F6;
  --primary-dark: #2563EB;
  --primary-light: #1E3A5F;
  --secondary: #FF9A3C;
  --secondary-dark: #FF7A00;
  --accent: #22c55e;
  --success: #22c55e;
  --warning: #fbbf24;
  --danger: #f87171;
  --info: #22d3ee;
  --body-bg: #0F172A;
  --card-bg: #1E293B;
  --card-muted-bg: #162033;
  --text-dark: #F1F5F9;
  --text-muted: #94A3B8;
  --border-color: #334155;
  --input-bg: #0f172a;
  --input-text: #F1F5F9;
  --dropdown-bg: #1E293B;
  --dropdown-hover-bg: #162033;
  --dropdown-text: #F1F5F9;
  --table-hover-bg: #162033;
  --role-super-bg: rgba(251, 191, 36, .14);
  --role-super-text: #fbbf24;
  --role-reseller-bg: rgba(168, 85, 247, .14);
  --role-reseller-text: #c084fc;
  --role-company-bg: rgba(59, 130, 246, .14);
  --role-company-text: #60a5fa;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 20px 60px rgba(0, 0, 0, 0.4);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--body-bg);
  color: var(--text-dark);
  font-size: 14px;
  transition: background-color .25s ease, color .25s ease;
}

a {
  color: inherit;
}

/* ── Wrapper ─────────────────────────────────── */
.wrapper {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: all .3s ease;
  overflow-y: auto;
}

.sidebar.collapsed {
  width: 70px;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-link span,
.sidebar.collapsed .sidebar-footer {
  display: none;
}

.sidebar.collapsed .sidebar-header {
  justify-content: center;
  padding: 20px 10px;
}

.sidebar.collapsed .nav-link {
  justify-content: center;
  padding: 12px 10px;
}

.sidebar.collapsed .nav-link i {
  margin-right: 0;
  font-size: 18px;
}

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

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
}

.logo-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--sidebar-title);
  line-height: 1.2;
}

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

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

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all .2s ease;
  border-radius: 0;
}

.nav-link i {
  width: 18px;
  text-align: center;
  font-size: 14px;
}

.nav-link:hover {
  background: var(--sidebar-hover-bg);
  color: var(--sidebar-hover-text);
  border-left-color: rgba(11, 77, 187, .4);
}

.nav-link.active {
  background: rgba(11, 77, 187, .12);
  color: var(--sidebar-active);
  border-left-color: var(--sidebar-active);
  font-weight: 600;
}

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

.sidebar-footer small {
  color: var(--sidebar-text);
  font-size: 11px;
}

/* ── Main content ─────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left .3s ease;
}

.sidebar.collapsed~.main-content {
  margin-left: 70px;
}

/* ── Topbar ──────────────────────────────────── */
.top-navbar {
  height: var(--topbar-height);
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: var(--shadow);
}

.page-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
}

.sidebar-toggle {
  color: var(--text-muted);
  border: none;
  background: none;
  cursor: pointer;
}

.sidebar-toggle:hover {
  color: var(--primary-dark);
}

.theme-toggle {
  min-width: 114px;
}

.role-chip {
  background: var(--card-muted-bg);
  color: var(--text-dark);
  border: 1px solid var(--border-color);
}

.role-chip-super {
  background: var(--role-super-bg);
  color: var(--role-super-text);
  border-color: transparent;
}

.role-chip-reseller {
  background: var(--role-reseller-bg);
  color: var(--role-reseller-text);
  border-color: transparent;
}

.role-chip-company {
  background: var(--role-company-bg);
  color: var(--role-company-text);
  border-color: transparent;
}

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

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border-color);
  padding: 14px 18px;
  font-weight: 600;
  font-size: 14px;
}

/* ── Stat cards ──────────────────────────────── */
.stat-card {
  border-radius: var(--radius);
  padding: 20px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.stat-card .stat-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 42px;
  opacity: .2;
}

.stat-card h3 {
  font-size: 28px;
  font-weight: 700;
  margin: 4px 0;
}

.stat-card p {
  font-size: 13px;
  margin: 0;
  opacity: .85;
}

.stat-green {
  background: linear-gradient(135deg, #0B4DBB, #083A8F);
}

.stat-blue {
  background: linear-gradient(135deg, #1D6FE8, #0B4DBB);
}

.stat-orange {
  background: linear-gradient(135deg, #FF7A00, #E06A00);
}

.stat-red {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.stat-purple {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.stat-teal {
  background: linear-gradient(135deg, #14b8a6, #0d9488);
}

/* ── Tables ──────────────────────────────────── */
.table-card {
  border-radius: var(--radius);
  overflow: hidden;
}

.table> :not(caption)>*>* {
  padding: .65rem .8rem;
  vertical-align: middle;
}

.table {
  color: var(--text-dark);
}

.table thead th {
  background: var(--card-muted-bg);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border-color);
}

.table tbody tr:hover {
  background: var(--table-hover-bg);
}

/* ── Buttons ─────────────────────────────────── */
.btn-wa {
  background: var(--gradient-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
}

.btn-wa:hover {
  background: #083A8F;
  color: #fff;
}

.btn {
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
}

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

.btn-outline-secondary {
  color: var(--text-muted);
  border-color: var(--border-color);
  background: transparent;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active,
.btn-outline-secondary.active {
  color: var(--text-dark);
  border-color: var(--border-color);
  background: var(--card-muted-bg);
}

/* ── Form controls ───────────────────────────── */
.form-control,
.form-select {
  background: var(--input-bg);
  color: var(--input-text);
  border-radius: 8px;
  border-color: var(--border-color);
  font-size: 13.5px;
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(11, 77, 187, .15);
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.form-control:disabled,
.form-control[readonly],
.form-select:disabled {
  background: var(--card-muted-bg);
  color: var(--text-muted);
}

/* ── Badges ──────────────────────────────────── */
.badge {
  font-size: 11px;
  padding: .35em .6em;
  border-radius: 6px;
}

/* ── Progress bars ───────────────────────────── */
.progress {
  border-radius: 100px;
  height: 8px;
}

.progress-bar {
  border-radius: 100px;
}

/* ── Login page ──────────────────────────────── */
.login-wrapper {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  padding: 32px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, .22), transparent 34%),
    radial-gradient(circle at bottom right, rgba(255, 122, 0, .18), transparent 26%),
    linear-gradient(135deg, #0b274f 0%, #114aa6 48%, #062a6b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-wrapper::before,
.login-wrapper::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.login-wrapper::before {
  width: 420px;
  height: 420px;
  top: -160px;
  right: -120px;
  background: rgba(255, 255, 255, .08);
  filter: blur(8px);
}

.login-wrapper::after {
  width: 280px;
  height: 280px;
  bottom: -100px;
  left: -60px;
  background: rgba(255, 154, 60, .14);
  filter: blur(14px);
}

.login-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 420px);
  gap: 28px;
  align-items: stretch;
}

.login-showcase {
  color: #fff;
  padding: 24px 8px 24px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

.login-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.login-brand-mark {
  width: 112px;
  height: 112px;
  border-radius: 30px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 24px 54px rgba(0, 0, 0, .16);
}

.login-brand-mark img {
  width: 86px;
  height: auto;
  object-fit: contain;
}

.login-school-brand {
  color: #fff;
  font-size: 40px;
}

.school-logo-container {
  width: 100%;
  height: 100%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.school-logo-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.school-logo-hero {
  border-radius: 26px;
}

.login-title,
.login-panel-copy h2 {
  font-family: 'Manrope', 'Inter', sans-serif;
}

.login-title {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2.3rem, 4vw, 4.2rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -.04em;
}

.login-subtitle {
  max-width: 640px;
  margin: 16px 0 0;
  font-size: 1.05rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, .8);
}

.login-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.login-highlight-card {
  display: flex;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(10px);
}

.login-highlight-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .14);
  color: #ffd7b0;
  font-size: 18px;
}

.login-highlight-card strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.login-highlight-card p {
  margin: 0;
  color: rgba(255, 255, 255, .74);
  line-height: 1.6;
}

.login-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.login-stat-pill {
  min-width: 150px;
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(4, 18, 43, .34);
  border: 1px solid rgba(255, 255, 255, .12);
}

.login-stat-value {
  display: block;
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
}

.login-stat-label {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, .68);
  font-size: .86rem;
}

.login-box {
  background: rgba(255, 255, 255, .96);
  border-radius: 28px;
  padding: 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 30px 90px rgba(4, 18, 43, .24);
  border: 1px solid rgba(255, 255, 255, .7);
}

.login-logo {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #101cff73 0%, #ffffff 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  box-shadow: 0 16px 34px rgba(11, 77, 187, .18);
}

.login-logo img {
  width: 55px;
  height: 55px;
  object-fit: contain;
}

.login-access-panel {
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.login-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.login-panel-chip {
  display: inline-flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(11, 77, 187, .08);
  color: var(--primary-dark);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.login-panel-copy h2 {
  margin: 0;
  font-size: 1.95rem;
  font-weight: 800;
  color: #0f172a;
}

.login-panel-copy p {
  margin: 10px 0 0;
  color: #5b6b7c;
  line-height: 1.7;
}

.login-school-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f7fc 100%);
  border: 1px solid #e3ecf6;
}

.login-school-name-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.login-school-name-wrap strong {
  color: #0f172a;
  font-size: .96rem;
}

.login-school-code-label {
  color: #64748b;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.login-switch-link,
.login-inline-link {
  color: var(--primary);
  font-size: .84rem;
  font-weight: 700;
  text-decoration: none;
}

.login-switch-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.login-switch-link:hover,
.login-inline-link:hover {
  color: var(--primary-dark);
}

.login-form .form-label {
  font-size: .9rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 10px;
}

.login-input-group {
  border: 1px solid #d7e2f0;
  border-radius: 18px;
  overflow: hidden;
  background: #f8fbff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.login-input-group:focus-within {
  border-color: rgba(11, 77, 187, .55);
  box-shadow: 0 0 0 4px rgba(11, 77, 187, .09);
  transform: translateY(-1px);
}

.login-input-group .input-group-text,
.login-input-group .form-control {
  border: 0;
  background: transparent;
}

.login-input-group .input-group-text {
  padding-left: 16px;
  color: var(--primary-dark);
}

.login-input-group .form-control {
  min-height: 56px;
  color: #0f172a;
  font-size: 1rem;
  box-shadow: none;
}

.login-input-group .form-control::placeholder {
  color: #8aa0b8;
}

.login-password-group .login-password-toggle {
  border: 0;
  border-left: 1px solid rgba(11, 77, 187, .08);
  background: transparent;
  color: #6b7d90;
  min-width: 52px;
}

.login-password-group .login-password-toggle:hover,
.login-password-group .login-password-toggle:focus {
  background: rgba(11, 77, 187, .05);
  color: var(--primary-dark);
  box-shadow: none;
}

.login-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 20px;
}

.login-remember-check {
  margin-bottom: 0;
}

.login-meta-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #64748b;
  font-size: .82rem;
}

.login-helper-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 16px;
  margin: 2px 0 18px;
  color: #64748b;
  font-size: .82rem;
}

.login-helper-row span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.login-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #ff7a00 0%, #ff9a3c 100%);
  color: #fff;
  box-shadow: 0 20px 36px rgba(255, 122, 0, .22);
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

.login-submit-btn:hover,
.login-submit-btn:focus {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 24px 42px rgba(255, 122, 0, .3);
  filter: saturate(1.05);
}

.login-steps {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, #f8fbff 0%, #f4f7fb 100%);
  border: 1px solid #e4edf6;
}

.login-step-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-step-item span {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 77, 187, .1);
  color: var(--primary-dark);
  font-weight: 800;
}

.login-step-item p {
  margin: 0;
  color: #4b5b6b;
}

.login-footer-note {
  padding-top: 4px;
  border-top: 1px solid #e6edf5;
}

.login-footer-note p {
  margin: 0 0 10px;
  color: #64748b;
  line-height: 1.6;
}

.login-footer-note a {
  color: var(--primary);
  font-weight: 600;
}

.login-footer-note a:hover {
  color: var(--primary-dark);
}

.login-reset-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.login-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 10px;
  border-radius: 18px;
  border: 1px solid #e3ecf6;
  background: #f8fbff;
  color: #64748b;
}

.login-progress-step span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e8f0fe;
  color: var(--primary-dark);
  font-weight: 800;
}

.login-progress-step small {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .03em;
}

.login-progress-step.active {
  border-color: rgba(11, 77, 187, .28);
  color: #0f172a;
}

.login-progress-step.done span,
.login-progress-step.active span {
  background: linear-gradient(135deg, #0b4dbb 0%, #1d6fe8 100%);
  color: #fff;
}

.login-otp-summary {
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f7fc 100%);
  border: 1px solid #e3ecf6;
}

.login-otp-badge {
  background: rgba(11, 77, 187, .1);
  color: var(--primary-dark);
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
}

.otp-inputs {
  display: flex;
  gap: .5rem;
  justify-content: center;
}

.otp-inputs input {
  width: 46px;
  height: 54px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  border: 2px solid #d7e2f0;
  border-radius: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, transform .2s;
  background: #f8fbff;
  color: #0f172a;
}

.otp-inputs input:focus {
  border-color: rgba(11, 77, 187, .55);
  box-shadow: 0 0 0 4px rgba(11, 77, 187, .09);
  transform: translateY(-1px);
}

/* ── Campaign status dot ─────────────────────── */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

.dot-running {
  background: #0B4DBB;
  animation: pulse 1.5s infinite;
}

.dot-pending {
  background: #f59e0b;
}

.dot-done {
  background: #64748b;
}

.dot-failed {
  background: #ef4444;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: .3;
  }
}

/* ── Import progress ─────────────────────────── */
.import-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s;
}

.import-zone:hover,
.import-zone.drag-over {
  border-color: var(--primary);
  background: rgba(11, 77, 187, .04);
}

.dropdown-menu {
  background: var(--dropdown-bg);
  color: var(--dropdown-text);
  border-color: var(--border-color);
  box-shadow: var(--shadow-md);
}

.dropdown-item,
.dropdown-item-text {
  color: var(--dropdown-text);
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: var(--dropdown-hover-bg);
  color: var(--dropdown-text);
}

.dropdown-divider {
  border-top-color: var(--border-color);
}

.alert {
  border-color: var(--border-color);
  background: var(--card-bg);
  color: var(--text-dark);
}

.text-muted {
  color: var(--text-muted) !important;
}

:root[data-theme="dark"] .table,
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .modal-content,
:root[data-theme="dark"] .offcanvas,
:root[data-theme="dark"] .list-group-item,
:root[data-theme="dark"] .pagination .page-link {
  background: var(--card-bg);
  color: var(--text-dark);
  border-color: var(--border-color);
}

:root[data-theme="dark"] .page-link:hover {
  background: var(--card-muted-bg);
  color: var(--text-dark);
}

:root[data-theme="dark"] .table-striped>tbody>tr:nth-of-type(odd)>* {
  color: var(--text-dark);
  background-color: rgba(255, 255, 255, .02);
}

:root[data-theme="dark"] .alert-warning {
  background: rgba(251, 191, 36, .12);
  color: #fcd34d;
}

:root[data-theme="dark"] .alert-success {
  background: rgba(34, 197, 94, .12);
  color: #86efac;
}

:root[data-theme="dark"] .alert-danger {
  background: rgba(248, 113, 113, .12);
  color: #fca5a5;
}

:root[data-theme="dark"] .alert-info {
  background: rgba(34, 211, 238, .12);
  color: #67e8f9;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 768px) {
  .login-wrapper {
    padding: 20px;
  }

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

  .login-showcase {
    padding: 0;
    gap: 18px;
  }

  .login-highlights {
    grid-template-columns: 1fr;
  }

  .login-box {
    padding: 26px 22px;
  }

  .login-school-summary,
  .login-meta-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .login-reset-progress {
    grid-template-columns: 1fr;
  }

  .login-panel-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .login-helper-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .sidebar {
    transform: translateX(-100%);
  }

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

  .main-content {
    margin-left: 0 !important;
  }

  .stat-card h3 {
    font-size: 22px;
  }
}

@media (max-width: 576px) {
  .login-title {
    font-size: 2.1rem;
  }

  .login-stat-pill {
    width: 100%;
  }

  .login-submit-btn {
    width: 100%;
  }

  .otp-inputs input {
    width: 42px;
    height: 50px;
    font-size: 1.2rem;
  }
}

/* ── Toast Notifications ─────────────────────── */
.notif-toast {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 9999;
  min-width: 290px;
  max-width: 420px;
  border-radius: 10px;
  padding: 14px 18px 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .15);
  animation: notifSlideIn .35s ease;
}

@keyframes notifSlideIn {
  from {
    opacity: 0;
    transform: translateX(60px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.notif-toast.success {
  background: #d1fae5;
  border-left: 5px solid #10b981;
  color: #065f46;
}

.notif-toast.error {
  background: #fee2e2;
  border-left: 5px solid #ef4444;
  color: #7f1d1d;
}

.notif-toast.warning {
  background: #fef3c7;
  border-left: 5px solid #f59e0b;
  color: #78350f;
}

.notif-toast.info {
  background: #e0f2fe;
  border-left: 5px solid #0ea5e9;
  color: #0c4a6e;
}

.notif-toast .notif-icon {
  font-size: 1.2rem;
  margin-top: 1px;
  flex-shrink: 0;
}

.notif-toast .notif-body {
  flex: 1;
  font-size: .92rem;
}

.notif-toast .notif-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: .55;
  padding: 0;
  line-height: 1;
  margin-top: 1px;
  flex-shrink: 0;
}

.notif-toast .notif-close:hover {
  opacity: 1;
}

/* ── Flatpickr Custom Styles ───────────────── */
.flatpickr-calendar {
  background: var(--card-bg) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-md) !important;
  border-radius: var(--radius) !important;
  color: var(--text-dark) !important;
  font-family: inherit !important;
  overflow: visible !important;
}

.flatpickr-months {
  overflow: visible !important;
  position: relative;
  z-index: 100;
}

.flatpickr-month,
.flatpickr-current-month {
  overflow: visible !important;
}

.flatpickr-months .flatpickr-month,
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  color: var(--text-dark) !important;
  fill: var(--text-dark) !important;
}

.flatpickr-weekday {
  color: var(--text-muted) !important;
}

.flatpickr-day {
  color: var(--text-dark) !important;
  border-radius: 8px !important;
}

.flatpickr-day:hover,
.flatpickr-day:focus {
  background: var(--dropdown-hover-bg) !important;
  border-color: transparent !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange,
.flatpickr-day.selected:focus,
.flatpickr-day.startRange:focus,
.flatpickr-day.endRange:focus,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover,
.flatpickr-day.prevMonthDay.selected,
.flatpickr-day.nextMonthDay.selected {
  background: var(--sidebar-active) !important;
  border-color: var(--sidebar-active) !important;
  color: #ffffff !important;
}

.flatpickr-day.today {
  border-color: var(--sidebar-active) !important;
}

.flatpickr-day.today:hover,
.flatpickr-day.today:focus {
  background: var(--dropdown-hover-bg) !important;
  color: var(--text-dark) !important;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay,
.flatpickr-day.notAllowed,
.flatpickr-day.notAllowed.prevMonthDay,
.flatpickr-day.notAllowed.nextMonthDay {
  color: var(--text-muted) !important;
  opacity: 0.35;
}

.flatpickr-current-month input.cur-year {
  color: inherit !important;
}

.flatpickr-time {
  border-top: 1px solid var(--border-color) !important;
}

.flatpickr-time input,
.flatpickr-time .flatpickr-time-separator {
  color: var(--text-dark) !important;
}

.flatpickr-day.inRange {
  box-shadow: -5px 0 0 var(--dropdown-hover-bg), 5px 0 0 var(--dropdown-hover-bg) !important;
  background: var(--dropdown-hover-bg) !important;
}

/* ── Flatpickr Year Dropdown with Searchbox ── */
.fp-year-dropdown {
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

.fp-year-btn {
  background: white;
  color: var(--text-dark);
  border: 1px solid rgba(11, 77, 187, .25);
  border-radius: 6px;
  padding: 2px 12px 2px 10px;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.7;
  transition: all .2s ease;
  white-space: nowrap;
}

.fp-year-btn::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 6px;
  vertical-align: middle;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  opacity: .55;
}

.fp-year-btn:hover {
  background: linear-gradient(135deg, rgba(11, 77, 187, .22), rgba(8, 58, 143, .18));
  border-color: var(--sidebar-active);
  box-shadow: 0 2px 8px rgba(11, 77, 187, .15);
}

.fp-year-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) scale(.95);
  width: 160px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .08);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  overflow: hidden;
}

.fp-year-panel.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) scale(1);
}

.fp-year-search {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--border-color);
  padding: 8px 12px;
  font-size: 12.5px;
  font-family: inherit;
  background: var(--card-muted-bg);
  color: var(--text-dark);
  outline: none;
}

.fp-year-search::placeholder {
  color: var(--text-muted);
  font-size: 11.5px;
}

.fp-year-search:focus {
  background: var(--input-bg);
  box-shadow: inset 0 -2px 0 var(--sidebar-active);
}

.fp-year-list {
  max-height: 200px;
  overflow-y: auto;
  padding: 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.fp-year-list::-webkit-scrollbar {
  width: 5px;
}

.fp-year-list::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 10px;
}

.fp-year-option {
  padding: 5px 10px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-dark);
  border-radius: 6px;
  cursor: pointer;
  transition: background .15s, color .15s;
  text-align: center;
}

.fp-year-option:hover,
.fp-year-option.highlight {
  background: var(--dropdown-hover-bg);
  color: var(--text-dark);
}

.fp-year-option.active {
  background: linear-gradient(135deg, #0B4DBB, #083A8F);
  color: #fff !important;
  font-weight: 600;
}

.fp-year-option.active:hover {
  background: linear-gradient(135deg, #083A8F, #062A6B);
}

.fp-year-empty {
  padding: 12px 10px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

/* Dark mode refinements */
:root[data-theme="dark"] .fp-year-btn {
  background: linear-gradient(135deg, rgba(59, 130, 246, .12), rgba(37, 99, 235, .08));
  border-color: rgba(59, 130, 246, .25);
  color: var(--text-dark);
}

:root[data-theme="dark"] .fp-year-btn:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, .22), rgba(37, 99, 235, .16));
  border-color: var(--sidebar-active);
  box-shadow: 0 2px 12px rgba(59, 130, 246, .12);
}

:root[data-theme="dark"] .fp-year-panel {
  box-shadow: 0 12px 36px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .25);
}

:root[data-theme="dark"] .fp-year-option.active {
  background: linear-gradient(135deg, #3B82F6, #2563EB);
  color: #0F172A !important;
}

.hover-primary {
  color: var(--text-muted) !important;
}
.hover-primary:hover {
  color: var(--primary) !important;
}