/* ═════════════════════════════════════════════════════════════════════════
   myPBD.cloud — Enterprise Glassmorphism Design System
   Modern Dark Glassmorphism, Responsive Grid, Smooth Micro-Animations
   ═════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-primary: #07090e;
  --bg-secondary: #0d121d;
  --card-bg: rgba(18, 24, 38, 0.65);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-hover-border: rgba(56, 189, 248, 0.35);
  
  --primary: #38bdf8;
  --primary-glow: rgba(56, 189, 248, 0.25);
  --secondary: #818cf8;
  --accent: #34d399;
  --danger: #f43f5e;
  --warning: #fbbf24;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px var(--primary-glow);
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── MOD TERANG (EYE-COMFORT LIGHT THEME) ── */
[data-theme="light"] {
  --bg-primary: #f1f5f9;
  --bg-secondary: #e2e8f0;
  --card-bg: #ffffff;
  --card-border: #cbd5e1;
  --card-hover-border: #0284c7;
  
  --primary: #0284c7;
  --primary-glow: rgba(2, 132, 199, 0.18);
  --secondary: #4f46e5;
  --accent: #16a34a;
  --danger: #e11d48;
  --warning: #d97706;
  
  --text-main: #0f172a;
  --text-muted: #334155;
  --text-dim: #64748b;
  
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 20px 40px -15px rgba(15, 23, 42, 0.09);
}

[data-theme="light"] body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(2, 132, 199, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(99, 102, 241, 0.05) 0%, transparent 40%);
}

[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .portal-header,
[data-theme="light"] .app-header {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .portal-brand-title,
[data-theme="light"] .school-pill-name,
[data-theme="light"] #dispSchoolName {
  color: #0f172a !important;
}

[data-theme="light"] .teacher-select {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .welcome-card {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .welcome-card h2 {
  color: #0f172a !important;
}

[data-theme="light"] .guide-item {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #334155 !important;
}

[data-theme="light"] .login-tabs {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .login-tab-btn {
  color: var(--text-muted);
}

[data-theme="light"] .login-tab-btn.active {
  background: var(--primary);
  color: #ffffff;
}

[data-theme="light"] .input-with-icon input,
[data-theme="light"] .form-group input,
[data-theme="light"] .form-group select {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

[data-theme="light"] .form-group select option,
[data-theme="light"] select option {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

[data-theme="light"] .csv-upload-box {
  background: rgba(2, 132, 199, 0.03);
  border-color: rgba(2, 132, 199, 0.25);
}

[data-theme="light"] .csv-upload-box:hover {
  background: rgba(2, 132, 199, 0.06);
}

[data-theme="light"] .textarea-box {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

[data-theme="light"] .guide-box {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

[data-theme="light"] .workflow-section {
  background: #f1f5f9;
  border-top: 1px solid #e2e8f0;
}

[data-theme="light"] .feature-bullet {
  background: #ffffff;
}

[data-theme="light"] .faq-card {
  background: #ffffff;
}

/* ── Modern Animated Theme Switch Toggle ── */
.theme-switch {
  position: relative;
  width: 60px;
  height: 30px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 6px;
  cursor: pointer;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  user-select: none;
  flex-shrink: 0;
}

.theme-switch:hover {
  border-color: var(--primary);
  box-shadow: 0 0 12px var(--primary-glow), inset 0 2px 4px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.theme-switch-icon {
  font-size: 13px;
  line-height: 1;
  z-index: 1;
  user-select: none;
  pointer-events: none;
}

.theme-switch-ball {
  position: absolute;
  top: 2px;
  left: 3px;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

[data-theme="light"] .theme-switch {
  background: #e2e8f0;
  border-color: #cbd5e1;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .theme-switch-ball {
  transform: translateX(28px);
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
}

/* ── Setup Tabs for Step 3 (Guru / Murid / Subjek) ── */
.setup-tabs-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  background: rgba(15, 23, 42, 0.6);
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
}

[data-theme="light"] .setup-tabs-bar {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.tab-btn-pill {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  outline: none;
}

[data-theme="light"] .tab-btn-pill {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #475569;
}

.tab-btn-pill:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

[data-theme="light"] .tab-btn-pill:hover {
  background: #f8fafc;
  color: #0f172a;
}

.tab-btn-pill.active {
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%) !important;
  color: #ffffff !important;
  font-weight: 700;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4) !important;
}

[data-theme="light"] .tab-btn-pill.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3) !important;
}

.btn-download-master {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff !important;
  border: 1px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  font-weight: 700;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-download-master:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.45);
  filter: brightness(1.08);
}

.btn-upload-master {
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
  color: #04101d !important;
  border: 1px solid rgba(56, 189, 248, 0.5);
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-md);
  font-weight: 700;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-upload-master:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.45);
  filter: brightness(1.08);
}

.tab-content-panel {
  display: none;
  animation: fadeIn 0.25s ease-in-out;
}

.tab-content-panel.active {
  display: block;
}

/* ═════════════════════════════════════════════════════════════════════════
   ENTERPRISE MULTI-STEP REGISTRATION WIZARD
   ═════════════════════════════════════════════════════════════════════════ */
.wizard-stepper {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  position: relative !important;
  margin-bottom: 32px !important;
  padding: 0 10px !important;
  width: 100% !important;
}

.wizard-stepper::before {
  content: '';
  position: absolute;
  top: 19px;
  left: 30px;
  right: 30px;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 0;
}

[data-theme="light"] .wizard-stepper::before {
  background: #cbd5e1;
}

.wizard-step-node {
  position: relative;
  z-index: 1;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 8px;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
}

.wizard-step-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #0f172a;
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: var(--text-dim);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 800;
  font-size: 0.9rem;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .wizard-step-circle {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #64748b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.wizard-step-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
  text-align: center;
  white-space: nowrap;
}

/* Step States */
.wizard-step-node.active .wizard-step-circle {
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 18px var(--primary-glow) !important;
  transform: scale(1.1);
}

.wizard-step-node.active .wizard-step-title {
  color: var(--primary) !important;
  font-weight: 800;
}

.wizard-step-node.completed .wizard-step-circle {
  background: #10b981 !important;
  border-color: #34d399 !important;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4) !important;
}

.wizard-step-node.completed .wizard-step-title {
  color: #10b981;
}

/* Step Panes */
.step-pane {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.step-pane.active {
  display: block;
}

/* Wizard Navigation Bar (Next/Prev Buttons) */
.wizard-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--card-border);
}

.btn-wizard-next {
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 12px 26px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.35);
  transition: var(--transition);
  margin-left: auto;
}

.btn-wizard-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(2, 132, 199, 0.5);
  filter: brightness(1.08);
}

