/* =====================================================
   EduManage – School Management App – styles.css
   ===================================================== */

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #818cf8;
  --secondary: #64748b;
  --accent: #f59e0b;
  --accent2: #10b981;
  --danger: #ef4444;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --topbar-h: 70px;
  --bottomnav-h: 64px;
  --sidebar-w: 270px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 12px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px rgba(79, 70, 229, 0.12);
  --glass: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(255, 255, 255, 0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  outline: none;
  padding: 0;
  cursor: pointer;
  appearance: none;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
}

@keyframes animate-pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.6;
    transform: scale(1.05);
  }
}

.animate-pulse {
  animation: animate-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ---- SCREENS ---- */
.screen {
  display: none;
  min-height: 100dvh;
}

.screen.active {
  display: flex;
  flex-direction: column;
}

/* ===================== LOGIN ===================== */
.login-bg {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0f172a 0%, var(--primary) 50%, var(--primary-hover) 100%);
  z-index: 0;
}

.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
}

.orb1 {
  width: 300px;
  height: 300px;
  background: #3b82f6;
  top: -80px;
  right: -60px;
}

.orb2 {
  width: 220px;
  height: 220px;
  background: #f59e0b;
  bottom: 40px;
  left: -60px;
}

.orb3 {
  width: 180px;
  height: 180px;
  background: #10b981;
  top: 40%;
  left: 50%;
}

.login-container {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px 30px;
  min-height: 100dvh;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
  color: white;
}

.logo-icon {
  font-size: 56px;
  margin-bottom: 8px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.login-logo h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.login-logo p {
  font-size: 0.85rem;
  opacity: 0.75;
  margin-top: 4px;
}

.role-selector {
  width: 100%;
  max-width: 360px;
  margin-bottom: 20px;
}

.role-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  text-align: center;
}

.role-tabs {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 6px;
}

.role-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 4px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  font-family: 'Inter', sans-serif;
}

.role-tab.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.role-icon {
  font-size: 1.3rem;
}

.login-form {
  width: 100%;
  max-width: 360px;
}

.input-group {
  margin-bottom: 16px;
}

.input-group label {
  display: block;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 7px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  font-size: 1rem;
}

.input-wrap input {
  width: 100%;
  padding: 14px 44px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  backdrop-filter: blur(8px);
  outline: none;
  transition: border-color 0.2s;
}

.input-wrap input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.input-wrap input:focus {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.15);
}

.toggle-pw {
  position: absolute;
  right: 14px;
  cursor: pointer;
  font-size: 1rem;
}

.login-error {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.82rem;
  margin-bottom: 12px;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.hidden {
  display: none !important;
}

.btn-login {
  width: 100%;
  padding: 15px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--accent), #f97316);
  color: white;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.5px;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-login:active {
  transform: scale(0.98);
  box-shadow: 0 3px 12px rgba(245, 158, 11, 0.3);
}

.demo-hint {
  margin-top: 24px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 12px 16px;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
  max-width: 360px;
  line-height: 1.7;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===================== APP SHELL ===================== */
#appShell {
  background: var(--bg);
}

/* ---- TOPBAR ---- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  background: white;
  padding: 0 20px;
  gap: 12px;
  box-shadow: var(--shadow);
  border-bottom: 1px solid var(--border);
}

.menu-btn,
.logout-btn {
  background: #f1f5f9;
  border: none;
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.menu-btn svg,
.logout-btn svg {
  width: 22px;
  height: 22px;
  stroke: var(--text);
}

.menu-btn:hover,
.logout-btn:hover {
  background: var(--primary);
}

.menu-btn:hover svg,
.logout-btn:hover svg {
  stroke: white;
}

.menu-btn:active,
.logout-btn:active {
  transform: scale(0.95);
}

.topbar-title {
  flex: 1;
  color: var(--text);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.user-badge {
  background: rgba(79, 70, 229, 0.08);
  color: var(--primary);
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}

/* ---- SIDEBAR ---- */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 199;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
}

.sidebar-overlay.open {
  opacity: 1;
  visibility: visible;
}

