:root {
  --primary: #07680b; /* Sky Blue - Main Theme */
  --primary-dark: #028523; 
  --primary-light: #7dd3fc;
  --secondary: #037c32; 
  --secondary-dark: #2563eb;
  --accent: #028f48;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --sidebar-bg: #14532d; /* Reverted to Dark Green */
  --sidebar-text: #f0fdf4;
  --sidebar-active: #16a34a; /* Green Active State */
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius: 8px;
  --radius-sm: 4px;
  --shadow: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1);
  --transition: all .2s ease;
  --primary-rgb: 22, 163, 74; /* RGB equivalent of #16a34a */
}

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

html, body {
  overflow-x: hidden;
  position: relative;
  width: 100%;
}

body {
  font-family: 'Outfit', sans-serif !important;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

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

/* ── Scrollbar ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

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

/* ── Sidebar ── */
.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1000;
  transition: var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-brand {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar-brand h2 { font-size: 18px; font-weight: 800; color: #ffffff; margin: 0; }

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

.sidebar-brand .brand-text h1 {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.sidebar-brand .brand-text span {
  font-size: 11px;
  color: #a7f3d0; /* Light mint green */
  font-weight: 500;
}

.sidebar-nav {
  flex: 1;
  padding: 8px 12px;
  margin-top: 4px;
}

.nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #a7f3d0; /* Soft light green for section headers */
  padding: 16px 8px 6px;
  opacity: 0.9;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.nav-item.active {
  background: var(--sidebar-active);
  color: #fff;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.4);
}

.nav-item .nav-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.06);
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  min-width: 0;
}
.user-info .name {
  font-size: 13px;
  font-weight: 600;
  color: #f9fafb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-info .role {
  font-size: 11px;
  color: #a7f3d0; /* Light mint green */
  text-transform: capitalize;
  font-weight: 500;
}

/* ── Main Content ── */
.main-content {
  margin-left: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: calc(100% - 260px);
  overflow-x: hidden;
  position: relative;
}

.topbar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

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

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

.topbar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
}

.topbar-btn:hover {
  background: var(--border);
  color: var(--text);
}

.page-content {
  padding: 24px;
  flex: 1;
  width: 100%;
  box-sizing: border-box;
}

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

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

.card-title {
  font-size: 15px;
  font-weight: 700;
}

.card-body {
  padding: 20px;
}
.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: #fafafa;
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ── Stat Cards ── */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-icon.blue {
  background: #eff6ff;
  color: #3b82f6;
}
.stat-icon.green {
  background: #f0fdf4;
  color: #10b981;
}
.stat-icon.purple {
  background: #f5f3ff;
  color: var(--primary);
}
.stat-icon.orange {
  background: #fff7ed;
  color: #f97316;
}
.stat-icon.cyan {
  background: #ecfeff;
  color: var(--accent);
}
.stat-icon.red {
  background: #fef2f2;
  color: var(--danger);
}

.stat-info .value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.stat-info .label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Tables ── */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  padding: 11px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  vertical-align: middle;
  transition: all 0.2s ease;
}

tbody tr {
  transition: all 0.2s ease;
}

