/* Glassmorphic Overlay */
.reauth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999; /* Ensure it overlays everything including chat and loaders */
  animation: fade-in 0.3s ease-out;
}

/* Premium Card */
.reauth-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04), 0 0 40px rgba(99, 102, 241, 0.05);
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Animations */
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pop-in {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.animate-pop-in {
  animation: pop-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Header */
.reauth-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.reauth-logo {
  font-size: 1.2rem;
  font-weight: 800;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.5px;
  box-shadow: 0 4px 14px rgba(96, 165, 250, 0.35);
  margin-bottom: 0.5rem;
}

.reauth-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.5px;
  margin: 0;
}

.reauth-description {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
  max-width: 320px;
}

/* Form */
.reauth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.reauth-error {
  background-color: #fef2f2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.4;
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.reauth-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.reauth-form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}

.reauth-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #0f172a;
  transition: all 0.2s ease;
  background-color: #ffffff;
}

.reauth-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.reauth-input-disabled {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #64748b;
  background-color: #f8fafc;
  cursor: not-allowed;
}

/* Submit Button */
.reauth-submit-btn {
  width: 100%;
  padding: 0.875rem;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.reauth-submit-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.3);
}

.reauth-submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.reauth-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Spinner */
.reauth-spinner-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.reauth-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Footer / Sign Out */
.reauth-footer {
  display: flex;
  justify-content: center;
  border-top: 1px solid #f1f5f9;
  padding-top: 1.25rem;
}

.reauth-signout-btn {
  background: none;
  border: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: #ef4444;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.reauth-signout-btn:hover {
  background-color: #fef2f2;
  text-decoration: underline;
}
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 1rem;
}

.login-card {
  background: white;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 420px;
}

.login-card h1 {
  margin: 0 0 0.5rem 0;
  color: #1a202c;
  font-size: 2rem;
  text-align: center;
}

.login-subtitle {
  color: #64748b;
  text-align: center;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.login-error {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #374151;
  font-weight: 500;
  font-size: 0.9rem;
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s;
  background-color: #ffffff;
  color: #0f172a;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
}

.login-card button[type="submit"] {
  width: 100%;
  padding: 0.875rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}

button[type="submit"]:hover:not(:disabled) {
  transform: translateY(-1px);
}

button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.forgot-password-link-container {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.5rem;
}

.forgot-password-link-container a {
  color: #667eea;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
}

.forgot-password-link-container a:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* Two-Factor Authentication Step */
.login-mfa-header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.login-mfa-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

.login-mfa-description {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.5;
  margin: 0;
}

.login-mfa-code-input {
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.35rem !important;
  font-weight: 700;
  letter-spacing: 0.25em;
}

.login-mfa-toggle-container {
  display: flex;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.login-mfa-toggle-btn {
  background: none;
  border: none;
  color: #667eea;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  text-decoration: underline;
}

.login-mfa-toggle-btn:hover {
  color: #764ba2;
}

.login-mfa-back-btn {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.7rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #475569;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.login-mfa-back-btn:hover:not(:disabled) {
  background: #f1f5f9;
  color: #0f172a;
}

/* Dark Theme Overrides */
body.dark-theme .login-card {
  background: #1e293b;
  border: 1px solid #334155;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

body.dark-theme .login-card h1 {
  color: #f8fafc;
}

body.dark-theme .login-subtitle {
  color: #94a3b8;
}

body.dark-theme .form-group label {
  color: #cbd5e1;
}

body.dark-theme .form-group input {
  background-color: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}

body.dark-theme .form-group input:focus {
  border-color: #818cf8;
}

body.dark-theme .login-error {
  background-color: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

body.dark-theme .login-mfa-badge {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}

body.dark-theme .login-mfa-description {
  color: #cbd5e1;
}

body.dark-theme .login-mfa-toggle-btn {
  color: #93c5fd;
}

body.dark-theme .login-mfa-toggle-btn:hover {
  color: #bfdbfe;
}

body.dark-theme .login-mfa-back-btn {
  background: #0f172a;
  border-color: #334155;
  color: #cbd5e1;
}

body.dark-theme .login-mfa-back-btn:hover:not(:disabled) {
  background: #334155;
  color: #f8fafc;
}
.onboard-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 1.5rem;
}

.onboard-card {
  background: white;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 440px;
}

.onboard-card h1 {
  margin: 0 0 0.5rem 0;
  color: #1a202c;
  font-size: 2rem;
  text-align: center;
}

.onboard-subtitle {
  color: #764ba2;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.onboard-description {
  color: #64748b;
  text-align: center;
  margin-bottom: 2rem;
  font-size: 0.95rem;
  line-height: 1.4;
}

.onboard-error {
  background-color: #fee;
  color: #c33;
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.onboard-back-btn {
  display: block;
  width: 100%;
  padding: 0.875rem;
  background: #f1f5f9;
  color: #475569;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s;
  margin-top: 1rem;
}

.onboard-back-btn:hover {
  background: #e2e8f0;
}

/* Loading & success states */
.loading-state,
.error-state,
.success-state {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.spinner {
  border: 3px solid rgba(99, 102, 241, 0.15);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border-top-color: #6366f1;
  border-right-color: #8b5cf6;
  animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  margin-bottom: 1rem;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.12);
}

body.dark-theme .onboard-card {
  background: #1e293b;
  border: 1px solid #334155;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

body.dark-theme .onboard-card h1 {
  color: #f8fafc;
}

body.dark-theme .onboard-subtitle {
  color: #818cf8;
}

body.dark-theme .onboard-description,
body.dark-theme .redirect-hint,
body.dark-theme .loading-state p {
  color: #94a3b8;
}

body.dark-theme .spinner {
  border-color: rgba(129, 140, 248, 0.18);
  border-top-color: #818cf8;
  border-right-color: #a78bfa;
}

body.dark-theme .success-message {
  color: #34d399;
}

body.dark-theme .success-loader {
  background-color: #334155;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.success-message {
  color: #0f766e;
  font-size: 1.1rem;
  margin: 1rem 0;
}

.redirect-hint {
  color: #64748b;
  font-size: 0.9rem;
}

.success-loader {
  width: 100%;
  height: 4px;
  background-color: #e2e8f0;
  border-radius: 9999px;
  margin-top: 1.5rem;
  position: relative;
  overflow: hidden;
}

.success-loader::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 50%, #10b981 100%);
  border-radius: 9999px;
  animation: loading-bar 2.2s ease-in-out infinite;
}

@keyframes loading-bar {
  0% { left: -30%; width: 30%; }
  50% { left: 30%; width: 40%; }
  100% { left: 100%; width: 30%; }
}
/* General Setup Workspace Styling */
.env-setup-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem;
  background-color: #0b0f19;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #f1f5f9;
  position: relative;
  overflow: hidden;
}

/* Background gradient nodes */
.env-setup-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.gradient-sphere {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
}

.sphere-1 {
  top: -10%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
}

.sphere-2 {
  bottom: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
}

/* Glassmorphism setup card */
.env-setup-card {
  width: 100%;
  max-width: 650px;
  background: rgba(17, 24, 39, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 3rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  z-index: 10;
  position: relative;
}

.env-setup-card-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  border-radius: 16px;
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1rem;
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}

.env-setup-card-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 0.5rem 0;
  background: linear-gradient(to right, #f8fafc, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.env-setup-card-header .subtitle {
  font-size: 0.95rem;
  color: #94a3b8;
  margin: 0;
}

/* Horizontal stepper layout */
.env-setup-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3rem;
  padding: 0 1rem;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1e293b;
  border: 2px solid #334155;
  color: #64748b;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #64748b;
  transition: color 0.3s ease;
}

.step-connector {
  flex: 1;
  height: 2px;
  background: #334155;
  margin: 0 1rem;
  transform: translateY(-13px);
  z-index: 1;
}

.step-item.active .step-num {
  border-color: #3b82f6;
  background: #0f172a;
  color: #3b82f6;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

.step-item.active .step-label {
  color: #3b82f6;
  font-weight: 600;
}

.step-item.completed .step-num {
  background: #3b82f6;
  border-color: #3b82f6;
  color: white;
}

.step-item.completed .step-label {
  color: #94a3b8;
}

/* Form inputs & grids */
.env-setup-container .form-group {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
}

.env-setup-container .form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.env-setup-container .form-group input,
.env-setup-container .form-group select {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  /* color: white; */
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.env-setup-container .form-group input:focus,
.env-setup-container .form-group select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  background: rgba(15, 23, 42, 0.8);
}

.env-setup-container .grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.env-setup-container .step-desc {
  font-size: 0.95rem;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 1.75rem;
}

/* Provider selector tabs */
.env-setup-container .provider-selector {
  display: flex;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid #334155;
  padding: 0.25rem;
  border-radius: 12px;
  margin-bottom: 1.75rem;
}

.env-setup-container .provider-tab {
  flex: 1;
  border: none;
  background: transparent;
  color: #64748b;
  padding: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.env-setup-container .provider-tab:hover {
  color: #94a3b8;
}

.env-setup-container .provider-tab.active {
  background: #1e293b;
  color: #f8fafc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Button aesthetics */
.env-setup-container .btn {
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.8rem 1.75rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.env-setup-container .btn-env-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  width: 100%;
}

.env-setup-container .btn-env-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.env-setup-container .btn-env-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.env-setup-container .btn-env-secondary {
  background: #1e293b;
  color: #cbd5e1;
  border: 1px solid #334155;
}

.env-setup-container .btn-env-secondary:hover {
  background: #334155;
  color: white;
}

.env-setup-container .env-setup-buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2rem;
  gap: 1rem;
}

.env-setup-container .env-setup-buttons .btn-env-primary {
  width: auto;
}

/* Error layout */
.env-setup-container .env-error-banner {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  padding: 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

/* Success layout */
.env-setup-container .env-setup-success {
  text-align: center;
  padding: 1rem 0;
}

.env-setup-container .success-badge {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  animation: bounce 2s infinite;
}

.env-setup-container .summary-box {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 1.5rem;
  text-align: left;
  margin: 2rem 0;
}

.env-setup-container .summary-box h4 {
  margin: 0 0 1rem 0;
  color: #3b82f6;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.env-setup-container .summary-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.env-setup-container .summary-box li {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  color: #94a3b8;
}

.env-setup-container .summary-box li:last-child {
  margin-bottom: 0;
}

.env-setup-container .summary-box strong {
  color: #f1f5f9;
}

/* Dynamic Fade-in keyframes */
.env-setup-container .fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
.campus-picker-container {
  position: relative;
  font-family: inherit;
}

.campus-picker-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(30, 41, 59, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 14px;
  border-radius: 8px;
  color: #f1f5f9;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.85rem;
  font-weight: 500;
  backdrop-filter: blur(8px);
}

.campus-picker-trigger:hover {
  background: rgba(51, 65, 85, 0.85);
  border-color: rgba(96, 165, 250, 0.4);
  transform: translateY(-1px);
}

.campus-picker-trigger.active {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.15);
}

.campus-picker-static {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(189, 189, 189, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 14px;
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: default;
}

.campus-picker-icon {
  font-size: 1.1rem;
}

.campus-picker-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.campus-picker-school-name {
  font-size: 0.7rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  line-height: 1.2;
}

.campus-picker-campus-name {
  color: #f8fafc;
  font-weight: 600;
  line-height: 1.3;
}

.campus-picker-arrow {
  font-size: 0.65rem;
  color: #94a3b8;
  margin-left: 4px;
  transition: transform 0.2s ease;
}

.campus-picker-trigger.active .campus-picker-arrow {
  transform: rotate(180deg);
}

/* Dropdown Menu styling */
.campus-picker-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 280px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  z-index: 1100;
  overflow: hidden;
  padding: 8px 0;
  animation: campusDropdownSlide 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes campusDropdownSlide {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.campus-picker-dropdown-header {
  padding: 8px 16px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 6px;
}

.campus-picker-school-group {
  margin-bottom: 8px;
}

.campus-picker-school-group:last-child {
  margin-bottom: 0;
}

.campus-picker-school-header {
  padding: 4px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #38bdf8;
  letter-spacing: 0.25px;
}

.campus-picker-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: #cbd5e1;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.8rem;
  font-family: inherit;
}

.campus-picker-option:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
}

.campus-picker-option.selected {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.15) 0%, transparent 100%);
  color: #60a5fa;
  font-weight: 600;
  box-shadow: inset 3px 0 0 #3b82f6;
}

.campus-picker-option-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.campus-picker-option-name {
  font-size: 0.85rem;
}

.campus-picker-option-role {
  font-size: 0.65rem;
  color: #94a3b8;
  font-weight: 500;
}

.campus-picker-option.selected .campus-picker-option-role {
  color: #93c5fd;
}

.campus-picker-option-check {
  font-size: 0.85rem;
  color: #3b82f6;
}
.db-container {
  padding: 2.5rem;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* Welcome Hero Banner */
.db-hero {
  position: relative;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  border-radius: 18px;
  padding: 3rem;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.db-hero-content {
  position: relative;
  z-index: 2;
  max-width: 60%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.db-hero-pill {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(96, 165, 250, 0.2);
}

.db-hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 60%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.db-hero-subtitle {
  font-size: 1.05rem;
  color: #94a3b8;
  line-height: 1.6;
}

.db-hero-meta {
  display: flex;
  gap: 1.25rem;
  margin-top: 0.5rem;
}

.db-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.db-meta-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399; /* Success color */
}

/* Background Graphics for Hero */
.db-hero-graphics {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 40%;
  overflow: hidden;
  pointer-events: none;
}

.db-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
}

.db-circle-1 {
  width: 250px;
  height: 250px;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  right: -50px;
  top: -50px;
  opacity: 0.35;
  animation: pulse-graf 8s infinite alternate ease-in-out;
}

.db-circle-2 {
  width: 180px;
  height: 180px;
  background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
  right: 120px;
  bottom: -40px;
  opacity: 0.25;
  animation: pulse-graf 6s infinite alternate-reverse ease-in-out;
}

@keyframes pulse-graf {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.15) translate(10px, 10px); }
}

/* Stats Summary Grid */
.db-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.db-stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}

.db-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.db-stat-icon {
  font-size: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.db-stat-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.db-stat-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.db-stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
}

.db-stat-value--online {
  color: #10b981;
}

.db-stat-trend {
  font-size: 12px;
  color: #94a3b8;
}

/* Modules Section */
.db-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1.25rem;
}

.db-modules-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.db-module-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 240px;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.db-module-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: transparent;
  transition: background 0.25s;
}

.db-module-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 20px -8px rgba(99, 102, 241, 0.15), 0 8px 16px -8px rgba(0, 0, 0, 0.05);
  border-color: #cbd5e1;
}