.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: -280px;
  z-index: 200;
  width: var(--sidebar-w);
  background: white;
  box-shadow: var(--shadow-md);
  transition: left 0.3s cubic-bezier(.4, 0, .2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar.open {
  left: 0;
}

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

.sidebar-logo {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.sidebar-close {
  background: #f1f5f9;
  border: none;
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-close svg {
  width: 18px;
  height: 18px;
  stroke: var(--text);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.sidebar-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}

.sidebar-role {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  color: var(--secondary);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  border-radius: 12px;
  margin: 2px 12px;
  width: calc(100% - 24px);
}

.nav-item:hover {
  background: #f1f5f9;
  color: var(--primary);
}

.nav-item.active {
  background: rgba(79, 70, 229, 0.08);
  color: var(--primary);
  font-weight: 700;
}

.nav-item:focus {
  outline: none;
}

.nav-icon {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
}

/* ---- MAIN CONTENT ---- */
.main-content {
  padding: 16px;
  padding-top: 80px;
  padding-bottom: 90px;
  box-sizing: border-box;
  max-width: 100vw;
  overflow-x: hidden;
}

/* ---- PAGES ---- */
.page {
  display: none;
  min-height: calc(100dvh - var(--topbar-h) - var(--bottomnav-h));
  padding: 0 16px;
  margin-top: 10px;
}

.page.active {
  display: block;
}

.page h2 {
  margin-bottom: 12px;
}

/* BUTTON ALIGN FIX */
.page .btn {
  margin-top: 10px;
}

/* ---- BOTTOM NAV ---- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--bottomnav-h);
  background: white;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0 4px;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 500;
  transition: color 0.2s;
  font-family: 'Inter', sans-serif;
}

.bottom-nav-item .nav-icon {
  font-size: 1.4rem;
  transition: transform 0.2s;
}

.bottom-nav-item.active {
  color: var(--primary-light);
}

.bottom-nav-item.active .nav-icon {
  transform: scale(1.15);
}

.bottom-nav-item:focus {
  outline: none;
}

/* ---- CARDS ---- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-title {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 4px;
}

.card-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
}

.card-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---- STAT GRID ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border);
}

.stat-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.stat-card:active {
  transform: scale(0.97);
}

.stat-card .s-icon {
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.stat-card .s-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
}

.stat-card .s-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---- ANALYTICS CARDS ---- */
.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.analytics-card {
  background: white;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
  border: 1px solid #f1f5f9;
  transition: transform 0.2s, box-shadow 0.2s;
}

.analytics-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

@media (max-width: 600px) {
  .analytics-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- SCHOOL PROFILE ICON ---- */
.school-profile-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.3);
  margin-right: 5px;
  transition: transform 0.2s;
}

.school-profile-icon:hover {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.3);
}

.school-profile-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.school-profile-icon span {
  color: white;
  font-weight: 800;
  font-size: 1rem;
}

/* ---- UPDATED PROFILE PAGE ---- */
.profile-container {
  max-width: 650px;
  margin: 0 auto;
  padding-bottom: 40px;
  overflow-x: hidden;
  width: 100%;
  box-sizing: border-box;
}

.profile-card {
  background: white;
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow-lg);
  border: 1px solid #f1f5f9;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-header {
  text-align: center;
  margin-bottom: 30px;
}

.profile-logo-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 16px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s;
}

.profile-logo-wrapper:hover {
  transform: scale(1.04);
}

.profile-logo-big {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: white;
  border: 4px solid #f8fafc;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.att-analytics-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 15px;
  transition: all 0.2s ease;
  cursor: pointer;
}

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

.att-analytics-card:active {
  transform: translateY(0);
}

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

.detail-title h3 {
  margin: 0;
  color: var(--text);
}