tbody tr:last-child td {
  border-bottom: none;
}
tbody tr:hover td {
  background: #f1f5f9;
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  gap: 4px;
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}
.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}
.badge-warning {
  background: #fef3c7;
  color: #92400e;
}
.badge-info    { background: #dbeafe; color: #1e40af; } /* Blue badge */
.badge-purple {
  background: #ede9fe;
  color: #5b21b6;
}
.badge-gray {
  background: #f3f4f6;
  color: #4b5563;
}

/* ── Buttons ── */
.sidebar-nav ul li a {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 4px;
  margin-bottom: 4px;
  transition: var(--transition);
  opacity: 0.8;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 1px 2px rgba(0,0,0,0.05);
}

.btn:not(:disabled):hover {
  transform: translateY(-1.5px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 4px 8px rgba(0,0,0,0.1);
}

.btn:not(:disabled):active {
  transform: translateY(0);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-success:hover {
  background: #059669;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  background: #dc2626;
}

.btn-warning {
  background: var(--warning);
  color: #fff;
}
.btn-warning:hover {
  background: #d97706;
}

.btn-secondary {
  background: var(--secondary);
  color: #fff;
}
.btn-secondary:hover { background: var(--secondary-dark); }

.btn-info {
  background: #0ea5e9;
  color: #fff;
}
.btn-info:hover { background: #0284c7; }

.btn-purple {
  background: #a855f7;
  color: #fff;
}
.btn-purple:hover { background: #9333ea; }

.btn-indigo {
  background: #6366f1;
  color: #fff;
}
.btn-indigo:hover { background: #4f46e5; }

.btn-dark-primary {
  background: #064e3b;
  color: #fff;
}
.btn-dark-primary:hover { background: #022c22; }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg);
  color: var(--text);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

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

.form-label .req {
  color: var(--danger);
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  background: #fff;
  color: var(--text);
  transition: var(--transition);
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.form-control.is-invalid {
  border-color: var(--danger);
}

select.form-control {
  cursor: pointer;
}

.form-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

.invalid-feedback {
  font-size: 11.5px;
  color: var(--danger);
  margin-top: 4px;
}

.form-row {
  display: grid;
  gap: 16px;
}

.form-row.cols-2 {
  grid-template-columns: 1fr 1fr;
}
.form-row.cols-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(15, 23, 42, 0.7);
  z-index: 9999 !important;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}


.modal-overlay.active {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: var(--radius);
  width: 100%;
  max-width: 560px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: modalIn 0.25s ease;
  margin: auto;
}

.modal-lg {
  max-width: 720px;
}
.modal-xl {
  max-width: 900px;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

.modal-title {
  font-size: 16px;
  font-weight: 700;
}

.modal-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 16px;
  transition: var(--transition);
}

.modal-close:hover {
  background: #fee2e2;
  color: var(--danger);
}

.modal-body {
  padding: 20px;
}

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

/* ── Alerts & Flash ── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border-color: #10b981;
}
.alert-danger {
  background: #fee2e2;
  color: #991b1b;
  border-color: #ef4444;
}
.alert-warning {
  background: #fef3c7;
  color: #92400e;
  border-color: #f59e0b;
}
.alert-info {
  background: #dbeafe;
  color: #1e40af;
  border-color: #3b82f6;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  background: #fff;
  transition: var(--transition);
  cursor: pointer;
}

.page-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.page-link.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ── Upload Zone ── */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  background: var(--bg);
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.04);
}

.upload-zone input {
  display: none;
}

.upload-preview {
  max-height: 150px;
  border-radius: var(--radius-sm);
  margin-top: 12px;
  object-fit: cover;
}

/* ── Attendance Toggle ── */
.attn-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition);
  background: #fff;
}

.attn-btn.present {
  background: #d1fae5;
  border-color: #10b981;
  color: #065f46;
}
.attn-btn.absent {
  background: #fee2e2;
  border-color: #ef4444;
  color: #991b1b;
}
.attn-btn.leave {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

/* ── Filter Bar ── */
.filter-bar {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-bar .form-control {
  max-width: 200px;
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.3;
}

.empty-state h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* ── Login Page ── */
.login-page {
  min-height: 100vh;
  display: flex;
  background: #f8fafc;
  position: relative;
  overflow: hidden;
}

.login-bg-circles {
  display: none;
}

.login-bg-circles .circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.08;
}

.login-bg-circles .circle-1 {
  width: 500px;
  height: 500px;
  background: var(--primary);
  top: -150px;
  right: -100px;
}

.login-bg-circles .circle-2 {
  width: 300px;
  height: 300px;
  background: var(--accent);
  bottom: -100px;
  left: -50px;
}

.login-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: linear-gradient(rgba(20, 58, 83, 0.85), rgba(43, 148, 209, 0.85)), url('../images/login-bg.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
}

.login-brand {
  max-width: 450px;
  position: relative;
  z-index: 2;
  text-align: center;
}

.login-brand .brand-logo {
  width: 72px;
  height: 72px;
  background: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: var(--primary);
  margin: 0 auto 24px;
}

.login-brand h1 {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.2;
}

.login-brand p {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.7;
}

.login-features {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.login-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 20px;
  border-radius: 30px;
  backdrop-filter: blur(5px);
  width: fit-content;
}

.login-feature .feat-icon {
  color: #4ade80;
  font-size: 16px;
}

.login-feature .feat-text {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}

.login-form-container {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
}

.login-mobile-brand {
    display: none;
    text-align: center;
    margin-bottom: 30px;
}

.login-mobile-brand .mobile-logo {
    width: 64px;
    height: 64px;
    background: #fff;
    border-radius: 12px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.login-mobile-brand .mobile-logo i {
    font-size: 32px;
    color: var(--primary);
}

.login-mobile-brand .mobile-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.login-mobile-brand h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
}

.login-right {
  width: 500px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  position: relative;
}

.login-form-card {
  width: 100%;
  background: #fff;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.08);
  border: 1px solid var(--border);
}

.card-title-prefix {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

.login-form-card h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
}

.login-form-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.login-form-card .form-label {
  color: var(--text);
  font-weight: 600;
}

.login-form-card .form-control {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  color: var(--text);
  padding: 12px 16px;
  border-radius: 10px;
}

.login-form-card .form-control::placeholder {
  color: #94a3b8;
}

.login-form-card .form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(7, 104, 11, 0.1);
}

.btn-login {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 15px -3px rgba(7, 104, 11, 0.3);
}

.btn-login:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 15px 25px -5px rgba(7, 104, 11, 0.4);
}

/* ── Avatar ── */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-placeholder {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

/* ── Photo in table ── */
.tb-photo {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  object-fit: cover;
}

.tb-photo-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

/* ── Charts ── */
.chart-wrapper {
  position: relative;
  height: 260px;
}

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

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

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}

.tab-btn {
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
}

.tab-btn::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transition: var(--transition);
}

.tab-btn.active {
  color: var(--primary);
}

.tab-btn.active::after {
  transform: scaleX(1);
}

.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}

