/* ============================================================
   SPEAXA Parent Portal Stylesheet
   Premium Glassmorphic LIGHT Theme
   ============================================================ */
:root {
  --primary: #3CBDB0;
  --primary-rgb: 60, 189, 176;
  --primary-dark: #2A9F94;
  --bg-dark: #F8FAFC;
  --bg-sidebar: rgba(255, 255, 255, 0.8);
  --bg-card: rgba(255, 255, 255, 0.7);
  --bg-input: #F1F5F9;
  --bg-hover: rgba(60, 189, 176, 0.08);
  --text-primary: #0F172A;
  --text-muted: #64748B;
  --text-secondary: #475569;
  --border: rgba(15, 23, 42, 0.08);
  --border-focus: rgba(60, 189, 176, 0.5);
  --gradient: linear-gradient(135deg, #3CBDB0, #0F766E);
  --gradient-accent: linear-gradient(135deg, #3B82F6, #1D4ED8);
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  
  --teal: #3CBDB0;
  --teal-light: #4DD2C4;
  --teal-dark: #0F766E;
  --emerald: #10B981;
  --gold: #F59E0B;
  --rose: #F43F5E;
  --violet: #8B5CF6;
  --sky: #0EA5E9;

  --sidebar-w: 260px;
  --header-h: 64px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --radius: 14px;
  
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.1);
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  background: radial-gradient(circle at top left, rgba(60, 189, 176, 0.05), transparent 45%),
              radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.03), transparent 45%),
              #F8FAFC;
  color: var(--text-primary);
  overflow: hidden;
}

/* ── Custom Scrollbar ────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ── Layout ────────────────────────────────── */
#app {
  display: flex;
  height: 100vh;
}

/* ── Sidebar ───────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100vh;
  flex-shrink: 0;
  z-index: 200;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: contain;
}

.brand-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 850;
  font-size: 1.2rem;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.brand-tag {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-top: 1px;
}

.sidebar-user-card {
  margin: 16px 12px;
  padding: 12px;
  background: rgba(60, 189, 176, 0.06);
  border: 1px solid rgba(60, 189, 176, 0.12);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
}

.sidebar-user-card:hover {
  background: rgba(60, 189, 176, 0.09);
  border-color: rgba(60, 189, 176, 0.2);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 10px rgba(60, 189, 176, 0.15);
}

.user-info-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.user-info-role {
  font-size: 0.72rem;
  color: var(--primary-dark);
  font-weight: 700;
  margin-top: 1px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

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

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 10px 6px;
  opacity: 0.8;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 3px;
  text-decoration: none;
}

.nav-item .nav-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  background: transparent;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: var(--transition);
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--primary-dark);
}

.nav-item:hover .nav-icon {
  background: rgba(60, 189, 176, 0.12);
  color: var(--primary-dark);
}

.nav-item.active {
  background: rgba(60, 189, 176, 0.1);
  color: var(--primary-dark);
  font-weight: 700;
}

.nav-item.active .nav-icon {
  background: var(--gradient);
  color: white;
  box-shadow: 0 4px 10px rgba(60, 189, 176, 0.2);
}

.sidebar-bottom {
  padding: 12px;
  border-top: 1px solid var(--border);
}

.btn-logout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.12);
  color: var(--danger);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.25);
  transform: translateY(-1px);
}

.btn-logout:active {
  transform: scale(0.96) !important;
}

/* ── Main Content ───────────────────────────── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: transparent;
}

.top-header {
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  flex-shrink: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-page-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-primary);
}

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

/* Child Selector */
.child-selector-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 12px;
  transition: var(--transition);
}

.child-selector-wrap:focus-within {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(60, 189, 176, 0.12);
}

.child-selector-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

#studentSelectDropdown {
  border: none;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary-dark);
  cursor: pointer;
  outline: none;
  max-width: 180px;
}

/* Link child btn */
.btn-link-child {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 9px;
  background: var(--gradient);
  color: white;
  font-size: 0.82rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(60, 189, 176, 0.2);
}

