/* ============================================================
   Hifz College — Main Stylesheet
   Palette: Deep Forest Green sidebar + Warm Parchment content
   ============================================================ */

:root {
  --sidebar-bg:      #1a3a2a;
  --sidebar-text:    #d6e8dd;
  --sidebar-active:  #d4a017;
  --sidebar-active-text: #1a3a2a;
  --sidebar-hover:   #243f30;
  --sidebar-border:  #243f30;
  --sidebar-footer:  rgba(255,255,255,0.35);

  --bg:        #f5f3ee;
  --surface:   #faf9f6;
  --surface2:  #ffffff;
  --border:    #ddd9d0;
  --text:      #28251d;
  --text-muted:#7a7570;
  --text-faint:#b5b1aa;
  --primary:   #1a5c3a;
  --primary-h: #134828;
  --accent:    #d4a017;
  --accent-h:  #b88510;
  --success:   #2e7d32;
  --success-bg:#e8f5e9;
  --danger:    #c62828;
  --danger-bg: #ffebee;
  --warning:   #e65100;
  --warning-bg:#fff3e0;
  --radius:    8px;
  --gold:      #d4a017;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
  --sidebar-w: 240px;
  --topbar-h:  56px;
  --transition:180ms ease;
}

/* Dark mode */
[data-theme="dark"] {
  --bg:        #111a13;
  --surface:   #182318;
  --surface2:  #1e2e1f;
  --border:    #2a3d2b;
  --text:      #d0d9d1;
  --text-muted:#7a8f7b;
  --text-faint:#4a5e4b;
  --primary:   #5dab7a;
  --primary-h: #4a9067;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,.4);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  display: flex;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
table { border-collapse: collapse; width: 100%; }

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
  overflow-y: auto;
  /* Islamic geometric pattern overlay */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.04' stroke-width='1'%3E%3Cpath d='M30 0 L60 30 L30 60 L0 30Z'/%3E%3Cpath d='M15 15 L45 15 L45 45 L15 45Z'/%3E%3C/g%3E%3C/svg%3E");
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px;
  border-bottom: 1px solid var(--sidebar-border);
}

.brand-name {
  font-size: 14px; font-weight: 700;
  color: #fff; line-height: 1.2;
}
.brand-sub { font-size: 11px; color: var(--sidebar-footer); line-height: 1.2; }

.sidebar-close {
  display: none; margin-left: auto; background: none; border: none;
  color: var(--sidebar-text); cursor: pointer; font-size: 16px; padding: 4px;
}

.sidebar-nav { flex: 1; padding: 12px 8px; }

.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  color: var(--sidebar-text); font-size: 13.5px; font-weight: 500;
  margin-bottom: 2px; transition: background var(--transition), color var(--transition);
  text-decoration: none;
}
.nav-link i { width: 18px; text-align: center; font-size: 14px; }
.nav-link:hover { background: var(--sidebar-hover); text-decoration: none; }
.nav-link.active {
  background: var(--sidebar-active);
  color: var(--sidebar-active-text);
  font-weight: 700;
}

.sidebar-footer {
  padding: 14px 16px; font-size: 11px;
  color: var(--sidebar-footer);
  border-top: 1px solid var(--sidebar-border);
}

.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 99;
}

/* ---- Main wrapper ---- */
.main-wrapper {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin var(--transition);
}

/* ---- Topbar ---- */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  position: sticky;
  top: 0; z-index: 50;
}

.menu-btn {
  display: none; background: none; border: none;
  cursor: pointer; font-size: 18px; color: var(--text);
  padding: 6px;
}

.topbar-title { font-size: 15px; font-weight: 600; flex: 1; }

.theme-toggle {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 16px;
  padding: 6px; border-radius: var(--radius);
  transition: background var(--transition);
}
.theme-toggle:hover { background: var(--bg); }

/* ---- Page content ---- */
.page-content { padding: 24px; flex: 1; max-width: 1200px; }