/* ── Responsive ── */
.sidebar-toggle {
  display: none;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

@media (max-width: 991px) {
  .sidebar {
    left: -260px;
    transition: left 0.3s ease;
  }
  .sidebar.open {
    left: 0;
  }
  .sidebar-toggle {
    display: flex;
  }
  .main-content {
    margin-left: 0;
    width: 100%;
  }
  .sidebar-overlay.active {
    display: block;
  }
  .form-row.cols-2,
  .form-row.cols-3,
  .summary-grid,
  .community-summary-grid,
  .enroll-form-grid,
  .bank-details-grid {
    grid-template-columns: 1fr !important;
  }
  
  .info-strip-grey,
  .header-selection-bar,
  .selection-header-bar,
  .attendance-summary-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .login-left {
    display: none;
  }
  .login-right {
    width: 100%;
    padding: 24px;
    background: #f1f5f9;
  }
  .login-mobile-brand {
    display: block;
  }
  .login-form-card {
    padding: 30px 24px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  }

  .form-columns {
     grid-template-columns: 1fr;
  }

  .form-group-row {
     grid-template-columns: 1fr;
     gap: 6px;
  }
  
  .table-wrapper {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
  }
}

/* ── Utility ── */
.text-muted {
  color: var(--text-muted);
}
.text-danger {
  color: var(--danger);
}
.text-success {
  color: var(--success);
}
.text-center {
  text-align: center;
}
.mt-16 {
  margin-top: 16px;
}
.mb-16 {
  margin-bottom: 16px;
}
.mb-24 {
  margin-bottom: 24px;
}
.gap-8 {
  gap: 8px;
}
.gap-10 {
  gap: 10px;
}
.gap-12 {
  gap: 12px;
}
.flex {
  display: flex;
}
.align-center {
  align-items: center;
}
.justify-between {
  justify-content: space-between;
}
.w-full {
  width: 100%;
}
.font-bold {
  font-weight: 700;
}
.font-sm {
  font-size: 12.5px;
}

/* ── Profile Dropdown ── */
.profile-dropdown {
  position: relative;
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  display: none;
  z-index: 1000;
  overflow: hidden;
  animation: dropdownIn 0.2s ease;
}
.dropdown-menu.active {
  display: block;
}
@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.dropdown-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.dropdown-header .user-name { font-weight: 700; display: block; }
.dropdown-header .user-role { font-size: 11px; color: var(--text-muted); text-transform: uppercase; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text);
  font-size: 13.5px;
  transition: var(--transition);
  border-bottom: 1px solid rgba(0,0,0,0.03);
}
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover {
  background: var(--bg);
  color: var(--primary);
}
.dropdown-item i { width: 16px; text-align: center; }
.dropdown-item.text-danger:hover { background: #fef2f2; color: #ef4444; }

/* ── Toast Notifications ── */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.toast {
  min-width: 320px;
  background: #fff;
  padding: 16px 20px;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 16px;
  border-left: 5px solid var(--primary);
  animation: toastIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}
.toast.hiding {
  animation: toastOut 0.3s ease forwards;
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(50px); }
}
.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-success i { color: var(--success); }
.toast-error i { color: var(--danger); }

.toast-content { flex: 1; }
.toast-content .title { font-weight: 700; font-size: 14px; margin-bottom: 2px; color: var(--text); }
.toast-content .message { font-size: 13px; color: var(--text-muted); }

/* ── Global Page Loader ── */
.page-loader {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  backdrop-filter: blur(4px);
  display: none;
}
.page-loader.active { display: flex; }
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.loader-text {
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 1.5px;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.6; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.02); }
}

/* ── Confirmation Modal Premium ── */
.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.confirm-modal-overlay.active { display: flex !important; }

