/* ============================================================
   EduCRM — Modern UI Stylesheet v2
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --primary:      #4f46e5;
  --primary-dk:   #4338ca;
  --primary-lt:   #eef2ff;
  --success:      #059669;
  --success-lt:   #d1fae5;
  --warning:      #d97706;
  --warning-lt:   #fef3c7;
  --danger:       #dc2626;
  --danger-lt:    #fee2e2;
  --info:         #0284c7;
  --info-lt:      #e0f2fe;
  --purple:       #7c3aed;
  --purple-lt:    #ede9fe;
  --teal:         #0d9488;
  --teal-lt:      #ccfbf1;
  --orange:       #ea580c;
  --orange-lt:    #ffedd5;

  --bg:           #f8fafc;
  --card:         #ffffff;
  --border:       #e2e8f0;
  --border-lt:    #f1f5f9;
  --text:         #0f172a;
  --text-muted:   #64748b;
  --text-light:   #94a3b8;

  --sidebar-bg:   #0f172a;
  --sidebar-w:    252px;

  --shadow-xs:    0 1px 2px rgba(0,0,0,.05);
  --shadow-sm:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:    0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -1px rgba(0,0,0,.04);
  --shadow-lg:    0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.03);
  --shadow-xl:    0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);

  --radius-sm:    6px;
  --radius:       10px;
  --radius-lg:    14px;
  --radius-xl:    18px;
  --font:         'Inter', system-ui, -apple-system, sans-serif;
  --transition:   all .18s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ─────────────────────────────────────────────────── */

.app-wrapper { display: flex; min-height: 100vh; }

/* ── Sidebar ─────────────────────────────────────────────────── */

.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 200;
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { font-size: 24px; line-height: 1; }
.logo-text {
  color: #fff;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.4px;
  background: linear-gradient(135deg, #fff 60%, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-close {
  display: none;
  background: rgba(255,255,255,.08);
  border: none;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  line-height: 1;
  transition: var(--transition);
}
.sidebar-close:hover { background: rgba(255,255,255,.14); color: #fff; }

.sidebar-nav {
  flex: 1;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: #94a3b8;
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  text-decoration: none;
  position: relative;
}
.nav-item:hover {
  background: rgba(255,255,255,.07);
  color: #e2e8f0;
  text-decoration: none;
}
.nav-item.active {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  box-shadow: 0 4px 12px rgba(79,70,229,.35);
}
.nav-icon {
  font-size: 15px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 14px 14px 18px;
  border-top: 1px solid rgba(255,255,255,.06);
}

.caller-badge {
  background: linear-gradient(135deg, rgba(79,70,229,.2), rgba(99,102,241,.1));
  border: 1px solid rgba(99,102,241,.3);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  margin-bottom: 12px;
}
.caller-label {
  color: #818cf8;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  display: block;
}
.caller-name {
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: block;
  margin-top: 2px;
}
.switch-member {
  color: #818cf8;
  font-size: 11px;
  display: inline-block;
  margin-top: 3px;
}
.switch-member:hover { color: #a5b4fc; }

.user-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.04);
}
.user-avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(79,70,229,.4);
}
.user-details { display: flex; flex-direction: column; min-width: 0; }
.user-name {
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-role { color: #64748b; font-size: 11px; text-transform: capitalize; margin-top: 1px; }

.logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px;
  background: rgba(220,38,38,.12);
  color: #fca5a5;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
  text-decoration: none;
}
.logout-btn:hover {
  background: rgba(220,38,38,.22);
  color: #fecaca;
  text-decoration: none;
}

/* ── Sidebar overlay ─────────────────────────────────────────── */

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
  z-index: 190;
}

/* ── Main content ────────────────────────────────────────────── */

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

/* ── Topbar ──────────────────────────────────────────────────── */

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

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.menu-toggle:hover { background: var(--bg); color: var(--text); }

.topbar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
  letter-spacing: -.2px;
}

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

.topbar-caller {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-lt);
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid #c7d2fe;
}

/* ── Content area ────────────────────────────────────────────── */

.content-area { padding: 28px 26px; flex: 1; }

/* ── Cards ───────────────────────────────────────────────────── */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .2s ease;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-lt);
  gap: 12px;
  flex-wrap: wrap;
  background: #fafbfc;
}
.card-header h3 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.2px;
}
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card-body { padding: 22px; }