/* ---- Alerts ---- */
.alert {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 20px; font-size: 14px; font-weight: 500;
}
.alert i { font-size: 16px; }
.alert-success { background: var(--success-bg); color: var(--success); border-left: 4px solid var(--success); }
.alert-error   { background: var(--danger-bg);  color: var(--danger);  border-left: 4px solid var(--danger); }

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 14px; font-weight: 700; }
.card-body { padding: 20px; }

/* ---- Stats grid ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}

.stat-value { font-size: 28px; font-weight: 800; line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.stat-icon {
  width: 38px; height: 38px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.stat-icon.green  { background: #e8f5e9; color: #2e7d32; }
.stat-icon.teal   { background: #e0f2f1; color: #00695c; }
.stat-icon.violet { background: #f3e5f5; color: #7b1fa2; }
.stat-icon.slate  { background: #f5f5f5; color: #616161; }

/* ---- Grid layouts ---- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 768px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---- Page header ---- */
.page-header {
  display: flex; align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  margin-bottom: 20px;
}
.page-header h2 { font-size: 20px; font-weight: 800; }
.page-header p  { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none; transition: background var(--transition), border-color var(--transition);
  white-space: nowrap;
}
.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-h); text-decoration: none; color:#fff; }
.btn-secondary { background: var(--bg); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--border); text-decoration: none; }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b71c1c; text-decoration: none; color:#fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-icon { padding: 6px 8px; }

/* ---- Search bar ---- */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.search-bar .input-wrap { position: relative; flex: 1; max-width: 420px; }
.search-bar .input-wrap i {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 14px;
}
.search-bar input { padding-left: 34px !important; }

/* ---- Form elements ---- */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-size: 13px; font-weight: 600;
  margin-bottom: 6px; color: var(--text);
}
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 8px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,92,58,.15);
}
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control { cursor: pointer; }
.form-error { font-size: 12px; 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; }
@media (max-width: 600px) {
  .form-row.cols-2,
  .form-row.cols-3 { grid-template-columns: 1fr; }
}

/* ---- Table ---- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table th, table td { padding: 10px 14px; text-align: left; font-size: 13.5px; }
table th {
  background: var(--bg); font-weight: 700;
  color: var(--text-muted); border-bottom: 1px solid var(--border);
}
table td { border-bottom: 1px solid var(--border); }
table tbody tr:hover { background: rgba(0,0,0,.02); }
table tbody tr:last-child td { border-bottom: none; }

/* Avatar circle */
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(26,92,58,.15); color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
}

.student-cell { display: flex; align-items: center; gap: 10px; }