.confirm-card {
  background: #ffffff;
  width: 100%;
  max-width: 420px;
  border-radius: 24px;
  padding: 35px;
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: scale(0.7);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.confirm-modal-overlay.active .confirm-card {
  transform: scale(1);
  opacity: 1;
}

/* confirm-top variant */
.confirm-modal-overlay.confirm-top {
  align-items: flex-start;
  padding-top: 40px;
}
.confirm-modal-overlay.confirm-top .confirm-card {
  transform: translateY(-50px);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.confirm-modal-overlay.active.confirm-top .confirm-card {
  transform: translateY(0);
  opacity: 1;
}

.confirm-icon {
  width: 70px;
  height: 70px;
  background: #f1f5f9;
  color: var(--primary);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 24px;
}

.confirm-title {
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.confirm-text {
  font-size: 15px;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 30px;
}

.confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.confirm-actions .btn {
    padding: 12px;
    border-radius: 14px;
    font-weight: 700;
    justify-content: center;
}

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

.topbar-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50% !important;
    border: none !important;
    background: #f8fafc !important;
    color: #64748b;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.topbar-icon-btn:hover {
    background: #f1f5f9;
    color: var(--primary);
    transform: translateY(-2px);
}

.topbar-sep {
    height: 24px;
    width: 1px;
    background: var(--border);
    margin: 0 8px;
}

.avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50% !important;
    background: var(--primary) !important;
    color: #fff !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-circle:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.profile-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 220px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid var(--border);
    padding: 8px;
    display: none;
    z-index: 1000;
    animation: dropIn 0.2s ease;
}

@keyframes dropIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-menu.active { display: block; }

.dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
}

.dropdown-header .user-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.dropdown-header .user-role {
    font-size: 11px;
    color: var(--text-muted);
}

.dropdown-item {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: var(--bg-soft);
    color: var(--primary);
}

.dropdown-item.text-danger:hover {
    background: #fef2f2;
    color: #ef4444;
}
/* ── Premium Details & Modals ── */
.details-modal-fix {
    padding: 30px 40px;
    position: relative;
    background: #fff;
    border-radius: 24px;
}

.modal-close-left {
    position: absolute;
    top: 25px;
    left: 25px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
    z-index: 10;
}

.modal-close-left:hover {
    background: #fef2f2;
    transform: scale(1.1) rotate(90deg);
    border-color: var(--danger);
}

.modal-header-premium {
    text-align: center;
    margin-bottom: 40px;
}

.modal-header-premium h2 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.title-underline {
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 0 auto;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(14, 165, 233, 0.2);
}

.premium-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 35px;
}

.detail-card {
    background: #f8fafc;
    border-radius: 18px;
    padding: 22px;
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: var(--transition);
}

