/* ═══════════════════════════════════════════
   Campus Assistant v2.0 — Main Stylesheet
   ═══════════════════════════════════════════ */

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; }
body { font-family: 'Inter', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
html { scroll-behavior: smooth; }

/* ─── Hero ─── */
.hero-gradient {
  background: linear-gradient(135deg, #4338ca 0%, #4f46e5 30%, #7c3aed 60%, #6d28d9 100%);
  position: relative;
  min-height: 520px;
}
.hero-particles::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.08) 0%, transparent 50%),
                    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.06) 0%, transparent 50%),
                    radial-gradient(circle at 50% 50%, rgba(165,180,252,0.1) 0%, transparent 70%);
}
.wave-divider { position: relative; margin-top: -2px; line-height: 0; }
.wave-divider svg { display: block; width: 100%; height: 80px; }

/* ─── Hero Buttons ─── */
.hero-btn-primary {
  background: white; color: #4f46e5;
  padding: 12px 28px; border-radius: 12px;
  font-weight: 700; font-size: 0.9rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.hero-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,0,0,0.2); }
.hero-btn-secondary {
  background: rgba(255,255,255,0.15); color: white;
  border: 2px solid rgba(255,255,255,0.4);
  padding: 12px 28px; border-radius: 12px;
  font-weight: 700; font-size: 0.9rem;
  transition: all 0.2s ease; backdrop-filter: blur(8px);
}
.hero-btn-secondary:hover { background: rgba(255,255,255,0.25); transform: translateY(-2px); }