.btn-link-child:hover {
  box-shadow: 0 6px 16px rgba(60, 189, 176, 0.3);
  transform: translateY(-2px);
  color: white !important;
}

.btn-link-child:active {
  transform: scale(0.96) !important;
}

/* Avatar */
.header-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  font-weight: 700;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--primary);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(60, 189, 176, 0.2);
}

/* ── Page content ────────────────────────────── */
.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 32px 40px;
}
@media (max-width: 991px) {
  .page-content {
    padding: 24px 28px;
  }
}
@media (max-width: 575px) {
  .page-content {
    padding: 16px;
  }
}

/* ── Sections ────────────────────────────────── */
.tab-section {
  display: none;
  animation: fadeUp 0.3s ease;
}

.tab-section.active {
  display: block;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Hero Banner ─────────────────────────────── */
.hero-banner {
  position: relative;
  background: linear-gradient(135deg, #0F766E 0%, #3CBDB0 60%, #0891B2 100%);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  color: white;
  overflow: hidden;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(60, 189, 176, 0.18);
}

.hero-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='400' height='200' viewBox='0 0 400 200' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='320' cy='40' r='80' fill='rgba(255,255,255,0.04)'/%3E%3Ccircle cx='340' cy='120' r='120' fill='rgba(255,255,255,0.04)'/%3E%3Ccircle cx='60' cy='160' r='60' fill='rgba(255,255,255,0.03)'/%3E%3C/svg%3E") no-repeat right center;
}

.hero-banner h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.hero-banner p {
  font-size: 0.9rem;
  opacity: 0.85;
  line-height: 1.5;
}

.hero-stats {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.hero-stat {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 10px 18px;
  min-width: 110px;
  transition: var(--transition);
}

.hero-stat:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.18);
}

.hero-stat-val {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 850;
}

.hero-stat-lbl {
  font-size: 0.72rem;
  opacity: 0.8;
  margin-top: 2px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Cards ───────────────────────────────────── */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  border-color: rgba(60, 189, 176, 0.2);
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: none;
  background: transparent;
  padding: 0;
}

.card-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title i {
  color: var(--primary);
}

/* ── Stat Grid ───────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(60, 189, 176, 0.2);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.stat-icon.teal    { background: rgba(60, 189, 176, 0.1); color: var(--primary); }
.stat-icon.emerald { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.stat-icon.gold    { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.stat-icon.violet  { background: rgba(139, 92, 246, 0.1); color: var(--violet); }
.stat-icon.sky     { background: rgba(14, 165, 233, 0.1); color: var(--sky); }
.stat-icon.rose    { background: rgba(244, 63, 94, 0.1);  color: var(--rose); }

.stat-value {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 850;
  color: var(--text-primary);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ── Table ───────────────────────────────────── */
.spx-table {
  width: 100%;
  border-collapse: collapse;
}

.spx-table thead th {
  padding: 14px 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.spx-table tbody tr {
  border-bottom: 1px solid rgba(15, 23, 42, 0.04);
  transition: var(--transition);
}

.spx-table tbody tr:last-child {
  border-bottom: none;
}

.spx-table tbody tr:hover {
  background: var(--bg-hover);
}

.spx-table tbody td {
  padding: 16px 20px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  vertical-align: middle;
}

/* ── Badges ──────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-present { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.badge-absent  { background: rgba(239, 68, 68, 0.1);  color: var(--danger); }
.badge-late    { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.badge-pending { background: rgba(139, 92, 246, 0.1); color: var(--violet); }
.badge-teal    { background: rgba(60, 189, 176, 0.1); color: var(--primary-dark); }

/* ── Progress bar ────────────────────────────── */
.progress-wrap {
  height: 6px;
  background: rgba(60, 189, 176, 0.1);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--gradient);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Metric Row ──────────────────────────────── */
.metric-row {
  margin-bottom: 16px;
}

.metric-row:last-child {
  margin-bottom: 0;
}

.metric-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.metric-name {
  color: var(--text-secondary);
  font-weight: 600;
}

.metric-val {
  font-weight: 700;
  color: var(--text-primary);
}

/* ── Teacher Card ────────────────────────────── */
.teacher-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.teacher-card:hover {
  transform: translateY(-3px);
  border-color: rgba(60, 189, 176, 0.2);
  box-shadow: var(--shadow-md);
}

.teacher-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
  border: 2px solid white;
  box-shadow: 0 4px 10px rgba(60, 189, 176, 0.15);
}