.detail-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item label {
    font-weight: 700;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-item .val {
    font-weight: 700;
    font-size: 14px;
    color: var(--text);
}

/* Stats Section */
.stats-table-section {
    background: #f0f9ff;
    padding: 25px;
    border-radius: 20px;
    margin-bottom: 35px;
    border: 1px solid #e0f2fe;
}

.premium-stats-table {
    width: 100%;
    border-collapse: collapse;
}

.premium-stats-table th {
    text-align: center;
    color: #0369a1;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    padding-bottom: 15px;
}

.premium-stats-table td {
    text-align: center;
    font-size: 28px;
    padding-top: 5px;
}

.font-extra-bold { font-weight: 900; }
.color-primary { color: var(--primary); }

.premium-action-footer {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-action-green {
    background: var(--success);
    color: #fff;
    padding: 10px 22px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    transition: var(--transition);
}

.btn-action-green:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(16, 185, 129, 0.25);
}

/* Modal Overlay shadow enhancement removed - integrated into main modal-overlay definition above */


/* Premium Layout Elements */
.premium-select-dark {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 8px 18px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
    cursor: pointer;
    transition: var(--transition);
}

.premium-select-dark:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.premium-select-dark option {
    background: #fff;
    color: var(--text);
    font-weight: 600;
}

.page-title-center {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
}

.community-summary-card {
    background: #ffffff;
    padding: 35px;
    border-radius: 24px;
    color: var(--text);
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.summary-header h3 {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.5px;
}

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

.summary-box {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    padding: 16px 20px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all 0.2s ease;
}

.summary-box:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
}

.s-label { 
    font-size: 11px; 
    font-weight: 700; 
    color: #64748b; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
}
.s-value { 
    font-size: 15px; 
    font-weight: 700; 
    color: #0f172a; 
}

.table-container-premium {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow-md);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.premium-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.premium-table th {
    background: #f8fafc;
    padding: 14px 18px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-bottom: 2px solid #f1f5f9;
}

.premium-table td {
    padding: 16px 18px;
    border-bottom: 1px solid #f1f5f9;
}

.premium-table tr:hover td {
    background: #f0f9ff;
}

.btn-action-open {
    background: var(--success);
    color: #fff;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    transition: var(--transition);
}

.btn-action-open:hover {
    background: #059669;
}

.empty-state-large {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 24px;
    border: 2px dashed var(--border);
}

.empty-state-large i {
    font-size: 60px;
    color: var(--border);
    margin-bottom: 15px;
}

.empty-state-large h2 { font-weight: 800; margin-bottom: 8px; }

/* Responsive Grid for Communities */
@media (max-width: 992px) {
    .premium-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .premium-details-grid {
        grid-template-columns: 1fr;
    }
}

/* Global Modal Overlay (merged with top definition) */


.modal-overlay.active {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 24px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-xl { max-width: 1200px; }
.modal-lg { max-width: 900px; }
.modal-md { max-width: 600px; }
.modal-sm { max-width: 400px; }

/* ── Premium Global Fonts & Animations ── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

body {
    font-family: 'Outfit', sans-serif !important;
    background-color: var(--bg);
    color: var(--text);
}

body {
    font-family: 'Outfit', sans-serif !important;
    background-color: var(--bg);
    color: var(--text);
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Fade animation moved to main modal-overlay definition */


.modal {
    animation: fadeInScale 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Enrollment Forms Premium ── */
.enroll-modal-header {
    background: #fff;
    padding: 30px 40px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.enroll-modal-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text);
    border-bottom: 3px solid var(--text);
    padding-bottom: 12px;
    letter-spacing: -1px;
}

.enroll-modal-header .icon-wrap {
    font-size: 32px;
    color: var(--text);
    background: #f1f5f9;
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-strip-grey {
    background: #f1f5f9;
    padding: 15px 30px;
    margin: 15px 40px;
    border-radius: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.info-strip-grey .info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-strip-grey .lbl {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-muted);
}

.info-strip-grey .val {
    background: #fff;
    color: var(--primary-dark);
    padding: 6px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    box-shadow: var(--shadow);
}

.enroll-form-grid {
    padding: 20px 40px;
}

.form-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 200px;
    gap: 40px;
    align-items: flex-start;
}

@media (max-width: 991px) {
    .enroll-modal-header { padding: 20px !important; gap: 8px !important; }
    .enroll-modal-header h2 { font-size: 22px !important; padding-bottom: 8px !important; letter-spacing: -0.5px !important; }
    .enroll-modal-header .icon-wrap { width: 50px !important; height: 50px !important; font-size: 24px !important; }
    
    .info-strip-grey { flex-direction: column !important; align-items: stretch !important; gap: 10px !important; margin: 10px 15px !important; padding: 15px !important; }
    .info-strip-grey .info-item { justify-content: space-between !important; width: 100% !important; border-bottom: 1px solid rgba(0,0,0,0.05) !important; padding-bottom: 5px !important; }
    .info-strip-grey .info-item:last-child { border-bottom: none !important; }
    .info-strip-grey .lbl { font-size: 11px !important; min-width: 100px !important; }
    .info-strip-grey .val { font-size: 12px !important; padding: 4px 12px !important; }

    .enroll-form-grid { padding: 15px !important; }
    .form-columns { grid-template-columns: 1fr !important; gap: 15px !important; }
    .form-group-row { grid-template-columns: 1fr !important; gap: 5px !important; margin-bottom: 12px !important; }
    .form-group-row label { text-align: left !important; font-size: 12px !important; width: 100% !important; }
    .photo-upload-container { width: 100% !important; max-width: 250px !important; height: 200px !important; margin: 0 auto 15px !important; order: -1 !important; }
    
    .bank-details-grid { grid-template-columns: 1fr !important; gap: 10px !important; }
    .enroll-modal-footer { padding: 20px !important; gap: 10px !important; flex-direction: column !important; }
    .btn-enroll-submit, .btn-cancel { width: 100% !important; justify-content: center !important; padding: 12px !important; }
}


.form-group-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
    gap: 15px;
    margin-bottom: 18px;
}

.form-group-row label {
    font-weight: 700;
    color: var(--text);
    font-size: 13px;
}

.form-group-row input,
.form-group-row select,
.form-group-row textarea {
    background: #fff;
    border: 1.5px solid var(--border);
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 600;
    color: var(--text);
    transition: var(--transition);
}

.form-group-row input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.gender-toggle {
    display: flex;
    gap: 8px;
}

.gender-toggle input {
    display: none;
}

.gender-toggle label {
    flex: 1;
    background: #f8fafc;
    border: 1.5px solid var(--border);
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-muted);
}

