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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f5f7fa;
  color: #333;
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

.app-loading {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: #4f46e5;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.page-loading {
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
}

.loading-text {
  color: #64748b;
  font-size: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes successModalPop {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.success-modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #10b981;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 700;
}

.password-field {
  position: relative;
}

.password-field input {
  width: 100%;
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 4px;
  color: #64748b;
}

.password-toggle:hover {
  color: #1f2937;
}

[data-fullscreen-view] {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  box-sizing: border-box;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn:hover {
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: #4f46e5;
  color: #fff;
}

.btn-primary:hover {
  background: #4338ca;
}

.btn-secondary {
  background: #e5e7eb;
  color: #374151;
}

.btn-secondary:hover {
  background: #d1d5db;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
}

input, textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 12px;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 4px;
}

.error-text {
  color: #ef4444;
  font-size: 13px;
  margin-top: 8px;
}

.btn-contact-admin {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
  font-weight: 700;
}

.btn-contact-admin:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}

.login-error-box {
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  line-height: 1.45;
}

.login-error-box strong {
  display: block;
  margin-bottom: 4px;
}

.login-error-box .login-help {
  margin-top: 8px;
  color: #7f1d1d;
}

.login-error-box .btn {
  margin-top: 6px;
}

/* Hide the login error container until it has content. */
.login-error-box:empty {
  display: none;
}

/* Prevent the fixed mobile hamburger from covering sidebar header text. */
@media (max-width: 768px) {
  .sidebar-header {
    padding-top: 88px;
    padding-left: 80px;
    padding-right: 20px;
    text-align: center;
  }

  .sidebar-header h3 {
    text-align: center;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .sidebar-header .badge {
    display: inline-block;
    margin-top: 8px;
  }
}

.info-text {
  color: #6b7280;
  font-size: 13px;
  margin-top: 8px;
}

.auth-tabs {
  display: flex;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 24px;
}

.tab-btn {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.tab-btn.active {
  color: #4f46e5;
  border-bottom-color: #4f46e5;
}

.auth-form h2 {
  margin-bottom: 20px;
  color: #1f2937;
}

#auth-container {
  max-width: 480px;
  margin: 60px auto;
  padding: 32px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.auth-footer {
  margin-top: 20px;
  text-align: center;
}

#dashboard-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background: #1e1b4b;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-header {
  padding: 0 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
  height: 32px;
  width: auto;
  margin-bottom: 8px;
  display: block;
}

.sidebar-header h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-active {
  background: #10b981;
  color: #fff;
}

.badge-expired {
  background: #ef4444;
  color: #fff;
}

.badge-suspended {
  background: #f59e0b;
  color: #fff;
}

.nav-menu {
  list-style: none;
  flex: 1;
  padding: 12px 0;
}

.nav-link {
  display: block;
  padding: 12px 20px;
  color: #c7d2fe;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s;
}

.nav-link:hover, .nav-link.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 32px;
  overflow-y: auto;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  margin-bottom: 24px;
}

.card h3 {
  margin-bottom: 16px;
  color: #1f2937;
  text-align: center;
}
/* Center H3 headings in category pages, except dashboard card headings. */
#view-container h3 {
  text-align: center;
}

/* Center any remaining module-level h2 headings (e.g. Parent Communication) in content views. */
#view-container h2 {
  text-align: center;
}
/* Dashboard card headings remain left-aligned. */
#view-container .dash-section h3,
.dash-section h3 {
  text-align: left;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
}

th {
  font-weight: 600;
  color: #6b7280;
  font-size: 12px;
  text-transform: uppercase;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.stat-card h4 {
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.stat-card .value {
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
}

#public-home {
  min-height: 100vh;
  background: #f8fafc;
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #e2e8f0;
}

.landing-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #1e1b4b;
  font-weight: 700;
  font-size: 1.1rem;
}

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

.btn-nav {
  padding: 8px 16px;
  background: transparent;
  color: #4f46e5;
  font-weight: 500;
}

.btn-nav:hover {
  background: #eef2ff;
}

.hero {
  padding: 80px 24px 60px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #4f46e5;
  background: #eef2ff;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.hero-heading {
  font-size: 2.75rem;
  font-weight: 800;
  color: #1e1b4b;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 1.1rem;
  color: #64748b;
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
  border-radius: 8px;
}

.btn-outline {
  background: transparent;
  color: #4f46e5;
  border: 2px solid #4f46e5;
}