/* ─── Feature Cards ─── */
.feature-card {
  background: white; border-radius: 20px;
  padding: 28px; border: 1px solid #f0f0f0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative; overflow: hidden;
}
.feature-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s ease;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: 0 16px 48px rgba(0,0,0,0.1); border-color: #e0e7ff; }
.feature-card:hover::before { transform: scaleX(1); }
.feature-icon {
  width: 56px; height: 56px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px; box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* ─── Stats Bar ─── */
.stats-bar {
  background: linear-gradient(135deg, #312e81, #4f46e5, #6d28d9);
}

/* ─── Navbar ─── */
.nav-btn {
  padding: 8px 14px; border-radius: 8px; font-size: 0.82rem; font-weight: 500;
  color: #6b7280; transition: all 0.2s ease; cursor: pointer;
  border: none; background: none;
}
.nav-btn:hover { color: #4f46e5; background: #eef2ff; }
.nav-btn.active { color: #4f46e5; background: #eef2ff; font-weight: 600; }
.mobile-nav-btn {
  padding: 10px 14px; border-radius: 10px; font-size: 0.85rem; font-weight: 500;
  color: #374151; background: #f9fafb; border: 1px solid #f0f0f0;
  transition: all 0.2s ease; text-align: left; cursor: pointer;
}
.mobile-nav-btn:hover { background: #eef2ff; color: #4f46e5; border-color: #c7d2fe; }

/* ─── Sections ─── */
.section-page { min-height: calc(100vh - 64px); }

/* ─── Buttons ─── */
.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white; padding: 10px 20px; border-radius: 10px;
  font-size: 0.85rem; font-weight: 600;
  transition: all 0.2s ease; border: none; cursor: pointer;
  box-shadow: 0 2px 8px rgba(79,70,229,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(79,70,229,0.4); }
.btn-secondary {
  background: white; color: #6b7280; padding: 10px 20px;
  border-radius: 10px; font-size: 0.85rem; font-weight: 600;
  border: 2px solid #e5e7eb; transition: all 0.2s ease; cursor: pointer;
}
.btn-secondary:hover { border-color: #d1d5db; background: #f9fafb; }
.btn-danger {
  background: #fee2e2; color: #dc2626; padding: 10px 20px;
  border-radius: 10px; font-size: 0.85rem; font-weight: 600;
  border: none; transition: all 0.2s ease; cursor: pointer;
}
.btn-danger:hover { background: #fecaca; }

/* ─── Form Inputs ─── */
.form-label { display: block; font-size: 0.8rem; font-weight: 600; color: #374151; margin-bottom: 6px; }
.form-input {
  width: 100%; border: 2px solid #e5e7eb; border-radius: 10px;
  padding: 10px 14px; font-size: 0.875rem; color: #111827;
  transition: all 0.2s ease; outline: none; background: white;
}
.form-input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.1); }
.form-input::placeholder { color: #9ca3af; }

/* ─── Stat Cards ─── */
.stat-card {
  background: white; border-radius: 16px; padding: 20px;
  border: 1px solid #f0f0f0; box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  text-align: center;
}
.stat-card.blue { border-left: 4px solid #3b82f6; }
.stat-card.green { border-left: 4px solid #10b981; }
.stat-card.red { border-left: 4px solid #ef4444; }
.stat-card.purple { border-left: 4px solid #8b5cf6; }
.stat-card.orange { border-left: 4px solid #f59e0b; }
.stat-value { font-size: 1.875rem; font-weight: 900; color: #111827; line-height: 1; }
.stat-label { font-size: 0.75rem; color: #6b7280; font-weight: 500; margin-top: 4px; }

/* ─── Subject Cards ─── */
.subject-card {
  background: white; border-radius: 16px; padding: 20px;
  border: 1px solid #f0f0f0; box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.2s ease;
}
.subject-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.08); }
.subject-card.safe { border-left: 4px solid #10b981; }
.subject-card.danger { border-left: 4px solid #ef4444; background: #fff5f5; }
.subject-card.warning { border-left: 4px solid #f59e0b; background: #fffbf0; }

/* Circular Progress */
.circular-progress { position: relative; width: 72px; height: 72px; flex-shrink: 0; }
.circular-progress svg { transform: rotate(-90deg); }
.circular-progress .track { fill: none; stroke: #f0f0f0; stroke-width: 6; }
.circular-progress .fill { fill: none; stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset 0.6s ease; }
.circular-progress .percentage {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 800; color: #111827;
}

/* ─── Timetable ─── */
.timetable-slot {
  border-radius: 8px; padding: 8px 10px;
  font-size: 0.75rem; font-weight: 600; color: white;
  cursor: pointer; transition: all 0.2s ease;
  position: relative;
}
.timetable-slot:hover { transform: scale(1.02); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.timetable-slot .delete-btn {
  position: absolute; top: 4px; right: 4px;
  opacity: 0; transition: opacity 0.2s;
  background: rgba(0,0,0,0.2); border-radius: 4px;
  padding: 2px 5px; font-size: 0.65rem;
}
.timetable-slot:hover .delete-btn { opacity: 1; }

/* ─── CGPA ─── */
.cgpa-tab {
  padding: 8px 18px; border-radius: 8px; font-size: 0.82rem; font-weight: 600;
  color: #6b7280; transition: all 0.2s ease; cursor: pointer; border: none; background: none;
}
.cgpa-tab.active { background: white; color: #4f46e5; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.cgpa-panel { }

/* ─── Chat ─── */
.chat-bubble {
  max-width: 85%; border-radius: 18px; padding: 14px 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06); line-height: 1.6;
  font-size: 0.875rem;
}
.bot-bubble {
  background: white; border: 1px solid #f0f0f0;
  border-bottom-left-radius: 4px; color: #1f2937;
}
.user-bubble {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: white; border-bottom-right-radius: 4px; margin-left: auto;
}
.chat-messages-area { scroll-behavior: smooth; }
.chat-messages-area::-webkit-scrollbar { width: 4px; }
.chat-messages-area::-webkit-scrollbar-track { background: transparent; }
.chat-messages-area::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 4px; }

.suggestion-chip {
  white-space: nowrap; padding: 6px 14px; border-radius: 20px;
  background: white; border: 1.5px solid #e5e7eb; color: #4f46e5;
  font-size: 0.75rem; font-weight: 600; cursor: pointer;
  transition: all 0.2s ease; flex-shrink: 0;
}
.suggestion-chip:hover { background: #eef2ff; border-color: #6366f1; }
.suggestions-scroll::-webkit-scrollbar { display: none; }

/* Typing indicator */
.typing-indicator { display: flex; align-items: center; gap: 5px; padding: 14px 18px; }
.typing-dot {
  width: 8px; height: 8px; background: #9ca3af; border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-6px); opacity: 1; } }

/* ─── Events ─── */
.event-card {
  background: white; border-radius: 20px; overflow: hidden;
  border: 1px solid #f0f0f0; box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  transition: all 0.3s ease;
}
.event-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.1); }
.event-card-header {
  padding: 20px; background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white;
}
.event-date-badge {
  background: rgba(255,255,255,0.2); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 10px; padding: 8px 12px; text-align: center;
  display: inline-block;
}

/* ─── Notices ─── */
.notice-card {
  background: white; border-radius: 16px; padding: 20px;
  border: 1px solid #f0f0f0; box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.2s ease; border-left: 4px solid #e5e7eb;
}
.notice-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.08); transform: translateX(2px); }
.notice-card.cat-urgent { border-left-color: #ef4444; background: #fff5f5; }
.notice-card.cat-academic { border-left-color: #3b82f6; }
.notice-card.cat-events { border-left-color: #f59e0b; }
.notice-card.cat-placements { border-left-color: #10b981; }
.notice-card.cat-general { border-left-color: #8b5cf6; }

.category-badge {
  display: inline-flex; align-items: center; padding: 4px 10px;
  border-radius: 20px; font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-urgent { background: #fee2e2; color: #dc2626; }
.badge-academic { background: #dbeafe; color: #1d4ed8; }
.badge-events { background: #fef3c7; color: #d97706; }
.badge-placements { background: #d1fae5; color: #065f46; }
.badge-general { background: #ede9fe; color: #6d28d9; }
.badge-default { background: #f3f4f6; color: #374151; }

/* ─── Filter Chips ─── */
.filter-chip {
  padding: 7px 16px; border-radius: 20px; font-size: 0.8rem; font-weight: 600;
  background: white; border: 1.5px solid #e5e7eb; color: #6b7280;
  cursor: pointer; transition: all 0.2s ease;
}
.filter-chip:hover { border-color: #6366f1; color: #4f46e5; background: #eef2ff; }
.filter-chip.active { background: #4f46e5; border-color: #4f46e5; color: white; }

/* ─── Modals ─── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 100; display: flex; align-items: center; justify-content: center;
  padding: 16px; backdrop-filter: blur(4px);
}
.modal-box {
  background: white; border-radius: 20px; width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.2);
  animation: modalIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px 0; margin-bottom: 20px;
}
.modal-close {
  width: 32px; height: 32px; border-radius: 8px; background: #f3f4f6;
  color: #6b7280; border: none; cursor: pointer; font-size: 0.85rem;
  transition: all 0.2s ease; display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: #e5e7eb; color: #111827; }
.modal-body { padding: 0 24px; }
.modal-footer {
  padding: 20px 24px; display: flex; justify-content: flex-end; gap: 10px;
  border-top: 1px solid #f0f0f0; margin-top: 20px;
}

/* ─── Toast Notifications ─── */
.toast {
  padding: 12px 16px; border-radius: 12px; font-size: 0.82rem;
  font-weight: 600; color: white; display: flex; align-items: center;
  gap: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  min-width: 260px; max-width: 320px;
  animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes toastIn { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast.success { background: linear-gradient(135deg, #059669, #10b981); }
.toast.error { background: linear-gradient(135deg, #dc2626, #ef4444); }
.toast.info { background: linear-gradient(135deg, #4f46e5, #6366f1); }
.toast.warning { background: linear-gradient(135deg, #d97706, #f59e0b); color: white; }

/* ─── Spinner ─── */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid #e5e7eb;
  border-top-color: #4f46e5;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Color Picker ─── */
.color-dot {
  width: 28px; height: 28px; border-radius: 50%; border: 3px solid transparent;
  cursor: pointer; transition: all 0.2s ease;
}
.color-dot:hover { transform: scale(1.15); }
.color-dot.selected { border-color: white; box-shadow: 0 0 0 3px rgba(0,0,0,0.2); transform: scale(1.1); }

/* ─── Admin Login Background ─── */
.admin-login-bg {
  background: linear-gradient(135deg, #312e81 0%, #4f46e5 40%, #7c3aed 70%, #6d28d9 100%);
}

/* ─── Glass Card ─── */
.glass-card {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.5);
}

/* ─── Admin Panel ─── */
.admin-stat {
  background: white; border-radius: 16px; padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06); border: 1px solid #f0f0f0;
  text-align: center;
}
.admin-card {
  background: white; border-radius: 16px; padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06); border: 1px solid #f0f0f0;
}
.admin-table { overflow-x: auto; }
.admin-table table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.admin-table th { background: #f9fafb; padding: 10px 12px; text-align: left; font-weight: 700; color: #374151; border-bottom: 1px solid #e5e7eb; }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; color: #4b5563; }
.admin-table tr:hover td { background: #f9fafb; }

/* ─── Floating Action Button ─── */
.floating-action-btn {
  position: fixed; bottom: 24px; right: 24px; z-index: 40;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white; border: none; cursor: pointer;
  box-shadow: 0 8px 24px rgba(79,70,229,0.4);
  transition: all 0.3s ease;
  display: flex; align-items: center; justify-content: center;
}
.floating-action-btn:hover { transform: scale(1.1); box-shadow: 0 12px 32px rgba(79,70,229,0.5); }

/* ─── Registration Form ─── */
.registration-form {
  background: #f8faff; border-radius: 16px; border: 1px solid #e0e7ff;
  overflow: hidden; max-height: 0; transition: max-height 0.4s ease;
}
.registration-form.open { max-height: 1000px; }

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .hero-gradient { min-height: 400px; }
  .chat-bubble { max-width: 92%; }
  .modal-box { margin: 8px; }
  .admin-table { font-size: 0.75rem; }
}

/* ─── Animations ─── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.animate-fadeIn { animation: fadeIn 0.4s ease; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4,0,0.6,1) infinite; }

/* ─── Attendance Quick Buttons ─── */
.att-btn {
  padding: 6px 14px; border-radius: 8px; font-size: 0.75rem; font-weight: 700;
  border: none; cursor: pointer; transition: all 0.15s ease;
}
.att-btn.present { background: #d1fae5; color: #065f46; }
.att-btn.present:hover { background: #10b981; color: white; }
.att-btn.absent { background: #fee2e2; color: #991b1b; }
.att-btn.absent:hover { background: #ef4444; color: white; }
.att-btn.edit { background: #e0e7ff; color: #3730a3; }
.att-btn.edit:hover { background: #4f46e5; color: white; }
.att-btn.delete { background: #f3f4f6; color: #6b7280; }
.att-btn.delete:hover { background: #ef4444; color: white; }

/* ─── CGPA Subject Row ─── */
.cgpa-row {
  display: flex; gap: 10px; align-items: center;
  background: #f9fafb; border-radius: 10px; padding: 12px;
  border: 1px solid #f0f0f0;
}
.cgpa-row input, .cgpa-row select {
  border: 1.5px solid #e5e7eb; border-radius: 8px; padding: 8px 10px;
  font-size: 0.82rem; outline: none; background: white;
}
.cgpa-row input:focus, .cgpa-row select:focus { border-color: #6366f1; }

/* ─── Progress Bar ─── */
.progress-bar-bg {
  background: #f0f0f0; border-radius: 999px; height: 8px; overflow: hidden;
}
.progress-bar-fill {
  height: 100%; border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.progress-safe { background: linear-gradient(90deg, #10b981, #34d399); }
.progress-warning { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.progress-danger { background: linear-gradient(90deg, #ef4444, #f87171); }

/* ─── SIS Portal Nav Button ─── */
.sis-portal-nav-btn {
  padding: 8px 16px; border-radius: 8px; font-size: 0.82rem; font-weight: 700;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white !important; text-decoration: none;
  transition: all 0.2s ease; cursor: pointer;
  box-shadow: 0 2px 8px rgba(79,70,229,0.3);
  display: inline-flex; align-items: center;
}
.sis-portal-nav-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(79,70,229,0.4); }

/* ─── Today Indicator ─── */
.today-class-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  border-radius: 10px; border: 1px solid #f0f0f0; background: #f9fafb;
}

/* ═══════════════════════════════════════════════════════════════
   SIS PORTAL STYLES
   ═══════════════════════════════════════════════════════════════ */

/* ─── Portal Welcome / Hero Card ─── */
.portal-welcome-card {
  background: linear-gradient(135deg, #4338ca 0%, #4f46e5 40%, #7c3aed 80%, #6d28d9 100%);
  border-radius: 24px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(79, 70, 229, 0.35);
}
.portal-welcome-card::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}
.portal-welcome-card::after {
  content: '';
  position: absolute;
  bottom: -30px; left: -20px;
  width: 120px; height: 120px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}

/* ─── Portal Bottom Navigation ─── */
.portal-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: none;
  background: none;
  cursor: pointer;
  color: #9ca3af;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.2s ease;
  padding: 6px 4px;
  -webkit-tap-highlight-color: transparent;
}
.portal-nav-btn i {
  font-size: 1.2rem;
  transition: all 0.2s ease;
}
.portal-nav-btn:hover { color: #6366f1; }
.portal-nav-btn.active {
  color: #4f46e5;
}
.portal-nav-btn.active i {
  transform: translateY(-1px);
}
.portal-nav-btn span {
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ─── Portal Tab Pages ─── */
.portal-tab-page { }
@keyframes portalFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.portal-tab-fadein { animation: portalFadeIn 0.3s ease; }

/* ─── SIS Progress Bar ─── */
.sis-progress-track {
  background: #e5e7eb;
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
}
.sis-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 4px;
}

/* ─── SIS Status Badges ─── */
.sis-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-safe { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }

/* ─── History Filter Buttons ─── */
.history-filter-btn {
  white-space: nowrap;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: white;
  border: 1.5px solid #e5e7eb;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.history-filter-btn:hover { border-color: #6366f1; color: #4f46e5; background: #eef2ff; }
.history-filter-btn.active { background: #4f46e5; border-color: #4f46e5; color: white; }
.history-filter-scroll::-webkit-scrollbar { display: none; }

/* ─── Share Options ─── */
.share-option-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
}
.share-option-btn:hover { transform: translateY(-2px); }

/* ─── Sync Status Badge ─── */
#sync-status-badge {
  display: none;
}
#sync-status-badge.flex {
  display: flex;
}

/* ─── Profile Cards ─── */
.profile-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  transition: background 0.15s ease;
  text-align: left;
  width: 100%;
  border: none;
  background: none;
}
.profile-action-row:hover { background: #f9fafb; }

/* ─── Demo Banner ─── */
#demo-banner {
  display: none;
}
#demo-banner.flex {
  display: flex;
}

/* ─── SIS Login Card ─── */
@keyframes sisLoginIn {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
#sis-login-screen .w-full.max-w-sm {
  animation: sisLoginIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Line clamp utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── Responsive Portal ─── */
@media (max-width: 480px) {
  .portal-welcome-card { padding: 20px; border-radius: 20px; }
  .portal-nav-btn { font-size: 0.57rem; gap: 2px; }
  .portal-nav-btn i { font-size: 1.1rem; }
}

/* ─── Rotate Right icon animation for refresh ─── */
@keyframes rotateFull { to { transform: rotate(360deg); } }
.fa-rotate-right.spinning { animation: rotateFull 0.6s linear infinite; }

/* ═══════════════════════════════════════════════════════════════
   LOGIN TYPE TOGGLE — Student / Parent radio switcher
   ═══════════════════════════════════════════════════════════════ */

.login-type-toggle {
  display: flex;
  gap: 8px;
  background: #f3f4f6;
  border-radius: 12px;
  padding: 4px;
}
.login-type-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.login-type-option input[type="radio"] {
  display: none;
}
.login-type-option.active {
  background: white;
  color: #4f46e5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.login-type-option:not(.active):hover {
  color: #374151;
  background: rgba(255,255,255,0.5);
}

/* ═══════════════════════════════════════════════════════════════
   PASSWORD STRENGTH METER
   ═══════════════════════════════════════════════════════════════ */

.pw-strength-track {
  width: 100%;
  height: 5px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}
.pw-strength-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              background-color 0.35s ease;
  min-width: 0;
}

/* ═══════════════════════════════════════════════════════════════
   PORTAL ADS CONTAINER
   ═══════════════════════════════════════════════════════════════ */

.portal-ad-container {
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: transparent;
  min-height: 0;
}

/* ═══════════════════════════════════════════════════════════════
   SUPERADMIN PANEL — Dark Theme
   ═══════════════════════════════════════════════════════════════ */

/* ─── SA Cards ─── */
.sa-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 16px;
  padding: 24px;
  transition: border-color 0.2s ease;
}
.sa-card:hover {
  border-color: #374151;
}

/* ─── SA Stat Cards ─── */
.sa-stat-card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  transition: all 0.2s ease;
}
.sa-stat-card:hover {
  border-color: #4f46e5;
  box-shadow: 0 0 0 1px rgba(79,70,229,0.3);
}
.sa-stat-value {
  font-size: 2rem;
  font-weight: 900;
  color: #f9fafb;
  line-height: 1;
}
.sa-stat-label {
  font-size: 0.72rem;
  color: #6b7280;
  font-weight: 600;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ─── SA Tabs ─── */
.sa-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  background: none;
  border: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.sa-tab:hover {
  color: #d1d5db;
  background: #1f2937;
}
.sa-tab.active {
  background: #4f46e5;
  color: white;
  box-shadow: 0 2px 8px rgba(79,70,229,0.4);
}

/* ─── SA Buttons ─── */
.sa-btn-primary {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(79,70,229,0.4);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.sa-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(79,70,229,0.5);
}
.sa-btn-primary:active {
  transform: translateY(0);
}

.sa-btn-secondary {
  background: #1f2937;
  color: #d1d5db;
  border: 1px solid #374151;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.sa-btn-secondary:hover {
  background: #374151;
  color: #f9fafb;
  border-color: #4b5563;
}

.sa-btn-sm {
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 7px;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.sa-btn-sm.edit {
  background: #1e3a5f;
  color: #60a5fa;
}
.sa-btn-sm.edit:hover {
  background: #1d4ed8;
  color: white;
}
.sa-btn-sm.delete {
  background: #3b1616;
  color: #f87171;
}
.sa-btn-sm.delete:hover {
  background: #dc2626;
  color: white;
}
.sa-btn-sm.toggle {
  background: #1f2937;
  color: #9ca3af;
}
.sa-btn-sm.toggle:hover {
  background: #374151;
  color: #d1d5db;
}
.sa-btn-sm.success {
  background: #064e3b;
  color: #34d399;
}
.sa-btn-sm.success:hover {
  background: #065f46;
  color: white;
}

.sa-btn-danger {
  background: #7f1d1d;
  color: #fca5a5;
  border: 1px solid #991b1b;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.sa-btn-danger:hover {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
}

/* ─── SA Modal ─── */
.sa-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(6px);
  animation: saOverlayIn 0.2s ease;
}
@keyframes saOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.sa-modal-box {
  background: #111827;
  border: 1px solid #374151;
  border-radius: 20px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 32px 96px rgba(0,0,0,0.6);
  animation: saModalIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  scrollbar-width: thin;
  scrollbar-color: #374151 transparent;
}
.sa-modal-box::-webkit-scrollbar { width: 4px; }
.sa-modal-box::-webkit-scrollbar-track { background: transparent; }
.sa-modal-box::-webkit-scrollbar-thumb { background: #374151; border-radius: 4px; }
@keyframes saModalIn {
  from { transform: scale(0.92) translateY(16px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.sa-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #1f2937;
  border: 1px solid #374151;
  color: #9ca3af;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.sa-modal-close:hover {
  background: #374151;
  color: #f9fafb;
  border-color: #4b5563;
}

/* ─── SA Form Elements ─── */
.sa-form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.sa-form-input {
  width: 100%;
  background: #0f172a;
  border: 1.5px solid #374151;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.875rem;
  color: #f9fafb;
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}
.sa-form-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.sa-form-input::placeholder {
  color: #4b5563;
}
.sa-form-input option {
  background: #1f2937;
  color: #f9fafb;
}

/* ─── SA Table ─── */
.sa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.sa-table th {
  background: #0f172a;
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.7rem;
  border-bottom: 1px solid #1f2937;
}
.sa-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #1f2937;
  color: #d1d5db;
  vertical-align: middle;
}
.sa-table tr:hover td {
  background: rgba(255,255,255,0.02);
}

/* ─── SA Status Badges ─── */
.sa-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.sa-badge.green  { background: #064e3b; color: #34d399; }
.sa-badge.red    { background: #3b1616; color: #f87171; }
.sa-badge.yellow { background: #451a03; color: #fbbf24; }
.sa-badge.blue   { background: #1e3a5f; color: #60a5fa; }
.sa-badge.gray   { background: #1f2937; color: #9ca3af; }
.sa-badge.purple { background: #2e1065; color: #a78bfa; }

/* ─── SA Health Check Rows ─── */
.sa-health-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 10px;
  background: #0f172a;
  border: 1px solid #1f2937;
  transition: border-color 0.2s ease;
}
.sa-health-row:hover {
  border-color: #374151;
}

/* ─── SA Log Entry ─── */
.sa-log-entry {
  padding: 10px 14px;
  border-radius: 8px;
  background: #0f172a;
  border: 1px solid #1f2937;
  font-size: 0.75rem;
  font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace;
  line-height: 1.6;
  transition: border-color 0.15s ease;
}
.sa-log-entry:hover {
  border-color: #374151;
}
.sa-log-entry.success { border-left: 3px solid #10b981; }
.sa-log-entry.error   { border-left: 3px solid #ef4444; }
.sa-log-entry.warn    { border-left: 3px solid #f59e0b; }
.sa-log-entry.info    { border-left: 3px solid #6366f1; }

/* ─── SA Scrollbar (dark) ─── */
.sa-scroll {
  scrollbar-width: thin;
  scrollbar-color: #374151 transparent;
}
.sa-scroll::-webkit-scrollbar { width: 4px; height: 4px; }
.sa-scroll::-webkit-scrollbar-track { background: transparent; }
.sa-scroll::-webkit-scrollbar-thumb { background: #374151; border-radius: 4px; }

/* ─── SA Login Gate ─── */
.sa-login-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #020617 0%, #0f172a 50%, #1e1b4b 100%);
  padding: 16px;
}
.sa-login-card {
  background: #111827;
  border: 1px solid #374151;
  border-radius: 24px;
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  animation: saModalIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── SA Divider ─── */
.sa-divider {
  border: none;
  border-top: 1px solid #1f2937;
  margin: 0;
}

/* ─── Responsive SA ─── */
@media (max-width: 768px) {
  .sa-tab {
    padding: 8px 12px;
    font-size: 0.75rem;
    gap: 5px;
  }
  .sa-card { padding: 16px; }
  .sa-login-card { padding: 28px 20px; }
  .sa-modal-box { max-width: 100%; margin: 8px; }
}
@media (max-width: 480px) {
  .sa-stat-value { font-size: 1.5rem; }
  .sa-tab span { display: none; }
  .sa-tab { padding: 10px; }
}
