/* ============================================================
   SDAAH School Management System — Design System
   ============================================================ */

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef2ff;
  --violet: #7c3aed;
  --violet-soft: #f5f3ff;
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --success: #16a34a;
  --success-soft: #f0fdf4;
  --warning: #d97706;
  --warning-soft: #fffbeb;
  --sidebar: #0f172a;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.07), 0 4px 16px rgba(15, 23, 42, 0.05);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------------- boot screen ---------------- */
.boot-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #fff;
}
.boot-logo { font-size: 52px; }
.boot-title { font-weight: 600; letter-spacing: 0.02em; margin: 0; }
.spinner {
  width: 26px;
  height: 26px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-top: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
}

.login-brand {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #4338ca 0%, #4f46e5 35%, #7c3aed 75%, #9333ea 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 48px;
}
.login-brand::before,
.login-brand::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
}
.login-brand::before { width: 420px; height: 420px; top: -160px; right: -140px; }
.login-brand::after { width: 320px; height: 320px; bottom: -120px; left: -110px; }

.brand-inner { position: relative; max-width: 430px; }
.brand-logo {
  width: 74px;
  height: 74px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: grid;
  place-items: center;
  margin-bottom: 26px;
}
.brand-name {
  margin: 0;
  font-size: 44px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.1;
}
.brand-tag {
  margin: 6px 0 18px;
  font-size: 17px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.92);
}
.brand-desc {
  margin: 0 0 26px;
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.82);
  max-width: 400px;
}
.brand-points { list-style: none; margin: 0 0 34px; padding: 0; }
.brand-points li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.94);
}
.brand-foot { font-size: 12.5px; color: rgba(255, 255, 255, 0.62); }

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 24px;
  background: var(--bg);
}

.login-card {
  width: 100%;
  max-width: 410px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 38px 30px;
  box-shadow: var(--shadow);
}
.login-card h2 { margin: 0 0 4px; font-size: 24px; }
.login-sub { margin: 0 0 24px; color: var(--muted); font-size: 14px; }
.mobile-brand {
  display: none;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--primary);
  font-size: 20px;
  margin-bottom: 18px;
}
.login-foot {
  margin: 22px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------------- forms ---------------- */
.field { display: block; margin-bottom: 18px; }
.field > span {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 7px;
  color: #334155;
}
.input, select.input, textarea.input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14.5px;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}
.input::placeholder { color: #a3b2c7; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: none;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.15s, transform 0.05s, box-shadow 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--violet));
  color: #fff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-hover), #6d28d9); }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { background: #f8fafc; color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 8px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--primary-soft); color: var(--primary); }

/* ---------------- alerts ---------------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  margin-bottom: 18px;
  border: 1px solid transparent;
}
.alert svg { flex-shrink: 0; margin-top: 1px; }
.alert-error { background: var(--danger-soft); color: #991b1b; border-color: #fecaca; }
.alert-success { background: var(--success-soft); color: #166534; border-color: #bbf7d0; }
.alert-info { background: var(--primary-soft); color: #3730a3; border-color: #c7d2fe; }

/* ============================================================
   APP SHELL (sidebar + topbar + content)
   ============================================================ */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 264px;
  position: fixed;
  inset: 0 auto 0 0;
  background: linear-gradient(180deg, #0f172a 0%, #101c36 100%);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  z-index: 60;
  transition: transform 0.25s ease;
}

.side-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.side-logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}
.side-logo-name { font-weight: 800; font-size: 17px; color: #fff; letter-spacing: 0.05em; }
.side-logo-sub { font-size: 11.5px; color: #7c8db0; margin-top: -2px; }

.side-nav { flex: 1; padding: 14px 0; overflow-y: auto; }
.side-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 12px;
  padding: 11px 15px;
  border-radius: 10px;
  color: #8fa1bf;
  font-weight: 500;
  font-size: 14.5px;
  transition: background 0.15s, color 0.15s;
}
.side-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.side-nav a.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4);
}