.btn-outline:hover {
  background: #eef2ff;
}

.hero-trust {
  font-size: 0.85rem;
  color: #94a3b8;
}

.hero-preview {
  display: flex;
  justify-content: center;
}

.preview-window {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12), 0 0 0 1px #e2e8f0;
  overflow: hidden;
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.preview-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.preview-title {
  font-size: 0.8rem;
  color: #64748b;
  font-weight: 500;
}

.preview-body {
  display: grid;
  grid-template-columns: 130px 1fr;
  min-height: 320px;
}

.preview-sidebar {
  background: #1e1b4b;
  padding: 16px 10px;
}

.preview-nav-item {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  color: #c7d2fe;
  margin-bottom: 4px;
}

.preview-nav-item.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.preview-main {
  padding: 16px;
}

.preview-dash-header {
  margin-bottom: 12px;
}

.preview-dash-header h4 {
  font-size: 1rem;
  margin: 0 0 4px;
  color: #1f2937;
}

.preview-dash-header p {
  font-size: 0.8rem;
  color: #6474b8;
  margin: 0 0 12px;
}

.preview-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.preview-stat {
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px 12px;
}

.preview-stat-label {
  display: block;
  font-size: 0.65rem;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.preview-stat-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e1b4b;
}

.preview-section {
  margin-bottom: 14px;
}

.preview-section-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.preview-table {
  font-size: 0.75rem;
}

.preview-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
}

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

.tag {
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.tag-green { background: #d1fae5; color: #065f46; }
.tag-red { background: #fee2e2; color: #991b1b; }
.tag-yellow { background: #fef3c7; color: #92400e; }

.preview-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 60px;
  padding-top: 8px;
}

.bar {
  flex: 1;
  background: #4f46e5;
  border-radius: 3px 3px 0 0;
  opacity: 0.8;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: #1e1b4b;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-sub {
  font-size: 1.05rem;
  color: #64748b;
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
  line-height: 1.6;
}

.benefits {
  background: #fff;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.benefit-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 28px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.benefit-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.benefit-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #eef2ff;
  color: #4f46e5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.benefit-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e1b4b;
  margin-bottom: 8px;
}

.benefit-card p {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.6;
}

.how-it-works {
  background: #f8fafc;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step-card {
  text-align: center;
  padding: 32px 24px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.step-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: #e0e7ff;
  margin-bottom: 12px;
}

.step-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e1b4b;
  margin-bottom: 8px;
}

.step-card p {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.6;
}

.showcase {
  background: #fff;
  border-top: 1px solid #e2e8f0;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.showcase-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  transition: box-shadow 0.2s;
}

.showcase-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.showcase-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #eef2ff;
  color: #4f46e5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.showcase-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e1b4b;
  margin-bottom: 6px;
}

.showcase-card p {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.55;
}

.trust {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.88rem;
  color: #334155;
  font-weight: 500;
}

.trust-item svg {
  color: #10b981;
  flex-shrink: 0;
}

.cta {
  background: #1e1b4b;
  padding: 80px 24px;
  text-align: center;
}

.cta-inner h2 {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.cta-inner p {
  font-size: 1.05rem;
  color: #c7d2fe;
  max-width: 500px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.cta-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta .btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}

.cta .btn-outline:hover {
  background: rgba(255,255,255,0.1);
}

.landing-footer {
  background: #0f0d2e;
  padding: 40px 24px 24px;
}

.landing-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand {
  margin-bottom: 24px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
}

.footer-brand p {
  font-size: 0.82rem;
  color: #94a3b8;
  max-width: 360px;
  line-height: 1.5;
}

.footer-links {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
}

.footer-link {
  background: none;
  border: none;
  color: #c7d2fe;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
}

.footer-link:hover {
  color: #fff;
}

.footer-copy {
  font-size: 0.78rem;
  color: #64748b;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
}

@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-preview {
    order: -1;
  }
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .showcase-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .steps-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .access-summary {
    margin-bottom: 24px;
  }

  .access-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 12px;
  }

  .access-badge .status-text {
    color: #1e1b4b;
  }

  .expire-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
  }

  .expire-badge.Active {
    background: #d1fae5;
    color: #065f46;
  }

  .expire-badge.Expired {
    background: #fee2e2;
    color: #991b1b;
  }

  .expire-badge.No-Access {
    background: #e5e7eb;
    color: #6b7281;
  }

  .expire-details {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 4px;
  }

  .expire-details span {
    margin-right: 16px;
    white-space: nowrap;
  }

  .expire-details span:last-child {
    margin-right: 0;
}
}