/* ---- Badges ---- */
.badge {
  display: inline-flex; align-items: center;
  padding: 2px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.badge-active    { background:#e8f5e9; color:#2e7d32; }
.badge-inactive  { background:#f5f5f5; color:#616161; }
.badge-graduated { background:#f3e5f5; color:#7b1fa2; }
.badge-excellent { background:#e8f5e9; color:#1b5e20; }
.badge-good      { background:#e3f2fd; color:#1565c0; }
.badge-average   { background:#fff8e1; color:#e65100; }
.badge-needs     { background:#ffebee; color:#c62828; }

/* ---- Action buttons in table ---- */
.action-btns { display: flex; gap: 4px; }

/* ---- Progress bar ---- */
.progress-wrap { background: var(--bg); border-radius: 999px; height: 8px; overflow: hidden; }
.progress-bar  { height: 100%; background: var(--primary); border-radius: 999px; transition: width .4s ease; }

/* ---- Student profile card ---- */
.profile-card { display: flex; gap: 20px; flex-wrap: wrap; }
.profile-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(26,92,58,.15); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 800; flex-shrink: 0;
}
.profile-info { flex: 1; min-width: 0; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; margin-top: 12px; }
@media (max-width: 480px) { .info-grid { grid-template-columns: 1fr; } }
.info-item label { font-size: 11px; color: var(--text-muted); display: block; }
.info-item span  { font-size: 14px; font-weight: 600; }

/* ---- Tabs ---- */
.tabs { display: flex; 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;
  border-bottom: 2px solid transparent; margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition);
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ---- Log / Revision items ---- */
.log-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px; border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 8px;
}
.log-icon {
  width: 34px; height: 34px; border-radius: 50%;
  background: #fff8e1; color: #e65100;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.log-icon.blue { background: #e3f2fd; color: #1565c0; }
.log-body { flex: 1; min-width: 0; }
.log-title { font-size: 13.5px; font-weight: 600; }
.log-sub   { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.log-actions { display: flex; align-items: center; gap: 8px; }

/* ---- Reports ---- */
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.bar-label { font-size: 12px; color: var(--text-muted); width: 130px; flex-shrink: 0; }
.bar-wrap  { flex: 1; background: var(--bg); border-radius: 999px; height: 10px; overflow: hidden; }
.bar-fill  { height: 100%; border-radius: 999px; background: var(--primary); transition: width .5s; }
.bar-count { font-size: 12px; color: var(--text-muted); width: 24px; text-align: right; flex-shrink: 0; }

/* ---- Notes box ---- */
.note-box {
  padding: 12px 16px; border-radius: var(--radius);
  background: #fff8e1; border: 1px solid #ffe082;
  font-size: 13.5px; color: #5d4037;
  margin-top: 12px;
}

/* ---- Empty state ---- */
.empty-state {
  text-align: center; padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state i { font-size: 40px; opacity: .3; margin-bottom: 12px; }
.empty-state p { font-size: 14px; margin-bottom: 16px; }

/* ---- Delete confirm dialog ---- */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 200;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface); border-radius: 12px;
  padding: 28px; max-width: 400px; width: 90%;
  box-shadow: var(--shadow-md);
}
.modal h3 { font-size: 16px; margin-bottom: 8px; }
.modal p  { font-size: 13.5px; color: var(--text-muted); margin-bottom: 20px; }
.modal-btns { display: flex; gap: 10px; justify-content: flex-end; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: block; }
  .sidebar-overlay.open { display: block; }
  .main-wrapper { margin-left: 0; }
  .menu-btn { display: block; }
  .page-content { padding: 16px; }
}

/* ---- Topbar right area (user + logout) ---- */
.topbar-right {
  display: flex; align-items: center; gap: 10px; margin-left: auto;
}
.topbar-user {
  font-size: 13px; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
}
@media (max-width: 600px) { .topbar-user { display: none; } }

.btn-logout {
  background: rgba(212,160,23,.15);
  color: var(--gold, #d4a017);
  border: 1px solid rgba(212,160,23,.3);
  border-radius: var(--radius);
  padding: 5px 12px; font-size: 12px;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .2s;
}
.btn-logout:hover { background: rgba(212,160,23,.28); }

/* ---- Sidebar user strip ---- */
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-top: 1px solid rgba(255,255,255,.1);
  margin-top: auto;
}
.sidebar-user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--gold, #d4a017); color: #1a3a2a;
  font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { font-size: 11px; color: rgba(255,255,255,.55); }
.sidebar-logout {
  color: rgba(255,255,255,.55); font-size: 15px;
  text-decoration: none; padding: 4px;
  transition: color .2s;
}
.sidebar-logout:hover { color: var(--gold, #d4a017); }

/* ============================================================
   MOBILE IMPROVEMENTS — v4 patch
   ============================================================ */

/* ---- General small screen tweaks ---- */
@media (max-width: 600px) {
  .page-content { padding: 12px; }
  .page-header  { gap: 8px; }
  .page-header h2 { font-size: 17px; }

  /* Stat cards — tighter on phone */
  .stat-value { font-size: 22px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
  .stat-card  { padding: 14px; }

  /* Cards */
  .card-body   { padding: 14px; }
  .card-header { padding: 12px 14px; }

  /* Buttons full-width where needed */
  .page-header .btn { font-size: 12px; padding: 7px 12px; }
}

/* ---- Tabs — scroll on small screens ---- */
.tabs, .tab-bar, .memo-tabs {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  flex-wrap: nowrap;
  scrollbar-width: none; /* Firefox */
}
.tabs::-webkit-scrollbar,
.tab-bar::-webkit-scrollbar,
.memo-tabs::-webkit-scrollbar { display: none; }

.tab-btn { white-space: nowrap; flex-shrink: 0; }

@media (max-width: 600px) {
  .tab-btn { padding: 8px 12px; font-size: 12px; }
}

/* ---- Student form — photo+form side by side grid ---- */
@media (max-width: 700px) {
  /* The photo+form 2-col grid in student_form.php */
  form > div[style*="grid-template-columns:260px"] {
    display: flex !important;
    flex-direction: column !important;
  }
}

/* ---- Students list table — hide less important cols on mobile ---- */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}
@media (max-width: 500px) {
  .hide-sm { display: none !important; }
  table th, table td { padding: 8px 10px; font-size: 12px; }
}

/* ---- Search bar — stack on mobile ---- */
@media (max-width: 500px) {
  .search-bar { flex-wrap: wrap; }
  .search-bar .input-wrap { max-width: 100%; width: 100%; }
}

/* ---- Log items — stack actions below on very small screens ---- */
@media (max-width: 480px) {
  .log-item { flex-wrap: wrap; }
  .log-actions { margin-left: auto; }
}

/* ---- Memo tracker cards max-width ---- */
@media (max-width: 700px) {
  .memo-card { max-width: 100% !important; }
}

/* ---- Student form: cols-3 collapse earlier ---- */
@media (max-width: 700px) {
  .form-row.cols-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .form-row.cols-3 { grid-template-columns: 1fr; }
}

/* ---- Parent dashboard grid — single col on mobile ---- */
@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr !important; }
}

/* ---- Topbar — shrink title on mobile ---- */
@media (max-width: 480px) {
  .topbar-title { font-size: 13px; }
  .topbar { padding: 0 12px; gap: 8px; }
  .btn-logout span { display: none; } /* hide text, keep icon */
}

/* ---- Modal — full width on mobile ---- */
@media (max-width: 480px) {
  .modal { width: 95% !important; padding: 20px; }
}

/* ---- Inline page-header form (reports selector) ---- */
@media (max-width: 600px) {
  .page-header form {
    width: 100%;
  }
  .page-header form select { width: 100% !important; }
  .page-header form { flex-wrap: wrap; }
}

/* ---- Student view activity strip ---- */
@media (max-width: 480px) {
  .sv-stat { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 12px; }
  .sv-stat-val { font-size: 18px; }
}

/* ---- Parent progress stats grid ---- */
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- Login page ---- */
@media (max-width: 700px) {
  .login-wrap {
    flex-direction: column;
    max-width: 480px;
    box-shadow: 0 8px 32px rgba(0,0,0,.15);
  }
  .login-panel {
    display: none;
  }
  .login-form-panel {
    width: 100%;
    border-radius: 16px;
    padding: 32px 20px;
  }
}

/* ---- Logo styles ---- */
.brand-logo {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.brand-logo-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.18);
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  background: #fff;
}

.login-logo-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.7);
  box-shadow: 0 4px 14px rgba(0,0,0,.28);
  margin-bottom: 20px;
  background: #fff;
}

/* DataTable fix */

.dataTables_wrapper {
    font-size:14px;
}

.dataTables_length,
.dataTables_filter{
    margin-bottom:10px;
}

.dataTables_filter input{
    border:1px solid var(--border);
    border-radius:6px;
    padding:6px 10px;
}

.dataTables_length select{
    border:1px solid var(--border);
    border-radius:6px;
    padding:5px;
}

/* Buttons */

.dt-buttons .dt-button{
    background:#f5f6f8;
    border:1px solid #ddd;
    border-radius:6px;
    padding:6px 12px;
    margin-right:5px;
}

.dt-buttons .dt-button:hover{
    background:#e9ecef;
}

/* Pagination */

.dataTables_paginate .paginate_button{
    border-radius:6px !important;
    margin:2px;
}

.dataTables_paginate .paginate_button.current{
    background:#2c7be5 !important;
    color:#fff !important;
}

/* Table header */

table.dataTable thead th{
    border-bottom:1px solid #ddd;
}

/* Remove weird sorting icons spacing */

table.dataTable thead th.sorting{
    background-image:none;
}

#tableButtons .dt-button{
    background:#f3f4f6;
    border:1px solid #ddd;
    border-radius:6px;
    padding:6px 12px;
    margin-right:5px;
    font-size:13px;
}

#tableButtons .dt-button:hover{
    background:#e5e7eb;
}

.dataTables_wrapper{
    font-size:13px;
}

.dataTables_filter input{
    border:1px solid var(--border);
    border-radius:6px;
    padding:6px 10px;
}

.dataTables_length select{
    border:1px solid var(--border);
    border-radius:6px;
}

.stat-link {
  text-decoration: none;
  color: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.stat-link:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(26,92,58,.18);
}

.stat-link .stat-label,
.stat-link .stat-value {
  color: inherit;
}


/* ============================================================
   HIZ Library — Collapsible Nav Group  (v2 — bulletproof)
   Paste at the bottom of assets/css/style.css
   ============================================================ */

/* ── Group wrapper ───────────────────────────────────────────── */
.nav-group {
  display: flex;
  flex-direction: column;
}

/* ── Toggle button — resets all button defaults ──────────────── */
button.nav-group-toggle {
  all: unset;               /* wipe every browser button default  */
  box-sizing: border-box;
  cursor: pointer;
  /* copy your .nav-link layout exactly */
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  transition: background 0.18s, color 0.18s;
  font-family: inherit;
}
button.nav-group-toggle:hover,
button.nav-group-toggle.open {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

/* Left gold bar when expanded */
.nav-group.group-open > button.nav-group-toggle {
  border-left: 3px solid #d4a017;
  padding-left: 11px;
  color: #fff;
}

/* Chevron — always last, always right */
.nav-group-arrow {
  margin-left: auto;
  font-size: 11px;
  opacity: 0.55;
  transition: transform 0.25s ease, opacity 0.2s;
  flex-shrink: 0;
  pointer-events: none;
}
button.nav-group-toggle.open .nav-group-arrow {
  transform: rotate(180deg);
  opacity: 1;
}

/* ── Badge (pending / unread count) ─────────────────────────── */
.nav-badge {
  background: #d4a017;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  line-height: 1.6;
  flex-shrink: 0;
}

/* ── Submenu — HIDDEN by default ─────────────────────────────── */
.nav-group-menu {
  /* Force hidden — override anything from .nav-link children */
  display: none !important;
  flex-direction: column;
  padding-left: 0;
  margin: 0;
  overflow: hidden;
}
/* Shown only when JS adds .open */
.nav-group-menu.open {
  display: flex !important;
  animation: navSlideDown 0.22s ease forwards;
}

@keyframes navSlideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* ── Submenu items ───────────────────────────────────────────── */
.nav-link.nav-sub {
  padding-left: 38px !important;
  font-size: 13px !important;
  color: rgba(255,255,255,0.65) !important;
  border-radius: 6px !important;
}
.nav-link.nav-sub i {
  font-size: 12px;
  width: 15px;
}
.nav-link.nav-sub:hover {
  color: #fff !important;
  background: rgba(255,255,255,0.07) !important;
}
.nav-link.nav-sub.active {
  background: rgba(212,160,23,0.2) !important;
  color: #fff !important;
  font-weight: 600 !important;
}