.teacher-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

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

/* ── Empty State ──────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 20px;
}

.empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(60, 189, 176, 0.08);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.8rem;
}

.empty-state h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.empty-state p {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 340px;
  margin: 0 auto 20px;
  line-height: 1.6;
}

/* ── Link-child state cards ───────────────────── */
.state-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 20px;
  padding: 52px 40px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.state-icon-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 2.2rem;
  background: rgba(60, 189, 176, 0.1);
  color: var(--primary);
}

.state-card h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.state-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 460px;
  margin: 0 auto 28px;
  line-height: 1.65;
}

/* Inline link-child form */
.link-form-inline {
  display: flex;
  gap: 10px;
  max-width: 420px;
  margin: 0 auto;
}

.link-form-inline input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--bg-input);
  color: var(--text-primary);
  outline: none;
  transition: var(--transition);
}

.link-form-inline input:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(60, 189, 176, 0.12);
}

.link-form-inline button {
  padding: 12px 24px;
  border-radius: 12px;
  background: var(--gradient);
  color: white;
  border: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(60, 189, 176, 0.2);
}

.link-form-inline button:hover {
  box-shadow: 0 6px 18px rgba(60, 189, 176, 0.3);
  transform: translateY(-2px);
  color: white !important;
}

.link-form-inline button:active {
  transform: scale(0.96) !important;
}

/* ── Buttons ──────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.btn:active, .btn-primary:active, .btn-ghost:active, .btn-success:active, .btn-danger:active, .btn-warning:active {
  transform: scale(0.96) !important;
}

.btn-primary {
  background: var(--gradient);
  color: white !important;
  box-shadow: 0 4px 12px rgba(60, 189, 176, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 6px 18px rgba(60, 189, 176, 0.3);
  transform: translateY(-2px);
  color: white !important;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: rgba(60, 189, 176, 0.2);
}

.btn-success {
  background: var(--success) !important;
  color: white !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2) !important;
}
.btn-success:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35) !important;
  background: #059669 !important;
}

.btn-danger {
  background: var(--danger) !important;
  color: white !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2) !important;
}
.btn-danger:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35) !important;
  background: #DC2626 !important;
}

.btn-warning {
  background: var(--warning) !important;
  color: white !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2) !important;
}
.btn-warning:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35) !important;
  background: #D97706 !important;
}

/* ── Login Overlay ────────────────────────────── */
#loginOverlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
}

.parent-login-split {
  display: flex;
  width: 100%;
  height: 100vh;
}

.parent-visual-panel {
  flex: 1;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.93), rgba(13, 92, 86, 0.97)), url('/logo.png');
  background-size: cover, 180px;
  background-position: center, center right -40px;
  background-repeat: no-repeat, no-repeat;
  padding: 60px;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

@media (max-width: 991.98px) {
  .parent-visual-panel {
    display: none;
  }
}

.parent-visual-panel::after {
  content: '';
  position: absolute;
  top: -10%; right: -10%;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.parent-visual-panel .visual-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.parent-visual-panel .visual-logo {
  width: 40px;
  height: 40px;
}

.parent-visual-panel .visual-brand-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.5px;
  color: #fff;
}

.parent-visual-panel .visual-content {
  max-width: 500px;
  margin: auto 0;
  z-index: 2;
}

.text-gold {
  background: linear-gradient(135deg, #FDE047, #F59E0B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.parent-visual-panel .visual-badge {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 24px;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.parent-visual-panel .visual-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  color: white;
}

.parent-visual-panel .visual-subtitle {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
}

.parent-visual-panel .visual-features {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.parent-visual-panel .feature-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.parent-visual-panel .feature-icon {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
}

.parent-visual-panel .feature-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 2px;
  color: white;
}

.parent-visual-panel .feature-desc {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.75);
}