.gender-toggle input:checked + label {
    background: #fff;
    color: var(--primary-dark);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.photo-upload-container {
    border: 2px dashed var(--border);
    border-radius: 24px;
    height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    position: relative;
    transition: var(--transition);
}

.photo-upload-container:hover {
    border-color: var(--primary);
    background: #fff;
}

.photo-placeholder {
    text-align: center;
}

.photo-placeholder i {
    font-size: 40px;
    color: var(--border);
    margin-bottom: 10px;
}

.photo-placeholder span {
    font-size: 12px;
    font-weight: 600;
    color: var(--danger);
}

.section-divider {
    height: 2px;
    background: var(--border);
    margin: 30px 0;
}

.bank-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 40px;
}

.enroll-modal-footer {
    padding: 30px 40px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-cancel {
    background: var(--bg);
    color: var(--text-muted);
    padding: 12px 35px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    transition: var(--transition);
}

.btn-cancel:hover {
    background: #fee2e2;
    color: var(--danger);
}

.btn-enroll-submit {
    background: var(--text);
    color: #fff;
    padding: 12px 40px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.2);
}

.btn-enroll-submit:hover {
    background: #000;
    transform: translateY(-2px);
}

.input-with-icon {
    position: relative;
    width: 100%;
}

.input-with-icon i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.file-upload-styled {
    position: relative;
    background: #f8fafc;
    border: 1.5px dashed var(--border);
    border-radius: 10px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.file-upload-styled:hover {
    border-color: var(--primary);
    background: #fff;
}

.file-upload-styled i {
    color: var(--primary);
}

.file-upload-styled input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.photo-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

/* ── Child/Student Pages ── */
.child-page-container {
    width: 100%;
    margin: 0;
    background: #fff;
    min-height: calc(100vh - 60px);
}

/* ── Global Header Bar & Dropdown ── */
.selection-header-bar {
    background: #f1f5f9;
    border-bottom: 2px solid var(--border);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    box-shadow: var(--shadow);
}

.community-dropdown {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    min-width: 250px;
    transition: var(--transition);
}

.community-dropdown:hover {
    background: var(--primary-dark);
}

.btn-add-new {
    background: var(--success);
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.btn-add-new:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.village-selector-inline {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid var(--primary);
    border-radius: 10px;
    font-weight: 700;
    color: var(--primary-dark);
    background: #fff;
    outline: none;
    transition: var(--transition);
    cursor: pointer;
}

.village-selector-inline:hover {
    border-color: var(--primary-dark);
    box-shadow: var(--shadow);
}

.attendance-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 20px;
}

.attendance-icons i {
    cursor: pointer;
    transition: var(--transition);
}

.attendance-icons i:hover {
    transform: scale(1.2);
}

.text-green { color: var(--success); }
.text-red { color: var(--danger); }

/* ── Table Search Inline ── */
.table-search-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    padding: 6px 15px;
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: var(--transition);
    max-width: 280px;
    margin-left: auto;
}

.table-search-inline:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(7, 104, 11, 0.1);
}

.table-search-inline i {
    color: var(--text-muted);
    font-size: 14px;
}

.table-search-inline input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    width: 100%;
    color: var(--text);
}

.table-search-inline input::placeholder {
    color: #94a3b8;
}

.search-wrap {
    position: relative;
    width: 300px;
}

.search-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-wrap input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text);
    background: #fff;
    transition: all 0.2s ease;
}

.search-wrap input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.search-wrap input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

/* ── Tutor Enrollment Listing ── */
.tutor-enroll-container {
    width: 100%;
    margin: 0;
    background: #fff;
    min-height: calc(100vh - 60px);
}

.tutor-enroll-container .selection-header-bar {
    background: #f1f5f9;
    border-bottom: 2px solid var(--border);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    box-shadow: var(--shadow);
}

.tutor-enroll-container .community-dropdown {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    min-width: 250px;
    transition: var(--transition);
}

.tutor-enroll-container .community-dropdown:hover {
    background: var(--primary-dark);
}

.tutor-enroll-container .community-summary-grid {
    background: #fff;
    padding: 24px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    border-bottom: 2px solid var(--border);
}

.tutor-enroll-container .summary-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tutor-enroll-container .summary-item .lbl {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-muted);
    width: 140px;
    flex-shrink: 0;
}

.tutor-enroll-container .summary-item .val {
    flex: 1;
    background: var(--primary);
    color: #fff;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13px;
    box-shadow: var(--shadow);
}

.village-table-wrap {
    padding: 24px;
}