.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1100;
  background: #1e1b4b;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  transition: background-color .16s ease, box-shadow .16s ease, transform .12s ease;
}

.hamburger-line {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px 0;
  background: #fff;
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

#dashboard-container.sidebar-open .mobile-menu-btn .hamburger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

#dashboard-container.sidebar-open .mobile-menu-btn .hamburger-line:nth-child(2) {
  opacity: 0;
}

#dashboard-container.sidebar-open .mobile-menu-btn .hamburger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}
.mobile-menu-btn:hover {
  background: #312e81;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.mobile-menu-btn:active {
  background: #1e1b4b;
  transform: translateY(1px);
}
.mobile-menu-btn:focus-visible {
  outline: 3px solid rgba(99,102,241,.45);
  outline-offset: 2px;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
}

.sidebar-open .sidebar-overlay {
  display: block;
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 260px;
    height: 100vh;
    z-index: 1050;
    transition: left 0.25s ease;
  }
  #dashboard-container.sidebar-open .sidebar {
    left: 0;
  }
  #dashboard-container {
    flex-direction: column;
  }
  .main-content {
    margin-left: 0;
    padding: 16px;
    padding-top: 64px;
  }
  .dash-header {
    padding-left: 48px;
  }
  .hero {
    padding: 40px 16px;
  }
  .hero-heading {
    font-size: 2rem;
  }
  .section-inner {
    padding: 48px 16px;
  }
  .benefits-grid {
    grid-template-columns: 1fr;
  }
  .showcase-grid {
    grid-template-columns: 1fr;
  }
  .trust-grid {
    grid-template-columns: 1fr;
  }
  .hero {
    padding: 40px 16px;
  }
  .hero-heading {
    font-size: 2rem;
  }
  .section-inner {
    padding: 48px 16px;
  }
  .benefits-grid {
    grid-template-columns: 1fr;
  }
  .showcase-grid {
    grid-template-columns: 1fr;
  }
  .trust-grid {
    grid-template-columns: 1fr;
  }
  .preview-body {
    grid-template-columns: 1fr;
  }
  .preview-sidebar {
    display: none;
  }
  .landing-nav-links {
    gap: 8px;
  }
  .btn-nav {
    padding: 6px 12px;
    font-size: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .benefit-card:hover,
  .showcase-card:hover {
    transform: none;
    transition: none;
  }
}

.expire-card {
  max-width: 480px;
  padding: 40px 24px;
  text-align: center;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.08);
}

.expire-header {
  margin-bottom: 24px;
}

.expire-header h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1e1b4b;
  margin-bottom: 8px;
}

.expire-icon svg {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  color: #ef4444;
}

.expire-details p {
  color: #64748b;
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.expire-explanation {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.expire-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

.expire-actions .btn {
  min-width: 140px;
}

.expire-support {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
  font-size: 0.85rem;
  color: #64748b;
  text-align: center;
}

.pending-view {
  min-height: 100vh;
  background: #f8fafc;
}

.pending-card {
  max-width: 560px;
  margin: 40px auto;
  padding: 32px 24px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.08);
}

.pending-welcome {
  text-align: center;
  margin-bottom: 32px;
}

.pending-welcome h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1e1b4b;
  margin-bottom: 8px;
}

.pending-welcome .pending-school-name {
  color: #4f46e5;
  font-size: 1.1rem;
  font-weight: 600;
}

.pending-status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 12px 20px;
  background: #eef2ff;
  border-radius: 8px;
}

.pending-status-indicator .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
}

.pending-status-indicator .status-text {
  color: #1e1b4b;
  font-weight: 500;
  font-size: 0.95rem;
}

.pending-timeline {
  display: flex;
  justify-content: space-between;
  padding: 16px 0;
  margin: 24px 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  text-align: center;
}

.timeline-step .step-circle {
  width: 32px;
  height: 32px;
  border: 2px solid #e2e8f0;
  border-radius: 50%;
  background: white;
  margin-bottom: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  transition: border-color 0.2s;
}

.timeline-step.timeline-step-active .step-circle {
  border-color: #4f46e5;
  color: #4f46e5;
}