.parent-visual-panel .visual-footer {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  z-index: 2;
}

.parent-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 10% 20%, rgba(60, 189, 176, 0.06) 0%, transparent 45%),
              radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.03) 0%, transparent 45%),
              #F8FAFC;
  position: relative;
  padding: 40px 24px;
}

.parent-form-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(rgba(15, 23, 42, 0.02) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.parent-form-panel .login-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 24px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 2;
  animation: slideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.login-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  margin: 0 auto 12px;
  display: block;
}

.parent-form-panel .login-card h2 {
  font-family: 'Outfit', sans-serif;
  text-align: center;
  margin-bottom: 4px;
  font-size: 1.5rem;
  color: var(--text-primary);
  font-weight: 750;
}

.parent-form-panel .login-card .subtitle {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

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

.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.parent-form-panel .input-group {
  display: flex;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-input);
  transition: var(--transition);
}

.parent-form-panel .input-group:focus-within {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(60, 189, 176, 0.12);
}

.parent-form-panel .spx-input-prefix {
  background: rgba(15, 23, 42, 0.02);
  border-right: 1px solid var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-size: 0.9rem;
}

.parent-form-panel .input-group .form-control {
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  width: 100%;
  padding: 11px 14px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-primary);
  outline: none;
}

.btn-login {
  width: 100%;
  padding: 13px;
  background: var(--gradient);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(60, 189, 176, 0.2);
}

.btn-login:hover {
  box-shadow: 0 6px 20px rgba(60, 189, 176, 0.3);
  transform: translateY(-2px);
  color: white !important;
}

.btn-login:active {
  transform: scale(0.96) !important;
}

#loginError {
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
  margin-top: 12px;
  display: none;
}

/* ── Modal ────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 20px;
}

.modal.open {
  display: flex;
}

.modal-box {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.6);
  animation: slideIn 0.3s ease;
  overflow: hidden;
}

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

.modal-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 750;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--text-muted);
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: rgba(15, 23, 42, 0.01);
}

/* ── Toast ────────────────────────────────────── */
#toastContainer {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.85) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6) !important;
  border-radius: 12px !important;
  box-shadow: var(--shadow-md);
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
  animation: slideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 320px;
}

.toast .toast-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.toast.toast-success .toast-icon { color: var(--success); }
.toast.toast-danger  .toast-icon { color: var(--danger); }
.toast.toast-warning .toast-icon { color: var(--warning); }

/* ── Divider ──────────────────────────────────── */
.section-gap {
  margin-bottom: 30px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

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

/* ── Insight Pill ─────────────────────────────── */
.insight-pill {
  background: rgba(60, 189, 176, 0.05);
  border: 1px solid rgba(60, 189, 176, 0.15);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.insight-pill i {
  color: var(--primary-dark);
  margin-top: 2px;
  flex-shrink: 0;
}

/* ── Guide Steps ──────────────────────────────── */
.guide-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.guide-step {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  transition: var(--transition);
}

.guide-step:hover {
  border-color: rgba(60, 189, 176, 0.2);
  transform: translateY(-1px);
}

.guide-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gradient);
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  box-shadow: 0 2px 6px rgba(60, 189, 176, 0.25);
}

.guide-step h4 {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.guide-step p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* ── Text Visibility Overrides ── */
.text-white {
  color: var(--text-primary) !important;
}
.text-white-50 {
  color: var(--text-muted) !important;
}
.btn .text-white {
  color: #ffffff !important;
}

/* ── Interactive Profile Avatar Upload styles ── */
.profile-avatar-wrapper {
  position: relative;
  display: inline-block;
  cursor: pointer;
  border-radius: 50%;
  overflow: hidden;
}
.profile-avatar-wrapper .profile-avatar-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.profile-avatar-wrapper:hover .profile-avatar-overlay {
  opacity: 1;
}
.profile-avatar-overlay i {
  color: #ffffff !important;
  font-size: 1.35rem;
}

/* Utility Classes */
.text-center {
  text-align: center !important;
}
.mt-3 {
  margin-top: 1rem !important;
}