.btn-circular-blue {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-circular-blue:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-enroll-amber {
    background: #f59e0b;
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-enroll-amber:hover {
    background: #d97706;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-exam-result {
    background: var(--success);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.btn-exam-result:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.2);
}

.no-selection-placeholder {
    padding: 100px 20px;
    text-align: center;
    color: var(--text-muted);
}

.no-selection-placeholder i {
    font-size: 60px;
    margin-bottom: 15px;
    opacity: 0.3;
}

/* Side Drawer System */
.side-drawer-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: rgba(0, 0, 0, 0.4); z-index: 3500;
    opacity: 0; visibility: hidden; transition: all 0.3s ease-in-out;
    backdrop-filter: blur(8px);
}
.side-drawer-overlay.active { opacity: 1; visibility: visible; }

.side-drawer {
    position: fixed; z-index: 3501 !important;
    background: #fff; transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: -5px 0 30px rgba(0,0,0,0.1); display: flex; flex-direction: column;
}

/* Desktop Styles (Default) */
@media (min-width: 992px) {
    .side-drawer {
        top: 0; right: 0; bottom: 0; left: auto;
        width: 70%; max-width: 70%; height: 100vh;
        transform: translateX(100%);
        box-shadow: -10px 0 40px rgba(0,0,0,0.1);
        border-left: 1px solid #e2e8f0;
    }
    .side-drawer.active { transform: translateX(0); }
    .swipe-handle { display: none; }
}

/* Mobile View: Swipe Drawer (Bottom Sheet) */
@media (max-width: 991px) {
    .side-drawer {
        top: auto; bottom: 0; left: 0; right: 0;
        width: 100%; height: 85vh; max-height: 85vh;
        transform: translateY(100%);
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
    }
    .side-drawer.active { transform: translateY(0); }
    
    .swipe-handle {
        display: block; width: 50px; height: 5px;
        background: #cbd5e1; border-radius: 10px;
        margin: 12px auto 0; flex-shrink: 0;
        cursor: ns-resize; user-select: none;
    }

    .drawer-header { padding-top: 15px !important; }
}