.db-module-card:hover::after {
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.db-module-badge {
  font-size: 1.75rem;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.db-module-badge--nexus       { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.db-module-badge--timetable   { background: #eff6ff; color: #2563eb; }
.db-module-badge--comms       { background: #f5f3ff; color: #7c3aed; }
.db-module-badge--admin       { background: #fee2e2; color: #ef4444; }
.db-module-badge--equilibrium { background: #f0fdfa; color: #0d9488; }
.db-module-badge--disabilities { background: #f0fdf4; color: #16a34a; }

.db-module-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.db-module-name {
  font-size: 1.2rem;
  font-weight: 750;
  color: #0f172a;
}

.db-module-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

.db-module-action {
  margin-top: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: #6366f1;
}

.db-arrow {
  font-size: 14px;
  transition: transform 0.2s;
}

.db-module-card:hover .db-arrow {
  transform: translateX(4px);
}

/* Responsiveness */
@media (max-width: 1024px) {
  .db-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .db-modules-grid {
    grid-template-columns: 1fr;
  }
  
  .db-hero {
    padding: 2rem;
  }
  
  .db-hero-content {
    max-width: 100%;
  }
  
  .db-hero-graphics {
    display: none;
  }
}

/* Dark Theme Overrides */
body.dark-theme .db-stat-card {
  background: #131b2e;
  border-color: #1e293b;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

body.dark-theme .db-stat-card:hover {
  background: #17223b;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

body.dark-theme .db-stat-icon {
  background: #1e293b;
}

body.dark-theme .db-stat-label {
  color: #94a3b8;
}

body.dark-theme .db-stat-value {
  color: #f8fafc;
}

body.dark-theme .db-stat-trend {
  color: #64748b;
}

body.dark-theme .db-section-title {
  color: #f8fafc;
}

body.dark-theme .db-module-card {
  background: #131b2e;
  border-color: #1e293b;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

body.dark-theme .db-module-card:hover {
  border-color: #334155;
  box-shadow: 0 12px 20px -8px rgba(99, 102, 241, 0.3), 0 8px 16px -8px rgba(0, 0, 0, 0.3);
}

body.dark-theme .db-module-name {
  color: #f8fafc;
}

body.dark-theme .db-module-desc {
  color: #94a3b8;
}

body.dark-theme .db-module-action {
  color: #818cf8;
}

/* Dark Theme Badge Overrides */
body.dark-theme .db-module-badge--timetable {
  background: #1e3a8a;
  color: #93c5fd;
}

body.dark-theme .db-module-badge--comms {
  background: #581c87;
  color: #d8b4fe;
}

body.dark-theme .db-module-badge--admin {
  background: #7f1d1d;
  color: #fca5a5;
}

body.dark-theme .db-module-badge--equilibrium {
  background: #115e59;
  color: #2dd4bf;
}

body.dark-theme .db-module-badge--disabilities {
  background: #14532d;
  color: #4ade80;
}
/* First-Time Setup Wizard Styles */

.wizard-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: overlayFadeIn 0.3s ease-out;
}

.wizard-card {
  width: 100%;
  max-width: 580px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 20px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04),
              0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.wizard-progress-bar {
  height: 6px;
  width: 100%;
  background: #f1f5f9;
  position: relative;
}

.wizard-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6 0%, #6366f1 100%);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wizard-progress-fill.step-1 {
  width: 25%;
}

.wizard-progress-fill.step-2 {
  width: 50%;
}

.wizard-progress-fill.step-3 {
  width: 75%;
}

.wizard-progress-fill.step-4 {
  width: 100%;
  background: #10b981;
}

.wizard-body {
  padding: 2.5rem;
}

.wizard-step {
  display: flex;
  flex-direction: column;
}

.wizard-badge {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6366f1;
  margin-bottom: 0.5rem;
}

.wizard-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.75rem 0;
  line-height: 1.25;
}

.wizard-desc {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.6;
  margin: 0 0 2rem 0;
}

.wizard-input-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.5rem;
}

.wizard-input-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.wizard-input-group input {
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  transition: all 0.2s ease;
}

.wizard-input-group input:focus {
  outline: none;
  border-color: #3b82f6;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.wizard-error-msg {
  padding: 0.75rem 1rem;
  background: #fef2f2;
  border-radius: 8px;
  color: #991b1b;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  animation: shake 0.4s ease;
}

.wizard-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
}

.campus-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  min-height: 80px;
  align-content: flex-start;
}

.campus-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.875rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  animation: scaleIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.campus-chip--seeded {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

.chip-icon {
  margin-right: 0.375rem;
}

.chip-remove {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.125rem;
  line-height: 1;
  padding: 0;
  margin-left: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  transition: all 0.15s ease;
}

.chip-remove:hover {
  background: #f1f5f9;
  color: #64748b;
}

.wizard-add-form {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.wizard-add-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  font-size: 0.95rem;
}

.wizard-add-form input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.wizard-step--success {
  text-align: center;
  align-items: center;
}

.success-icon-badge {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  animation: bounce 1s infinite alternate;
}

.wizard-summary-box {
  width: 100%;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 2rem;
  text-align: left;
}

.wizard-summary-box h4 {
  margin: 0 0 0.75rem 0;
  color: #14532d;
  font-size: 0.95rem;
  font-weight: 700;
}

.wizard-summary-box ul {
  margin: 0;
  padding-left: 1.25rem;
  color: #166534;
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Animations */
@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fade-in 0.35s ease-out forwards;
}

@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

@keyframes bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}
/* Overlay Container */
.j-wizard-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(11, 15, 25, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  font-family: 'Inter', sans-serif;
  color: #e2e8f0;
}

/* Card layout */
.j-wizard-card {
  width: 100%;
  max-width: 600px;
  background: #111827;
  border: 1px solid #1f2937;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
}

/* Progress bar filling */
.j-wizard-progress-bar {
  height: 4px;
  background: #1f2937;
  width: 100%;
}

.j-wizard-progress-fill {
  height: 100%;
  background: linear-gradient(to right, #3b82f6, #8b5cf6);
  width: 0%;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.j-wizard-progress-fill.step-1 {
  width: 33.3%;
}

.j-wizard-progress-fill.step-2 {
  width: 66.6%;
}

.j-wizard-progress-fill.step-3 {
  width: 100%;
}

.j-wizard-body {
  padding: 2.5rem;
}

.j-wizard-step {
  display: flex;
  flex-direction: column;
}

.j-wizard-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #3b82f6;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.j-wizard-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.75rem 0;
  color: #f8fafc;
}

.j-wizard-desc {
  font-size: 0.95rem;
  color: #94a3b8;
  line-height: 1.6;
  margin: 0 0 2rem 0;
}

.j-wizard-info-box {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 2rem;
}

.j-wizard-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
  border-top: 1px solid #1f2937;
  padding-top: 1.5rem;
}

/* Providers tabs */
.j-provider-selector {
  display: flex;
  background: #0f172a;
  border: 1px solid #1f2937;
  padding: 0.2rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

.j-provider-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: #64748b;
  font-weight: 600;
  padding: 0.6rem;
  font-size: 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.j-provider-tab.active {
  background: #1e293b;
  color: white;
}

/* Form structure */
.j-form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 1.25rem;
}

.j-form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.j-form-group input {
  background: #0f172a;
  border: 1px solid #1f2937;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  color: white;
  font-size: 0.9rem;
}

.j-form-group input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.j-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Error message */
.j-wizard-error-msg {
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.15);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-top: 1rem;
}

/* Success layout */
.j-wizard-step--success {
  align-items: center;
  text-align: center;
}

.j-success-icon-badge {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.j-wizard-summary-box {
  background: #0f172a;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: left;
  width: 100%;
  margin-bottom: 1.5rem;
}

.j-wizard-summary-box h4 {
  margin: 0 0 0.75rem 0;
  color: #3b82f6;
  font-size: 0.9rem;
}

.j-wizard-summary-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.j-wizard-summary-box li {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: #94a3b8;
}

.j-wizard-summary-box strong {
  color: white;
}
.custom-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1500;
  padding: 1.5rem;
}

.custom-modal-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transform-origin: center;
}

.custom-modal-card.animate-pop-in {
  animation: modal-pop-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modal-pop-in {
  from {
    transform: scale(0.92) translateY(10px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.custom-modal-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.custom-modal-logo {
  font-size: 1.1rem;
  font-weight: 800;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(96, 165, 250, 0.35);
  margin-bottom: 0.25rem;
}

.custom-modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.custom-modal-body {
  text-align: center;
}

.custom-modal-message {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.5;
  margin: 0;
}

.custom-modal-footer {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  width: 100%;
}

.custom-modal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  flex: 1;
}

.custom-modal-btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: 1px solid #059669;
  color: #ffffff;
}

.custom-modal-btn-primary:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.custom-modal-btn-primary:active {
  transform: translateY(0);
}

.custom-modal-btn-secondary {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #475569;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.custom-modal-btn-secondary:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #1e293b;
}

.custom-modal-btn-ok {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: 1px solid #2563eb;
  color: #ffffff;
}

.custom-modal-btn-ok:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.custom-modal-btn-ok:active {
  transform: translateY(0);
}

.custom-modal-btn:disabled {
  background: #cbd5e1 !important;
  border-color: #cbd5e1 !important;
  color: #94a3b8 !important;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.custom-modal-spinner-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.custom-modal-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: custom-modal-spin 0.6s linear infinite;
}

@keyframes custom-modal-spin {
  to { transform: rotate(360deg); }
}
.mfa-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2100;
  padding: 1rem;
}

.mfa-modal-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
}

.mfa-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  border-top-left-radius: 14px;
  border-top-right-radius: 14px;
}

.mfa-modal-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.mfa-modal-icon {
  font-size: 1.6rem;
}

.mfa-modal-header h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}

.mfa-modal-subtitle {
  margin: 2px 0 0 0;
  font-size: 0.8rem;
  color: #64748b;
}

.mfa-modal-close {
  border: none;
  background: transparent;
  font-size: 1.6rem;
  color: #64748b;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  line-height: 1;
  border-radius: 6px;
}

.mfa-modal-close:hover {
  color: #0f172a;
  background: #e2e8f0;
}

.mfa-modal-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mfa-loading {
  text-align: center;
  padding: 2rem;
  color: #64748b;
  font-size: 0.95rem;
}

.mfa-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  line-height: 1.45;
}

.mfa-alert p {
  margin: 0.25rem 0 0 0;
}

.mfa-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.mfa-alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
}

.mfa-alert-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.mfa-alert-mandatory {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.mfa-policy-enforcement-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.825rem;
  color: #64748b;
  padding-top: 0.5rem;
  border-top: 1px solid #e2e8f0;
}

.mfa-policy-badge {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.6rem;
  border-radius: 9999px;
}

.mfa-status-banner {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.mfa-status-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mfa-status-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}

.mfa-status-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}

.mfa-status-badge.enabled {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.mfa-status-badge.disabled {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.mfa-recovery-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.825rem;
  color: #64748b;
  padding-top: 0.5rem;
  border-top: 1px solid #e2e8f0;
}

.mfa-info-section p,
.mfa-enabled-text {
  font-size: 0.9rem;
  color: #334155;
  line-height: 1.55;
  margin: 0 0 1rem 0;
}

.mfa-feature-list {
  margin: 0 0 1.5rem 0;
  padding-left: 1.25rem;
  color: #475569;
  font-size: 0.875rem;
  line-height: 1.65;
}

.mfa-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mfa-btn {
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

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

.mfa-btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  color: #ffffff;
}

.mfa-btn-primary:hover:not(:disabled) {
  opacity: 0.95;
  transform: translateY(-1px);
}

.mfa-btn-secondary {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #334155;
}

.mfa-btn-secondary:hover:not(:disabled) {
  background: #f1f5f9;
  color: #0f172a;
}

.mfa-btn-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.mfa-btn-danger:hover:not(:disabled) {
  background: #fee2e2;
  color: #b91c1c;
}

/* Setup View */
.mfa-setup-view,
.mfa-confirm-view,
.mfa-recovery-view {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mfa-step {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.15rem;
}

.mfa-step-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.mfa-step-number {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #3b82f6;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mfa-step-header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.mfa-step-desc {
  margin: 0 0 0.9rem 0;
  font-size: 0.85rem;
  color: #475569;
  line-height: 1.5;
}

.mfa-qr-container {
  display: flex;
  justify-content: center;
  margin: 0.75rem 0;
}

.mfa-qr-image {
  width: 180px;
  height: 180px;
  border-radius: 10px;
  border: 4px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  background: #ffffff;
}

.mfa-manual-secret {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mfa-manual-label {
  font-size: 0.78rem;
  color: #64748b;
}

.mfa-secret-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
}

.mfa-secret-box code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.08em;
  word-break: break-all;
}

.mfa-copy-inline-btn {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #2563eb;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}

.mfa-copy-inline-btn:hover {
  background: #dbeafe;
}

.mfa-code-input {
  width: 100%;
  padding: 0.7rem;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: #0f172a;
  background: #ffffff;
}

.mfa-code-input:focus {
  outline: none;
  border-color: #3b82f6;
}

.mfa-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.mfa-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}

.mfa-field input[type="password"] {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #0f172a;
  background: #ffffff;
}

.mfa-field input[type="password"]:focus {
  outline: none;
  border-color: #3b82f6;
}

.mfa-form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.mfa-form-footer .mfa-btn {
  flex: 1;
}

/* Recovery Codes Grid */
.mfa-codes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 1rem;
}

.mfa-code-pill {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.5rem;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 0.08em;
}

.mfa-recovery-actions {
  display: flex;
  gap: 0.75rem;
}

.mfa-recovery-actions .mfa-btn {
  flex: 1;
}

/* Dark Theme Support */
body.dark-theme .mfa-modal-card {
  background: #1e293b;
  border-color: #334155;
}

body.dark-theme .mfa-modal-header {
  background: #0f172a;
  border-bottom-color: #334155;
}

body.dark-theme .mfa-modal-header h2 {
  color: #f8fafc;
}

body.dark-theme .mfa-modal-subtitle {
  color: #94a3b8;
}

body.dark-theme .mfa-modal-close {
  color: #94a3b8;
}

body.dark-theme .mfa-modal-close:hover {
  color: #f8fafc;
  background: #334155;
}

body.dark-theme .mfa-status-banner,
body.dark-theme .mfa-step,
body.dark-theme .mfa-codes-grid {
  background: #0f172a;
  border-color: #334155;
}

body.dark-theme .mfa-status-label,
body.dark-theme .mfa-info-section p,
body.dark-theme .mfa-enabled-text,
body.dark-theme .mfa-step-header h3,
body.dark-theme .mfa-field label {
  color: #f1f5f9;
}

body.dark-theme .mfa-feature-list,
body.dark-theme .mfa-step-desc,
body.dark-theme .mfa-recovery-count,
body.dark-theme .mfa-manual-label {
  color: #cbd5e1;
}

body.dark-theme .mfa-recovery-count {
  border-top-color: #334155;
}

body.dark-theme .mfa-status-badge.disabled {
  background: #334155;
  color: #cbd5e1;
  border-color: #475569;
}

body.dark-theme .mfa-status-badge.enabled {
  background: rgba(22, 163, 74, 0.2);
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.4);
}

body.dark-theme .mfa-secret-box,
body.dark-theme .mfa-code-input,
body.dark-theme .mfa-field input[type="password"],
body.dark-theme .mfa-code-pill {
  background: #1e293b;
  border-color: #475569;
  color: #f8fafc;
}

body.dark-theme .mfa-secret-box code {
  color: #f8fafc;
}

body.dark-theme .mfa-btn-secondary {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

body.dark-theme .mfa-btn-secondary:hover:not(:disabled) {
  background: #334155;
  color: #ffffff;
}

body.dark-theme .mfa-btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

body.dark-theme .mfa-btn-danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.25);
  color: #fecaca;
}

body.dark-theme .mfa-alert-error {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

body.dark-theme .mfa-alert-success {
  background: rgba(22, 163, 74, 0.15);
  border-color: rgba(22, 163, 74, 0.35);
  color: #86efac;
}

body.dark-theme .mfa-alert-warning {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fde68a;
}

body.dark-theme .mfa-alert-mandatory {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.35);
  color: #bfdbfe;
}

body.dark-theme .mfa-policy-enforcement-row {
  border-top-color: #334155;
  color: #cbd5e1;
}

body.dark-theme .mfa-policy-badge {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  border-color: rgba(147, 197, 253, 0.4);
}

/* Premium Glassmorphic AI Assistant Drawer Styling */

.ai-bubble {
  position: fixed;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
  border: none;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4), 0 8px 30px rgba(0, 0, 0, 0.2);
  color: #ffffff;
  cursor: pointer;
  z-index: 1040;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* Dynamic positioning to prevent overlaps in Shell */
.ai-bubble {
  bottom: 24px;
}

/* If Timetabling page: push up above settings (24px) and staff chat (96px) */
body:has([href*="/timetabling"]) .ai-bubble,
body:has(.shell-settings-trigger) .ai-bubble {
  bottom: 168px;
}

/* If Nexus page: push up above staff chat (24px) */
body:has([href*="/nexus"]) .ai-bubble {
  bottom: 96px;
}

.ai-bubble:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 6px 24px rgba(124, 58, 237, 0.5), 0 10px 35px rgba(0, 0, 0, 0.25);
}

.ai-bubble:active {
  transform: scale(0.95);
}

.bubble-icon {
  font-size: 1.5rem;
  z-index: 2;
  transition: transform 0.25s ease;
}

.ai-bubble:hover .bubble-icon {
  transform: rotate(10deg);
}

.bubble-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 70%);
  z-index: 1;
  opacity: 0.8;
  animation: pulse-glow 3s infinite alternate;
}

@keyframes pulse-glow {
  0% {
    transform: scale(0.9);
    opacity: 0.5;
  }
  100% {
    transform: scale(1.1);
    opacity: 0.9;
  }
}

/* Glassmorphic Drawer Container */
.ai-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 440px;
  max-width: 92vw;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.35);
  z-index: 1060;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.ai-drawer.open {
  transform: translateX(0);
}

.ai-drawer.popped-out {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  transform: none;
  border-left: none;
  box-shadow: none;
}

/* Header styling */
.ai-drawer-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(30, 41, 59, 0.55);
}

.header-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-icon {
  font-size: 1.5rem;
}

.header-title h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 2px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.header-walkthrough-btn,
.header-info-btn,
.header-popout-btn {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  color: #e2e8f0;
  transition: all 0.15s ease;
}

.header-walkthrough-btn:hover,
.header-info-btn:hover,
.header-popout-btn:hover,
.header-walkthrough-btn.active,
.header-info-btn.active,
.header-popout-btn.active {
  background: rgba(124, 58, 237, 0.3);
  border-color: #8b5cf6;
  color: #ffffff;
}

.header-close {
  border: none;
  background: transparent;
  font-size: 1.75rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-close:hover {
  color: #ffffff;
  transform: rotate(90deg);
}

/* Proactive Readiness & Diagnostics Bar */
.ai-readiness-bar {
  background: rgba(15, 23, 42, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.55rem 1rem;
}

.ai-readiness-bar-main {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.ai-readiness-toggle-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  color: #e2e8f0;
  cursor: pointer;
  font-size: 0.78rem;
  text-align: left;
  transition: all 0.15s ease;
}

.ai-readiness-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(139, 92, 246, 0.5);
}

.ai-score-pill {
  font-weight: 700;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 999px;
}

.ai-score-pill.ready {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.ai-score-pill.warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.ai-score-pill.error {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.ai-readiness-summary {
  flex: 1;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-issue-count-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.ai-chevron {
  font-size: 0.65rem;
  color: #94a3b8;
}

.ai-readiness-refresh-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border-radius: 8px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-readiness-refresh-btn:hover {
  background: rgba(124, 58, 237, 0.25);
  color: #ffffff;
}

/* Expandable Diagnostics & Checklist Panel */
.ai-diagnostics-drawer {
  margin-top: 0.65rem;
  max-height: 310px;
  overflow-y: auto;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ai-diag-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-top: 0.25rem;
}

.ai-readiness-steps-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ai-readiness-step-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.step-status-icon {
  font-size: 0.85rem;
}

.step-row-info {
  flex: 1;
  min-width: 0;
}

.step-row-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #f8fafc;
}

.step-row-detail {
  font-size: 0.7rem;
  color: #94a3b8;
}

.step-go-btn,
.step-ask-btn {
  background: rgba(124, 58, 237, 0.22);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #ddd6fe;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.step-go-btn:hover,
.step-ask-btn:hover {
  background: #7c3aed;
  color: #ffffff;
}

.ai-issues-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ai-issue-card {
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  background: rgba(30, 41, 59, 0.75);
  border-left: 3px solid #f59e0b;
}

.ai-issue-card.error {
  border-left-color: #ef4444;
  background: rgba(127, 29, 29, 0.22);
}

.ai-issue-card.warning {
  border-left-color: #f59e0b;
  background: rgba(120, 53, 15, 0.2);
}

.ai-issue-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: #ffffff;
}

.ai-issue-badge {
  font-size: 0.68rem;
  font-weight: 700;
}

.ai-issue-msg {
  margin: 0.25rem 0;
  font-size: 0.74rem;
  color: #cbd5e1;
  line-height: 1.35;
}

.ai-issue-fix {
  margin: 0.2rem 0 0.45rem 0;
  font-size: 0.72rem;
  color: #a7f3d0;
  line-height: 1.35;
}

.ai-issue-actions {
  display: flex;
  gap: 0.4rem;
}

/* Walkthrough Picker */
.ai-walkthrough-picker {
  padding: 0.85rem 1rem;
  background: rgba(30, 41, 59, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wt-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wt-picker-header h4 {
  margin: 0;
  font-size: 0.9rem;
  color: #ffffff;
}

.wt-picker-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.25rem;
  cursor: pointer;
}

.wt-picker-sub {
  margin: 0.25rem 0 0.6rem 0;
  font-size: 0.75rem;
  color: #94a3b8;
}

.wt-picker-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.wt-picker-item {
  text-align: left;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  color: #f8fafc;
  cursor: pointer;
  transition: all 0.15s ease;
}

.wt-picker-item:hover,
.wt-picker-item.active {
  border-color: #8b5cf6;
  background: rgba(124, 58, 237, 0.18);
}

.wt-picker-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.wt-progress-pill {
  font-size: 0.68rem;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.25);
  color: #ddd6fe;
}

.wt-picker-item p {
  margin: 0.25rem 0 0 0;
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.35;
}

/* Pinned Interactive Walkthrough Stepper Card (Option A) */
.ai-walkthrough-card {
  margin: 0.65rem 1rem 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(49, 46, 129, 0.55) 0%, rgba(30, 41, 59, 0.85) 100%);
  border: 1px solid rgba(139, 92, 246, 0.45);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.wt-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.wt-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #c4b5fd;
  display: block;
}

.wt-card-title-group h4 {
  margin: 2px 0 0 0;
  font-size: 0.86rem;
  color: #ffffff;
}

.wt-close-btn {
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}

.wt-step-dots {
  display: flex;
  gap: 0.35rem;
  margin: 0.55rem 0;
}

.wt-step-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(15, 23, 42, 0.6);
  color: #cbd5e1;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.wt-step-dot.verified {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
  color: #34d399;
}

.wt-step-dot.current {
  background: #7c3aed;
  border-color: #c4b5fd;
  color: #ffffff;
  transform: scale(1.1);
}

.wt-step-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #ffffff;
}

.wt-verify-status {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 6px;
}

