:root {
  /* Brand color synchronization (Matched to Main Page) */
  --sky-blue: #E1F5FE;
  --sky-blue-dark: #B3E5FC;
  --card-white: #FFFFFF;
  --text-main: #0F172A;
  --charcoal: #334155;
  --brass: #C9A14A;
  --brass-soft: #E4C97A;
  --verdant: #3C7C68;
  
  --success-green: #10B981;
  --error-red: #EF4444;
  --mist-line: #D7DCE3;
  
  /* Light Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.85); 
  --glass-border: var(--sky-blue-dark);
  
  /* Typography synced with main Nogadata site */
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Fraunces', Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Force absolute background attachment for maximum browser compatibility */
body { 
  font-family: var(--font-body); 
  color: var(--text-main); 
  min-height: 100vh; 
  margin: 0;
  
  /* Fixed Background Logic */
  background: url('assets/exam-hall-gold.webp') no-repeat center center fixed; 
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
  position: relative;
}

/* Lightened background multiplier to match Sky Blue theme */
.background-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(225, 245, 254, 0.85); /* Sky blue tint */
  z-index: -1;
}

/* Global Typography Overrides */
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--text-main); font-weight: 600; }

/* Circular Logo Logic */
.rounded-logo {
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background-color: #ffffff;
  padding: 6px; 
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 2px solid var(--brass);
}

/* Utility Classes */
.active-state { display: flex !important; }
.full-width { width: 100%; }
.alert-message { padding: 1rem; border-radius: 6px; font-size: 0.875rem; margin-bottom: 1.5rem; font-weight: 500; color: var(--text-main); line-height: 1.5; }
.alert-message.error { background: rgba(239, 68, 68, 0.15); border-left: 4px solid var(--error-red); }
.alert-message.success { background: rgba(16, 185, 129, 0.15); border-left: 4px solid var(--success-green); }
.success-text { color: var(--verdant); font-weight: 600; margin-top: 1rem; font-size: 0.95rem; }

/* ==========================================
   GLASSMORPHISM COMPONENT (Light Theme)
   ========================================== */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  border-radius: 16px;
}

/* ==========================================
   AUTH LAYOUT (CENTERED)
   ========================================== */
.center-layout {
  display: none; 
  min-height: 100vh;
  width: 100%;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-card {
  width: 100%;
  max-width: 480px;
  padding: 3.5rem 3rem;
}

.brand-header { text-align: center; margin-bottom: 2.5rem; }
.brand-logo { height: 90px; margin-bottom: 1.5rem; }
.brand-header h2 { font-size: 2.2rem; margin-bottom: 0.5rem; color: var(--text-main); } 
.brand-header p { color: var(--charcoal); font-size: 1rem; font-weight: 500; margin-bottom: 0.5rem;}
.sub-text { color: var(--charcoal) !important; font-size: 0.85rem !important; font-weight: 400 !important; }

/* Tabs & Inputs */
.tabs { display: flex; gap: 1rem; border-bottom: 2px solid var(--mist-line); margin-bottom: 2rem; }
.tabs button { flex: 1; background: none; border: none; font-size: 1.05rem; font-weight: 600; color: var(--charcoal); cursor: pointer; padding-bottom: 0.75rem; transition: 0.2s; font-family: var(--font-heading); }
.tabs button.active { color: var(--brass); border-bottom: 3px solid var(--brass); margin-bottom: -2px; }
.tabs button:hover:not(.active) { color: var(--text-main); }

.input-group { display: flex; flex-direction: column; margin-bottom: 1.5rem; }
.input-group label { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--text-main); letter-spacing: 0.02em; }
.input-group input { padding: 1rem; border: 1px solid var(--sky-blue-dark); border-radius: 8px; font-size: 1rem; background-color: var(--card-white); color: var(--text-main); transition: 0.2s; }
.input-group input::placeholder { color: #94A3B8; }
.input-group input:focus { outline: none; border-color: var(--brass); background-color: var(--card-white); box-shadow: 0 0 0 3px rgba(201, 161, 74, 0.2); }

.link-text { font-size: 0.9rem; color: var(--verdant); cursor: pointer; text-decoration: none; font-weight: 600; transition: 0.2s; }
.link-text:hover { color: var(--brass); text-decoration: underline; }
#forgotPasswordBtn { text-align: right; display: block; margin-top: -0.5rem; margin-bottom: 2rem; }

/* Buttons */
.btn { padding: 1rem; border: none; border-radius: 8px; font-weight: 600; font-size: 1.05rem; cursor: pointer; transition: 0.2s; font-family: var(--font-body); text-transform: uppercase; letter-spacing: 0.05em; }
.btn:active { transform: scale(0.98); }
.btn--primary { background-color: var(--brass); color: var(--card-white); box-shadow: 0 4px 15px rgba(201, 161, 74, 0.3); }
.btn--primary:hover { background-color: var(--brass-soft); box-shadow: 0 6px 20px rgba(201, 161, 74, 0.4); color: var(--text-main); }

/* ==========================================
   DASHBOARD LAYOUT
   ========================================== */
.dashboard-layout { display: none; min-height: 100vh; padding: 2rem; gap: 2rem; max-width: 1400px; margin: 0 auto; }
.active-dashboard { display: flex !important; }

.sidebar { width: 300px; padding: 2rem; display: flex; flex-direction: column; height: fit-content; }
.sidebar-logo { height: 80px; width: 80px; margin-bottom: 3rem; margin-left: auto; margin-right: auto; }
.nav-item { background: none; border: none; text-align: left; padding: 1rem 1.25rem; border-radius: 8px; font-weight: 600; color: var(--charcoal); cursor: pointer; margin-bottom: 0.5rem; width: 100%; transition: 0.2s; font-size: 1.05rem; }
.nav-item.active, .nav-item:hover { background-color: var(--sky-blue); color: var(--verdant); }

.sidebar-info { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--sky-blue-dark); }
.sidebar-info h4 { color: var(--verdant); margin-bottom: 0.75rem; font-size: 1.1rem; }
.sidebar-info p { font-size: 0.85rem; color: var(--charcoal); line-height: 1.6; }

