.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.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: 400px;
}

.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: #fee;
  color: #c33;
  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;
}

.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;
}

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

button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.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: 4px solid rgba(0, 0, 0, 0.1);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border-left-color: #764ba2;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@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: 2px;
  margin-top: 1.5rem;
  position: relative;
  overflow: hidden;
}

.success-loader::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 30%;
  background-color: #10b981;
  animation: loading-bar 3s linear infinite;
}

@keyframes loading-bar {
  0% { left: -30%; width: 30%; }
  50% { left: 30%; width: 40%; }
  100% { left: 100%; width: 30%; }
}
.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--timetable { background: #eff6ff; color: #2563eb; }
.db-module-badge--comms     { background: #f5f3ff; color: #7c3aed; }
.db-module-badge--admin     { background: #fee2e2; color: #ef4444; }

.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;
  }
}
.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);
}

.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;
}

.shell-user {
  padding: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.shell-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #334155;
  color: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid rgba(96, 165, 250, 0.4);
  cursor: default;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.shell-logout-btn {
  width: 38px;
  height: 38px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.shell-logout-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #ef4444;
  transform: scale(1.05);
}

.shell-content {
  flex: 1;
  margin-left: 64px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  font-size: 1.2rem;
  color: #64748b;
}

/* 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-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;
}

: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;
}
