/* ==========================================================================
   SiCBT - Modern Operator Dashboard & Authentication CSS Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Color Palette */
  --primary: #6366F1;
  --primary-hover: #4F46E5;
  --primary-light: #EEF2FF;
  --primary-gradient: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
  
  --secondary: #10B981;
  --secondary-hover: #059669;
  
  --info: #06B6D4;
  --info-hover: #0891B2;
  
  --warning: #F59E0B;
  --danger: #EF4444;
  
  --bg-app: #F4F6FB;
  --bg-surface: #FFFFFF;
  --bg-sidebar: #FFFFFF;
  
  --text-main: #1E293B;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  
  --border-color: #E2E8F0;
  --border-focus: #A5B4FC;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 9999px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(99, 102, 241, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  --sidebar-width: 260px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

/* ==========================================================================
   AUTHENTICATION & PUBLIC PAGES (Login, Register, Reset, Legal)
   ========================================================================== */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
  background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 40%),
              var(--bg-app);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  padding: 2.5rem 2rem;
  animation: fadeIn 0.4s ease-out;
}

.auth-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.75rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.auth-brand svg {
  width: 36px;
  height: 36px;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.auth-tabs {
  display: flex;
  background: var(--bg-app);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.auth-tab-btn {
  flex: 1;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.auth-tab-btn.active {
  background: var(--bg-surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

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

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-main);
  transition: var(--transition);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.btn-block {
  width: 100%;
  padding: 0.8rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary-gradient);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.auth-footer-links {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-light);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
}

.auth-footer-links a {
  color: var(--text-muted);
  font-weight: 500;
}

.auth-footer-links a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Legal Content Page */
.legal-card {
  max-width: 760px;
  line-height: 1.7;
}

.legal-card h1 {
  font-size: 1.75rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.legal-card h2 {
  font-size: 1.25rem;
  color: var(--text-main);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.legal-card ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

/* ==========================================================================
   APP LAYOUT (Sidebar + Main Content)
   ========================================================================== */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
}

.sidebar-header {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  border-bottom: 1px solid transparent;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.4rem;
  color: #1E1B4B;
}

.brand-icon {
  width: 34px;
  height: 34px;
  background: var(--primary-gradient);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.brand-menu-toggle {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  cursor: pointer;
  border-radius: 50%;
  border: 1px solid var(--border-color);
}

.sidebar-nav {
  padding: 1rem 1rem 2rem 1rem;
  overflow-y: auto;
  flex: 1;
}

.nav-item {
  list-style: none;
  margin-bottom: 0.35rem;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.nav-link-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-link svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.nav-link:hover {
  background: var(--bg-app);
  color: var(--primary);
}

.nav-item.active .nav-link {
  background: var(--primary);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.nav-item.active .nav-link svg {
  stroke: #FFFFFF;
}

.nav-section-title {
  font-size: 0.725rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin: 1.5rem 1rem 0.6rem 1rem;
}

.nav-arrow {
  font-size: 0.75rem;
  color: var(--text-light);
  transition: var(--transition);
}

/* Main Content Area */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Top Navigation Bar */
.topbar {
  height: 60px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  margin-top: 0.5rem;
}

.topbar-breadcrumb {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.user-avatar-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #E0E7FF;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  position: relative;
}

.user-avatar-badge::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: var(--secondary);
  border: 2px solid #FFFFFF;
  border-radius: 50%;
}

/* Main Content Body */
.content-body {
  padding: 1rem 2rem 2.5rem 2rem;
}

/* Hero Banner matching Screenshot */
.hero-banner {
  background: var(--primary-gradient);
  border-radius: var(--radius-lg);
  padding: 2rem;
  color: #FFFFFF;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  right: -50px;
  top: -50px;
  width: 250px;
  height: 250px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: 0.02em;
}

.hero-title {
  font-size: 1.65rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
}

.hero-desc {
  font-size: 0.9rem;
  opacity: 0.9;
  max-width: 540px;
}

.hero-metrics {
  display: flex;
  gap: 1rem;
}

.hero-metric-card {
  background: #FFFFFF;
  color: var(--text-main);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  min-width: 140px;
  height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.hero-metric-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Statistics Grid (4 Cards) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.2;
  margin-bottom: 0.4rem;
}

.stat-caption {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Dashboard Middle Grid (Distribution & Quick Action) */
.middle-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.panel-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.panel-header {
  margin-bottom: 1.25rem;
}

.panel-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.2rem;
}

.panel-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Distribution Progress List */
.dist-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.dist-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.825rem;
  margin-bottom: 0.35rem;
}

.dist-name {
  font-weight: 600;
  color: var(--text-main);
}

.dist-stat {
  color: var(--text-muted);
  font-weight: 500;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: #EEF2FF;
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.6s ease-in-out;
}

.bar-purple { background: #6366F1; }
.bar-green { background: #10B981; }
.bar-cyan { background: #06B6D4; }
.bar-amber { background: #F59E0B; }

/* Quick Action Buttons Column */
.quick-actions-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.btn-action {
  width: 100%;
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-action-purple {
  background: #6366F1;
  color: #FFFFFF;
}

.btn-action-purple:hover {
  background: #4F46E5;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-action-green {
  background: #10B981;
  color: #FFFFFF;
}

.btn-action-green:hover {
  background: #059669;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-action-cyan {
  background: #06B6D4;
  color: #FFFFFF;
}

.btn-action-cyan:hover {
  background: #0891B2;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.btn-action-outline {
  background: #FFFFFF;
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-action-outline:hover {
  background: var(--bg-app);
  border-color: var(--text-light);
}

/* Priority Exam Section */
.priority-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.priority-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.875rem;
}

.priority-table th,
.priority-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.priority-table th {
  background: var(--bg-app);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.priority-table tr:last-child td {
  border-bottom: none;
}

.badge-status {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.725rem;
  font-weight: 600;
}

.badge-active {
  background: #D1FAE5;
  color: #065F46;
}

.badge-pending {
  background: #FEF3C7;
  color: #92400E;
}

/* Modal Popup */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--bg-surface);
  width: 90%;
  max-width: 500px;
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: var(--transition);
}

.modal-overlay.active .modal-box {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--text-muted);
}