.wt-verify-status.verified {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.wt-verify-status.pending {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.wt-step-instruction {
  margin: 0.35rem 0;
  font-size: 0.76rem;
  line-height: 1.45;
  color: #e2e8f0;
}

.wt-step-live-note {
  font-size: 0.7rem;
  color: #a5b4fc;
  margin-bottom: 0.45rem;
}

.wt-verify-feedback {
  font-size: 0.73rem;
  font-weight: 600;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.75);
  color: #f8fafc;
  margin-bottom: 0.45rem;
}

.wt-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.wt-btn-nav {
  background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
  color: #ffffff;
  border: none;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
}

.wt-btn-verify {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.45);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
}

.wt-btn-ask {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 0.73rem;
  font-weight: 600;
  cursor: pointer;
}

.wt-step-footer-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.wt-step-footer-nav button {
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.wt-step-footer-nav button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Info Overlay */
.ai-info-overlay {
  padding: 1rem 1.25rem;
  background: rgba(15, 23, 42, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.info-overlay-header h4 {
  margin: 0;
  font-size: 0.95rem;
  color: #ffffff;
}

.info-overlay-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.35rem;
  cursor: pointer;
}

.info-context-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.25);
  color: #c4b5fd;
  margin-bottom: 0.4rem;
}

.info-overlay-body p {
  font-size: 0.78rem;
  color: #cbd5e1;
  margin: 0 0 0.6rem 0;
}

.capability-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.capability-list li {
  display: flex;
  gap: 0.5rem;
  font-size: 0.76rem;
  color: #e2e8f0;
  line-height: 1.35;
}

.info-overlay-footer {
  margin-top: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.7rem;
  color: #94a3b8;
}

/* Body and messages container */
.ai-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
}

.ai-empty-prompt {
  text-align: center;
  margin: auto;
  padding: 1rem 0.5rem;
  max-width: 340px;
  color: #cbd5e1;
}

.empty-icon {
  font-size: 2.75rem;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 4px 8px rgba(124, 58, 237, 0.3));
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0px); }
}

.ai-empty-prompt h4 {
  margin: 0 0 0.4rem 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
}

.ai-empty-prompt p {
  margin: 0 0 1rem 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #94a3b8;
}

/* Suggested Action Chips */
.ai-suggested-chips {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
}

.ai-inline-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.ai-action-chip {
  background: rgba(124, 58, 237, 0.14);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #e2e8f0;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.ai-action-chip.small {
  padding: 0.3rem 0.6rem;
  font-size: 0.72rem;
  border-radius: 999px;
}

.ai-action-chip:hover {
  background: rgba(124, 58, 237, 0.32);
  border-color: #a78bfa;
  color: #ffffff;
  transform: translateY(-1px);
}

.ai-inline-code {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8em;
  color: #c4b5fd;
}

.ai-messages-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

/* Message bubbles */
.ai-msg-bubble-wrapper {
  display: flex;
  gap: 0.65rem;
  max-width: 90%;
  animation: fade-in-up 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ai-msg-bubble-wrapper.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.ai-msg-bubble-wrapper.assistant {
  align-self: flex-start;
}

.ai-msg-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.user .ai-msg-avatar {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.assistant .ai-msg-avatar {
  background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.ai-msg-bubble {
  padding: 0.7rem 0.95rem;
  border-radius: 12px;
  font-size: 0.86rem;
  line-height: 1.5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.user .ai-msg-bubble {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  border-bottom-right-radius: 2px;
}

.assistant .ai-msg-bubble {
  background: rgba(255, 255, 255, 0.07);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom-left-radius: 2px;
}

/* Loading animations */
.loading-bubble {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
}

.loading-bubble .ai-spinner {
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(139, 92, 246, 0.25);
  border-top-color: #8b5cf6;
  border-right-color: #6366f1;
  border-radius: 50%;
  animation: ai-spin 0.8s linear infinite;
  flex-shrink: 0;
}

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

.loading-bubble .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  box-shadow: 0 0 6px rgba(139, 92, 246, 0.45);
  animation: bounce 1.4s infinite ease-in-out both;
}

.loading-bubble .dot:nth-child(1) {
  animation-delay: -0.32s;
}

.loading-bubble .dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Light & Dark Theme Adaptability for Assistant Drawer */
body:not(.dark-theme) .ai-drawer {
  background: rgba(255, 255, 255, 0.96);
  border-left: 1px solid #e2e8f0;
  color: #0f172a;
  box-shadow: -10px 0 30px rgba(15, 23, 42, 0.12);
}

body:not(.dark-theme) .ai-drawer-header {
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

body:not(.dark-theme) .header-title h3 {
  color: #0f172a;
}

body:not(.dark-theme) .header-status {
  color: #64748b;
}

body:not(.dark-theme) .header-walkthrough-btn,
body:not(.dark-theme) .header-info-btn,
body:not(.dark-theme) .header-popout-btn {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #475569;
}

body:not(.dark-theme) .header-walkthrough-btn:hover,
body:not(.dark-theme) .header-info-btn:hover,
body:not(.dark-theme) .header-popout-btn:hover,
body:not(.dark-theme) .header-walkthrough-btn.active,
body:not(.dark-theme) .header-info-btn.active,
body:not(.dark-theme) .header-popout-btn.active {
  background: #eff6ff;
  border-color: #6366f1;
  color: #4f46e5;
}

body:not(.dark-theme) .header-close {
  color: #64748b;
}

body:not(.dark-theme) .header-close:hover {
  color: #0f172a;
}

body:not(.dark-theme) .ai-readiness-bar {
  background: #f1f5f9;
  border-bottom-color: #e2e8f0;
}

body:not(.dark-theme) .ai-readiness-toggle-btn {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #1e293b;
}

body:not(.dark-theme) .ai-readiness-toggle-btn:hover {
  background: #f8fafc;
  border-color: #6366f1;
}

body:not(.dark-theme) .ai-readiness-summary {
  color: #0f172a;
}

body:not(.dark-theme) .ai-readiness-refresh-btn {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #475569;
}

body:not(.dark-theme) .ai-readiness-refresh-btn:hover {
  background: #eff6ff;
  color: #4f46e5;
}

body:not(.dark-theme) .ai-readiness-step-row {
  background: #ffffff;
  border-color: #e2e8f0;
}

body:not(.dark-theme) .step-row-title {
  color: #0f172a;
}

body:not(.dark-theme) .step-row-detail {
  color: #64748b;
}

body:not(.dark-theme) .step-go-btn,
body:not(.dark-theme) .step-ask-btn {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4338ca;
}

body:not(.dark-theme) .step-go-btn:hover,
body:not(.dark-theme) .step-ask-btn:hover {
  background: #4f46e5;
  color: #ffffff;
}

body:not(.dark-theme) .ai-issue-card {
  background: #fffbeb;
}

body:not(.dark-theme) .ai-issue-card.error {
  background: #fef2f2;
}

body:not(.dark-theme) .ai-issue-header {
  color: #0f172a;
}

body:not(.dark-theme) .ai-issue-msg {
  color: #475569;
}

body:not(.dark-theme) .ai-issue-fix {
  color: #047857;
}

body:not(.dark-theme) .ai-walkthrough-picker {
  background: #f8fafc;
  border-bottom-color: #e2e8f0;
}

body:not(.dark-theme) .wt-picker-header h4 {
  color: #0f172a;
}

body:not(.dark-theme) .wt-picker-item {
  background: #ffffff;
  border-color: #e2e8f0;
  color: #0f172a;
}

body:not(.dark-theme) .wt-picker-item:hover,
body:not(.dark-theme) .wt-picker-item.active {
  background: #eef2ff;
  border-color: #6366f1;
}

body:not(.dark-theme) .wt-progress-pill {
  background: #e0e7ff;
  color: #4338ca;
}

body:not(.dark-theme) .ai-walkthrough-card {
  background: linear-gradient(145deg, #eef2ff 0%, #f8fafc 100%);
  border-color: #c7d2fe;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

body:not(.dark-theme) .wt-badge {
  color: #4f46e5;
}

body:not(.dark-theme) .wt-card-title-group h4,
body:not(.dark-theme) .wt-step-heading {
  color: #0f172a;
}

body:not(.dark-theme) .wt-step-instruction {
  color: #334155;
}

body:not(.dark-theme) .wt-step-live-note {
  color: #4f46e5;
}

body:not(.dark-theme) .wt-verify-feedback {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #e2e8f0;
}

body:not(.dark-theme) .wt-btn-ask {
  background: #ffffff;
  color: #334155;
  border-color: #cbd5e1;
}

body:not(.dark-theme) .wt-step-footer-nav {
  border-top-color: #e2e8f0;
}

body:not(.dark-theme) .wt-step-footer-nav button {
  color: #475569;
}

body:not(.dark-theme) .ai-info-overlay {
  background: #f8fafc;
  border-bottom-color: #e2e8f0;
}

body:not(.dark-theme) .info-overlay-header h4 {
  color: #0f172a;
}

body:not(.dark-theme) .info-overlay-body p,
body:not(.dark-theme) .capability-list li {
  color: #334155;
}

body:not(.dark-theme) .ai-empty-prompt h4 {
  color: #0f172a;
}

body:not(.dark-theme) .ai-empty-prompt p {
  color: #64748b;
}

body:not(.dark-theme) .ai-action-chip {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #4c1d95;
}

body:not(.dark-theme) .ai-action-chip:hover {
  background: #ede9fe;
  border-color: #8b5cf6;
  color: #3b0764;
}

body:not(.dark-theme) .ai-inline-code {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #4f46e5;
}

body:not(.dark-theme) .assistant .ai-msg-bubble {
  background: #f8fafc;
  color: #0f172a;
  border-color: #e2e8f0;
}

body:not(.dark-theme) .ai-drawer-footer {
  background: #f8fafc;
  border-top-color: #e2e8f0;
}

body:not(.dark-theme) .ai-input-field {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

body:not(.dark-theme) .ai-input-field:focus {
  background: #ffffff;
  border-color: #6366f1;
}

/* Action confirmation cards */
.ai-confirm-card {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 12px;
  padding: 1rem;
  margin: 0.5rem 0;
  display: flex;
  gap: 0.75rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  animation: pulse-border 2.5s infinite alternate;
}

@keyframes pulse-border {
  0% { border-color: rgba(245, 158, 11, 0.2); }
  100% { border-color: rgba(245, 158, 11, 0.45); }
}

.confirm-icon {
  font-size: 1.25rem;
  color: #f59e0b;
  flex-shrink: 0;
}

.confirm-content {
  flex: 1;
}

.confirm-title {
  display: block;
  font-weight: 700;
  color: #f59e0b;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.confirm-desc {
  font-size: 0.83rem;
  color: #e2e8f0;
  margin: 0.35rem 0 0.75rem 0;
  line-height: 1.45;
}

.confirm-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-confirm {
  background: #f59e0b;
  color: #0f172a;
  border: none;
  padding: 0.4rem 0.875rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
}

.btn-confirm:hover {
  background: #d97706;
  transform: translateY(-1px);
}

.btn-cancel {
  background: transparent;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.4rem 0.875rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Footer / Input interface */
.ai-drawer-footer {
  display: flex;
  gap: 0.625rem;
  padding: 0.95rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(30, 41, 59, 0.45);
  align-items: center;
}

.ai-input-field {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  color: #ffffff;
  font-size: 0.86rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-input-field:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.09);
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.25);
}

.ai-input-field:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ai-send-btn {
  background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
}

.ai-send-btn:hover:not(:disabled) {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
}

.ai-send-btn:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
}
.shell-container {
  display: flex;
  min-height: 100vh;
  background-color: #f8fafc;
}

.shell-sidebar {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: #f1f5f9;
  width: 64px;
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  height: 100vh;
  z-index: 1000;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.focus-mode .shell-sidebar {
  transform: translateX(-100%);
}

.shell-content {
  flex: 1;
  margin-left: 64px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.focus-mode .shell-content {
  margin-left: 0;
}

.shell-header {
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80px;
}

.shell-brand-icon {
  font-size: 1.1rem;
  font-weight: 800;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.5px;
  box-shadow: 0 4px 10px rgba(96, 165, 250, 0.3);
  cursor: default;
}

.shell-nav {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.shell-nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  color: #cbd5e1;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
}

.shell-nav-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid #0f172a;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.shell-nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
}

.shell-nav-item.active {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
  color: #60a5fa;
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.3);
}

.shell-nav-icon {
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* User/About Dropdown next to CampusPicker */
.shell-user-dropdown {
  position: relative;
  display: inline-block;
}

.shell-user-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.375rem 0.75rem 0.375rem 0.5rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.shell-user-dropdown-trigger:hover,
.shell-user-dropdown-trigger.active {
  border-color: #cbd5e1;
  background: #f8fafc;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.shell-user-avatar-small {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.shell-user-name-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}

.shell-user-dropdown-arrow {
  font-size: 0.65rem;
  color: #94a3b8;
  transition: transform 0.2s ease;
}

.shell-user-dropdown-trigger.active .shell-user-dropdown-arrow {
  transform: rotate(180deg);
}

/* Dropdown Menu styling */
.shell-user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  z-index: 1010;
  padding: 1rem;
  animation: dropdown-fade-in 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top right;
}

@keyframes dropdown-fade-in {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Menu Header */
.shell-user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.25rem 0.5rem 0.75rem;
}

.shell-user-dropdown-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.25);
}

.shell-user-dropdown-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.shell-user-dropdown-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shell-user-dropdown-email {
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shell-user-dropdown-role {
  font-size: 0.7rem;
  font-weight: 600;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  padding: 1px 6px;
  border-radius: 4px;
  width: fit-content;
  margin-top: 4px;
}

.shell-user-dropdown-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 0.5rem 0;
}

/* About Section */
.shell-user-dropdown-section {
  padding: 0.5rem 0.5rem;
}

.shell-user-dropdown-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.shell-user-dropdown-about-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.shell-user-dropdown-about-item {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  color: #334155;
  gap: 0.5rem;
}

.shell-user-dropdown-about-item .module-name {
  flex: 1;
  font-weight: 500;
}

.shell-user-dropdown-about-item .module-status {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 4px;
}

.shell-user-dropdown-about-item .badge-licensed {
  background-color: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.shell-user-dropdown-about-item .module-version {
  font-family: monospace;
  color: #64748b;
  font-size: 0.75rem;
}

/* Logout button in dropdown */
.shell-user-dropdown-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  color: #ef4444;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 0.5rem;
}

.shell-user-dropdown-logout:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.05);
}

.shell-user-dropdown-logout:active {
  transform: translateY(0);
}

.shell-content {
  flex: 1;
  margin-left: 64px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #64748b;
  padding: 3rem 1.5rem;
}

.shell-loader-spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid rgba(99, 102, 241, 0.15);
  border-top-color: #6366f1;
  border-right-color: #8b5cf6;
  animation: shell-spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.12);
}

body.dark-theme .shell-loader-spinner {
  border-color: rgba(129, 140, 248, 0.18);
  border-top-color: #818cf8;
  border-right-color: #a78bfa;
  box-shadow: 0 0 16px rgba(129, 140, 248, 0.2);
}

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

/* Global Floating Chat Overlay Drawer */
.shell-chat-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4), 0 8px 30px rgba(0, 0, 0, 0.15);
  color: #ffffff;
  cursor: pointer;
  z-index: 1040;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.shell-chat-trigger:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5), 0 10px 35px rgba(0, 0, 0, 0.2);
}

.shell-chat-trigger--active {
  transform: rotate(90deg) scale(0.9);
  background: #1e293b;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.shell-chat-trigger--pushed {
  bottom: 96px !important;
}

.shell-chat-trigger-icon {
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  margin-top: -2px; /* Visual center alignment */
}

.shell-chat-trigger-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 750;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Backdrop Overlay */
.shell-chat-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.25);
  backdrop-filter: blur(2px);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.shell-chat-drawer-overlay--open {
  opacity: 1;
  pointer-events: auto;
}

/* Chat Drawer Container */
.shell-chat-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 760px;
  max-width: 90vw;
  background: #ffffff;
  box-shadow: -10px 0 30px rgba(15, 23, 42, 0.15);
  z-index: 1060;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.shell-chat-drawer--open {
  transform: translateX(0);
}

.shell-chat-drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  background: #f8fafc;
}

.shell-chat-drawer-header-icon {
  font-size: 1.4rem;
  margin-right: 12px;
}

.shell-chat-drawer-header-info {
  flex: 1;
}

.shell-chat-drawer-header-info h3 {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.2;
}

.shell-chat-drawer-header-info p {
  font-size: 11px;
  color: #64748b;
  margin: 2px 0 0 0;
}

.shell-chat-drawer-close {
  border: none;
  background: transparent;
  font-size: 24px;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.shell-chat-drawer-close:hover {
  color: #0f172a;
}

.shell-chat-drawer-body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

/* Ensure the workspace takes full height inside the drawer */
.shell-chat-drawer-body #comm-staff-chat-workspace {
  height: 100% !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.shell-chat-drawer-body .loading {
  padding: 40px;
}

/* Sticky Header / Topbar Styles */
.shell-topbar {
  height: 64px;
  background-color: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 990;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.shell-topbar-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.25px;
}

.shell-topbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.shell-page-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: auto;
}

/* Floating Settings trigger button on bottom right */
.shell-settings-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  border: none;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4), 0 8px 30px rgba(0, 0, 0, 0.15);
  color: #ffffff;
  cursor: pointer;
  z-index: 1040;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.shell-settings-trigger:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5), 0 10px 35px rgba(0, 0, 0, 0.2);
}

.shell-settings-trigger--active {
  background: #1e293b;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.shell-settings-trigger-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.shell-settings-trigger-gear {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: #1e293b;
  border: 1.5px solid #ffffff;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Settings Drawer backdrop overlay */
.shell-settings-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.25);
  backdrop-filter: blur(2px);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.shell-settings-drawer-overlay--open {
  opacity: 1;
  pointer-events: auto;
}

/* Settings Drawer Container sliding from right */
.shell-settings-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 90vw;
  background: #ffffff;
  box-shadow: -10px 0 30px rgba(15, 23, 42, 0.15);
  z-index: 1060;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.shell-settings-drawer--open {
  transform: translateX(0);
}

.shell-settings-drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  background: #f8fafc;
}

.shell-settings-drawer-header-icon {
  font-size: 1.4rem;
  margin-right: 12px;
}

.shell-settings-drawer-header-info {
  flex: 1;
}

.shell-settings-drawer-header-info h3 {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  line-height: 1.2;
}

.shell-settings-drawer-header-info p {
  font-size: 11px;
  color: #64748b;
  margin: 2px 0 0 0;
}

.shell-settings-drawer-close {
  border: none;
  background: transparent;
  font-size: 24px;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.shell-settings-drawer-close:hover {
  color: #0f172a;
}

.shell-settings-drawer-body {
  flex: 1;
  overflow: visible; /* Prevent CampusPicker dropdown clipping */
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

/* Sections inside Settings Drawer */
.shell-settings-drawer-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.shell-settings-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.shell-settings-picker-container {
  width: 100%;
}

.shell-settings-picker-container .campus-picker-container {
  width: 100%;
}

.shell-settings-picker-container .campus-picker-trigger {
  width: 100%;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #0f172a;
}

.shell-settings-picker-container .campus-picker-trigger:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.shell-settings-picker-container .campus-picker-campus-name {
  color: #1e293b;
}

.shell-settings-picker-container .campus-picker-dropdown {
  left: 0;
  right: auto;
  width: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.shell-settings-picker-container .campus-picker-school-header {
  color: #2563eb;
}

.shell-settings-picker-container .campus-picker-option {
  color: #334155;
}

.shell-settings-picker-container .campus-picker-option:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.shell-settings-picker-container .campus-picker-option.selected {
  background: #eff6ff;
  color: #2563eb;
}

.shell-settings-drawer-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 1.25rem 0;
}

/* User profile details in Settings Drawer */
.shell-settings-user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.shell-settings-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.25);
}