/* ── Stats grid ──────────────────────────────────────────────── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 18px;
  margin-bottom: 0;
}
.stats-grid-sm { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease;
  cursor: default;
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.stat-body { min-width: 0; }
.stat-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -.5px;
}
.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  font-weight: 500;
}

/* ── Tables ──────────────────────────────────────────────────── */

.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table thead {
  position: sticky; top: 0;
  z-index: 10;
}
.data-table th {
  background: #f8fafc;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 11px 16px;
  text-align: left;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-lt);
  vertical-align: middle;
  color: var(--text);
}
.data-table tbody tr { transition: background .12s ease; }
.data-table tbody tr:hover { background: #f8fafc; }
.data-table tbody tr:last-child td { border-bottom: none; }

.text-center { text-align: center; }
.text-muted  { color: var(--text-muted) !important; }
.text-danger { color: var(--danger) !important; }
.py-4 { padding-top: 36px; padding-bottom: 36px; }
.py-3 { padding-top: 22px; padding-bottom: 22px; }
.mt-4 { margin-top: 26px; }
.mt-3 { margin-top: 16px; }
.mb-4 { margin-bottom: 26px; }
.mb-2 { margin-bottom: 8px; }
.ml-2 { margin-left: 6px; }
.ml-auto { margin-left: auto; }

/* ── Badges ──────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.6;
  letter-spacing: .1px;
}
.badge-blue   { background: #dbeafe; color: #1d4ed8; }
.badge-green  { background: var(--success-lt); color: #065f46; }
.badge-yellow { background: var(--warning-lt); color: #92400e; }
.badge-red    { background: var(--danger-lt);  color: #991b1b; }
.badge-gray   { background: #f1f5f9; color: #475569; }
.badge-teal   { background: var(--teal-lt);   color: #134e4a; }
.badge-purple { background: var(--purple-lt); color: #5b21b6; }
.badge-orange { background: var(--orange-lt); color: #9a3412; }
.badge-dark   { background: #e2e8f0; color: #1e293b; }

.followup-date { font-weight: 600; font-size: 12px; }
.followup-date.overdue { color: var(--danger); }

/* ── Buttons ─────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.4;
  font-family: var(--font);
  letter-spacing: -.1px;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: #fff;
  box-shadow: 0 2px 8px rgba(79,70,229,.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #4338ca, #4f46e5);
  box-shadow: 0 4px 12px rgba(79,70,229,.4);
}

.btn-success {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  box-shadow: 0 2px 8px rgba(5,150,105,.25);
}
.btn-success:hover {
  background: linear-gradient(135deg, #047857, #059669);
  box-shadow: 0 4px 12px rgba(5,150,105,.35);
}

.btn-warning {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #fff;
  box-shadow: 0 2px 8px rgba(217,119,6,.25);
}
.btn-warning:hover {
  background: linear-gradient(135deg, #b45309, #d97706);
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
  box-shadow: 0 2px 8px rgba(220,38,38,.25);
}
.btn-danger:hover {
  background: linear-gradient(135deg, #b91c1c, #dc2626);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-outline:hover { background: var(--bg); border-color: #cbd5e1; }

.btn-full { width: 100%; }

.btn-sm  { padding: 7px 14px; font-size: 12px; }
.btn-xs  { padding: 4px 9px; font-size: 11px; border-radius: 5px; }
.btn-xs:hover { transform: none; }

.btn-call     { background: var(--success-lt); color: #065f46; border: 1px solid #a7f3d0; box-shadow: none; }
.btn-call:hover { background: #a7f3d0; box-shadow: none; }
.btn-whatsapp { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; box-shadow: none; }
.btn-whatsapp:hover { background: #bbf7d0; box-shadow: none; }

/* ── Forms ───────────────────────────────────────────────────── */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}
.form-group:last-child { margin-bottom: 0; }

label {
  font-size: 12.5px;
  font-weight: 600;
  color: #374151;
  letter-spacing: -.1px;
}
.required { color: var(--danger); }

input[type=text], input[type=email], input[type=password],
input[type=number], input[type=date], input[type=file],
select, textarea {
  width: 100%;
  padding: 9px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}
input::placeholder, textarea::placeholder { color: #b0bac6; }
textarea { resize: vertical; min-height: 80px; }
select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}
small.text-muted { font-size: 11px; color: var(--text-muted); }

.form-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.form-row .form-group { flex: 1; min-width: 180px; }