.btn-wizard-prev {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main) !important;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

[data-theme="light"] .btn-wizard-prev {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155 !important;
}

.btn-wizard-prev:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

/* Review Summary Card in Step 4 */
.review-summary-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 20px;
}

[data-theme="light"] .review-summary-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .review-grid {
    grid-template-columns: 1fr;
  }
}

.review-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.review-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

.review-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(129, 140, 248, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(52, 211, 153, 0.04) 0%, transparent 60%);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ── Container ── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navigation ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 9, 14, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
  padding: 16px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-glow);
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(56, 189, 248, 0.15);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-left: 6px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #0284c7);
  color: #04101d;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.45);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  border: 1px solid var(--card-border);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--text-muted);
}

.btn-block {
  width: 100%;
}

/* ── Login Gateway Layout ── */
.login-wrapper {
  padding: 60px 0 80px 0;
  min-height: calc(100vh - 180px);
  display: flex;
  align-items: center;
}

.login-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 600;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.2;
}

.hero-title span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
}

.feature-bullets {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-bullet {
  display: flex;
  gap: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  padding: 14px 18px;
  border-radius: var(--radius-md);
}

.bullet-icon {
  font-size: 1.4rem;
}

.feature-bullet strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-main);
}

.feature-bullet p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Login Card ── */
.login-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg);
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-icon {
  width: 50px;
  height: 50px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 12px;
}

.login-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
}

.login-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.alert-box {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fecdd3;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 18px;
}

/* ── Form Inputs ── */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  font-size: 1.1rem;
  pointer-events: none;
}

.input-with-icon input,
.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.form-group select option,
select option {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  padding: 10px 14px;
}

/* ── CSV Upload Area ── */
.csv-upload-box {
  background: rgba(56, 189, 248, 0.04);
  border: 2px dashed rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  margin-bottom: 16px;
  transition: var(--transition);
  cursor: pointer;
}

.csv-upload-box:hover {
  border-color: var(--primary);
  background: rgba(56, 189, 248, 0.08);
}

.csv-tools-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.input-with-icon input {
  padding-left: 42px;
}

.input-with-icon input:focus,
.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--card-border);
}

.divider span {
  padding: 0 12px;
}

.login-footer-text {
  text-align: center;
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.login-footer-text a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

/* ── Portal Body & Fullscreen URL Masking App Frame ── */
.portal-body {
  overflow: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.portal-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.portal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(13, 18, 29, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--card-border);
  padding: 10px 24px;
  z-index: 1000;
}

.portal-header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-main);
}

.portal-logo {
  font-size: 1.4rem;
}

.portal-brand-title {
  font-size: 1.1rem;
  font-weight: 800;
}

.school-info-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  padding: 6px 14px;
  border-radius: var(--radius-md);
}

.school-pill-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.school-pill-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.status-indicator {
  color: var(--accent);
  font-weight: 600;
}

.portal-header-center {
  flex: 1;
  max-width: 480px;
  margin: 0 20px;
}

.teacher-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.teacher-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.teacher-select {
  width: 100%;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.portal-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-folder {
  background: rgba(129, 140, 248, 0.15);
  color: var(--secondary);
  border: 1px solid rgba(129, 140, 248, 0.3);
  padding: 8px 14px;
  font-size: 0.82rem;
}

.btn-folder:hover {
  background: rgba(129, 140, 248, 0.25);
}

.btn-logout {
  background: rgba(244, 63, 94, 0.12);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.25);
  padding: 8px 14px;
  font-size: 0.82rem;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.btn-logout:hover {
  background: rgba(244, 63, 94, 0.22);
}

/* ── Portal Main Content & Frame ── */
.portal-content {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #000;
}

.pbd-app-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.welcome-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 10;
}