.shell-settings-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.shell-settings-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.shell-settings-email {
  font-size: 0.75rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shell-settings-role {
  font-size: 0.7rem;
  font-weight: 600;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  padding: 1px 6px;
  border-radius: 4px;
  width: fit-content;
  margin-top: 4px;
}

/* Licensed modules in Settings Drawer */
.shell-settings-about-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.shell-settings-about-item {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  color: #334155;
  gap: 0.5rem;
}

.shell-settings-about-item .module-name {
  flex: 1;
  font-weight: 500;
}

.shell-settings-about-item .module-status {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 4px;
}

.shell-settings-about-item .badge-licensed {
  background-color: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.shell-settings-about-item .module-version {
  font-family: monospace;
  color: #64748b;
  font-size: 0.75rem;
}

/* Sign out button in Settings Drawer */
.shell-settings-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  color: #ef4444;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: auto; /* Push to the very bottom */
}

.shell-settings-logout-btn:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.05);
}

.shell-settings-logout-btn:active {
  transform: translateY(0);
}

/* Load Demo Data buttons */
.shell-user-dropdown-demodata {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-top: 0.25rem;
}

.shell-user-dropdown-demodata:hover {
  background: #dcfce7;
  color: #14532d;
  border-color: #86efac;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(22, 101, 52, 0.05);
}

.shell-user-dropdown-demodata:disabled {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.shell-settings-demodata-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.shell-settings-demodata-btn:hover {
  background: #dcfce7;
  color: #14532d;
  border-color: #86efac;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(22, 101, 52, 0.05);
}

.shell-settings-demodata-btn:disabled {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #94a3b8;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Theme Toggle Button Styles */
.shell-theme-toggle {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 1.1rem;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  margin-right: 0.5rem;
}

.shell-theme-toggle:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: scale(1.02);
}

body.dark-theme .shell-theme-toggle {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

body.dark-theme .shell-theme-toggle:hover {
  background: #334155;
  border-color: #475569;
}

.shell-sync-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 1.1rem;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  margin-right: 0.5rem;
}

.shell-sync-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: scale(1.02);
}

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

body.dark-theme .shell-sync-btn {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

body.dark-theme .shell-sync-btn:hover {
  background: #334155;
  border-color: #475569;
}

.shell-settings-theme-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  margin-top: 0.5rem;
  font-family: inherit;
}

.shell-settings-theme-btn:hover {
  background: #f8fafc;
  color: #1e293b;
  border-color: #cbd5e1;
}

body.dark-theme .shell-settings-theme-btn {
  background: #1e293b;
  border-color: #334155;
  color: #cbd5e1;
}

body.dark-theme .shell-settings-theme-btn:hover {
  background: #334155;
  color: #f8fafc;
  border-color: #475569;
}
.shell-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.shell-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.shell-toast.success {
  border-left: 4px solid #10b981;
}

.shell-toast.error {
  border-left: 4px solid #ef4444;
}


/* Security / MFA button in User Dropdown & Settings Drawer */
.shell-user-dropdown-security,
.shell-settings-security-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 0.4rem;
}

.shell-user-dropdown-security:hover,
.shell-settings-security-btn:hover {
  background: #dbeafe;
  color: #1e40af;
  border-color: #93c5fd;
  transform: translateY(-1px);
}

body.dark-theme .shell-user-dropdown-security,
body.dark-theme .shell-settings-security-btn {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}

body.dark-theme .shell-user-dropdown-security:hover,
body.dark-theme .shell-settings-security-btn:hover {
  background: rgba(59, 130, 246, 0.25);
  color: #bfdbfe;
}
:root {
  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;
  
  /* Use light theme to match timetable module */
  color-scheme: light;
  color: #333;
  background-color: #ffffff;
  
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

body {
  margin: 0;
  min-height: 100vh;
}

#root {
  min-height: 100vh;
}

/* --- Global Dark Theme Implementation --- */
body.dark-theme {
  background-color: #0b0f19 !important;
  color: #cbd5e1 !important;
  color-scheme: dark;
}

/* Shell Layout Overrides */
body.dark-theme .shell-container {
  background-color: #0b0f19 !important;
}

body.dark-theme .shell-topbar {
  background-color: #0f172a !important;
  border-bottom: 1px solid #1e293b !important;
}

body.dark-theme .shell-topbar-title {
  color: #f8fafc !important;
}

body.dark-theme .shell-user-dropdown-trigger {
  background: #0f172a !important;
  border-color: #1e293b !important;
}

body.dark-theme .shell-user-dropdown-trigger:hover,
body.dark-theme .shell-user-dropdown-trigger.active {
  background: #1e293b !important;
  border-color: #334155 !important;
}

body.dark-theme .shell-user-name-label {
  color: #cbd5e1 !important;
}

body.dark-theme .shell-user-dropdown-menu {
  background: #131b2e !important;
  border-color: #1e293b !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
}

body.dark-theme .shell-user-dropdown-name {
  color: #f8fafc !important;
}

body.dark-theme .shell-user-dropdown-email {
  color: #94a3b8 !important;
}

body.dark-theme .shell-user-dropdown-role {
  color: #818cf8 !important;
  background: rgba(129, 140, 248, 0.15) !important;
}

body.dark-theme .shell-user-dropdown-divider {
  background-color: #1e293b !important;
}

body.dark-theme .shell-user-dropdown-about-item {
  color: #cbd5e1 !important;
}

body.dark-theme .shell-user-dropdown-about-item .module-name {
  color: #94a3b8 !important;
}

body.dark-theme .shell-user-dropdown-about-item .module-version {
  color: #64748b !important;
}

body.dark-theme .shell-user-dropdown-demodata {
  color: #cbd5e1 !important;
}

body.dark-theme .shell-user-dropdown-demodata:hover {
  background: #1e293b !important;
}

/* Chat & Settings Drawers in Shell */
body.dark-theme .shell-chat-drawer,
body.dark-theme .shell-settings-drawer {
  background: #131b2e !important;
  border-left-color: #1e293b !important;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .shell-chat-drawer-header,
body.dark-theme .shell-settings-drawer-header {
  background: #0f172a !important;
  border-bottom-color: #1e293b !important;
}

body.dark-theme .shell-chat-drawer-header h3,
body.dark-theme .shell-settings-drawer-header h3 {
  color: #f8fafc !important;
}

body.dark-theme .shell-settings-section-title {
  color: #818cf8 !important;
}

body.dark-theme .shell-settings-about-item {
  color: #cbd5e1 !important;
}

body.dark-theme .shell-settings-name {
  color: #f8fafc !important;
}

body.dark-theme .shell-settings-role {
  color: #818cf8 !important;
  background: rgba(129, 140, 248, 0.15) !important;
}

body.dark-theme .shell-settings-demodata-btn {
  color: #cbd5e1 !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

body.dark-theme .shell-settings-demodata-btn:hover {
  background: rgba(255, 255, 255, 0.1) !important;
}

body.dark-theme .shell-settings-drawer-divider {
  background: #1e293b !important;
}

/* Dashboard pages (host / shell) */
body.dark-theme .db-container {
  background: #0b0f19 !important;
  color: #cbd5e1 !important;
}

body.dark-theme .db-hero {
  background: linear-gradient(135deg, #131b2e 0%, #0b0f19 100%) !important;
  border: 1px solid #1e293b !important;
}

body.dark-theme .db-hero-title {
  background: linear-gradient(135deg, #f8fafc 60%, #cbd5e1 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

body.dark-theme .db-hero-subtitle {
  color: #94a3b8 !important;
}

body.dark-theme .db-meta-badge {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.02) !important;
  color: #cbd5e1 !important;
}

body.dark-theme .db-stat-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
}

body.dark-theme .db-stat-card:hover {
  border-color: #4f46e5 !important;
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15) !important;
  background: #17223b !important;
}

body.dark-theme .db-stat-icon {
  background: #0f172a !important;
}

body.dark-theme .db-stat-label {
  color: #94a3b8 !important;
}

body.dark-theme .db-stat-value {
  color: #f8fafc !important;
}

body.dark-theme .db-stat-trend {
  color: #64748b !important;
}

body.dark-theme .db-section-title {
  color: #f8fafc !important;
}

body.dark-theme .db-module-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
}

body.dark-theme .db-module-card:hover {
  border-color: #4f46e5 !important;
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.15) !important;
  background: #17223b !important;
}

body.dark-theme .db-module-name {
  color: #f8fafc !important;
}

body.dark-theme .db-module-desc {
  color: #94a3b8 !important;
}

body.dark-theme .db-module-badge--timetable {
  background: rgba(59, 130, 246, 0.15) !important;
  color: #60a5fa !important;
}

body.dark-theme .db-module-badge--comms {
  background: rgba(129, 140, 248, 0.15) !important;
  color: #818cf8 !important;
}

body.dark-theme .db-module-badge--admin {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
}

body.dark-theme .db-module-action {
  color: #818cf8 !important;
}

/* Campus Picker Overrides */
body.dark-theme .campus-picker-trigger {
  background: #0f172a !important;
  border-color: #1e293b !important;
  color: #cbd5e1 !important;
}

body.dark-theme .campus-picker-trigger:hover {
  background: #1e293b !important;
  border-color: #334155 !important;
}

body.dark-theme .campus-picker-dropdown {
  background: #131b2e !important;
  border-color: #1e293b !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
}

body.dark-theme .campus-picker-option {
  color: #cbd5e1 !important;
}

body.dark-theme .campus-picker-option:hover {
  background: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-theme .campus-picker-option.active {
  background: rgba(99, 102, 241, 0.15) !important;
  color: #818cf8 !important;
}

/* --- Nexus Module Overrides --- */
body.dark-theme .nexus-layout-container {
  background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.08), transparent 45%),
    radial-gradient(circle at bottom left, rgba(168, 85, 247, 0.04), transparent 35%),
    #0b0f19 !important;
  color: #cbd5e1 !important;
}

body.dark-theme .glass-panel {
  background: rgba(19, 27, 46, 0.8) !important;
  border-color: #1e293b !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
}

body.dark-theme .nexus-subnav-header {
  border-bottom: 1px solid #1e293b !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1) !important;
}

body.dark-theme .nexus-logo-text h2 {
  background: linear-gradient(to right, #818cf8, #f8fafc) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

body.dark-theme .nexus-logo-tag {
  color: #94a3b8 !important;
}

body.dark-theme .nexus-subnav-links {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid #1e293b !important;
}

body.dark-theme .nexus-subnav-item {
  color: #94a3b8 !important;
}

body.dark-theme .nexus-subnav-item:hover {
  color: #f8fafc !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

body.dark-theme .nexus-subnav-item.active {
  color: #818cf8 !important;
  background: rgba(99, 102, 241, 0.08) !important;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.2) !important;
}

/* --- Auth Module Layout Overrides --- */
body.dark-theme .auth-layout-container {
  background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.08), transparent 45%),
    radial-gradient(circle at bottom left, rgba(168, 85, 247, 0.04), transparent 35%),
    #0b0f19 !important;
  color: #cbd5e1 !important;
}

body.dark-theme .auth-subnav-header {
  border-bottom: 1px solid #1e293b !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1) !important;
}

body.dark-theme .auth-logo-text h2 {
  background: linear-gradient(to right, #818cf8, #f8fafc) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

body.dark-theme .auth-logo-tag {
  color: #94a3b8 !important;
}

body.dark-theme .auth-subnav-links {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid #1e293b !important;
}

body.dark-theme .auth-subnav-item {
  color: #94a3b8 !important;
}

body.dark-theme .auth-subnav-item:hover {
  color: #f8fafc !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

body.dark-theme .auth-subnav-item.active {
  color: #818cf8 !important;
  background: rgba(99, 102, 241, 0.08) !important;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.2) !important;
}

/* --- System Config Module Overrides --- */
body.dark-theme .system-tabs-nav {
  background: #0f172a !important;
  border-bottom-color: #1e293b !important;
}

body.dark-theme .system-tab-link {
  color: #94a3b8 !important;
}

body.dark-theme .system-tab-link:hover,
body.dark-theme .system-tab-link.active {
  color: #818cf8 !important;
}

body.dark-theme .system-tab-link.active {
  border-bottom-color: #818cf8 !important;
}

body.dark-theme .system-page__header {
  border-bottom-color: #1e293b !important;
}

body.dark-theme .system-page__header h1 {
  color: #f8fafc !important;
}

body.dark-theme .system-page__subtitle {
  color: #94a3b8 !important;
}

body.dark-theme .tenant-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
}

body.dark-theme .tenant-card:hover {
  border-color: #4f46e5 !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .tenant-card__name {
  color: #f8fafc !important;
}

body.dark-theme .tenant-card__slug {
  background: #0f172a !important;
  color: #94a3b8 !important;
}

body.dark-theme .tenant-card__seats {
  color: #cbd5e1 !important;
}

body.dark-theme .tenant-card__seats strong {
  color: #f8fafc !important;
}

body.dark-theme .tenant-card__actions {
  border-top-color: #1e293b !important;
}

body.dark-theme .system-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
}

body.dark-theme .system-empty-state {
  background: #0f172a !important;
  color: #94a3b8 !important;
  border-color: #1e293b !important;
}

body.dark-theme .alert--success {
  background-color: rgba(16, 185, 129, 0.15) !important;
  color: #4ade80 !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
}