.inline-input {
  padding: 5px 9px;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  font-size: 12px;
  font-family: var(--font);
  width: auto;
  outline: none;
}
.inline-input:focus { border-color: #6366f1; }

/* ── Filter form ─────────────────────────────────────────────── */

.filter-form { padding: 18px 22px; }
.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.filter-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ── Alerts ──────────────────────────────────────────────────── */

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}
.alert-success {
  background: var(--success-lt);
  color: #065f46;
  border-color: #6ee7b7;
}
.alert-error {
  background: var(--danger-lt);
  color: #7f1d1d;
  border-color: #fca5a5;
}

/* ── Modal ───────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.5);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-box {
  background: var(--card);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 580px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(0,0,0,.05);
  animation: modalIn .22s cubic-bezier(.34,1.56,.64,1);
}

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

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
  background: var(--card);
  z-index: 1;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.modal-header h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.2px;
}
.modal-close {
  background: var(--bg);
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.modal-close:hover { background: var(--border); color: var(--text); }

.modal-body { padding: 22px; }
.modal-footer {
  padding: 16px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  background: #fafbfc;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* ── Login page ──────────────────────────────────────────────── */

body.login-body {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

body.login-body::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(79,70,229,.15) 0%, transparent 70%);
  top: -100px; left: -100px;
  pointer-events: none;
}
body.login-body::after {
  content: '';
  position: absolute;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(124,58,237,.12) 0%, transparent 70%);
  bottom: -100px; right: -100px;
  pointer-events: none;
}

.login-wrapper {
  width: 100%;
  max-width: 420px;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.login-card {
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.4), 0 0 0 1px rgba(255,255,255,.05);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.logo-icon-lg {
  font-size: 44px;
  display: block;
  margin-bottom: 10px;
  filter: drop-shadow(0 4px 8px rgba(79,70,229,.3));
}
.login-logo h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.5px;
}
.login-logo p { color: var(--text-muted); font-size: 13.5px; margin-top: 5px; }

.login-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 11.5px;
  margin-top: 22px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  line-height: 1.9;
}

.divider {
  text-align: center;
  color: var(--text-light);
  font-size: 12px;
  position: relative;
  margin: 22px 0;
}
.divider::before, .divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 44%;
  height: 1px;
  background: var(--border);
}
.divider::before { left: 0; }
.divider::after  { right: 0; }

/* ── Two-column layout ───────────────────────────────────────── */

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

/* ── Code block ──────────────────────────────────────────────── */

.code-block {
  background: #0f172a;
  color: #94a3b8;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  font-family: 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.8;
  overflow-x: auto;
  white-space: pre;
  border: 1px solid rgba(255,255,255,.06);
}

.info-list { padding-left: 18px; color: var(--text-muted); font-size: 13px; }
.info-list li { margin-bottom: 6px; }
.error-list { padding-left: 18px; color: var(--danger); font-size: 12px; }
.error-list li { margin-bottom: 4px; }

/* ── Actions cell ────────────────────────────────────────────── */

.actions-cell {
  white-space: nowrap;
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: nowrap;
}
.remark-cell {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 12px;
}

/* ── Inline edit form ────────────────────────────────────────── */

.inline-edit-form { display: contents; }

/* ── Select member page ──────────────────────────────────────── */

.add-member-section {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-top: 4px;
}
.add-member-toggle {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: var(--primary);
  list-style: none;
  user-select: none;
  background: var(--primary-lt);
}
.add-member-toggle::-webkit-details-marker { display: none; }
.add-member-section[open] .add-member-toggle { border-bottom: 1px solid var(--border); }
.add-member-section > form { padding: 0 16px 16px; }

/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 960px) {
  .row-2col { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: flex; }
  .sidebar-overlay.open { display: block; }

  .main-content { margin-left: 0; }
  .menu-toggle  { display: flex; }

  .content-area { padding: 16px; }
  .topbar { padding: 0 16px; }

  .filter-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid  { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  .data-table th, .data-table td { padding: 9px 11px; }
  .modal-box { max-width: 100%; border-radius: var(--radius-lg); }
  .form-row  { flex-direction: column; gap: 0; }
  .form-row .form-group { min-width: unset; }
}

@media (max-width: 480px) {
  .filter-grid { grid-template-columns: 1fr; }
  .stats-grid  { grid-template-columns: 1fr 1fr; }
  .login-card  { padding: 30px 22px; }
  .content-area { padding: 14px; }
}