.welcome-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 540px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.welcome-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.welcome-card h2 {
  font-size: 1.6rem;
  color: var(--text-main);
}

.welcome-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 6px;
  margin-bottom: 24px;
}

.welcome-guide {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.guide-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
}

.guide-num {
  width: 26px;
  height: 26px;
  background: var(--primary);
  color: #04101d;
  font-weight: 800;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--card-border);
  padding: 30px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.88rem;
}

/* ── Responsive Media Queries ── */
@media (max-width: 900px) {
  .login-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .portal-header {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  .portal-header-center {
    margin: 0;
    max-width: 100%;
  }
}

/* ═════════════════════════════════════════════════════════════════════════
   ⚡ SWEETALERT2 DUAL-THEME STYLING (DARK / LIGHT AUTOMATIC ADAPTATION)
   ═════════════════════════════════════════════════════════════════════════ */
.swal2-container {
  z-index: 10000000 !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

.swal2-popup {
  background: var(--bg-surface) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-medium) !important;
  border-radius: 20px !important;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.65), 0 0 30px var(--primary-glow) !important;
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  padding: 28px 24px !important;
}

.swal2-title {
  color: var(--text-main) !important;
  font-weight: 800 !important;
  font-size: 1.25rem !important;
  line-height: 1.3 !important;
  margin-bottom: 8px !important;
}

.swal2-html-container {
  color: var(--text-muted) !important;
  font-size: 0.92rem !important;
  line-height: 1.6 !important;
}

.swal2-loader {
  border-color: var(--primary) transparent var(--primary) transparent !important;
}

.swal2-icon.swal2-success {
  border-color: #10b981 !important;
  color: #10b981 !important;
}

.swal2-icon.swal2-success [class^='swal2-success-line'] {
  background-color: #10b981 !important;
}

.swal2-icon.swal2-success .swal2-success-ring {
  border: .25em solid rgba(16, 185, 129, 0.3) !important;
}

.swal2-icon.swal2-error {
  border-color: #ef4444 !important;
  color: #ef4444 !important;
}

.swal2-icon.swal2-error [class^='swal2-x-mark-line'] {
  background-color: #ef4444 !important;
}

.swal2-icon.swal2-warning {
  border-color: #f59e0b !important;
  color: #f59e0b !important;
}

/* ═════════════════════════════════════════════════════════════════════════
   FLOATING WINDOW / MODAL POPUP (LOG MASUK PORTAL)
   ═════════════════════════════════════════════════════════════════════════ */
.floating-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(3, 7, 18, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  overflow-y: auto;
  overscroll-behavior: contain !important;
  touch-action: none;
}

.floating-modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.floating-modal-window {
  width: 100%;
  max-width: 480px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.8), 0 0 35px var(--primary-glow);
  padding: 32px 28px;
  position: relative;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  touch-action: auto;
  overscroll-behavior: contain;
}

.floating-modal-overlay.active .floating-modal-window {
  transform: scale(1) translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--card-border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  transition: var(--transition);
}

.modal-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
  transform: scale(1.05);
}

.login-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
}

.login-tab-btn {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.login-tab-btn.active {
  background: linear-gradient(135deg, #0284c7 0%, #38bdf8 100%) !important;
  color: #ffffff !important;
  font-weight: 700;
}


/* ══ UNIVERSAL EYE-COMFORT LIGHT MODE ENHANCEMENTS ══ */
[data-theme="light"] body {
  background: #f1f5f9 !important;
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(2, 132, 199, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 90%, rgba(79, 70, 229, 0.04) 0%, transparent 40%) !important;
  color: #0f172a !important;
}

[data-theme="light"] .navbar,
[data-theme="light"] .top-nav,
[data-theme="light"] .portal-header,
[data-theme="light"] .app-header {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04) !important;
}

[data-theme="light"] .portal-brand-title,
[data-theme="light"] .school-pill-name,
[data-theme="light"] #dispSchoolName,
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4 {
  color: #0f172a !important;
}

[data-theme="light"] p,
[data-theme="light"] .hero-desc,
[data-theme="light"] .section-desc,
[data-theme="light"] .feature-desc {
  color: #334155 !important;
}

[data-theme="light"] .card,
[data-theme="light"] .feature-card,
[data-theme="light"] .stat-card,
[data-theme="light"] .portal-card,
[data-theme="light"] .floating-modal-window {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05) !important;
  color: #0f172a !important;
}

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: #f8fafc !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #0f172a !important;
}
[data-theme="light"] input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus {
  border-color: #0284c7 !important;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15) !important;
}

[data-theme="light"] .login-tabs {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
}
[data-theme="light"] .login-tab-btn {
  color: #475569 !important;
}
[data-theme="light"] .login-tab-btn.active {
  background: linear-gradient(135deg, #0284c7, #2563eb) !important;
  color: #ffffff !important;
}