@media (min-width: 1600px) {
    .side-drawer { width: 60%; max-width: 60%; }
}
.drawer-header {
    padding: 20px 24px; border-bottom: 1px solid #f1f5f9;
    display: flex; justify-content: space-between; align-items: center; background: #f8fafc;
}
.drawer-header h3 { font-size: 18px; font-weight: 700; color: #1e293b; margin: 0; }
.drawer-close { background: none; border: none; font-size: 20px; color: #64748b; cursor: pointer; padding: 5px; }
.drawer-close:hover { color: #0f172a; }
.drawer-body { padding: 24px; flex: 1; overflow-y: auto; }

/* Relieve Form Specifics */
.relieve-form label { display: block; font-weight: 600; color: #475569; margin-bottom: 8px; font-size: 13px; }
.relieve-form textarea { width: 100%; height: 120px; padding: 12px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 14px; margin-bottom: 20px; resize: none; }
.relieve-form p { font-size: 13px; color: #64748b; margin-bottom: 15px; background: #fffcf0; padding: 10px; border-left: 4px solid #f59e0b; }
.btn-submit-drawer { width: 100%; padding: 12px; background: #e11d48; color: #fff; border: none; border-radius: 8px; font-weight: 700; cursor: pointer; }
.btn-submit-drawer:hover { background: #be123c; }

/* Profile Card Modal Styling */
.profile-card-detailed { display: flex; gap: 24px; text-align: left; }
.profile-sidebar { width: 180px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; text-align: center; border-right: 1px solid #f1f5f9; padding-right: 24px; }
.profile-photo-large { width: 120px; height: 120px; border-radius: 18px; object-fit: cover; border: 4px solid #fff; box-shadow: 0 10px 25px rgba(0,0,0,0.1); margin-bottom: 15px; transition: transform 0.3s ease; }
.profile-photo-large:hover { transform: scale(1.05); }
.photo-container { position: relative; margin-bottom: 15px; }
.online-indicator { position: absolute; bottom: 20px; right: 5px; width: 16px; height: 16px; background: #22c55e; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.profile-main { flex: 1; min-width: 0; }
.profile-info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; margin-bottom: 25px; background: #fff; border-radius: 16px; }
.info-group { background: #f8fafc; padding: 12px 16px; border-radius: 12px; border: 1px solid #f1f5f9; transition: all 0.2s ease; }
.info-group:hover { border-color: #cbd5e1; background: #fff; transform: translateY(-2px); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
.info-group label { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 800; color: #64748b; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 6px; }
.info-group label i { color: #0ea5e9; font-size: 11px; }
.info-group .value { font-size: 14px; font-weight: 700; color: #1e293b; }

.section-title { font-size: 14px; font-weight: 700; color: #334155; margin: 30px 0 15px; padding-bottom: 8px; border-bottom: 2px solid #f1f5f9; display: flex; justify-content: space-between; align-items: center; }
.status-badge-green, .status-badge-red { padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 800; cursor: default; }
.status-badge-green { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.status-badge-red { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.attendance-stats-row { display: flex; gap: 12px; margin-bottom: 20px; }
.stat-box { flex: 1; background: #f8fafc; padding: 15px; border-radius: 16px; text-align: center; border: 1px solid #f1f5f9; position: relative; overflow: hidden; }
.stat-box .title { font-size: 9px; font-weight: 800; color: #94a3b8; margin-bottom: 8px; text-transform: uppercase; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat-box .title i { font-size: 16px; opacity: 0.6; }
.stat-box .val { font-size: 24px; font-weight: 900; color: #0f172a; }
.stat-box.present { background: #f0fdf4; border-color: #dcfce7; }
.stat-box.present .val { color: #16a34a; }
.stat-box.present .title i { color: #16a34a; }
.stat-box.rate { background: #f0f9ff; border-color: #e0f2fe; }
.stat-box.rate .val { color: #0284c7; }
.stat-box.rate .title i { color: #0284c7; }

/* Responsive Profile Modal */
@media (max-width: 768px) {
    .profile-card-detailed { flex-direction: column; align-items: center; text-align: center; gap: 20px; }
    .profile-sidebar { width: 100%; border-right: none; padding-right: 0; border-bottom: 1px solid #f1f5f9; padding-bottom: 25px; }
    .profile-main { width: 100%; padding-left: 0; }
    .profile-info-grid { grid-template-columns: 1fr; }
    .info-group { text-align: left; }
    .attendance-stats-row { flex-direction: column; }
    .stat-box { width: 100%; }
    .section-title { justify-content: center; }
}

/* ── Page Loader ── */
.page-loader {
  position: fixed;
  top: 0;
  left: 260px; /* Aligned to main content */
  width: calc(100% - 260px);
  height: 100vh;
  background: rgba(255, 255, 255, 0.85);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 900; /* Between Topbar (100) and Sidebar (1000) */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

@media (max-width: 1024px) {
  .page-loader {
    left: 0;
    width: 100%;
  }
}

.page-loader.active {
  display: flex;
}

.loader-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s ease-in-out infinite;
}

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

.loader-logo i {
  font-size: 40px;
  color: var(--primary);
}

.spinner {
  width: 54px;
  height: 54px;
  border: 5px solid #f1f5f9;
  border-top: 5px solid var(--primary);
  border-radius: 50%;
  animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.loader-text {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.95); }
}

/* ── Notification System ── */
.notification-dropdown { position: relative; display: flex; align-items: center; }
.notif-badge { 
    position: absolute; top: 0; right: 0; 
    background: #ef4444; color: #fff; font-size: 10px; font-weight: 800; 
    padding: 2px 6px; border-radius: 10px; border: 2px solid #fff; 
    pointer-events: none; transform: translate(30%, -30%);
}

.notif-list { max-height: 350px; overflow-y: auto; padding: 10px 0; }
.notif-item { 
    padding: 12px 16px; border-bottom: 1px solid #f1f5f9; 
    display: flex; gap: 15px; align-items: flex-start; transition: all 0.2s; 
    cursor: pointer;
}
.notif-item:hover { background: #f8fafc; }
.notif-item:last-child { border-bottom: none; }

.notif-icon { 
    width: 36px; height: 36px; border-radius: 10px; 
    display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
}
.notif-icon.warning { background: #fff7ed; color: #f97316; }
.notif-icon.danger { background: #fef2f2; color: #ef4444; }
.notif-icon.info { background: #f0f9ff; color: #0ea5e9; }
.notif-icon.success { background: #f0fdf4; color: #10b981; }

.notif-content .title { font-size: 13px; font-weight: 700; color: #1e293b; margin-bottom: 2px; }
.notif-content .text { font-size: 12px; color: #64748b; line-height: 1.4; }

.notif-dismiss {
    margin-left: auto; background: none; border: none; 
    color: #cbd5e1; cursor: pointer; padding: 5px; 
    transition: all 0.2s; visibility: hidden; opacity: 0;
}
.notif-item:hover .notif-dismiss { visibility: visible; opacity: 1; }
.notif-dismiss:hover { color: #ef4444; transform: scale(1.1); }

.notif-empty { padding: 40px 20px; text-align: center; color: #94a3b8; }
.notif-empty i { font-size: 30px; margin-bottom: 10px; opacity: 0.5; }
.notif-empty p { font-size: 13px; font-weight: 500; }