.timeline-step .step-label {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 500;
}

.timeline-step.timeline-step-active .step-label {
  color: #1e1b4b;
}

.timeline-divider {
  flex: 1;
  height: 20px;
  border-left: 1px solid #e2e8f0;
  margin: auto 8px;
}

.pending-card-content {
  margin: 24px 0;
  padding: 20px;
  background: #f8fafc;
  border-radius: 10px;
  text-align: center;
}

.pending-card-content p {
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.6;
}

.pending-card-content strong {
  color: #1e1b4b;
}

.pending-action-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

.pending-action-buttons .btn {
  min-width: 140px;
}

.pending-support {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
  font-size: 0.85rem;
  color: #64748b;
}

@media (max-width: 768px) {
  .pending-card {
    margin: 24px auto;
    padding: 24px 16px;
  }
  
  .pending-timeline {
    flex-direction: column;
    padding: 12px 0;
  }
  
  .timeline-step {
    margin-bottom: 20px;
  }
  
  .timeline-divider {
    border-top: 1px solid #e2e8f0;
    border-left: none;
    height: auto;
    width: 100%;
    margin: 8px 0;
  }
  
  .pending-action-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .pending-action-buttons .btn {
    min-width: 100%;
    margin: 4px 0;
  }
}

@media (max-width: 768px) { .stats-grid { grid-template-columns: 1fr 1fr; } table { display: block; overflow-x: auto; white-space: nowrap; } }
@media (max-width: 480px) { .stats-grid { grid-template-columns: 1fr; } }