.side-foot {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.side-foot-plan { font-size: 13px; font-weight: 600; color: #e2e8f0; }
.side-foot-ver { font-size: 11.5px; color: #64748b; margin-top: 2px; }

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 55;
}

.main {
  flex: 1;
  margin-left: 264px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

.topbar {
  height: 66px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 26px;
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar-title { font-size: 16.5px; font-weight: 700; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar-school {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
  max-width: 230px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--violet));
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.content {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 32px 48px;
}

/* ---------------- badges ---------------- */
.badge {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.badge-super { background: #fef3c7; color: #92400e; }
.badge-school { background: #e0e7ff; color: #3730a3; }
.badge-teacher { background: #dcfce7; color: #166534; }
.badge-green { background: var(--success-soft); color: #166534; }
.badge-red { background: var(--danger-soft); color: #991b1b; }
.badge-gray { background: #f1f5f9; color: #475569; }

/* ---------------- page & cards ---------------- */
.page-title { margin: 0 0 4px; font-size: 24px; font-weight: 800; }
.page-sub { margin: 0 0 8px; color: var(--muted); font-size: 14.5px; }
.page-sub b { color: #334155; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin-top: 22px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.ic-indigo { background: var(--primary-soft); color: var(--primary); }
.ic-green { background: var(--success-soft); color: var(--success); }
.ic-violet { background: var(--violet-soft); color: var(--violet); }
.ic-amber { background: var(--warning-soft); color: var(--warning); }
.stat-value { font-size: 23px; font-weight: 800; line-height: 1.2; word-break: break-word; }
.stat-label { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* skeleton loaders */
.sk {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #eef1f6 25%, #e2e8f0 50%, #eef1f6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  margin: 6px 0;
}
.sk-lg { height: 20px; width: 110px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------- plan card ---------------- */
.plan-card { margin-top: 22px; }
.plan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.plan-name { font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.plan-meta { color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.plan-expiry {
  font-size: 13px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 14px;
}
.feature-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.feature-chip {
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
}
.feature-chip.on { background: var(--success-soft); color: #166534; }
.feature-chip.off { background: #f1f5f9; color: #94a3b8; text-decoration: line-through; }

/* ---------------- empty state / notes ---------------- */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  margin-top: 22px;
}
.empty-icon { font-size: 44px; margin-bottom: 10px; }
.empty-state h2 { margin: 0 0 6px; font-size: 20px; }
.empty-state p { color: var(--muted); margin: 0 0 20px; }

.note-card {
  margin-top: 22px;
  font-size: 14px;
  color: #334155;
  background: var(--warning-soft);
  border-color: #fde68a;
}

/* ---------------- tables (for upcoming milestones) ---------------- */
.table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow-x: auto;
  margin-top: 22px;
}
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left;
  padding: 13px 18px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
  white-space: nowrap;
}
.table td { padding: 13px 18px; border-bottom: 1px solid #eef2f7; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #fafbfe; }

/* ---------------- responsive ---------------- */
.only-mobile { display: none; }

@media (max-width: 900px) {
  .login-page { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .mobile-brand { display: flex; }

  .sidebar { transform: translateX(-100%); }
  .app.sidebar-open .sidebar { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, 0.4); }
  .app.sidebar-open .sidebar-backdrop { display: block; }
  .main { margin-left: 0; }
  .only-mobile { display: inline-grid; }
  .topbar-school { display: none; }
  .content { padding: 22px 16px 40px; }
  .login-card { padding: 30px 24px 24px; }
}

/* ============================================================
   MILESTONE 2 — Super Admin Panel components
   ============================================================ */

/* toolbar (title + actions row) */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.toolbar .page-title { margin: 0; }
.toolbar .page-sub { margin: 2px 0 0; }
.toolbar-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search-input { max-width: 300px; }

/* modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  animation: fadeIn 0.15s ease;
}
.modal {
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px 28px 22px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.35);
  animation: pop 0.18s ease;
}
.modal.wide { max-width: 740px; }
.modal h3 { margin: 0 0 4px; font-size: 19px; }
.modal-sub { color: var(--muted); font-size: 13.5px; margin: 0 0 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.confirm-msg { margin: 6px 0 4px; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes pop { from { transform: scale(0.96); opacity: 0; } }

/* form layout inside modals */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 800;
  margin: 20px 0 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 7px;
}
.form-section:first-child { margin-top: 0; }

/* feature checkbox grid (Plan Builder) */
.checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}
.check-item:hover { border-color: #c7d2fe; }
.check-item:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
input[type="checkbox"] { accent-color: var(--primary); width: 16px; height: 16px; cursor: pointer; flex-shrink: 0; }

/* toast */
.toast {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 18px;
  border-radius: 13px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.35);
  animation: slideUp 0.25s ease;
}
.toast-success { background: #15803d; }
.toast-error { background: #b91c1c; }
@keyframes slideUp { from { transform: translateY(14px); opacity: 0; } }

/* school detail */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px 22px; }
.info-label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.info-value { font-weight: 600; margin-top: 3px; word-break: break-word; font-size: 14.5px; }

.tabs { display: flex; gap: 4px; border-bottom: 1.5px solid var(--border); margin-top: 24px; overflow-x: auto; }
.tab {
  padding: 11px 18px;
  border: none;
  background: none;
  font-family: var(--font);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1.5px;
  white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-color: var(--primary); }

.muted2 { color: var(--muted); font-size: 12.5px; }
.actions-cell { display: flex; gap: 6px; flex-wrap: wrap; }
.table .table-empty { text-align: center; color: var(--muted); padding: 34px 18px !important; }

/* two-column card layout (dashboard) */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.card h3.card-title { margin: 0 0 12px; font-size: 16px; }
.mini-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 2px;
  border-bottom: 1px solid #eef2f7;
  font-size: 14px;
}
.mini-row:last-child { border-bottom: none; }
.mini-row .muted2 { font-size: 12px; }

.total-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--success-soft);
  color: #166534;
  border: 1px solid #bbf7d0;
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 14px;
}

@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .modal { padding: 20px 18px 16px; }
}

/* ============================================================
   MILESTONE 3 — Classes & Subjects cards
   ============================================================ */
.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin-top: 22px; }
.class-card { padding: 20px 22px; }
.class-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.class-name { margin: 0; font-size: 17px; font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.subject-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.subject-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--violet-soft);
  color: var(--violet);
  border: 1px solid #ddd6fe;
  border-radius: 999px;
  padding: 4px 11px;
  font-size: 12.5px;
  font-weight: 600;
}
.subject-chip button {
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 11px;
  opacity: 0.7;
}
.subject-chip button:hover { opacity: 1; color: var(--danger); }
.add-subject { display: flex; gap: 8px; margin-top: 14px; }
.add-subject .input { flex: 1; padding: 8px 12px; font-size: 13.5px; }

/* ============================================================
   MILESTONE 4 — Attendance UI
   ============================================================ */
.att-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.summary { display: flex; gap: 8px; flex-wrap: wrap; }
.sum-chip {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
}
.sum-p { background: var(--success-soft); color: #166534; border-color: #bbf7d0; }
.sum-a { background: var(--danger-soft); color: #991b1b; border-color: #fecaca; }
.sum-l { background: var(--warning-soft); color: #92400e; border-color: #fde68a; }

.att-list { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.att-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 13px 18px;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}
.att-student { min-width: 0; }

.att-toggle { display: inline-flex; border: 1.5px solid var(--border); border-radius: 10px; overflow: hidden; flex-shrink: 0; }
.att-toggle button {
  width: 46px;
  padding: 9px 0;
  border: none;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.att-toggle button + button { border-left: 1.5px solid var(--border); }
.att-toggle button:hover { background: #f1f5f9; }
.att-toggle .active-p { background: var(--success); color: #fff; }
.att-toggle .active-a { background: var(--danger); color: #fff; }
.att-toggle .active-l { background: var(--warning); color: #fff; }
.att-toggle .active-p:hover, .att-toggle .active-a:hover, .att-toggle .active-l:hover { filter: brightness(1.05); }

/* progress bar */
.pbar {
  width: 110px;
  height: 9px;
  background: #eef2f7;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}
.pbar-fill { height: 100%; border-radius: 999px; }
.pbar-fill.good { background: linear-gradient(90deg, #22c55e, #16a34a); }
.pbar-fill.ok { background: linear-gradient(90deg, #f59e0b, #d97706); }
.pbar-fill.bad { background: linear-gradient(90deg, #f87171, #dc2626); }

@media (max-width: 600px) {
  .att-row { justify-content: center; text-align: center; }
}