.dashboard-content { flex: 1; display: flex; flex-direction: column; gap: 2rem; }

.dashboard-header { padding: 2.5rem; }
.dashboard-header h1 { font-size: 2.5rem; margin-bottom: 0.75rem; color: var(--text-main); }
.dashboard-header p { color: var(--charcoal); font-size: 1.1rem; opacity: 0.9; }

/* Info Panels */
.info-panel { padding: 2.5rem; }
.info-panel h2 { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; font-size: 1.75rem; color: var(--text-main); }
.step-badge { background-color: var(--brass); color: var(--card-white); padding: 0.35rem 1rem; border-radius: 999px; font-size: 0.85rem; text-transform: uppercase; font-family: var(--font-body); font-weight: 700; letter-spacing: 0.05em; }

.procedure-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.step h3 { font-size: 1.2rem; margin-bottom: 1rem; color: var(--verdant); }
.step p { font-size: 0.95rem; line-height: 1.7; color: var(--charcoal); }

/* Management & Empty States */
.management-panel { padding: 2.5rem; }
.panel-header { margin-bottom: 2.5rem; border-bottom: 1px solid var(--sky-blue-dark); padding-bottom: 1.5rem; }
.panel-header h2 { font-size: 1.75rem; color: var(--text-main); }

.empty-state { text-align: center; padding: 5rem 2rem; background-color: var(--sky-blue); border: 1px dashed var(--brass); border-radius: 12px; }
.empty-icon { font-size: 3.5rem; margin-bottom: 1.5rem; opacity: 0.9; }
.empty-state h3 { margin-bottom: 1rem; font-size: 1.75rem; color: var(--text-main); }
.empty-state p { color: var(--charcoal); max-width: 500px; margin: 0 auto 2.5rem; font-size: 1.05rem; line-height: 1.6; }

.download-link { display: block; text-align: center; margin-bottom: 2rem; font-size: 1.05rem; background: var(--sky-blue); padding: 1rem; border-radius: 8px; border: 1px solid var(--sky-blue-dark); color: var(--verdant); font-weight: 600; text-decoration: none; }
.download-link:hover { background: var(--sky-blue-dark); color: var(--text-main); }
.file-input { display: inline-block; padding: 1rem; color: var(--text-main); background: var(--sky-blue); border: 1px solid var(--sky-blue-dark); border-radius: 8px; width: 100%; max-width: 400px; cursor: pointer; }

.billing-card { background-color: var(--sky-blue); border: 1px solid var(--sky-blue-dark); padding: 2.5rem; border-radius: 12px; text-align: center; margin-top: 3rem; }
.billing-card h3 { color: var(--text-main); margin-bottom: 1rem; }
.invoice-details { font-size: 1.1rem; color: var(--charcoal); }
.invoice-amount { font-size: 3rem; font-weight: 700; color: var(--brass); margin: 0.5rem 0 2rem 0; font-family: var(--font-heading); }

/* Table */
.dashboard-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.dashboard-table th { padding: 1.25rem 1rem; text-align: left; font-size: 0.9rem; color: var(--verdant); border-bottom: 2px solid var(--sky-blue-dark); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
.dashboard-table td { padding: 1.25rem 1rem; border-bottom: 1px solid var(--mist-line); font-size: 0.95rem; color: var(--charcoal); }
.dashboard-table tr:hover td { background-color: var(--sky-blue); }
.score-badge { padding: 0.4rem 1rem; border-radius: 99px; font-size: 0.8rem; font-weight: 600; background: var(--sky-blue); color: var(--verdant); border: 1px solid var(--sky-blue-dark); }

@media (max-width: 1024px) {
  .dashboard-layout { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; padding: 1.5rem; }
  .sidebar-logo { margin-bottom: 0; height: 60px; width: 60px; }
  .sidebar-info { display: none; }
  .procedure-steps { grid-template-columns: 1fr; }
}