/* System Config Modals & Wizard Overrides */
body.dark-theme .modal {
  background: #131b2e !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

body.dark-theme .modal__header {
  border-bottom-color: #1e293b !important;
}

body.dark-theme .modal__header h2 {
  color: #f8fafc !important;
}

body.dark-theme .modal__footer {
  border-top-color: #1e293b !important;
  background-color: #0f172a !important;
}

body.dark-theme .modal__body::-webkit-scrollbar-track {
  background: #0f172a !important;
}

body.dark-theme .modal__body::-webkit-scrollbar-thumb {
  background: #334155 !important;
}

body.dark-theme .modal__body::-webkit-scrollbar-thumb:hover {
  background: #475569 !important;
}

body.dark-theme .step-indicator {
  background-color: #0f172a !important;
  border-bottom-color: #1e293b !important;
}

body.dark-theme .step-indicator::before {
  background-color: #1e293b !important;
}

body.dark-theme .step-indicator__num {
  background-color: #131b2e !important;
  border-color: #334155 !important;
  color: #94a3b8 !important;
}

body.dark-theme .step-indicator__label {
  color: #94a3b8 !important;
}

body.dark-theme .step-indicator__step--active .step-indicator__num {
  border-color: #6366f1 !important;
  background-color: #6366f1 !important;
  color: white !important;
}

body.dark-theme .step-indicator__step--active .step-indicator__label {
  color: #818cf8 !important;
}

body.dark-theme .wizard-step h3 {
  color: #f8fafc !important;
}

body.dark-theme .form-group label {
  color: #cbd5e1 !important;
}

body.dark-theme .form-group input[type="text"],
body.dark-theme .form-group input[type="email"],
body.dark-theme .form-group input[type="url"],
body.dark-theme .form-group input[type="password"] {
  background-color: #0f172a !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-theme .form-group input:focus {
  border-color: #6366f1 !important;
}

body.dark-theme .radio-option {
  border-color: #1e293b !important;
  background-color: #0f172a !important;
}

body.dark-theme .radio-option:hover {
  border-color: #334155 !important;
  background-color: #1e293b !important;
}

body.dark-theme .radio-option__label {
  color: #f8fafc !important;
}

body.dark-theme .oidc-config-fields {
  background: #0f172a !important;
  border-color: #1e293b !important;
}

body.dark-theme .review-summary {
  background-color: #0f172a !important;
  border-color: #1e293b !important;
}

body.dark-theme .review-row {
  border-bottom-color: #1e293b !important;
}

body.dark-theme .review-label {
  color: #94a3b8 !important;
}

body.dark-theme .review-value {
  color: #f8fafc !important;
}

body.dark-theme .nexus-title-block h1 {
  background: linear-gradient(to right, #818cf8, #f8fafc) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

body.dark-theme .nexus-subtitle {
  color: #94a3b8 !important;
}

body.dark-theme .nexus-stat-card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

body.dark-theme .stat-value {
  color: #f8fafc !important;
}

body.dark-theme .stat-label {
  color: #94a3b8 !important;
}

body.dark-theme .nexus-search-input {
  background: #0f172a !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-theme .nexus-search-input:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25) !important;
}

body.dark-theme .filter-label {
  color: #94a3b8 !important;
}

body.dark-theme .nexus-filter-select {
  background: #0f172a !important;
  border-color: #1e293b !important;
  color: #cbd5e1 !important;
}

body.dark-theme .nexus-filter-select:focus {
  border-color: #6366f1 !important;
}

body.dark-theme .nexus-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
}

body.dark-theme .nexus-card:hover {
  border-color: #6366f1 !important;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15) !important;
  background: #17223b !important;
}

body.dark-theme .nexus-card-header h3 {
  color: #f8fafc !important;
}

body.dark-theme .meta-value {
  color: #cbd5e1 !important;
}

body.dark-theme .meta-label {
  color: #94a3b8 !important;
}

body.dark-theme .fte-progress-bar {
  background: #1e293b !important;
}

body.dark-theme .qual-tag {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

body.dark-theme .nexus-card-hover-footer {
  border-top-color: #1e293b !important;
  color: #94a3b8 !important;
}

body.dark-theme .nexus-card:hover .nexus-card-hover-footer {
  color: #818cf8 !important;
}

/* Nexus Drawer Overrides */
body.dark-theme .nexus-drawer {
  background: #131b2e !important;
  border-left-color: #1e293b !important;
}

body.dark-theme .nexus-drawer-header {
  border-bottom-color: #1e293b !important;
}

body.dark-theme .profile-text-identity h2 {
  color: #f8fafc !important;
}

body.dark-theme .profile-type-badge {
  color: #94a3b8 !important;
}

body.dark-theme .drawer-tab-navigation {
  background: #0f172a !important;
  border-color: #1e293b !important;
}

body.dark-theme .drawer-tab-btn {
  color: #94a3b8 !important;
}

body.dark-theme .drawer-tab-btn.active {
  background: #1e293b !important;
  color: #f8fafc !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
}

body.dark-theme .drawer-section-title {
  color: #38bdf8 !important;
  border-bottom-color: #1e293b !important;
}

body.dark-theme .grid-label {
  color: #94a3b8 !important;
}

body.dark-theme .grid-value {
  color: #f8fafc !important;
}

body.dark-theme .grid-value.font-highlight {
  color: #818cf8 !important;
}

body.dark-theme .grid-value.mail-value {
  color: #38bdf8 !important;
}

body.dark-theme .drawer-form-group label {
  color: #cbd5e1 !important;
}

body.dark-theme .drawer-form-group input,
body.dark-theme .drawer-form-group select,
body.dark-theme .drawer-form-group textarea {
  background: #0f172a !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-theme .drawer-form-group input:focus,
body.dark-theme .drawer-form-group select:focus,
body.dark-theme .drawer-form-group textarea:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}

body.dark-theme .timeline-node::before {
  background: #1e293b !important;
}

body.dark-theme .timeline-card {
  background: #0f172a !important;
  border-color: #1e293b !important;
}

body.dark-theme .timeline-card-header h4 {
  color: #f8fafc !important;
}

body.dark-theme .timeline-card-meta {
  color: #94a3b8 !important;
}

body.dark-theme .timeline-card-dates {
  color: #64748b !important;
}

body.dark-theme .timeline-action-card {
  border-color: rgba(99, 102, 241, 0.3) !important;
}

body.dark-theme .qual-detail-pill {
  background: rgba(59, 130, 246, 0.15) !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
  color: #60a5fa !important;
}

body.dark-theme .wwcc-badge.detail-badge {
  box-shadow: none !important;
}

body.dark-theme .subject-checkbox-label {
  background: #0f172a !important;
  border-color: #1e293b !important;
  color: #cbd5e1 !important;
}

body.dark-theme .subject-checkbox-label:hover {
  background: #1e293b !important;
  border-color: #334155 !important;
}

body.dark-theme .subject-detail-pill {
  background: rgba(34, 197, 94, 0.15) !important;
  border-color: rgba(34, 197, 94, 0.3) !important;
  color: #4ade80 !important;
}

body.dark-theme .nexus-drawer-footer {
  background: #0f172a !important;
  border-top-color: #1e293b !important;
}

body.dark-theme .nexus-btn-secondary {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

body.dark-theme .nexus-btn-secondary:hover {
  background: #334155 !important;
  color: #f8fafc !important;
}

/* Reference Management Data Grid (Nexus) */
body.dark-theme .ref-tabs-container {
  border-bottom-color: #1e293b !important;
}

body.dark-theme .ref-tab-btn {
  color: #94a3b8 !important;
}

body.dark-theme .ref-tab-btn.active {
  color: #818cf8 !important;
  border-bottom-color: #818cf8 !important;
}

body.dark-theme .reference-grid-table {
  border-color: #1e293b !important;
}

body.dark-theme .reference-grid-table th {
  background: #0f172a !important;
  color: #f8fafc !important;
  border-bottom-color: #1e293b !important;
}

body.dark-theme .reference-grid-table td {
  border-bottom-color: #1e293b !important;
  color: #cbd5e1 !important;
}

body.dark-theme .reference-grid-table tr:hover {
  background: rgba(255, 255, 255, 0.02) !important;
}

/* --- Timetabling Module Overrides --- */
body.dark-theme .timetable-layout-container {
  background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.08), transparent 45%),
    radial-gradient(circle at bottom left, rgba(168, 85, 247, 0.04), transparent 35%),
    #0b0f19 !important;
  color: #cbd5e1 !important;
}

body.dark-theme .timetable-layout-container .main-content {
  background-color: transparent !important;
  color: #cbd5e1 !important;
}

body.dark-theme .timetable-container {
  background-color: #0b0f19 !important;
  color: #cbd5e1 !important;
}

body.dark-theme .timetable-subnav-header {
  border-bottom: 1px solid #1e293b !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1) !important;
}

body.dark-theme .timetable-logo-text h2 {
  background: linear-gradient(to right, #60a5fa, #f8fafc) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

body.dark-theme .timetable-logo-tag {
  color: #94a3b8 !important;
}

body.dark-theme .timetable-subnav-links {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid #1e293b !important;
}

body.dark-theme .timetable-subnav-item {
  color: #94a3b8 !important;
  background: transparent !important;
}

body.dark-theme .timetable-subnav-item:hover {
  color: #f8fafc !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

body.dark-theme .timetable-subnav-item.active {
  color: #60a5fa !important;
  background: rgba(96, 165, 250, 0.08) !important;
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.2) !important;
}

body.dark-theme .timetable-dropdown-menu {
  background: #131b2e !important;
  border-color: #1e293b !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .timetable-dropdown-menu a {
  color: #cbd5e1 !important;
}

body.dark-theme .timetable-dropdown-menu a:hover {
  background: rgba(96, 165, 250, 0.08) !important;
  color: #60a5fa !important;
}

body.dark-theme .timetable-menu-collapse-btn:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  color: #cbd5e1 !important;
}

body.dark-theme .resources-layout-container {
  background: #0b0f19 !important;
}

body.dark-theme .resource-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

body.dark-theme .resource-card:hover {
  border-color: #3b82f6 !important;
  background: #17223b !important;
}

body.dark-theme .resource-card h3 {
  color: #f8fafc !important;
}

body.dark-theme .resource-meta-row {
  color: #cbd5e1 !important;
}

body.dark-theme .resource-meta-label {
  color: #94a3b8 !important;
}

body.dark-theme .resource-badge {
  background: #1e293b !important;
  color: #94a3b8 !important;
  border-color: #334155 !important;
}

/* Period Grid Overrides */
body.dark-theme .periods-grid {
  border-color: #1e293b !important;
}

body.dark-theme .period-row {
  border-bottom-color: #1e293b !important;
}

body.dark-theme .period-time-cell {
  background: #0f172a !important;
  color: #cbd5e1 !important;
  border-right-color: #1e293b !important;
}

body.dark-theme .period-day-cell {
  border-right-color: #1e293b !important;
  background: #131b2e !important;
}

body.dark-theme .period-day-cell.active {
  background: rgba(59, 130, 246, 0.15) !important;
  border-color: #3b82f6 !important;
}

body.dark-theme .period-day-cell.inactive {
  background: #0f172a !important;
  color: #64748b !important;
}

/* Master Timetable Grid Overrides */
body.dark-theme .timetable-header-cell {
  background: #0f172a !important;
  color: #f8fafc !important;
  border-bottom-color: #1e293b !important;
  border-right-color: #1e293b !important;
}

body.dark-theme .timetable-row-header {
  background: #0f172a !important;
  color: #cbd5e1 !important;
  border-bottom-color: #1e293b !important;
  border-right-color: #1e293b !important;
}

body.dark-theme .timetable-grid-cell {
  border-bottom-color: #1e293b !important;
  border-right-color: #1e293b !important;
  background: #131b2e !important;
}

body.dark-theme .timetable-cell-card {
  background: #1e293b !important;
  border-color: #334155 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .timetable-cell-subject {
  color: #f8fafc !important;
}

body.dark-theme .timetable-cell-teacher,
body.dark-theme .timetable-cell-room {
  color: #94a3b8 !important;
}

/* Rules Builder Overrides */
body.dark-theme .rule-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .rule-card:hover {
  border-color: #3b82f6 !important;
}

body.dark-theme .rule-title {
  color: #f8fafc !important;
}

body.dark-theme .rule-description {
  color: #cbd5e1 !important;
}

body.dark-theme .rule-meta-value {
  color: #f8fafc !important;
}

/* Dialogue Modal Overrides */
body.dark-theme .dialog-overlay {
  background: rgba(15, 23, 42, 0.6) !important;
}

body.dark-theme .dialog-content {
  background: #131b2e !important;
  border-color: #1e293b !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4) !important;
  color: #cbd5e1 !important;
}

body.dark-theme .dialog-header h3 {
  color: #f8fafc !important;
}

body.dark-theme .dialog-footer {
  border-top-color: #1e293b !important;
  background: #0f172a !important;
}

/* --- Communications Overlay & App Overrides --- */
body.dark-theme .communications-container {
  background: #0b0f19 !important;
  color: #cbd5e1 !important;
}

body.dark-theme .chat-workspace-container {
  background: #131b2e !important;
}

body.dark-theme .chat-sidebar {
  background: #0f172a !important;
  border-right-color: #1e293b !important;
}

body.dark-theme .chat-user-item {
  color: #cbd5e1 !important;
}

body.dark-theme .chat-user-item:hover {
  background: #1e293b !important;
}

body.dark-theme .chat-user-item.active {
  background: rgba(99, 102, 241, 0.15) !important;
  color: #818cf8 !important;
}

body.dark-theme .chat-area {
  background: #131b2e !important;
}

body.dark-theme .chat-header-bar {
  background: #0f172a !important;
  border-bottom-color: #1e293b !important;
}

body.dark-theme .chat-header-name {
  color: #f8fafc !important;
}

body.dark-theme .message-bubble.incoming {
  background: #1e293b !important;
  color: #cbd5e1 !important;
  border-color: #334155 !important;
}

body.dark-theme .message-bubble.outgoing {
  background: #4f46e5 !important;
  color: #ffffff !important;
}

body.dark-theme .chat-input-bar {
  background: #0f172a !important;
  border-top-color: #1e293b !important;
}

body.dark-theme .chat-text-input {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f8fafc !important;
}

/* --- Administration & Security Overrides --- */
body.dark-theme .admin-container {
  background: #0b0f19 !important;
}

body.dark-theme .admin-layout-container {
  background: #0b0f19 !important;
}

body.dark-theme .admin-sidebar {
  background: #131b2e !important;
  border-right-color: #1e293b !important;
}

body.dark-theme .admin-table {
  border-color: #1e293b !important;
}

body.dark-theme .admin-table th {
  background: #0f172a !important;
  color: #f8fafc !important;
  border-bottom-color: #1e293b !important;
}

body.dark-theme .admin-table td {
  border-bottom-color: #1e293b !important;
  color: #cbd5e1 !important;
}

body.dark-theme .admin-table tr:hover {
  background: rgba(255, 255, 255, 0.02) !important;
}

body.dark-theme .admin-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .admin-card h3 {
  color: #f8fafc !important;
}

body.dark-theme .admin-input {
  background: #0f172a !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}

/* Shell Modals Overrides */
body.dark-theme .custom-modal-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.2) !important;
}

body.dark-theme .custom-modal-title {
  color: #f8fafc !important;
}

body.dark-theme .custom-modal-message {
  color: #cbd5e1 !important;
}

body.dark-theme .custom-modal-btn-secondary {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

body.dark-theme .custom-modal-btn-secondary:hover {
  background: #334155 !important;
  color: #f8fafc !important;
}


/* --- Timetabling Module Deep Dark Overrides --- */

/* Ensure html background matches body dark theme */
html:has(body.dark-theme) {
  background-color: #0b0f19 !important;
}

/* Base layouts & containers */
body.dark-theme .timetable-layout .page-container {
  background-color: #0b0f19 !important;
  color: #cbd5e1 !important;
}

body.dark-theme .timetable-layout .page-header {
  background: #131b2e !important;
  border: 1px solid #1e293b !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .timetable-layout .page-header h1 {
  color: #f8fafc !important;
}

body.dark-theme .timetable-layout .page-header p,
body.dark-theme .timetable-layout .page-subtitle,
body.dark-theme .timetable-layout .page-description {
  color: #94a3b8 !important;
}

/* Page 1: Dashboard */
body.dark-theme .dashboard-grid .stat-card {
  background: #131b2e !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

body.dark-theme .dashboard-grid .stat-card:hover {
  background: #17223b !important;
}

body.dark-theme .dashboard-grid .stat-value {
  color: #f8fafc !important;
}

body.dark-theme .dashboard-grid .stat-label {
  color: #94a3b8 !important;
}

body.dark-theme .timetable-layout .config-summary,
body.dark-theme .timetable-layout .quick-start {
  background: #131b2e !important;
  border: 1px solid #1e293b !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

body.dark-theme .timetable-layout .config-summary h2,
body.dark-theme .timetable-layout .quick-start h2 {
  color: #f8fafc !important;
}

body.dark-theme .timetable-layout .config-item {
  background: #0f172a !important;
  color: #cbd5e1 !important;
}

body.dark-theme .timetable-layout .config-item strong {
  color: #818cf8 !important;
}

body.dark-theme .timetable-layout .quick-start li {
  color: #cbd5e1 !important;
}

body.dark-theme .timetable-layout .quick-start li strong {
  color: #f8fafc !important;
}

body.dark-theme .timetable-layout .warning-card {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}

body.dark-theme .timetable-layout .warning-card h2 {
  color: #fbbf24 !important;
}

body.dark-theme .timetable-layout .warning-card p {
  color: #fbbf24 !important;
}

/* Page 2: Configuration */
body.dark-theme .configuration-container {
  --conf-bg: #0b0f19;
  --conf-card-bg: rgba(19, 27, 46, 0.85);
  --conf-border: #1e293b;
  --conf-text: #cbd5e1;
  --conf-text-light: #94a3b8;
  --conf-primary: #3b82f6;
  --conf-accent-blue: #3b82f6;
  --conf-accent-emerald: #10b981;
}

body.dark-theme .conf-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .conf-card-title {
  color: #f8fafc !important;
  border-bottom-color: #1e293b !important;
}

body.dark-theme .interactive-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .interactive-card:hover {
  border-color: #334155 !important;
  background: #17223b !important;
}

body.dark-theme .interactive-card.active-primary {
  border-color: #3b82f6 !important;
  background: linear-gradient(to bottom right, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05)) !important;
}

body.dark-theme .interactive-card.active-secondary {
  border-color: #10b981 !important;
  background: linear-gradient(to bottom right, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05)) !important;
}

body.dark-theme .interactive-card.active-blue {
  border-color: #6366f1 !important;
  background: linear-gradient(to bottom right, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.05)) !important;
}

body.dark-theme .interactive-card-title {
  color: #f8fafc !important;
}

body.dark-theme .aussie-configurator {
  background: #0f172a !important;
  border-color: #1e293b !important;
}

body.dark-theme .year-selector-title {
  color: #cbd5e1 !important;
}

body.dark-theme .year-capsule {
  background: #131b2e !important;
  border-color: #1e293b !important;
  color: #cbd5e1 !important;
}

body.dark-theme .year-capsule:hover {
  border-color: #334155 !important;
  background: #17223b !important;
}

body.dark-theme .year-capsule.none {
  background: #131b2e !important;
}

body.dark-theme .legend-dot.none {
  background-color: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .schedule-preview-box {
  background: #0f172a !important;
  border-color: #1e293b !important;
}

body.dark-theme .preview-cell {
  background: #131b2e !important;
  border-color: #1e293b !important;
  color: #cbd5e1 !important;
}

body.dark-theme .preview-cell.day-header {
  background: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-theme .preview-cell.period-slot {
  background: #17223b !important;
  color: #f8fafc !important;
  border-left-color: #3b82f6 !important;
}

body.dark-theme .preview-cell.period-slot:hover {
  background: #1e293b !important;
}

body.dark-theme .preview-cell.break-slot {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}

body.dark-theme .conf-form-group label {
  color: #cbd5e1 !important;
}

body.dark-theme .conf-form-group input,
body.dark-theme .conf-form-group select {
  background: #0f172a !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-theme .conf-form-group input:focus,
body.dark-theme .conf-form-group select:focus {
  border-color: #3b82f6 !important;
}

body.dark-theme .break-card-premium {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .break-card-premium:hover {
  border-color: #334155 !important;
}

body.dark-theme .break-remove-btn {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #ef4444 !important;
}

body.dark-theme .break-remove-btn:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
}

body.dark-theme .mode-badge.all,
body.dark-theme .mode-badge.primary {
  background-color: rgba(59, 130, 246, 0.15) !important;
  color: #60a5fa !important;
}

body.dark-theme .mode-badge.secondary {
  background-color: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
}

/* Page 3: Period Register */
body.dark-theme .register-summary .summary-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .register-summary .summary-card:hover {
  border-color: #334155 !important;
  background: #17223b !important;
}

body.dark-theme .register-summary .summary-card.warning {
  border-color: rgba(239, 68, 68, 0.3) !important;
  background: rgba(239, 68, 68, 0.15) !important;
}

body.dark-theme .register-summary .summary-value {
  color: #f8fafc !important;
}

body.dark-theme .register-summary .summary-label {
  color: #94a3b8 !important;
}

body.dark-theme .period-table-container {
  background: #131b2e !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

body.dark-theme .period-table thead {
  background: #0f172a !important;
}

body.dark-theme .period-table th {
  color: #cbd5e1 !important;
  border-bottom-color: #1e293b !important;
}

body.dark-theme .period-table td {
  color: #cbd5e1 !important;
  border-bottom-color: #1e293b !important;
}

body.dark-theme .period-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02) !important;
}

body.dark-theme .period-table tbody tr.form-period {
  background: rgba(245, 158, 11, 0.15) !important;
}

body.dark-theme .period-table tbody tr.form-period:hover {
  background: rgba(245, 158, 11, 0.25) !important;
}

body.dark-theme .period-cell {
  color: #f8fafc !important;
}

body.dark-theme .overlap-section {
  background: #131b2e !important;
  border-color: #ef4444 !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.1) !important;
}

body.dark-theme .overlap-table thead {
  background: #0f172a !important;
}

body.dark-theme .overlap-table th {
  color: #fca5a5 !important;
  border-bottom-color: #ef4444 !important;
}

body.dark-theme .overlap-table td {
  color: #cbd5e1 !important;
  border-bottom-color: rgba(239, 68, 68, 0.3) !important;
}

body.dark-theme .overlap-table tbody tr:hover {
  background: rgba(239, 68, 68, 0.05) !important;
}

body.dark-theme .overlap-minutes {
  color: #ef4444 !important;
}

body.dark-theme .info-message {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
  color: #34d399 !important;
}

body.dark-theme .break-row {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.1) 100%) !important;
  border-top-color: rgba(245, 158, 11, 0.3) !important;
  border-bottom-color: rgba(245, 158, 11, 0.3) !important;
}

body.dark-theme .break-row td {
  color: #fbbf24 !important;
}

/* Page 4: Rules Builder */
body.dark-theme .rules-builder-page {
  --color-primary: #6366f1;
  --color-primary-dark: #4f46e5;
  --color-primary-light: rgba(99, 102, 241, 0.15);
  --color-border: #1e293b;
  --color-bg-pane: #131b2e;
  --color-bg-page: #0b0f19;
  --color-text-main: #f8fafc;
  --color-text-muted: #94a3b8;
  
  --color-success: #10b981;
  --color-success-bg: rgba(16, 185, 129, 0.15);
  --color-success-border: rgba(16, 185, 129, 0.3);
  
  --color-danger: #ef4444;
  --color-danger-bg: rgba(239, 68, 68, 0.15);
  --color-danger-border: rgba(239, 68, 68, 0.3);
  
  --color-warning: #f59e0b;
  --color-warning-bg: rgba(245, 158, 11, 0.15);
}

body.dark-theme .rules-builder-page .page-header {
  background: #131b2e !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .timetable-selector-bar {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .timetable-selector-bar label {
  color: #cbd5e1 !important;
}

body.dark-theme .timetable-selector-bar select {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  border-color: #1e293b !important;
}

body.dark-theme .timetable-selector-bar select:focus {
  border-color: #6366f1 !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25) !important;
}

body.dark-theme .rules-list-container,
body.dark-theme .rules-form-container {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .rules-builder-content .pane-header {
  border-bottom-color: #1e293b !important;
}

body.dark-theme .rules-builder-content .pane-header h2 {
  color: #f8fafc !important;
}

body.dark-theme .rule-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .rule-card:hover {
  border-color: #3b82f6 !important;
  background: #17223b !important;
}

body.dark-theme .rule-card.editing {
  border-color: #6366f1 !important;
  background-color: rgba(99, 102, 241, 0.15) !important;
}

body.dark-theme .rule-card.inactive {
  background-color: rgba(255, 255, 255, 0.02) !important;
  border-color: #1e293b !important;
}

body.dark-theme .rule-card-header h3 {
  color: #f8fafc !important;
}

body.dark-theme .rule-detail-item .label {
  color: #94a3b8 !important;
}

body.dark-theme .rule-detail-item .value {
  color: #f8fafc !important;
}

body.dark-theme .rule-card-actions {
  border-top-color: #1e293b !important;
}

body.dark-theme .loading-state,
body.dark-theme .empty-rules-state {
  border-color: #1e293b !important;
  background: #0f172a !important;
}

body.dark-theme .empty-rules-state p {
  color: #cbd5e1 !important;
}

body.dark-theme .rule-edit-form select,
body.dark-theme .rule-edit-form input[type="text"],
body.dark-theme .rule-edit-form input[type="number"] {
  background-color: #0f172a !important;
  color: #f8fafc !important;
  border-color: #1e293b !important;
}

body.dark-theme .rule-edit-form select:focus,
body.dark-theme .rule-edit-form input[type="text"]:focus,
body.dark-theme .rule-edit-form input[type="number"]:focus {
  border-color: #6366f1 !important;
}

body.dark-theme .form-group label {
  color: #cbd5e1 !important;
}

body.dark-theme .toggle-label {
  color: #cbd5e1 !important;
}

body.dark-theme .toggle-label input[type="checkbox"] {
  border-color: #1e293b !important;
  background-color: #0f172a !important;
}

body.dark-theme .toggle-label input[type="checkbox"]:checked {
  border-color: #6366f1 !important;
  background-color: #6366f1 !important;
}

body.dark-theme .btn-secondary {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

body.dark-theme .btn-secondary:hover:not(:disabled) {
  background-color: #334155 !important;
  color: #f8fafc !important;
}

body.dark-theme .form-actions {
  border-top-color: #1e293b !important;
}

/* Pages 5, 6, 7: Class Groups, Course Sections, Course Section Groups (using ResourcePage.css) */
body.dark-theme .timetable-layout input[type="text"] {
  background: #0f172a !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-theme .timetable-layout input[type="text"]:focus {
  border-color: #3b82f6 !important;
}

/* Target unassigned students lists sidebars and cards in ClassGroups and CourseSections */
body.dark-theme .timetable-layout div[style*="border: 2px dashed #cbd5e1"],
body.dark-theme .timetable-layout div[style*="dashed #cbd5e1"] {
  background-color: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .timetable-layout div[style*="border: 2px dashed #cbd5e1"] h3,
body.dark-theme .timetable-layout div[style*="dashed #cbd5e1"] h3 {
  color: #f8fafc !important;
}

body.dark-theme .timetable-layout div[draggable="true"],
body.dark-theme .timetable-layout div[style*="cursor: grab"] {
  background-color: #0f172a !important;
  border-color: #1e293b !important;
  color: #cbd5e1 !important;
}

body.dark-theme .timetable-layout div[draggable="true"]:hover,
body.dark-theme .timetable-layout div[style*="cursor: grab"]:hover {
  border-color: #3b82f6 !important;
  background-color: #17223b !important;
}

body.dark-theme .timetable-layout div[style*="background-color: rgb(241, 245, 249)"],
body.dark-theme .timetable-layout div[style*="background-color: #f1f5f9"] {
  background-color: #0f172a !important;
  color: #cbd5e1 !important;
}

body.dark-theme .timetable-layout div[style*="background-color: rgb(248, 250, 252)"],
body.dark-theme .timetable-layout div[style*="background-color: #f8fafc"] {
  background-color: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .timetable-layout label[style*="background-color"] {
  background-color: #0f172a !important;
  border-bottom-color: #1e293b !important;
  color: #cbd5e1 !important;
}

body.dark-theme .timetable-layout label[style*="background-color: rgb(227, 242, 253)"] {
  background-color: rgba(59, 130, 246, 0.15) !important;
}

/* Checkbox Group Dark Theme Overrides */
body.dark-theme .checkbox-group label {
  background: #131b2e !important;
  border: 1px solid #1e293b !important;
}

body.dark-theme .checkbox-group label:hover {
  background: #17223b !important;
  border-color: #334155 !important;
}

body.dark-theme .checkbox-group span {
  color: #cbd5e1 !important;
}

body.dark-theme .checkbox-group input[type="checkbox"] {
  border-color: #1e293b !important;
  background-color: #0f172a !important;
}

body.dark-theme .checkbox-group input[type="checkbox"]:checked {
  border-color: #3b82f6 !important;
  background-color: #3b82f6 !important;
}

body.dark-theme .resource-page {
  background: #0b0f19 !important;
}

body.dark-theme .btn-secondary,
body.dark-theme .btn-edit {
  background: #1e293b !important;
  color: #cbd5e1 !important;
  border: 1px solid #334155 !important;
}

body.dark-theme .btn-secondary:hover,
body.dark-theme .btn-edit:hover {
  background: #334155 !important;
  color: #f8fafc !important;
}

body.dark-theme .btn-delete {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #ef4444 !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

body.dark-theme .btn-delete:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
}

body.dark-theme .resource-card {
  background: #131b2e !important;
  border: 1px solid #1e293b !important;
}

body.dark-theme .resource-card:hover {
  border-color: #3b82f6 !important;
  background: #17223b !important;
}

body.dark-theme .card-header h3 {
  color: #f8fafc !important;
}

body.dark-theme .card-info {
  color: #cbd5e1 !important;
}

body.dark-theme .info-label {
  color: #94a3b8 !important;
}

body.dark-theme .card-actions {
  border-top: 1px solid #1e293b !important;
}

body.dark-theme .empty-state {
  background: #131b2e !important;
  border: 2px dashed #1e293b !important;
}

body.dark-theme .empty-state h3 {
  color: #cbd5e1 !important;
}

body.dark-theme .empty-state p {
  color: #94a3b8 !important;
}

body.dark-theme .form-modal {
  background: rgba(15, 23, 42, 0.6) !important;
}

body.dark-theme .form-container {
  background: #131b2e !important;
  border: 1px solid #1e293b !important;
  color: #cbd5e1 !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4) !important;
}

body.dark-theme .form-container h2 {
  color: #f8fafc !important;
}

body.dark-theme .form-group label {
  color: #cbd5e1 !important;
}

body.dark-theme .form-group input,
body.dark-theme .form-group select,
body.dark-theme .form-group textarea {
  background: #0f172a !important;
  border: 1px solid #1e293b !important;
  color: #f8fafc !important;
}

body.dark-theme .form-group input:focus,
body.dark-theme .form-group select:focus,
body.dark-theme .form-group textarea:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2) !important;
}

body.dark-theme .form-actions {
  border-top: 1px solid #1e293b !important;
}

body.dark-theme .resource-table,
body.dark-theme .table-container {
  background: #131b2e !important;
  border-color: #1e293b !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

body.dark-theme .resource-table th,
body.dark-theme .table-container th {
  background: #0f172a !important;
  color: #94a3b8 !important;
  border-bottom: 1px solid #1e293b !important;
}

body.dark-theme .resource-table tbody tr,
body.dark-theme .table-container tbody tr {
  border-bottom: 1px solid #1e293b !important;
}

body.dark-theme .resource-table tbody tr:hover,
body.dark-theme .table-container tbody tr:hover {
  background: rgba(255, 255, 255, 0.02) !important;
}

body.dark-theme .resource-table td,
body.dark-theme .table-container td {
  color: #cbd5e1 !important;
}

body.dark-theme .detail-panel {
  background: #131b2e !important;
  border-left: 1px solid #1e293b !important;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .detail-header {
  background: #0f172a !important;
  border-bottom: 1px solid #1e293b !important;
}

body.dark-theme .detail-header h2 {
  color: #f8fafc !important;
}

body.dark-theme .close-button {
  color: #94a3b8 !important;
}

body.dark-theme .close-button:hover {
  color: #f8fafc !important;
  background: #1e293b !important;
}

body.dark-theme .detail-section h3 {
  color: #cbd5e1 !important;
}

body.dark-theme .detail-label {
  color: #94a3b8 !important;
}

body.dark-theme .student-item {
  background: #0f172a !important;
  border: 1px solid #1e293b !important;
}

body.dark-theme .student-item:hover {
  background: #1e293b !important;
  border-color: #334155 !important;
}

body.dark-theme .student-info strong {
  color: #f8fafc !important;
}

body.dark-theme .student-meta {
  color: #94a3b8 !important;
}

body.dark-theme .modal-content {
  background: #131b2e !important;
  color: #cbd5e1 !important;
}

body.dark-theme .modal-header {
  border-bottom: 1px solid #1e293b !important;
}

body.dark-theme .modal-header h2 {
  color: #f8fafc !important;
}

body.dark-theme .modal-close {
  color: #94a3b8 !important;
}

body.dark-theme .modal-close:hover {
  color: #f8fafc !important;
}

/* Page 8: Generate Timetable */
body.dark-theme .generation-intro {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .generation-intro h2 {
  color: #f8fafc !important;
  border-bottom: 1px solid #1e293b !important;
}

body.dark-theme .features-list li {
  color: #cbd5e1 !important;
}

body.dark-theme .warning-box {
  background-color: rgba(245, 158, 11, 0.15) !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  color: #fbbf24 !important;
}

body.dark-theme .job-status-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .job-header {
  border-bottom-color: #1e293b !important;
}

body.dark-theme .detail-row {
  border-bottom-color: #1e293b !important;
}

body.dark-theme .detail-label {
  color: #94a3b8 !important;
}

body.dark-theme .detail-value {
  color: #cbd5e1 !important;
}

body.dark-theme .progress-bar {
  background-color: #0f172a !important;
  border-color: #1e293b !important;
}

body.dark-theme .progress-text {
  color: #60a5fa !important;
}

body.dark-theme .accordion-group {
  border-color: #1e293b !important;
  background: #131b2e !important;
}

body.dark-theme .accordion-header {
  background: #0f172a !important;
  color: #f8fafc !important;
}

body.dark-theme .accordion-header:hover {
  background: #1e293b !important;
}

body.dark-theme .accordion-body {
  border-top-color: #1e293b !important;
}

body.dark-theme .violation-item {
  border-bottom-color: #1e293b !important;
}

body.dark-theme .violation-desc {
  color: #cbd5e1 !important;
}

body.dark-theme .violation-entity {
  color: #94a3b8 !important;
}

/* Page 9: Master Timetable */
body.dark-theme .master-timetable-page {
  background: #0b0f19 !important;
}

body.dark-theme .master-timetable-container {
  background: #131b2e !important;
  border: 1px solid #1e293b !important;
}

body.dark-theme .master-grid thead {
  background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%) !important;
}

body.dark-theme .period-cell {
  background: #0f172a !important;
  color: #cbd5e1 !important;
  border-right-color: #1e293b !important;
  border-bottom-color: #1e293b !important;
}

body.dark-theme .year-cell {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #a7f3d0 !important;
  border-right-color: #1e293b !important;
  border-bottom-color: #1e293b !important;
}

body.dark-theme .master-grid-cell {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .master-slot-card {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

body.dark-theme .master-slot-card:hover {
  border-color: #3b82f6 !important;
  background: #24304f !important;
}

body.dark-theme .master-slot-card .slot-subject {
  color: #60a5fa !important;
}

body.dark-theme .master-slot-card .slot-details {
  color: #cbd5e1 !important;
}

body.dark-theme .master-slot-card .slot-group {
  color: #94a3b8 !important;
}

body.dark-theme .empty-cell-hint {
  color: #334155 !important;
}

body.dark-theme .legend-panel {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .legend-item {
  background: #0f172a !important;
  color: #cbd5e1 !important;
  border-color: #1e293b !important;
}

body.dark-theme .period-time {
  color: #94a3b8 !important;
}

/* Page 10: Manual Allocation */
body.dark-theme .manual-allocation-page {
  background: #0b0f19 !important;
}

body.dark-theme .page-header-ribbon .page-header {
  background: #131b2e !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .page-header-ribbon .page-header h1 {
  color: #f8fafc !important;
}

body.dark-theme .page-header-ribbon .page-header p {
  color: #94a3b8 !important;
}

body.dark-theme .allocation-stats-container .stat-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
  color: #cbd5e1 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .allocation-stats-container .stat-card:hover {
  background: #17223b !important;
}

body.dark-theme .allocation-stats-container .stat-value {
  color: #60a5fa !important;
}

body.dark-theme .allocation-stats-container .stat-label {
  color: #94a3b8 !important;
}

body.dark-theme .course-sections-sidebar {
  background: #131b2e !important;
  border-color: #1e293b !important;
  color: #cbd5e1 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

body.dark-theme .course-sections-sidebar h3 {
  color: #f8fafc !important;
}

body.dark-theme .sidebar-tabs {
  background: #0f172a !important;
  border-color: #1e293b !important;
}

body.dark-theme .sidebar-tab-btn {
  color: #cbd5e1 !important;
}

body.dark-theme .sidebar-tab-btn:hover {
  background: #1e293b !important;
}

body.dark-theme .sidebar-tab-btn.active {
  background: #3b82f6 !important;
  color: white !important;
}

body.dark-theme .sidebar-hint {
  background: rgba(14, 165, 233, 0.15) !important;
  color: #bae6fd !important;
}

body.dark-theme .rotation-filter {
  background: #0f172a !important;
  border-color: #1e293b !important;
}

body.dark-theme .course-section-card {
  background: #0f172a !important;
  border-color: #1e293b !important;
}

body.dark-theme .course-section-card:hover {
  border-color: #3b82f6 !important;
}

body.dark-theme .course-section-card.fully-allocated {
  background: rgba(255, 255, 255, 0.02) !important;
  border-color: #1e293b !important;
}

body.dark-theme .section-code {
  color: #60a5fa !important;
}

body.dark-theme .section-name {
  color: #cbd5e1 !important;
}

body.dark-theme .section-teacher,
body.dark-theme .section-class,
body.dark-theme .section-special-room {
  color: #94a3b8 !important;
}

body.dark-theme .timetable-grid-container {
  background: #131b2e !important;
  border-color: #1e293b !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

body.dark-theme .grid-controls {
  border-bottom-color: #1e293b !important;
}

body.dark-theme .split-class-toggle {
  color: #cbd5e1 !important;
}

body.dark-theme .validation-feedback {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}

body.dark-theme .validation-message.error {
  color: #fca5a5 !important;
}

body.dark-theme .validation-message.warning {
  color: #fbbf24 !important;
}

body.dark-theme .allocation-grid thead {
  background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%) !important;
}

body.dark-theme .grid-cell {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .grid-cell.empty {
  background: #0f172a !important;
}

body.dark-theme .grid-cell.empty:hover {
  background: #17223b !important;
}

body.dark-theme .grid-cell.drop-target {
  background: rgba(59, 130, 246, 0.15) !important;
  border-color: #3b82f6 !important;
}

body.dark-theme .grid-cell.valid-drop {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: #10b981 !important;
}

body.dark-theme .grid-cell.invalid-drop {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: #ef4444 !important;
}

body.dark-theme .grid-cell.warning-drop {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: #f59e0b !important;
}

body.dark-theme .grid-cell.drag-active-valid {
  background-color: rgba(40, 167, 69, 0.12) !important;
  border-color: rgba(40, 167, 69, 0.6) !important;
  border-top-color: #28a745 !important;
}

body.dark-theme .grid-cell.drag-active-valid:hover,
body.dark-theme .grid-cell.drag-active-valid.drop-target {
  background-color: rgba(40, 167, 69, 0.22) !important;
  border-color: #28a745 !important;
}

body.dark-theme .grid-cell.drag-active-warning {
  background-color: rgba(255, 193, 7, 0.14) !important;
  border-color: rgba(255, 193, 7, 0.65) !important;
  border-top-color: #e6a800 !important;
}

body.dark-theme .grid-cell.drag-active-warning:hover,
body.dark-theme .grid-cell.drag-active-warning.drop-target {
  background-color: rgba(255, 193, 7, 0.25) !important;
  border-color: #e6a800 !important;
}

body.dark-theme .grid-cell.drag-active-invalid {
  background-color: rgba(220, 53, 69, 0.1) !important;
  border-color: rgba(220, 53, 69, 0.55) !important;
  border-top-color: #dc3545 !important;
}

body.dark-theme .grid-cell.drag-active-invalid:hover,
body.dark-theme .grid-cell.drag-active-invalid.drop-target {
  background-color: rgba(220, 53, 69, 0.18) !important;
  border-color: #dc3545 !important;
}

body.dark-theme .grid-cell.selected {
  outline-color: #3b82f6 !important;
}

body.dark-theme .empty-cell-hint {
  color: #3b82f6 !important;
}

body.dark-theme .slot-content {
  background: #1e293b !important;
  border-left-color: #3b82f6 !important;
  color: #cbd5e1 !important;
}

body.dark-theme .slot-content:hover {
  border-left-color: #60a5fa !important;
}

body.dark-theme .lock-indicator,
body.dark-theme .split-indicator {
  background: #1e293b !important;
  color: #3b82f6 !important;
}

body.dark-theme .slot-subject {
  color: #60a5fa !important;
}

body.dark-theme .slot-teacher {
  color: #cbd5e1 !important;
}

body.dark-theme .slot-room {
  color: #94a3b8 !important;
}

body.dark-theme .slot-carousel-controls {
  background: rgba(15, 23, 42, 0.95) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4) !important;
}

/* View Timetable page (Timetable.css) slot styles */
body.dark-theme .slot-cell {
  border-color: #1e293b !important;
}

body.dark-theme .slot-cell.has-slot {
  background: rgba(59, 130, 246, 0.15) !important;
}

body.dark-theme .slot-cell.has-slot:hover {
  background: rgba(59, 130, 246, 0.25) !important;
  box-shadow: inset 0 0 0 2px #3b82f6 !important;
}

body.dark-theme .slot-cell.empty-slot {
  background: #131b2e !important;
}

body.dark-theme .slot-cell.selected {
  box-shadow: inset 0 0 0 3px #3b82f6 !important;
  background: rgba(59, 130, 246, 0.25) !important;
}

body.dark-theme .slot-class-group {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
}

body.dark-theme .slot-content.locked-slot {
  background: linear-gradient(135deg, #1e293b 0%, #131b2e 100%) !important;
  border-left-color: #fbbf24 !important;
}

body.dark-theme .lock-indicator {
  background: #fbbf24 !important;
  color: #0b0f19 !important;
}

body.dark-theme .empty-slot-content {
  color: #334155 !important;
}

body.dark-theme .slot-details-panel {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .slot-details-panel .panel-header {
  background: #0f172a !important;
  border-bottom-color: #1e293b !important;
}

body.dark-theme .slot-details-panel .panel-header h3 {
  color: #f8fafc !important;
}

body.dark-theme .slot-details-panel .btn-close {
  color: #94a3b8 !important;
}

body.dark-theme .slot-details-panel .btn-close:hover {
  background: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-theme .slot-details-panel .detail-row {
  border-bottom-color: #1e293b !important;
}

body.dark-theme .slot-details-panel .detail-row label {
  color: #cbd5e1 !important;
}

body.dark-theme .slot-details-panel .detail-row span {
  color: #f8fafc !important;
}

body.dark-theme .slot-details-panel .form-group label {
  color: #cbd5e1 !important;
}

body.dark-theme .slot-details-panel .form-select,
body.dark-theme .slot-details-panel .form-input {
  background: #0f172a !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-theme .slot-details-panel .form-select:focus,
body.dark-theme .slot-details-panel .form-input:focus {
  border-color: #3b82f6 !important;
}

body.dark-theme .slot-details-panel .panel-actions {
  border-top-color: #1e293b !important;
}

body.dark-theme .timetable-filters {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .filter-group label {
  color: #cbd5e1 !important;
}

body.dark-theme .filter-group .form-select {
  background: #0f172a !important;
  border-color: #1e293b !important;
  color: #cbd5e1 !important;
}

body.dark-theme .filter-group .form-select:focus {
  border-color: #3b82f6 !important;
}

body.dark-theme .form-period-notice {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.05) 100%) !important;
  border-color: #3b82f6 !important;
  color: #60a5fa !important;
}

body.dark-theme .calendar-link-container {
  background: #0f172a !important;
  border-color: #1e293b !important;
}

body.dark-theme .calendar-link-input {
  color: #cbd5e1 !important;
}

body.dark-theme .calendar-instructions {
  border-top-color: #1e293b !important;
}

body.dark-theme .calendar-instructions h3 {
  color: #f8fafc !important;
}

body.dark-theme .instruction-section {
  background: #0f172a !important;
  border-color: #1e293b !important;
}

body.dark-theme .instruction-section h4 {
  color: #60a5fa !important;
}

body.dark-theme .instruction-section ol {
  color: #cbd5e1 !important;
}

body.dark-theme .stacked-slot-card {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

body.dark-theme .stacked-slot-card:hover {
  background: #24304f !important;
  border-color: #3b82f6 !important;
}

body.dark-theme .stacked-slot-card.selected {
  border-color: #3b82f6 !important;
  background: rgba(59, 130, 246, 0.15) !important;
}

body.dark-theme .btn-focus-mode {
  background: #1e293b !important;
  color: #cbd5e1 !important;
  border: 1px solid #334155 !important;
}

body.dark-theme .btn-focus-mode:hover {
  background: #334155 !important;
  color: #f8fafc !important;
}

body.dark-theme .btn-focus-mode.focus-active {
  background: rgba(59, 130, 246, 0.15) !important;
  border-color: #3b82f6 !important;
  color: #60a5fa !important;
}


/* --- Timetabling Module Timetables Management page Overrides --- */
body.dark-theme .timetables-page {
  background: #0b0f19 !important;
}

body.dark-theme .timetables-header {
  background: #131b2e !important;
  border-color: #1e293b !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .header-text h1 {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

body.dark-theme .header-text p {
  color: #94a3b8 !important;
}

body.dark-theme .timetable-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .timetable-card:hover {
  border-color: #3b82f6 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

body.dark-theme .timetable-card.active {
  border-color: #3b82f6 !important;
  background: linear-gradient(to bottom, #172554 0%, #131b2e 100%) !important;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.15) !important;
}

body.dark-theme .card-top h3 {
  color: #f8fafc !important;
}

body.dark-theme .card-body .description {
  color: #cbd5e1 !important;
}

body.dark-theme .meta-item {
  color: #94a3b8 !important;
}

body.dark-theme .timetable-card .card-actions {
  border-top-color: #1e293b !important;
}

body.dark-theme .timetable-card .action-btn {
  background: #1e293b !important;
  color: #cbd5e1 !important;
  border-color: #334155 !important;
}

body.dark-theme .timetable-card .action-btn:hover {
  background: #334155 !important;
  color: #f8fafc !important;
  border-color: #475569 !important;
}

body.dark-theme .timetable-card .action-btn.primary {
  background: #2563eb !important;
  color: #ffffff !important;
  border: none !important;
}

body.dark-theme .timetable-card .action-btn.primary:hover {
  background: #1d4ed8 !important;
}

body.dark-theme .timetable-card .action-btn.danger {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #ef4444 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

body.dark-theme .timetable-card .action-btn.danger:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: #ef4444 !important;
}

body.dark-theme .timetable-card .action-btn:disabled {
  opacity: 0.4 !important;
}


/* --- Nexus Module Contrast and Hover Overrides --- */
body.dark-theme .nexus-card-header h3 {
  color: #f8fafc !important;
}

body.dark-theme .nexus-card-subtitle {
  color: #60a5fa !important;
}

body.dark-theme .nexus-identifier-badge {
  background: rgba(59, 130, 246, 0.15) !important;
  color: #60a5fa !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
}

body.dark-theme .meta-label {
  color: #94a3b8 !important;
}

body.dark-theme .meta-value {
  color: #cbd5e1 !important;
}

body.dark-theme .nexus-card:hover {
  background: #17223b !important;
  border-color: #3b82f6 !important;
}

body.dark-theme .nexus-btn-secondary {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

body.dark-theme .nexus-btn-secondary:hover {
  background: #334155 !important;
  color: #f8fafc !important;
}

body.dark-theme .nexus-tab-item:hover {
  color: #f8fafc !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

body.dark-theme .nexus-tab-item.active {
  color: #818cf8 !important;
  background: rgba(99, 102, 241, 0.1) !important;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.2) !important;
}

body.dark-theme .stat-value {
  color: #f8fafc !important;
}

body.dark-theme .stat-label {
  color: #94a3b8 !important;
}

body.dark-theme .ref-title {
  color: #f8fafc !important;
}

body.dark-theme .ref-description {
  color: #cbd5e1 !important;
}

body.dark-theme .ref-tab-btn:hover {
  color: #f8fafc !important;
}

body.dark-theme .drawer-action-btn {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

body.dark-theme .drawer-action-btn:hover {
  background: #334155 !important;
  color: #f8fafc !important;
}

body.dark-theme .drawer-action-btn.relief-btn {
  background: rgba(129, 140, 248, 0.15) !important;
  border-color: rgba(129, 140, 248, 0.4) !important;
  color: #818cf8 !important;
}

body.dark-theme .drawer-action-btn.relief-btn:hover {
  background: rgba(129, 140, 248, 0.25) !important;
  color: #a5b4fc !important;
  border-color: #818cf8 !important;
}

body.dark-theme .drawer-close-btn:hover {
  color: #f8fafc !important;
}

body.dark-theme .drawer-tab-btn:hover {
  color: #f8fafc !important;
}

body.dark-theme .drawer-tab-btn.active {
  background: #1e293b !important;
  color: #f8fafc !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .grid-value {
  color: #cbd5e1 !important;
}

body.dark-theme .grid-value.font-highlight {
  color: #818cf8 !important;
}

body.dark-theme .visual-timeline::before {
  background: rgba(255, 255, 255, 0.08) !important;
}

body.dark-theme .timeline-marker {
  background: #131b2e !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

body.dark-theme .timeline-card-header h4 {
  color: #cbd5e1 !important;
}

body.dark-theme .timeline-card-meta {
  color: #94a3b8 !important;
}

body.dark-theme .action-card-title {
  color: #818cf8 !important;
}

body.dark-theme .timeline-empty {
  color: #94a3b8 !important;
}

body.dark-theme .qual-detail-pill {
  background: rgba(59, 130, 246, 0.15) !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
  color: #60a5fa !important;
}


/* --- Communications Module UI Correct Selectors Overrides --- */
body.dark-theme .comm-chat {
  background: #131b2e !important;
  border-color: #1e293b !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .comm-chat-sidebar {
  background: #0f172a !important;
  border-right-color: #1e293b !important;
}

body.dark-theme .comm-chat-sidebar-header {
  border-bottom-color: #1e293b !important;
}

body.dark-theme .comm-chat-title {
  color: #f8fafc !important;
}

body.dark-theme .comm-chat-sub {
  color: #94a3b8 !important;
}

body.dark-theme .comm-sidebar-search {
  background: #0f172a !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-theme .comm-sidebar-search:focus {
  border-color: #6366f1 !important;
}

body.dark-theme .comm-archived-toggle {
  color: #94a3b8 !important;
}

body.dark-theme .comm-archived-toggle:hover {
  color: #cbd5e1 !important;
}

body.dark-theme .comm-room-btn {
  background: transparent !important;
  border-color: transparent !important;
}

body.dark-theme .comm-room-btn:hover {
  background: #1e293b !important;
  border-color: #334155 !important;
}

body.dark-theme .comm-room-btn--active {
  background: #1e293b !important;
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15) !important;
}

body.dark-theme .comm-room-name {
  color: #f8fafc !important;
}

body.dark-theme .comm-room-preview {
  color: #cbd5e1 !important;
}

body.dark-theme .comm-room-type-badge--dm {
  background: rgba(37, 99, 235, 0.15) !important;
  color: #60a5fa !important;
  border-color: rgba(37, 99, 235, 0.3) !important;
}

body.dark-theme .comm-room-type-badge--group {
  background: rgba(124, 58, 237, 0.15) !important;
  color: #a78bfa !important;
  border-color: rgba(124, 58, 237, 0.3) !important;
}

body.dark-theme .comm-room-type-badge--context {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
}

body.dark-theme .comm-chat-main-header {
  border-bottom-color: #1e293b !important;
}

body.dark-theme .comm-chat-room-title {
  color: #f8fafc !important;
}

body.dark-theme .comm-chat-room-sub {
  color: #94a3b8 !important;
}

body.dark-theme .comm-refresh-btn,
body.dark-theme .comm-archive-btn {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

body.dark-theme .comm-refresh-btn:hover,
body.dark-theme .comm-archive-btn:hover {
  background: #334155 !important;
  color: #f8fafc !important;
}

body.dark-theme .comm-archive-btn:hover {
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.15) !important;
}

body.dark-theme .comm-messages-area {
  background: #0b0f19 !important;
}

body.dark-theme .comm-msg-bubble--mine {
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%) !important;
  color: #ffffff !important;
}

body.dark-theme .comm-msg-bubble--other {
  background: #131b2e !important;
  color: #cbd5e1 !important;
  border-color: #1e293b !important;
}

body.dark-theme .comm-msg-meta {
  color: #64748b !important;
}

body.dark-theme .comm-composer {
  border-top-color: #1e293b !important;
  background: #131b2e !important;
}

body.dark-theme .comm-composer-input {
  background: #0f172a !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-theme .comm-composer-input:focus {
  background: #0f172a !important;
  border-color: #3b82f6 !important;
}

/* Bell dropdown notification overlay in global shell topbar */
body.dark-theme .comm-bell-btn {
  background: #131b2e !important;
  border-color: #1e293b !important;
  color: #cbd5e1 !important;
}

body.dark-theme .comm-bell-btn:hover {
  background: #1e293b !important;
  border-color: #334155 !important;
}

body.dark-theme .comm-bell-dropdown {
  background: #131b2e !important;
  border-color: #1e293b !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4) !important;
}

body.dark-theme .comm-bell-dropdown-header {
  border-bottom-color: #1e293b !important;
}

body.dark-theme .comm-bell-dropdown-title {
  color: #f8fafc !important;
}

body.dark-theme .comm-bell-dropdown-sub {
  color: #94a3b8 !important;
}

body.dark-theme .comm-notif-item {
  background: #131b2e !important;
  border-bottom-color: #1e293b !important;
}

body.dark-theme .comm-notif-item:hover {
  background: #1e293b !important;
}

body.dark-theme .comm-notif-title {
  color: #f8fafc !important;
}

body.dark-theme .comm-notif-body {
  color: #cbd5e1 !important;
}


/* --- Auth / Admin Module Overrides --- */
body.dark-theme .auth-layout.layout {
  background: #0b0f19 !important;
}

body.dark-theme .auth-layout .main-content {
  background-color: #0b0f19 !important;
  color: #cbd5e1 !important;
}

body.dark-theme .auth-layout .sidebar {
  background: linear-gradient(180deg, #131b2e 0%, #0b0f19 100%) !important;
  border-right: 1px solid #1e293b !important;
}

body.dark-theme .auth-layout .sidebar-header {
  border-bottom: 1px solid #1e293b !important;
}

body.dark-theme .auth-layout .nav-item {
  color: #94a3b8 !important;
}

body.dark-theme .auth-layout .nav-item:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  color: #f8fafc !important;
}

body.dark-theme .auth-layout .nav-item.active {
  background: rgba(96, 165, 250, 0.15) !important;
  color: #60a5fa !important;
}

body.dark-theme .users-container,
body.dark-theme .tenant-manager,
body.dark-theme .school-manager {
  background: #0b0f19 !important;
  color: #cbd5e1 !important;
}

body.dark-theme .users-header h1,
body.dark-theme .tenant-manager h1,
body.dark-theme .school-manager h1 {
  color: #f8fafc !important;
}

body.dark-theme .users-header p,
body.dark-theme .users-form-group small,
body.dark-theme .users-role-description,
body.dark-theme .permission-label-desc {
  color: #94a3b8 !important;
}

body.dark-theme .users-table-container {
  background: #131b2e !important;
  border-color: #1e293b !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

body.dark-theme .users-table thead {
  background-color: #0f172a !important;
  border-bottom: 2px solid #1e293b !important;
}

body.dark-theme .users-table th {
  color: #cbd5e1 !important;
}

body.dark-theme .users-table td {
  color: #cbd5e1 !important;
  border-top: 1px solid #1e293b !important;
}

body.dark-theme .users-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.02) !important;
}

body.dark-theme .role-badge {
  background-color: rgba(59, 130, 246, 0.15) !important;
  color: #60a5fa !important;
}

body.dark-theme .status-badge.active {
  background-color: rgba(16, 185, 129, 0.15) !important;
  color: #34d399 !important;
}

body.dark-theme .status-badge.inactive {
  background-color: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
}

body.dark-theme .users-btn-secondary,
body.dark-theme .users-btn-danger,
body.dark-theme .btn-secondary {
  background-color: #1e293b !important;
  color: #cbd5e1 !important;
  border: 1px solid #334155 !important;
}

body.dark-theme .users-btn-secondary:hover,
body.dark-theme .users-btn-danger:hover,
body.dark-theme .btn-secondary:hover {
  background-color: #334155 !important;
  color: #f8fafc !important;
}

body.dark-theme .users-modal-overlay {
  background-color: rgba(15, 23, 42, 0.6) !important;
}

body.dark-theme .users-modal-content {
  background: #131b2e !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
  border: 1px solid #1e293b !important;
}

body.dark-theme .users-modal-header {
  border-bottom: 1px solid #1e293b !important;
}

body.dark-theme .users-modal-header h2 {
  color: #f8fafc !important;
}

body.dark-theme .users-modal-close {
  color: #94a3b8 !important;
}

body.dark-theme .users-modal-close:hover {
  background-color: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-theme .users-form-group label {
  color: #cbd5e1 !important;
}

body.dark-theme .users-form-group input,
body.dark-theme .users-form-group select,
body.dark-theme .users-form-group textarea {
  background: #0f172a !important;
  border: 2px solid #1e293b !important;
  color: #f8fafc !important;
}

body.dark-theme .users-form-group input:focus,
body.dark-theme .users-form-group select:focus,
body.dark-theme .users-form-group textarea:focus {
  border-color: #3b82f6 !important;
  background: #0f172a !important;
}

body.dark-theme .users-modal-footer {
  border-top: 1px solid #1e293b !important;
}

body.dark-theme .users-roles-container {
  background-color: #0f172a !important;
  border-color: #1e293b !important;
}

body.dark-theme .users-role-item {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .users-role-item:hover {
  border-color: #3b82f6 !important;
}

body.dark-theme .users-role-item.selected {
  background-color: rgba(59, 130, 246, 0.1) !important;
  border-color: #3b82f6 !important;
}

body.dark-theme .users-role-name {
  color: #f8fafc !important;
}

body.dark-theme .campus-access-section {
  border-top: 1px solid #1e293b !important;
}

body.dark-theme .campus-access-title {
  color: #f8fafc !important;
}

body.dark-theme .campus-access-table th {
  background-color: #0f172a !important;
  color: #cbd5e1 !important;
  border-bottom-color: #1e293b !important;
}

body.dark-theme .campus-access-table td {
  color: #cbd5e1 !important;
  border-bottom-color: #1e293b !important;
}

body.dark-theme .campus-access-grant-form {
  background-color: #0f172a !important;
  border-color: #1e293b !important;
}

body.dark-theme .permissions-grid {
  background-color: #0f172a !important;
  border-color: #1e293b !important;
}

body.dark-theme .permission-checkbox-item:hover {
  background-color: #1e293b !important;
}

body.dark-theme .permission-label-name {
  color: #f8fafc !important;
}

body.dark-theme .permission-mask-preview {
  background: #0f172a !important;
  color: #cbd5e1 !important;
}

body.dark-theme .tenant-list,
body.dark-theme .school-list {
  background: transparent !important;
}

body.dark-theme .card,
body.dark-theme .manager-card,
body.dark-theme .tenant-card,
body.dark-theme .school-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

body.dark-theme .card:hover,
body.dark-theme .tenant-card:hover,
body.dark-theme .school-card:hover {
  border-color: #3b82f6 !important;
}

body.dark-theme .card-header,
body.dark-theme .card-footer {
  border-color: #1e293b !important;
}

body.dark-theme .card-title,
body.dark-theme .tenant-name,
body.dark-theme .school-name {
  color: #f8fafc !important;
}

body.dark-theme .card-body,
body.dark-theme .tenant-description,
body.dark-theme .school-description {
  color: #cbd5e1 !important;
}

body.dark-theme .card-meta,
body.dark-theme .meta-item {
  color: #94a3b8 !important;
}

/* --- Additional Timetable Management Page (/timetabling/timetables) Overrides --- */
body.dark-theme .timetables-page {
  background: #0b0f19 !important;
  color: #cbd5e1 !important;
}

body.dark-theme .timetables-header {
  background: #131b2e !important;
  border-color: #1e293b !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

body.dark-theme .timetables-header .header-text h1 {
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

body.dark-theme .timetables-header .header-text p {
  color: #94a3b8 !important;
}

body.dark-theme .empty-state {
  background: #131b2e !important;
  border-color: #334155 !important;
}

body.dark-theme .empty-state h3 {
  color: #cbd5e1 !important;
}

body.dark-theme .empty-state p {
  color: #94a3b8 !important;
}

body.dark-theme .timetable-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .timetable-card:hover {
  border-color: #3b82f6 !important;
  background: #17223b !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .timetable-card.active {
  border-color: #3b82f6 !important;
  background: linear-gradient(to bottom, #17254a 0%, #131b2e 100%) !important;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.25) !important;
}

body.dark-theme .timetable-card .card-top h3 {
  color: #f8fafc !important;
}

body.dark-theme .timetable-card .description {
  color: #cbd5e1 !important;
}

body.dark-theme .timetable-card .meta-item {
  color: #94a3b8 !important;
}

body.dark-theme .timetable-card .card-actions {
  border-top-color: #1e293b !important;
}

body.dark-theme .timetable-card .action-btn {
  background: #1e293b !important;
  color: #cbd5e1 !important;
  border-color: #334155 !important;
}

body.dark-theme .timetable-card .action-btn:hover {
  background: #334155 !important;
  color: #f8fafc !important;
  border-color: #475569 !important;
}

body.dark-theme .timetable-card .action-btn.primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  color: white !important;
  border: none !important;
}

body.dark-theme .timetable-card .action-btn.primary:hover {
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35) !important;
}

body.dark-theme .timetable-card .action-btn.danger {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

body.dark-theme .timetable-card .action-btn.danger:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  color: #fca5a5 !important;
}

body.dark-theme .modal-overlay {
  background: rgba(15, 23, 42, 0.6) !important;
}

body.dark-theme .modal-content {
  background: #131b2e !important;
  border: 1px solid #1e293b !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3) !important;
  color: #cbd5e1 !important;
}

body.dark-theme .modal-content h2 {
  color: #f8fafc !important;
}

body.dark-theme .form-group label {
  color: #cbd5e1 !important;
}

body.dark-theme .form-group input,
body.dark-theme .form-group textarea {
  background: #0f172a !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-theme .form-group input:focus,
body.dark-theme .form-group textarea:focus {
  border-color: #3b82f6 !important;
}

body.dark-theme .info-box {
  background: rgba(14, 165, 233, 0.15) !important;
  border-color: rgba(14, 165, 233, 0.3) !important;
  color: #38bdf8 !important;
}

/* --- Additional Nexus Module Overrides --- */
body.dark-theme .nexus-db-title-block h1 {
  background: linear-gradient(to right, #818cf8, #f8fafc) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

body.dark-theme .nexus-db-subtitle {
  color: #94a3b8 !important;
}

body.dark-theme .nexus-db-stat-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
}

body.dark-theme .nexus-db-stat-card:hover {
  background: #17223b !important;
  border-color: #6366f1 !important;
}

body.dark-theme .db-stat-value {
  color: #f8fafc !important;
}

body.dark-theme .db-stat-label {
  color: #94a3b8 !important;
}

body.dark-theme .nexus-db-chart-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .nexus-db-chart-card h3 {
  color: #f8fafc !important;
}

body.dark-theme .campus-name {
  color: #cbd5e1 !important;
}

body.dark-theme .campus-value {
  color: #94a3b8 !important;
}

body.dark-theme .cohort-label {
  color: #cbd5e1 !important;
}

body.dark-theme .cohort-count {
  color: #a78bfa !important;
}

body.dark-theme .bar-outer,
body.dark-theme .cohort-bar-outer {
  background: #1e293b !important;
}

body.dark-theme .nexus-db-details-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .nexus-db-details-card h3 {
  color: #f8fafc !important;
}

body.dark-theme .quick-action-btn {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .quick-action-btn:hover {
  background: #17223b !important;
  border-color: #6366f1 !important;
}

body.dark-theme .action-info h4 {
  color: #f8fafc !important;
}

body.dark-theme .action-info p {
  color: #94a3b8 !important;
}

body.dark-theme .log-subsection h4 {
  color: #94a3b8 !important;
  border-bottom-color: #1e293b !important;
}

body.dark-theme .log-item {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .log-item:hover {
  background: #17223b !important;
  border-color: #cbd5e1 !important;
}

body.dark-theme .log-name {
  color: #f8fafc !important;
}

body.dark-theme .log-meta {
  color: #94a3b8 !important;
}

body.dark-theme .no-data-text,
body.dark-theme .no-log-text {
  color: #64748b !important;
}

body.dark-theme .nexus-tab-item {
  color: #94a3b8 !important;
}

body.dark-theme .nexus-tab-item:hover {
  color: #f8fafc !important;
  background: rgba(255, 255, 255, 0.05) !important;
}

body.dark-theme .nexus-search-input:focus,
body.dark-theme .nexus-filter-select:focus {
  background: #0f172a !important;
}

body.dark-theme .nexus-btn-secondary {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

body.dark-theme .nexus-btn-secondary:hover {
  background: #334155 !important;
  color: #f8fafc !important;
  border-color: #475569 !important;
}

/* --- Additional Communications Module Overrides --- */
body.dark-theme .comm-new-msg-btn {
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25) !important;
}

body.dark-theme .comm-modal-overlay {
  background: rgba(15, 23, 42, 0.6) !important;
}

body.dark-theme .comm-modal {
  background: #131b2e !important;
  border: 1px solid #1e293b !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4) !important;
}

body.dark-theme .comm-modal-header {
  border-bottom-color: #1e293b !important;
}

body.dark-theme .comm-modal-icon {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
  color: #34d399 !important;
}

body.dark-theme .comm-modal-title {
  color: #f8fafc !important;
}

body.dark-theme .comm-modal-sub {
  color: #94a3b8 !important;
}

body.dark-theme .comm-modal-close:hover {
  background: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-theme .comm-modal-footer {
  border-top-color: #1e293b !important;
}

body.dark-theme .comm-label {
  color: #cbd5e1 !important;
}

body.dark-theme .comm-hint {
  color: #64748b !important;
}

body.dark-theme .comm-input,
body.dark-theme .comm-select,
body.dark-theme .comm-textarea {
  background: #0f172a !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-theme .comm-input:focus,
body.dark-theme .comm-select:focus,
body.dark-theme .comm-textarea:focus {
  border-color: #3b82f6 !important;
}

body.dark-theme .comm-msg-edit-textarea {
  background: #0f172a !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-theme .comm-close-confirm-strip {
  background: #2b1f15 !important;
  border-bottom-color: #4b350f !important;
  color: #fcd34d !important;
}

body.dark-theme .comm-messages-empty-title,
body.dark-theme .comm-chat-empty-title {
  color: #cbd5e1 !important;
}

body.dark-theme .comm-messages-empty-sub,
body.dark-theme .comm-chat-empty-sub {
  color: #94a3b8 !important;
}

body.dark-theme .comm-composer-input:focus {
  background: #0f172a !important;
}

/* --- Additional Auth Module Overrides --- */
body.dark-theme .school-manager-container {
  color: #cbd5e1 !important;
}

body.dark-theme .school-manager-header h1 {
  background: linear-gradient(135deg, #cbd5e1 0%, #3b82f6 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

body.dark-theme .school-manager-subtitle {
  color: #94a3b8 !important;
}

body.dark-theme .quota-card {
  background: rgba(19, 27, 46, 0.7) !important;
  border-color: #1e293b !important;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .quota-card:hover {
  border-color: #3b82f6 !important;
}

body.dark-theme .quota-card__info h3 {
  color: #cbd5e1 !important;
}

body.dark-theme .quota-card__values {
  color: #94a3b8 !important;
}

body.dark-theme .quota-card__values strong {
  color: #f8fafc !important;
}

body.dark-theme .quota-card__progress-bar-container {
  background: #1e293b !important;
}

body.dark-theme .quota-card__alert {
  color: #fcd34d !important;
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}

body.dark-theme .school-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .school-card:hover {
  border-color: #cbd5e1 !important;
}

body.dark-theme .school-card--expanded {
  border-color: #3b82f6 !important;
}

body.dark-theme .school-card__header {
  background: #131b2e !important;
}

body.dark-theme .school-card__header:hover {
  background: #17223b !important;
}

body.dark-theme .school-card__code-badge {
  background: rgba(59, 130, 246, 0.15) !important;
  color: #60a5fa !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
}

body.dark-theme .school-card__name {
  color: #f8fafc !important;
}

body.dark-theme .school-card__campuses-section {
  border-top-color: #1e293b !important;
  background: #0f172a !important;
}

body.dark-theme .campuses-section__header h4 {
  color: #cbd5e1 !important;
}

body.dark-theme .campuses-empty-msg {
  background: #131b2e !important;
  border-color: #1e293b !important;
  color: #94a3b8 !important;
}

body.dark-theme .campus-item {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .campus-item:hover {
  border-color: #cbd5e1 !important;
}

body.dark-theme .campus-item__name {
  color: #cbd5e1 !important;
}

body.dark-theme .school-manager-empty-state {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .school-manager-empty-state h3 {
  color: #cbd5e1 !important;
}

body.dark-theme .school-manager-empty-state p {
  color: #94a3b8 !important;
}

body.dark-theme .system-page__header {
  border-bottom-color: #1e293b !important;
}

body.dark-theme .system-page__header h1 {
  color: #f8fafc !important;
}

body.dark-theme .system-page__subtitle {
  color: #94a3b8 !important;
}

body.dark-theme .tenant-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .tenant-card:hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4) !important;
}

body.dark-theme .tenant-card__name {
  color: #f8fafc !important;
}

body.dark-theme .tenant-card__slug {
  color: #cbd5e1 !important;
  background: #0f172a !important;
}

body.dark-theme .tenant-card__actions {
  border-top-color: #1e293b !important;
}

body.dark-theme .modal {
  background: #131b2e !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
  border: 1px solid #1e293b !important;
}

body.dark-theme .modal__header {
  border-bottom-color: #1e293b !important;
}

body.dark-theme .modal__header h2 {
  color: #f8fafc !important;
}

body.dark-theme .modal__close:hover {
  background-color: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-theme .modal__footer {
  border-top-color: #1e293b !important;
  background-color: #0f172a !important;
}

body.dark-theme .modal__body::-webkit-scrollbar-track {
  background: #0f172a !important;
}

body.dark-theme .modal__body::-webkit-scrollbar-thumb {
  background: #334155 !important;
}

body.dark-theme .modal__body::-webkit-scrollbar-thumb:hover {
  background: #475569 !important;
}

body.dark-theme .step-indicator {
  background-color: #0f172a !important;
  border-bottom-color: #1e293b !important;
}

body.dark-theme .step-indicator::before {
  background-color: #1e293b !important;
}

body.dark-theme .step-indicator__num {
  background-color: #131b2e !important;
  border-color: #1e293b !important;
  color: #94a3b8 !important;
}

body.dark-theme .step-indicator__label {
  color: #94a3b8 !important;
}

body.dark-theme .step-indicator__step--active .step-indicator__num {
  border-color: #6366f1 !important;
  background-color: #6366f1 !important;
  color: white !important;
}

body.dark-theme .step-indicator__step--active .step-indicator__label {
  color: #818cf8 !important;
}

body.dark-theme .wizard-step h3 {
  color: #f8fafc !important;
}

body.dark-theme .field-hint {
  color: #94a3b8 !important;
}

body.dark-theme .radio-option {
  border-color: #1e293b !important;
  background-color: #0f172a !important;
}

body.dark-theme .radio-option:hover {
  border-color: #cbd5e1 !important;
  background-color: #1e293b !important;
}

body.dark-theme .radio-option__label {
  color: #cbd5e1 !important;
}

body.dark-theme .oidc-config-fields {
  background: #0f172a !important;
  border-color: #1e293b !important;
}

body.dark-theme .review-summary {
  background-color: #0f172a !important;
  border-color: #1e293b !important;
}

body.dark-theme .review-row {
  border-bottom-color: #1e293b !important;
}

body.dark-theme .review-label {
  color: #94a3b8 !important;
}

body.dark-theme .review-value {
  color: #f8fafc !important;
}

body.dark-theme .btn--ghost {
  color: #cbd5e1 !important;
  border-color: #334155 !important;
}

body.dark-theme .btn--ghost:hover {
  background-color: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-theme .btn--danger {
  background-color: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

body.dark-theme .btn--danger:hover {
  background-color: rgba(239, 68, 68, 0.25) !important;
  color: #fca5a5 !important;
}

/* --- Communications Module Dashboard & Settings Layout Overrides --- */
body.dark-theme .comm-app-container {
  background: #0b0f19 !important;
}

body.dark-theme .comm-layout-wrapper {
  background: #0b0f19 !important;
}

body.dark-theme .comm-layout-nav {
  background: #131b2e !important;
  border-right: 1px solid #1e293b !important;
}

body.dark-theme .comm-layout-nav-item {
  color: #cbd5e1 !important;
}

body.dark-theme .comm-layout-nav-item:hover {
  background: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-theme .comm-layout-nav-item--active {
  background: rgba(99, 102, 241, 0.15) !important;
  color: #818cf8 !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
}

body.dark-theme .comm-patient-list {
  border-color: #1e293b !important;
}

body.dark-theme .comm-patient-row {
  border-bottom-color: #1e293b !important;
}

body.dark-theme .comm-patient-row:hover {
  background: #1e293b !important;
}

body.dark-theme .comm-patient-row--selected {
  background: rgba(59, 130, 246, 0.15) !important;
}

body.dark-theme .comm-patient-name {
  color: #f8fafc !important;
}

body.dark-theme .comm-patient-id {
  color: #94a3b8 !important;
}

body.dark-theme .comm-segment {
  background: #0f172a !important;
}

body.dark-theme .comm-segment-btn {
  color: #94a3b8 !important;
}

body.dark-theme .comm-segment-btn--active {
  background: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-theme .comm-snapshot-card {
  background: #0f172a !important;
  border-color: #1e293b !important;
}

body.dark-theme .comm-snapshot-quote {
  background: #131b2e !important;
  color: #cbd5e1 !important;
  border-color: #1e293b !important;
}

body.dark-theme .comm-snapshot-dd {
  color: #f8fafc !important;
}

body.dark-theme .comm-action-btn--escalate:hover {
  background: rgba(16, 185, 129, 0.15) !important;
}

body.dark-theme .comm-action-btn--edit:hover {
  background: #1e293b !important;
}

body.dark-theme .comm-action-btn--delete:hover {
  background: rgba(239, 68, 68, 0.15) !important;
}

body.dark-theme .comm-settings-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .comm-provider-btn--active {
  background: #1e293b !important;
  color: #818cf8 !important;
  border-color: #6366f1 !important;
}

body.dark-theme .comm-template-item {
  background: #131b2e !important;
  border-color: #1e293b !important;
  color: #cbd5e1 !important;
}

body.dark-theme .comm-template-item:hover {
  background: #1e293b !important;
  border-color: #334155 !important;
}

body.dark-theme .comm-template-item--active {
  background: rgba(99, 102, 241, 0.15) !important;
  border-color: #818cf8 !important;
}

body.dark-theme .comm-token-helper {
  background: #0f172a !important;
  border-color: #1e293b !important;
  color: #cbd5e1 !important;
}

body.dark-theme .comm-token-badge {
  background: rgba(99, 102, 241, 0.15) !important;
  color: #818cf8 !important;
}

body.dark-theme .comm-logs-container {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .comm-log-filters {
  background: #0f172a !important;
  border-color: #1e293b !important;
  color: #cbd5e1 !important;
}

body.dark-theme .comm-logs-table th {
  background: #0f172a !important;
  color: #cbd5e1 !important;
  border-bottom-color: #1e293b !important;
}

body.dark-theme .comm-log-row:hover {
  background: #1e293b !important;
}

body.dark-theme .comm-recipient-badge {
  background: #1e293b !important;
  color: #cbd5e1 !important;
}

body.dark-theme .comm-composer-locked-banner {
  background: #1a1625 !important;
  border-color: #3b2055 !important;
  color: #d6bdf8 !important;
}

/* --- View Timetable Page (/timetabling/timetable/:id) Overrides --- */
body.dark-theme .timetable-page {
  background: #0b0f19 !important;
  color: #cbd5e1 !important;
}

body.dark-theme .page-header {
  background: #131b2e !important;
  border-color: #1e293b !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .page-header h1 {
  color: #f8fafc !important;
}

body.dark-theme .page-header p {
  color: #94a3b8 !important;
}

body.dark-theme .stat-card {
  background: #131b2e !important;
  border-color: #1e293b !important;
}

body.dark-theme .stat-value {
  color: #60a5fa !important;
}

body.dark-theme .stat-label {
  color: #94a3b8 !important;
}

body.dark-theme .timetable-grid-wrapper {
  background: #131b2e !important;
  border: 1px solid #1e293b !important;
}

body.dark-theme .timetable-grid thead {
  background: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-theme .period-header,
body.dark-theme .day-header {
  border-color: #334155 !important;
}

body.dark-theme .period-cell {
  background: #0f172a !important;
  color: #cbd5e1 !important;
  border-right-color: #1e293b !important;
}

body.dark-theme .slot-cell {
  border-color: #1e293b !important;
}

body.dark-theme .slot-cell.has-slot {
  background: rgba(59, 130, 246, 0.15) !important;
}

body.dark-theme .slot-cell.has-slot:hover {
  background: rgba(59, 130, 246, 0.25) !important;
  box-shadow: inset 0 0 0 2px #3b82f6 !important;
}

body.dark-theme .slot-cell.empty-slot {
  background: #131b2e !important;
}

body.dark-theme .slot-cell.selected {
  box-shadow: inset 0 0 0 3px #3b82f6 !important;
  background: rgba(59, 130, 246, 0.2) !important;
}

body.dark-theme .slot-subject {
  color: #60a5fa !important;
}

body.dark-theme .slot-section {
  color: #cbd5e1 !important;
}

body.dark-theme .slot-teacher,
body.dark-theme .slot-room {
  color: #94a3b8 !important;
}

body.dark-theme .slot-class-group {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
}

body.dark-theme .slot-carousel-controls {
  background: #0f172a !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .carousel-indicator {
  color: #cbd5e1 !important;
}

body.dark-theme .slot-content.locked-slot {
  background: linear-gradient(135deg, #17223b 0%, #0f172a 100%) !important;
}

body.dark-theme .slot-details-panel {
  background: #131b2e !important;
  border: 1px solid #1e293b !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4) !important;
}

body.dark-theme .panel-header {
  border-bottom-color: #1e293b !important;
  background: #0f172a !important;
}

body.dark-theme .panel-header h3 {
  color: #f8fafc !important;
}

body.dark-theme .btn-close {
  color: #cbd5e1 !important;
}

body.dark-theme .btn-close:hover {
  background: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-theme .detail-row {
  border-bottom-color: #1e293b !important;
}

body.dark-theme .detail-row label {
  color: #94a3b8 !important;
}

body.dark-theme .detail-row span {
  color: #cbd5e1 !important;
}

body.dark-theme .slot-details-panel .form-group label {
  color: #cbd5e1 !important;
}

body.dark-theme .slot-details-panel .form-select,
body.dark-theme .slot-details-panel .form-input {
  background: #0f172a !important;
  border-color: #1e293b !important;
  color: #f8fafc !important;
}

body.dark-theme .slot-details-panel .form-select:focus,
body.dark-theme .slot-details-panel .form-input:focus {
  border-color: #3b82f6 !important;
}

body.dark-theme .panel-actions {
  border-top-color: #1e293b !important;
}

body.dark-theme .empty-state,
body.dark-theme .loading {
  color: #94a3b8 !important;
}

/* Unified Theme Overrides for Spinners & Loaders across all Micro-Frontends */
body.dark-theme .spinner,
body.dark-theme .loading-spinner,
body.dark-theme .comm-spinner {
  border-color: rgba(129, 140, 248, 0.18) !important;
  border-top-color: #818cf8 !important;
  border-right-color: #a78bfa !important;
}

body.dark-theme .address-input-spinner {
  border-color: rgba(129, 140, 248, 0.25) !important;
  border-top-color: #818cf8 !important;
}

body.dark-theme .loading-container p,
body.dark-theme .drawer-loading-area p,
body.dark-theme .nexus-loading-spinner p,
body.dark-theme .nexus-db-loading p,
body.dark-theme .loading-spinner p {
  color: #94a3b8 !important;
}

body.dark-theme .error-message {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
}





/*$vite$:1*/