.att-status-group{display:flex;gap:4px;}.att-btn{padding:4px 8px;border:1px solid #ccc;border-radius:4px;cursor:pointer;background:#f9f9f9;}.att-btn.active{background:#4f46e5;color:#fff;border-color:#4f46e5;}

.dash-header{display:flex;justify-content:space-between;align-items:flex-start;flex-wrap:wrap;gap:12px;margin-bottom:20px;}.dash-title{font-size:1.6rem;font-weight:700;margin:0;overflow-wrap:anywhere;}.dash-subtitle{color:#64748b;margin:6px 0 0;overflow-wrap:anywhere;}.stat-card{display:flex;align-items:center;gap:12px;}.stat-icon{font-size:1.8rem;}.stat-body{display:flex;flex-direction:column;}.stat-value{font-size:1.4rem;font-weight:700;}.stat-label{font-size:0.85rem;color:#64748b;}.quick-actions{display:flex;gap:8px;flex-wrap:wrap;}.recent-list{margin:0;padding-left:18px;}

.section-header{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:12px;}.fee-summary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px;}.fee-metric{background:#f8fafc;border:1px solid #e2e8f0;border-radius:10px;padding:12px;}.fee-metric-label{font-size:0.8rem;color:#64748b;margin-bottom:4px;}.fee-metric-value{font-size:1.1rem;font-weight:700;}.fee-collected{color:#10b981;}.fee-outstanding{color:#ef4444;}.fee-progress{height:8px;background:#e2e8f0;border-radius:4px;overflow:hidden;margin:12px 0;}.fee-progress-bar{height:100%;background:#4f46e5;border-radius:4px;transition:width .3s;}

@media (max-width:480px){.fee-summary-grid{grid-template-columns:1fr 1fr;}.stats-grid{grid-template-columns:1fr 1fr;}.dash-title{font-size:1.3rem;}}

.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch;}.section-header{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap;}

@media (max-width:768px){.students-table-wrap table,.students-table-wrap thead,.students-table-wrap tbody,.students-table-wrap tr,.students-table-wrap th,.students-table-wrap td{display:block;width:100%;}.students-table-wrap thead tr{position:absolute;top:-9999px;left:-9999px;}.students-table-wrap tr{margin-bottom:12px;border:1px solid #e2e8f0;border-radius:8px;padding:8px;background:#fff;}.students-table-wrap td{border:none;padding:4px 8px;position:relative;padding-left:40%;}.students-table-wrap td:before{position:absolute;left:8px;top:4px;width:35%;white-space:nowrap;font-weight:600;content:attr(data-label);}}

.btn-success{background:#10b981;color:#fff;}.btn-success:hover{background:#059669;}.btn-warning{background:#f59e0b;color:#fff;}.btn-warning:hover{background:#d97706;}

/* Keep operational views usable on phones and small tablets. */
html, body { max-width: 100%; overflow-x: hidden; }
#view-container { min-width: 0; }
#view-container .card { min-width: 0; overflow-x: auto; }
#view-container table { min-width: 560px; }
.table-responsive { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
#view-container input, #view-container select, #view-container textarea { min-width: 0; max-width: 100%; }
.quick-actions .btn { min-height: 42px; }
.att-status-group { flex-wrap: wrap; }

/* Shared, neutral action controls for public and authenticated app views. */
.btn {
  gap: 8px;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid #d6d9de;
  border-radius: 8px;
  background: #fff;
  color: #252a31;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .12s ease;
}
.btn:hover { background: #f4f5f6; border-color: #bfc4cb; box-shadow: 0 2px 5px rgba(16, 24, 40, .08); }
.btn:active { background: #eceef0; transform: translateY(1px); }
.btn:focus-visible, .att-btn:focus-visible { outline: 3px solid rgba(71, 81, 95, .28); outline-offset: 2px; }
.btn:disabled { opacity: .52; background: #f1f2f3; color: #737982; box-shadow: none; }
.btn-primary, .btn-success { background: #303640; border-color: #303640; color: #fff; }
.btn-primary:hover, .btn-success:hover { background: #20252c; border-color: #20252c; color: #fff; }
.btn-secondary, .btn-outline, .btn-danger, .btn-warning, .btn-nav { background: #fff; border-color: #d6d9de; color: #303640; }
.btn-secondary:hover, .btn-outline:hover, .btn-danger:hover, .btn-warning:hover, .btn-nav:hover { background: #f0f1f3; border-color: #c2c6cc; color: #20252c; }
.btn-small { min-height: 36px; padding: 6px 10px; font-size: 13px; }
.btn-small.icon-action { width: 40px; min-width: 40px; height: 40px; padding: 0; margin: 2px; }
.action-icon { display: block; flex: 0 0 auto; }
.icon-action { color: #adb14f; }
.btn-with-icon { gap: 7px; white-space: nowrap; }
#view-container td:last-child .btn-small { margin: 2px 3px; }
.icon-action-cell { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.quick-actions .btn { min-height: 44px; }

.att-status-group { display: flex; flex-wrap: nowrap; gap: 7px; align-items: center; }
.att-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0 5px;
  border: 1px solid #d4d8de;
  border-radius: 9px;
  background: #fff;
  color: #454b54;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.att-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.att-btn:hover { background: #f5f6f7; border-color: #9da4ad; }
.att-btn.active { background: #e9ebee; color: #20252c; border-color: #626a75; box-shadow: inset 0 0 0 1px #626a75; }

#edit-student-form.student-edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
#edit-student-form .form-field { min-width: 0; }
#edit-student-form .form-field label { margin-bottom: 6px; }
#edit-student-form .form-field input, #edit-student-form .form-field select { margin-bottom: 0; }
#edit-student-form .edit-form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 4px; }

@media (max-width: 520px) {
  .att-status-group { gap: 5px; }
  .att-btn { width: 42px; min-width: 42px; height: 42px; }
  #edit-student-form.student-edit-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  #edit-student-form .edit-form-actions { grid-column: auto; }
}

@media (max-width: 768px) {
  [data-fullscreen-view] { padding: 16px; }
  .main-content { min-width: 0; padding: 16px; }
  .card { padding: 18px; }
  .dash-header { align-items: flex-start; }
  .access-summary { max-width: 100%; }
  .section-header { align-items: flex-start; }
  .quick-actions .btn { flex: 1 1 180px; }
  #view-container .students-table-wrap table { min-width: 0; }
}

@media (max-width: 480px) {
  .main-content { padding: 12px; }
  .card { padding: 14px; margin-bottom: 16px; }
  .dash-title { font-size: 1.2rem; overflow-wrap: anywhere; }
  .dash-subtitle { font-size: .85rem; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { min-width: 0; padding: 12px; gap: 8px; }
  .stat-icon { font-size: 1.35rem; }
  .stat-value { font-size: 1.15rem; }
  .fee-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fee-metric { min-width: 0; padding: 9px; }
  .fee-metric-value { font-size: .95rem; overflow-wrap: anywhere; }
  .quick-actions { display: grid; grid-template-columns: 1fr; }
  .quick-actions .btn { width: 100%; }
  .btn { min-height: 40px; }
  .pending-action-buttons { align-items: stretch; }
}