.detail-title p {
  margin: 4px 0 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.att-detail-list {
  background: white;
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.att-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.att-detail-row:last-child {
  border-bottom: none;
}

.att-student-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.att-student-name {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

.att-student-roll {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.status-label {
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-present {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.status-absent {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.status-leave {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-light);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 15px;
  cursor: pointer;
  text-decoration: none;
}

.back-link:hover {
  opacity: 0.8;
}

.edit-overlay {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid white;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
}

.profile-section {
  margin-bottom: 24px;
}

.profile-section-title {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #f1f5f9;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.profile-field {
  background: #f8fafc;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #f1f5f9;
}

.profile-field.full {
  grid-column: span 2;
}

.profile-field.readonly {
  background: #f1f5f9;
  opacity: 0.8;
}

.profile-field label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.profile-field div {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
  overflow-wrap: break-word;
}

.profile-field input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
  overflow-wrap: break-word;
}

.profile-field input:focus {
  outline: none;
}

.stat-pill {
  background: #eff6ff;
  color: #1e40af;
  padding: 4px 10px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
}

.stat-card.blue {
  border-left: 4px solid #3b82f6;
}

.stat-card.green {
  border-left: 4px solid #10b981;
}

.stat-card.amber {
  border-left: 4px solid #f59e0b;
}

.stat-card.purple {
  border-left: 4px solid #8b5cf6;
}

.stat-card.red {
  border-left: 4px solid #ef4444;
}

.stat-card.teal {
  border-left: 4px solid #14b8a6;
}

/* ---- STUDENT GRID (RESPONSIVE) ---- */
.student-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .student-grid {
    grid-template-columns: 1fr;
  }
}

/* ---- SECTION HEADER ---- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

/* ---- BUTTONS ---- */
.btn {
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  outline: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary-light);
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 168, 0.3);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-success {
  background: var(--accent2);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-warning {
  background: var(--accent);
  color: white;
}

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

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

.btn-circle {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  justify-content: center;
  font-size: 1.2rem;
}

.btn-fab {
  position: fixed;
  bottom: calc(var(--bottomnav-h) + 16px);
  right: 16px;
  z-index: 90;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--primary-light), #1d4ed8);
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(37, 99, 168, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-fab:active {
  transform: scale(0.92);
  box-shadow: 0 3px 12px rgba(37, 99, 168, 0.3);
}

/* ---- QUICK ACTIONS ---- */
.quick-actions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.action-half {
  flex: 1 1 calc(50% - 6px);
}

.action-full {
  flex: 1 1 100%;
}

/* ---- LIST ITEMS ---- */
.list-item {
  background: white;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
}

.item-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: white;
}

.item-info {
  flex: 1;
  min-width: 0;
}

.item-name {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.item-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ---- BADGE ---- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.badge-present {
  background: #dcfce7;
  color: #16a34a;
}

.badge-absent {
  background: #fee2e2;
  color: #dc2626;
}

.badge-late {
  background: #fef9c3;
  color: #ca8a04;
}

.badge-paid {
  background: #dcfce7;
  color: #16a34a;
}

.badge-unpaid {
  background: #fee2e2;
  color: #dc2626;
}

.badge-partial {
  background: #fef3c7;
  color: #d97706;
}

.badge-blue {
  background: #dbeafe;
  color: #1d4ed8;
}

/* ---- FORM ELEMENTS ---- */
.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: #f8fafc;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary-light);
  background: white;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* ---- TABLE ---- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  min-width: 400px;
}

th {
  background: var(--primary);
  color: white;
  padding: 11px 12px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

td {
  padding: 11px 12px;
  font-size: 0.83rem;
  border-bottom: 1px solid var(--border);
}

tr:last-child td {
  border-bottom: none;
}

tr:nth-child(even) td {
  background: #f8fafc;
}

/* ---- ATTENDANCE GRID ---- */
.att-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 6px;
  margin-bottom: 14px;
}

.att-card {
  background: white;
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
  box-shadow: var(--shadow);
  font-size: 0.72rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
}

.att-card .att-name {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.att-card.present {
  border-color: #10b981;
  background: #f0fdf4;
}

.att-card.absent {
  border-color: #ef4444;
  background: #fef2f2;
}

.att-card.late {
  border-color: #f59e0b;
  background: #fffbeb;
}

.att-status-btns {
  display: flex;
  gap: 3px;
  justify-content: center;
  margin-top: 4px;
}

.att-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 0.7rem;
  transition: transform 0.15s;
}

.att-btn:active {
  transform: scale(0.9);
}

.att-btn.p {
  background: #dcfce7;
}

.att-btn.p.sel {
  background: #16a34a;
  color: white;
}

.att-btn.a {
  background: #fee2e2;
}

.att-btn.a.sel {
  background: #dc2626;
  color: white;
}

.att-btn.l {
  background: #fef9c3;
}

.att-btn.l.sel {
  background: #ca8a04;
  color: white;
}

/* ---- NOTICE CARD ---- */
.notice-card {
  background: white;
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary-light);
}

.notice-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 5px;
}

.notice-body {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.notice-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ---- HOMEWORK CARD ---- */
.hw-card {
  background: white;
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  border-left: 4px solid #8b5cf6;
}

.hw-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

/* ===================== LANDING PAGE ===================== */
.landing-screen {
  background: white;
  color: var(--text);
  overflow-x: hidden;
  position: relative;
  z-index: 10;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--topbar-h);
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-link {
  font-weight: 600;
  color: var(--secondary);
  font-size: 0.95rem;
  transition: color 0.2s;
  text-decoration: none;
}

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

/* Hero Section */
.hero {
  padding: 80px 24px;
  text-align: center;
  background: radial-gradient(circle at top right, rgba(79, 70, 229, 0.05), transparent),
              radial-gradient(circle at bottom left, rgba(245, 158, 11, 0.05), transparent);
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 24px;
  color: #0f172a;
}

.hero h1 span {
  background: linear-gradient(135deg, var(--primary), #818cf8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: clamp(1.1rem, 3vw, 1.25rem);
  color: var(--secondary);
  margin-bottom: 40px;
  line-height: 1.6;
}

.cta-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-hero {
  padding: 16px 32px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
}

.btn-hero.primary {
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow-lg);
}

.btn-hero.primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 25px 50px -12px rgba(79, 70, 229, 0.25);
}

.btn-hero.outline {
  background: white;
  border: 2px solid var(--border);
  color: var(--text);
}

.btn-hero.outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(79, 70, 229, 0.02);
}

/* Features Section */
.section-padding {
  padding: 80px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header-saas {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 2px;
  display: block;
  margin-bottom: 12px;
}

.features-grid-saas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.feature-card-saas {
  padding: 40px;
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all 0.3s;
}

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

.feature-icon {
  width: 56px;
  height: 56px;
  background: rgba(79, 70, 229, 0.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 24px;
}

.feature-card-saas h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.feature-card-saas p {
  color: var(--secondary);
  line-height: 1.6;
}

/* Benefits (Alternating) */
.benefit-row {
  display: flex;
  align-items: center;
  gap: 60px;
  margin-bottom: 100px;
}

.benefit-row:nth-child(even) {
  flex-direction: row-reverse;
}

.benefit-content {
  flex: 1;
}

.benefit-image {
  flex: 1.2;
  background: var(--bg);
  border-radius: 24px;
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  box-shadow: var(--shadow-md);
}

/* Social Proof */
.testimonials {
  background: #0f172a;
  color: white;
  padding: 100px 24px;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 40px auto 0;
}

.testimonial-card {
  padding: 32px;
  background: rgba(255,255,255,0.05);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .benefit-row { flex-direction: column !important; gap: 32px; }
  .hero h1 { font-size: 3rem; }
}

.hw-title {
  font-weight: 700;
  font-size: 0.9rem;
}

.hw-body {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.5;
}

.hw-footer {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* ---- FEE CARD ---- */
.fee-card {
  background: white;
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.fee-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.fee-name {
  font-weight: 700;
  font-size: 0.9rem;
}

.fee-progress {
  height: 6px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}

.fee-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s;
}

.fee-bar.paid {
  background: #10b981;
}

.fee-bar.partial {
  background: #f59e0b;
}

.fee-bar.unpaid {
  background: #ef4444;
}

/* ---- FILTER ROW ---- */
.filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter-chip {
  padding: 7px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: white;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  color: var(--text-muted);
  transition: all 0.2s;
}

.filter-chip.active {
  background: var(--primary-light);
  color: white;
  border-color: var(--primary-light);
}

/* ---- SEARCH ---- */
.search-bar {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 12px;
  padding: 0 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  gap: 8px;
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  padding: 13px 0;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  background: transparent;
}

/* ---- WELCOME BANNER ---- */
.welcome-banner {
  background: white;
  border: 1px solid #f1f5f9;
  border-radius: 20px;
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.welcome-text h2 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  line-height: 1.2;
}

.welcome-text .sub-info {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.welcome-text .sub-item {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.welcome-emoji {
  font-size: 2.5rem;
  background: #f8fafc;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
}

/* ---- EMPTY STATE ---- */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 0.85rem;
}

/* ---- MODAL ---- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-box {
  position: relative;
  background: white;
  width: 100%;
  max-width: 400px;
  border-radius: 20px;
  padding: 0;
  overflow: hidden;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  animation: modalScale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  color: white;
}

.modal-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.modal-header button {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
}

.modal-body {
  overflow-y: auto;
  padding: 18px;
  flex: 1;
}

/* ---- FORM MODAL ---- */
.form-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 400;
  display: flex;
  justify-content: center;
  align-items: center;
}

.form-modal-content {
  background: white;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 350px;
  box-shadow: var(--shadow-md);
  animation: slideUp 0.3s cubic-bezier(.4, 0, .2, 1);
}

.form-modal-content h3 {
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.form-modal-content input,
.form-modal-content select,
.form-modal-content textarea {
  width: 100%;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: #f8fafc;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  outline: none;
}

.select-field {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: white;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  outline: none;
  cursor: pointer;
}

.form-modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.form-modal-actions button {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

.form-modal-actions .save-btn {
  background: var(--primary-light);
  color: white;
}

.form-modal-actions .cancel-btn {
  background: #e2e8f0;
  color: var(--text);
}

/* ---- CONFIRM MODAL ---- */
.confirm-modal {
  z-index: 500;
}

.confirm-modal .form-modal-content {
  max-width: 320px;
  text-align: center;
}

.confirm-modal h3 {
  font-size: 1.05rem;
  margin-bottom: 20px;
  font-weight: 700;
  color: var(--text);
}

.confirm-modal .btn-danger {
  background: var(--danger);
  color: white;
  border: none;
}

/* ---- TOAST ---- */
.toast {
  position: fixed;
  bottom: calc(var(--bottomnav-h) + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  background: #1e293b;
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  max-width: 320px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.toast.visible {
  display: block !important;
}

/* ---- PROFILE CARD ---- */
.profile-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius);
  padding: 24px 18px;
  text-align: center;
  color: white;
  margin-bottom: 16px;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 12px;
  border: 3px solid rgba(255, 255, 255, 0.4);
}

.profile-name {
  font-size: 1.2rem;
  font-weight: 800;
}

.profile-sub {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-top: 4px;
}

.profile-chips {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.profile-chip {
  background: rgba(255, 255, 255, 0.2);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.info-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

/* ---- UTIL ---- */
.mt8 {
  margin-top: 8px;
}

/* ---- DELETE ---- */
.btn.danger {
  background: #ff4d4f;
  color: white;
}

.mt12 {
  margin-top: 12px;
}

.mt16 {
  margin-top: 16px;
}

.mb0 {
  margin-bottom: 0 !important;
}

.flex {
  display: flex;
}

.gap8 {
  gap: 8px;
}

.flex-1 {
  flex: 1;
}

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

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

.text-sm {
  font-size: 0.8rem;
}

.fw7 {
  font-weight: 700;
}

/* Scrollbar (desktop preview) */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

/* Safe area for notch phones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav {
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
  }
}

@media (max-width: 600px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-card {
    padding: 16px;
    border-radius: 16px;
  }
}

@media (max-width: 480px) {
  .quick-actions-grid .btn {
    flex: 1 1 100%;
  }
}

/* ---- ATTENDANCE TOGGLE ---- */
.att-toggle {
  display: flex;
  gap: 6px;
  padding: 4px 0;
}

.att-option {
  flex: 1;
  position: relative;
}

.att-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.att-label {
  display: block;
  text-align: center;
  padding: 6px 4px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  color: #64748b;
  text-transform: uppercase;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
}

.att-option input:checked+.att-label.p {
  background: #dcfce7;
  color: #16a34a;
  border-color: #16a34a;
}

.att-option input:checked+.att-label.a {
  background: #fee2e2;
  color: #dc2626;
  border-color: #dc2626;
}

.att-option input:checked+.att-label.l {
  background: #fef3c7;
  color: #ca8a04;
  border-color: #ca8a04;
}

.whatsapp-btn {
  background: #25D366;
  color: white;
  margin-top: 10px;
  width: 100%;
}

.whatsapp-btn:hover {
  background: #128C7E;
}

/* ---- DATE NAVIGATION ---- */
.date-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.date-nav .btn-sm {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  font-size: 0.7rem;
}

/* ---- ATTENDANCE SUMMARY CARDS ---- */
.history-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.history-card {
  text-align: center;
  padding: 12px 8px;
  border-radius: 12px;
  background: white;
  border: 1px solid #f1f5f9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.history-card .h-val {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.history-card .h-lbl {
  font-size: 0.65rem;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
}

.history-card.p .h-val {
  color: #16a34a;
}

.history-card.a .h-val {
  color: #dc2626;
}

.history-card.l .h-val {
  color: #ca8a04;
}

/* ---- NOTICES ---- */
.notice-priority {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: inline-block;
}

.prio-normal {
  background: #f1f5f9;
  color: #64748b;
}

.prio-important {
  background: #ffedd5;
  color: #ea580c;
}

.prio-urgent {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid rgba(220, 38, 38, 0.2);
}

/* ---- ADMIN DASHBOARD ANALYTICS ---- */
.att-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 10px;
}

@media (max-width: 768px) {
  .att-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.att-analytics-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  gap: 15px;
  transition: transform 0.2s ease;
}

.att-analytics-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.att-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.att-card-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #1a3a5c;
  font-weight: 800;
}

.att-card-header .date {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
}

.att-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.att-metric-item {
  background: #f8fafc;
  padding: 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.att-metric-icon {
  font-size: 1.2rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.att-metric-details {
  display: flex;
  flex-direction: column;
}

.att-metric-label {
  font-size: 0.65rem;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
}

.att-metric-value {
  font-size: 1rem;
  font-weight: 800;
  color: #1e293b;
}

/* Metric Colors */
.metric-total .att-metric-icon {
  background: #e0f2fe;
  color: #0284c7;
}

.metric-present .att-metric-icon {
  background: #dcfce7;
  color: #16a34a;
}

.metric-absent .att-metric-icon {
  background: #fee2e2;
  color: #dc2626;
}

.metric-leave .att-metric-icon {
  background: #fef3c7;
  color: #ca8a04;
}

.att-progress-section {
  margin-top: 5px;
}

.att-progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}

.att-progress-bar {
  height: 10px;
  background: #f1f5f9;
  border-radius: 5px;
  overflow: hidden;
}

.att-progress-fill {
  height: 100%;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =====================================================
   7. PARENT DASHBOARD V2 COMPONENTS
   ===================================================== */

/* HERO BANNER V2 */
.parent-hero {
  position: relative;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  padding: 30px 24px;
  border-radius: 20px;
  color: white;
  margin-bottom: 28px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.3);
}

.parent-hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: rotate-slow 20s linear infinite;
  pointer-events: none;
}

@keyframes rotate-slow {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.hero-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.hero-avatar {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  background: var(--p-glass);
  backdrop-filter: blur(10px);
  border: 1.5px solid var(--p-glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.hero-info h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.5px;
}

.hero-info p {
  font-size: 0.9rem;
  opacity: 0.9;
  margin: 4px 0 0;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.present {
  background: var(--p-success);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.status-badge.absent {
  background: var(--p-danger);
  color: white;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* STAT CARDS V2 */
.p-stat-card {
  background: white;
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.p-stat-card:active {
  transform: scale(0.97);
}

.p-stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.p-stat-icon {
  font-size: 1.8rem;
}

.p-stat-trend {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
}

.p-stat-trend.up {
  background: #dcfce7;
  color: #166534;
}

.p-stat-value {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.p-stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
}

.p-progress-container {
  height: 8px;
  background: #f1f5f9;
  border-radius: 4px;
  margin-top: 15px;
  overflow: hidden;
}

.p-progress-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ACTIVITY TIMELINE */
.activity-timeline {
  position: relative;
  padding-left: 20px;
}

.activity-timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e2e8f0;
}

.activity-item {
  position: relative;
  padding-bottom: 24px;
}

.activity-item::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--p-info);
  z-index: 1;
}

.activity-item.homework::before {
  border-color: var(--p-warning);
}

.activity-item.notice::before {
  border-color: var(--p-info);
}

.activity-item.attendance::before {
  border-color: var(--p-success);
}

.activity-content {
  background: white;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.activity-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: block;
}

.activity-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
}

.activity-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* SKELETON LOADER */
.skeleton {
  background: linear-gradient(90deg, #f0f4f8 25%, #e2e8f0 50%, #f0f4f8 75%);
  background-size: 200% 100%;
  animation: skeleton-pulse 1.5s infinite;
  border-radius: 8px;
}

@keyframes skeleton-pulse {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.performance-overview {
  background: white;
  border-radius: 18px;
  padding: 24px;
  margin-top: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 100px;
  margin-top: 20px;
}

.trend-bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.trend-bar {
  width: 100%;
  border-radius: 4px 4px 0 0;
  background: var(--p-info);
  transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.trend-day {
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* CHILD SWITCHER */
.child-switcher {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 4px 16px;
  margin-bottom: 20px;
  scrollbar-width: none;
}

.child-switcher::-webkit-scrollbar {
  display: none;
}

.child-card {
  flex: 0 0 140px;
  background: white;
  padding: 12px;
  border-radius: 16px;
  border: 2px solid transparent;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.child-card.active {
  border-color: var(--primary);
  background: linear-gradient(to bottom, #ffffff, #f0f7ff);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.1);
}

.child-card .c-avatar {
  width: 40px;
  height: 40px;
  background: #f1f5f9;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.child-card.active .c-avatar {
  background: var(--primary);
  color: white;
}

.child-card .c-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.child-card .c-class {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

* {
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

input,
textarea {
  user-select: text !important;
  -webkit-user-select: text !important;
}

/* Dashboard Mini-Badges */
.badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-green { background: #f0fdf4; color: #16a34a; }
.badge-red { background: #fef2f2; color: #ef4444; }
.badge-amber { background: #fff7ed; color: #d97706; }
.badge-blue { background: #eff6ff; color: #3b82f6; }

.clickable-row {
  cursor: pointer;
  padding: 8px;
  border-radius: 12px;
  transition: background 0.2s;
}

.clickable-row:hover {
  background: #f8fafc;
}

/* Help Page Styles */
.help-container {
  padding: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.help-search-wrap {
  position: sticky;
  top: 0;
  background: rgba(240, 244, 248, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 16px;
  z-index: 100;
  margin-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
}

.help-search {
  width: 100%;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  font-size: 0.95rem;
  outline: none;
  background: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.help-search:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.help-card {
  background: white;
  border-radius: 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid #f1f5f9;
}

.help-header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: white;
  user-select: none;
}

.help-header:hover {
  background: #f8fafc;
}

.help-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.help-icon {
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  background: #f1f5f9;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-title {
  font-weight: 700;
  color: #0f172a;
  font-size: 1.05rem;
}

.help-chevron {
  transition: transform 0.3s;
  font-size: 0.8rem;
  color: #94a3b8;
}

.help-card.active .help-chevron {
  transform: rotate(180deg);
}

.help-card.active .help-header {
  border-bottom: 1px solid #f1f5f9;
}

.help-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: #fcfdfe;
}

.help-card.active .help-content {
  max-height: 2000px;
}

.help-body {
  padding: 20px;
}

.help-step {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
}

.help-step:last-child {
  margin-bottom: 0;
}

.help-step-icon {
  color: #6366f1;
  font-size: 0.9rem;
  margin-top: 3px;
  background: #eef2ff;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.help-step-text {
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.6;
}

.help-highlight {
  background: #eef2ff;
  color: #4f46e5;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
}

.help-tip {
  margin-top: 20px;
  padding: 14px 18px;
  background: #fffbeb;
  border-left: 5px solid #f59e0b;
  border-radius: 8px;
  font-size: 0.9rem;
  color: #92400e;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

/* ===================== FAQ ACCORDION ===================== */
.faq-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.faq-item[open] {
  border-color: rgba(79, 70, 229, 0.3);
  box-shadow: 0 4px 20px rgba(79, 70, 229, 0.08);
}

.faq-question {
  padding: 20px 24px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  user-select: none;
  transition: color 0.2s;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform 0.25s;
}

details[open] .faq-question::after {
  transform: rotate(45deg);
}

.faq-item[open] .faq-question {
  color: var(--primary);
}

.faq-answer {
  padding: 0 24px 20px;
  border-top: 1px solid var(--border);
}

.faq-answer p {
  margin: 16px 0 0;
  color: var(--secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .faq-question {
    font-size: 0.95rem;
    padding: 16px 18px;
  }
  .faq-answer {
    padding: 0 18px 16px;
  }
}