/* Connecticut Elderly Services PCA Training Platform - CSS */

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

:root {
  --color-primary: #1a3a5c;
  --color-secondary: #f0a500;
  --color-success: #28a745;
  --color-danger: #dc3545;
  --color-warning: #ffc107;
  --color-light: #f8f9fa;
  --color-border: #dee2e6;
  --color-text: #333;
  --color-text-light: #666;
  --color-white: #fff;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15);
  --spacing: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--color-white);
  color: var(--color-text);
  line-height: 1.6;
  font-size: 16px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--spacing);
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--color-primary) 0%, #2d5a7b 100%);
  color: var(--color-white);
  padding: var(--spacing-lg) 0;
  box-shadow: var(--shadow-md);
}

.header-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--spacing);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.5px;
}

.logo-subtitle {
  font-size: 13px;
  opacity: 0.9;
  margin-top: 4px;
}

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

.header-user {
  font-size: 14px;
  opacity: 0.95;
}

.header-admin-btn {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 7px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
  white-space: nowrap;
}

.header-admin-btn:hover {
  background: rgba(255,255,255,0.25);
  color: white;
}

/* Main Content */
.main-content {
  min-height: calc(100vh - 200px);
  padding: var(--spacing-xl) 0;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #2d5a7b 100%);
  color: var(--color-white);
  padding: var(--spacing-xl) 0;
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.hero-content {
  max-width: 700px;
  margin: 0 auto;
}

.hero h2 {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: var(--spacing);
  line-height: 1.2;
}

.hero p {
  font-size: 18px;
  margin-bottom: var(--spacing-lg);
  opacity: 0.95;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  font-family: inherit;
  text-align: center;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: #142d47;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background-color: #6c757d;
  color: var(--color-white);
}

.btn-secondary:hover {
  background-color: #5a6268;
}

.btn-success {
  background-color: var(--color-success);
  color: var(--color-white);
}

.btn-success:hover {
  background-color: #218838;
  transform: translateY(-2px);
}

.btn-large {
  padding: 14px 32px;
  font-size: 16px;
}

.link-btn {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 2px solid var(--color-secondary);
  transition: all 0.2s ease;
}

.link-btn:hover {
  color: var(--color-secondary);
}

/* Cards */
.card {
  background: var(--color-white);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.card h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: var(--spacing);
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: var(--spacing);
}

/* Features Section */
.features {
  padding: var(--spacing-xl) 0;
  background-color: var(--color-light);
}

.features h3 {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--spacing-xl);
  color: var(--color-primary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--spacing-lg);
}

.feature-card {
  background: var(--color-white);
  padding: var(--spacing-lg);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.feature-card h4 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--spacing);
  color: var(--color-primary);
}

.feature-card p {
  color: var(--color-text-light);
  font-size: 14px;
}

/* Training Modules Section */
.training-modules {
  padding: var(--spacing-xl) 0;
}

.training-modules h3 {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--spacing-xl);
  color: var(--color-primary);
}

.modules-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing);
}

.module-item {
  background: linear-gradient(135deg, var(--color-primary), #2d5a7b);
  color: var(--color-white);
  padding: var(--spacing-lg);
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: var(--spacing);
  box-shadow: var(--shadow-sm);
}

.module-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--color-secondary);
  color: var(--color-primary);
  font-weight: 700;
  flex-shrink: 0;
}

.module-name {
  font-size: 15px;
  font-weight: 500;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--color-primary), #2d5a7b);
  color: var(--color-white);
  padding: var(--spacing-xl) 0;
  text-align: center;
  margin-top: var(--spacing-xl);
}

.cta-section h3 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: var(--spacing);
}

.cta-section p {
  font-size: 18px;
  margin-bottom: var(--spacing-lg);
  opacity: 0.95;
}

/* Forms */
.form {
  width: 100%;
}

.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing);
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-primary);
  font-size: 14px;
}

.form-input, select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--color-border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  transition: all 0.2s ease;
}

.form-input:focus, select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.1);
}

/* Alerts */
.alert {
  padding: var(--spacing);
  border-radius: 6px;
  margin-bottom: var(--spacing-lg);
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.admin-header-actions {
  display: flex;
  gap: var(--spacing);
  align-items: center;
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-outline:hover {
  background: var(--color-primary);
  color: white;
}

/* Progress */
.progress-section {
  margin-bottom: var(--spacing-xl);
}

.progress-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--spacing);
  font-size: 14px;
  font-weight: 600;
}

.progress-text {
  color: var(--color-text-light);
}

.progress-percentage {
  color: var(--color-secondary);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: var(--color-light);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-secondary), #e89b00);
  transition: width 0.3s ease;
}

/* Module Layout */
.module-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.module-sidebar {
  position: sticky;
  top: var(--spacing-lg);
  height: fit-content;
}

.modules-nav {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--spacing);
  box-shadow: var(--shadow-sm);
}

.modules-nav h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: var(--spacing);
  color: var(--color-primary);
}

.modules-list {
  list-style: none;
}

.module-nav-item {
  margin-bottom: 8px;
}

.module-nav-item a, .module-nav-item span {
  display: block;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
  color: var(--color-text);
}

.module-nav-item a {
  color: var(--color-primary);
  font-weight: 600;
}

.module-nav-item a:hover {
  background-color: var(--color-light);
}

.module-nav-item.active a, .module-nav-item.active span {
  background-color: var(--color-primary);
  color: var(--color-white);
}

.module-nav-item.completed a::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: middle;
}

.checkmark {
  display: inline-block;
  color: var(--color-success);
  margin-right: 6px;
}

/* Module Content */
.module-content {
  background: var(--color-white);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  padding: var(--spacing-lg);
}

.lesson-header {
  border-bottom: 2px solid var(--color-secondary);
  padding-bottom: var(--spacing);
  margin-bottom: var(--spacing-lg);
}

.lesson-header h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-primary);
}

.lesson-body {
  margin-bottom: var(--spacing-xl);
  font-size: 15px;
  line-height: 1.8;
}

.lesson-body h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing);
}

.lesson-body h3 {
  font-size: 18px;
  font-weight: 600;
  color: #2d5a7b;
  margin-top: var(--spacing);
  margin-bottom: 8px;
}

.lesson-body ul, .lesson-body ol {
  margin-left: var(--spacing-lg);
  margin-bottom: var(--spacing);
}

.lesson-body li {
  margin-bottom: 6px;
}

.lesson-body strong {
  color: var(--color-primary);
  font-weight: 600;
}

/* Knowledge Check */
.knowledge-check {
  background-color: var(--color-light);
  padding: var(--spacing-lg);
  border-radius: 8px;
  border-left: 4px solid var(--color-secondary);
}

.knowledge-check h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--spacing);
}

.check-note {
  color: var(--color-text-light);
  font-size: 14px;
  margin-bottom: var(--spacing-lg);
}

.questions-container {
  margin-bottom: var(--spacing-lg);
}

.question-item {
  background: var(--color-white);
  padding: var(--spacing);
  margin-bottom: var(--spacing);
  border-radius: 6px;
  border: 1px solid var(--color-border);
}

.question-text {
  font-weight: 600;
  margin-bottom: var(--spacing);
  color: var(--color-text);
}

.question-options {
  display: flex;
  gap: var(--spacing-lg);
}

.radio-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  user-select: none;
}

.radio-label input {
  margin-right: 8px;
  cursor: pointer;
  width: 18px;
  height: 18px;
}

.radio-label span {
  cursor: pointer;
}

.quiz-actions {
  display: flex;
  gap: var(--spacing);
  margin-top: var(--spacing-lg);
}

.completion-badge {
  background-color: #d4edda;
  color: #155724;
  padding: var(--spacing);
  border-radius: 6px;
  border: 1px solid #c3e6cb;
  font-weight: 600;
  text-align: center;
}

/* Module Complete */
.completion-card {
  background: var(--color-white);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  padding: var(--spacing-xl);
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.completion-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--color-success);
  color: var(--color-white);
  font-size: 40px;
  margin-bottom: var(--spacing-lg);
}

.completion-card h2 {
  font-size: 32px;
  color: var(--color-primary);
  margin-bottom: var(--spacing);
}

.completion-message {
  font-size: 18px;
  color: var(--color-text-light);
  margin-bottom: var(--spacing-lg);
}

.completion-stats {
  background-color: var(--color-light);
  padding: var(--spacing);
  border-radius: 6px;
  margin-bottom: var(--spacing-lg);
}

.next-steps {
  margin-top: var(--spacing-xl);
}

.exam-ready {
  background-color: #d4edda;
  padding: var(--spacing-lg);
  border-radius: 6px;
  margin-top: var(--spacing-lg);
}

.highlight {
  color: #155724;
  font-weight: 600;
  margin-bottom: var(--spacing);
}

.remaining-text {
  color: var(--color-text-light);
  font-size: 14px;
}

/* Exam */
.exam-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.exam-header h1 {
  font-size: 36px;
  color: var(--color-primary);
  margin-bottom: var(--spacing);
}

.exam-subtitle {
  font-size: 18px;
  color: var(--color-text-light);
}

.exam-form {
  max-width: 900px;
  margin: 0 auto;
}

.exam-section {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
}

.section-header {
  border-bottom: 2px solid var(--color-secondary);
  padding-bottom: var(--spacing);
  margin-bottom: var(--spacing-lg);
}

.section-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
}

.section-questions {
  font-size: 13px;
  color: var(--color-text-light);
  margin-top: 4px;
}

.exam-question {
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing);
  border-bottom: 1px solid var(--color-border);
}

.exam-question:last-child {
  border-bottom: none;
}

.question-number {
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 12px;
  display: block;
}

.exam-actions {
  display: flex;
  gap: var(--spacing);
  justify-content: center;
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-lg);
  border-top: 2px solid var(--color-border);
}

/* Results */
.result-card {
  background: var(--color-white);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-width: 800px;
  margin: 0 auto;
}

.result-header {
  padding: var(--spacing-xl);
  text-align: center;
}

.result-header.passed {
  background: linear-gradient(135deg, var(--color-success), #20c997);
  color: var(--color-white);
}

.result-header.failed {
  background: linear-gradient(135deg, var(--color-danger), #fd7e14);
  color: var(--color-white);
}

.result-icon {
  font-size: 60px;
  margin-bottom: var(--spacing);
}

.result-header h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: var(--spacing);
}

.result-subtitle {
  font-size: 16px;
  opacity: 0.95;
}

.result-details {
  padding: var(--spacing-xl);
}

.section-scores {
  margin-bottom: var(--spacing-xl);
}

.section-scores h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--spacing-lg);
}

.scores-table {
  width: 100%;
}

.score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing);
  border-bottom: 1px solid var(--color-border);
  background-color: var(--color-light);
  margin-bottom: 8px;
  border-radius: 4px;
}

.score-row.passed {
  background-color: #d4edda;
}

.score-row.failed {
  background-color: #f8d7da;
}

.score-info {
  display: flex;
  flex-direction: column;
}

.score-title {
  font-weight: 600;
  color: var(--color-text);
}

.score-detail {
  font-size: 13px;
  color: var(--color-text-light);
}

.score-badge {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-success);
}

.score-badge.needs-improvement {
  color: var(--color-danger);
}

.certificate-section {
  background-color: var(--color-light);
  padding: var(--spacing-lg);
  border-radius: 6px;
  margin-bottom: var(--spacing-lg);
}

.certificate-section h3 {
  color: var(--color-primary);
  margin-bottom: var(--spacing);
}

.print-note {
  font-size: 13px;
  color: var(--color-text-light);
  margin-top: var(--spacing);
}

/* Admin */
.admin-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-xl);
}

.admin-header h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-primary);
}

.admin-stats {
  margin-bottom: var(--spacing-xl);
}

.admin-stats h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--spacing-lg);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
}

.stat-card {
  background: linear-gradient(135deg, var(--color-primary), #2d5a7b);
  color: var(--color-white);
  padding: var(--spacing-lg);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.stat-number {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: var(--spacing);
}

.stat-label {
  font-size: 14px;
  opacity: 0.95;
}

/* Agencies */
.admin-agencies {
  background: var(--color-white);
  border-radius: 8px;
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--spacing-xl);
}

.admin-agencies h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--spacing-lg);
}

.agencies-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--spacing-lg);
}

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

.agencies-table th {
  background-color: var(--color-light);
  font-weight: 700;
  color: var(--color-primary);
}

.agencies-table code {
  background-color: var(--color-light);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
}

.add-agency-form {
  background-color: var(--color-light);
  padding: var(--spacing-lg);
  border-radius: 6px;
  margin-top: var(--spacing-lg);
}

.add-agency-form h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--spacing);
}

/* Learners Table */
.admin-learners {
  background: var(--color-white);
  border-radius: 8px;
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
}

.admin-learners h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--spacing-lg);
}

.learners-table-wrapper {
  overflow-x: auto;
}

.learners-table {
  width: 100%;
  border-collapse: collapse;
}

.learners-table th, .learners-table td {
  padding: var(--spacing);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
}

.learners-table th {
  background-color: var(--color-light);
  font-weight: 700;
  color: var(--color-primary);
}

.learner-row.passed {
  background-color: #f0fff4;
}

.learner-row.failed {
  background-color: #fff5f5;
}

.learner-row.in-progress {
  background-color: var(--color-light);
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-badge.passed {
  background-color: var(--color-success);
  color: var(--color-white);
}

.status-badge.failed {
  background-color: var(--color-danger);
  color: var(--color-white);
}

.status-badge.in-progress {
  background-color: var(--color-warning);
  color: #333;
}

.no-data {
  text-align: center;
  color: var(--color-text-light);
  padding: var(--spacing-lg);
}

/* Login */
.login-card {
  background: var(--color-white);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  padding: var(--spacing-xl);
  max-width: 400px;
  margin: var(--spacing-xl) auto;
}

.login-card h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--spacing);
  text-align: center;
}

.start-card {
  max-width: 500px;
  margin: 0 auto;
}

.subtitle {
  text-align: center;
  color: var(--color-text-light);
  margin-bottom: var(--spacing-lg);
}

.form-note {
  font-size: 13px;
  color: var(--color-text-light);
  margin-top: var(--spacing);
  text-align: center;
}

.form-note a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: var(--color-white);
  border-radius: 8px;
  padding: var(--spacing-xl);
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
}

.modal-large {
  max-width: 700px;
}

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

.modal-actions {
  display: flex;
  gap: var(--spacing);
  margin-top: var(--spacing-xl);
  justify-content: center;
}

.result-passed, .result-failed {
  text-align: center;
  padding: var(--spacing-lg);
}

.result-passed h3, .result-failed h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: var(--spacing);
}

.result-passed h3 {
  color: var(--color-success);
}

.result-failed h3 {
  color: var(--color-danger);
}

.score-display {
  font-size: 18px;
  margin: var(--spacing) 0;
}

.section-results {
  background-color: var(--color-light);
  padding: var(--spacing-lg);
  border-radius: 6px;
  margin: var(--spacing-lg) 0;
  text-align: left;
}

.section-results h4 {
  margin-bottom: var(--spacing);
}

.section-results ul {
  list-style: none;
}

.section-result {
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-result.passed {
  color: var(--color-success);
}

.section-result .checkmark {
  color: var(--color-success);
}

.success-message {
  color: var(--color-success);
  font-weight: 600;
  margin-top: var(--spacing);
}

.review-list {
  background-color: var(--color-light);
  padding: var(--spacing-lg);
  border-radius: 6px;
  list-style: none;
  margin: var(--spacing) 0;
}

.review-list li {
  padding: 8px 0;
}

/* Error */
.error-card {
  background: var(--color-white);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  padding: var(--spacing-xl);
  text-align: center;
  max-width: 500px;
  margin: var(--spacing-xl) auto;
}

.error-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--color-danger);
  color: var(--color-white);
  font-size: 40px;
  margin-bottom: var(--spacing-lg);
}

.error-card h2 {
  font-size: 28px;
  color: var(--color-danger);
  margin-bottom: var(--spacing);
}

.error-message {
  color: var(--color-text-light);
  margin-bottom: var(--spacing-lg);
}

/* Footer */
.footer {
  background-color: var(--color-primary);
  color: var(--color-white);
  text-align: center;
  padding: var(--spacing-lg) 0;
  margin-top: var(--spacing-xl);
  font-size: 13px;
  opacity: 0.9;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-inner p {
  margin: 0;
}

.footer-powered {
  font-size: 12px;
  opacity: 0.8;
}

.footer-powered a {
  color: var(--color-secondary);
  text-decoration: none;
  font-weight: 600;
}

.footer-powered a:hover {
  text-decoration: underline;
}

.logo-link {
  text-decoration: none;
  color: inherit;
}

.logo-link:hover h1 {
  opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
  .module-layout {
    grid-template-columns: 1fr;
  }

  .module-sidebar {
    position: static;
  }

  .modules-nav {
    display: flex;
    gap: var(--spacing);
    overflow-x: auto;
    padding: var(--spacing);
  }

  .modules-nav h4 {
    display: none;
  }

  .modules-list {
    display: flex;
    gap: var(--spacing);
    flex-wrap: wrap;
  }

  .module-nav-item {
    margin-bottom: 0;
  }

  .hero h2 {
    font-size: 28px;
  }

  .hero p {
    font-size: 16px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .modules-list {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .header-container {
    flex-direction: column;
    gap: var(--spacing);
    align-items: flex-start;
  }

  .learners-table-wrapper {
    overflow-x: auto;
  }

  .learners-table {
    font-size: 12px;
  }

  .learners-table th, .learners-table td {
    padding: 8px;
  }

  .modal-content {
    margin: var(--spacing);
  }

  .exam-actions {
    flex-direction: column;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .question-options {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .hero h2 {
    font-size: 24px;
  }

  .btn-large {
    width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .admin-header {
    flex-direction: column;
    gap: var(--spacing);
  }

  .header-container {
    flex-direction: column;
  }

  .logo h1 {
    font-size: 20px;
  }
}

/* ═══════════════════════════════════════════════════
   ADMIN PANEL — REDESIGNED v0.1
═══════════════════════════════════════════════════ */

/* Admin layout — negative margin cancels main-content's 3rem padding */
.admin-wrap {
  display: flex;
  min-height: calc(100vh - 80px);
  background: #f0f2f5;
  margin: -3rem 0 -3rem 0;
}

/* Sidebar */
.admin-sidebar {
  width: 240px;
  min-width: 240px;
  background: var(--color-primary);
  color: white;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.admin-brand-icon {
  font-size: 28px;
}

.admin-brand-title {
  font-size: 16px;
  font-weight: 700;
  color: white;
}

.admin-brand-sub {
  font-size: 11px;
  color: var(--color-accent);
  font-weight: 600;
}

.admin-nav {
  flex: 1;
  padding: 12px 0;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
}

.admin-nav-item:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}

.admin-nav-item.active {
  background: rgba(255,255,255,0.15);
  color: white;
  border-left: 3px solid var(--color-accent);
}

.nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.nav-badge {
  margin-left: auto;
  background: var(--color-accent);
  color: var(--color-primary);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}

.admin-sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.15);
}

.admin-logout-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.admin-logout-btn:hover {
  color: white;
}

/* Main area */
.admin-main {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

.admin-tab {
  display: none;
}

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

.admin-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 28px;
}

.admin-page-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0;
}

.admin-page-sub {
  color: var(--color-text-light);
  font-size: 14px;
  margin: 4px 0 0 0;
}

.admin-page-date {
  font-size: 13px;
  color: var(--color-text-light);
  padding-top: 6px;
}

/* Stats cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: white;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  border-left: 4px solid transparent;
}

.stat-blue  { border-left-color: #3b82f6; }
.stat-orange { border-left-color: var(--color-accent); }
.stat-green { border-left-color: #22c55e; }
.stat-purple { border-left-color: #8b5cf6; }

.stat-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.stat-number {
  font-size: 30px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.stat-label {
  font-size: 13px;
  color: var(--color-text-light);
  margin-top: 4px;
}

/* Cards */
.admin-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  margin-bottom: 24px;
  overflow: hidden;
}

.admin-card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--color-border);
}

.admin-card-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0;
}

/* Admin table */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: var(--color-text-light);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
  padding: 12px 24px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.admin-table td {
  padding: 14px 24px;
  border-bottom: 1px solid #f0f0f0;
  color: var(--color-text);
}

.admin-table tbody tr:hover {
  background: #fafafa;
}

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

/* Badges */
.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-green  { background: #dcfce7; color: #166534; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-blue   { background: #dbeafe; color: #1e40af; }

/* Code pill */
.code-pill {
  background: var(--color-primary);
  color: var(--color-accent);
  padding: 4px 10px;
  border-radius: 5px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
}

/* Two column layout */
.admin-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Search bar */
.admin-search-wrap {
  display: flex;
  gap: 10px;
  align-items: center;
}

.admin-search-input {
  padding: 9px 14px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 14px;
  width: 240px;
  outline: none;
  transition: border-color 0.2s;
}

.admin-search-input:focus {
  border-color: var(--color-primary);
}

.admin-select {
  padding: 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  outline: none;
}

/* Misc */
.text-muted { color: var(--color-text-light); font-size: 13px; }
.no-data { padding: 24px; text-align: center; color: var(--color-text-light); }
.card-footer-note { padding: 12px 24px; font-size: 13px; color: var(--color-text-light); }
.field-hint { font-size: 12px; color: var(--color-text-light); margin-top: 4px; }
.btn-full { width: 100%; }

.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-icon { font-size: 40px; margin-bottom: 12px; }

/* Settings */
.settings-section {
  padding: 24px;
}

.settings-steps {
  margin: 16px 0;
  padding-left: 20px;
  line-height: 2;
}

.settings-steps li {
  color: var(--color-text);
  font-size: 14px;
}

.settings-note {
  background: #fffbeb;
  border: 1px solid #fbbf24;
  border-radius: 6px;
  padding: 14px 16px;
  font-size: 14px;
  color: #78350f;
  margin-top: 16px;
}

.settings-table td {
  padding: 12px 24px;
}

.settings-table td:first-child {
  color: var(--color-text-light);
  font-size: 13px;
  width: 160px;
}

/* Admin Login page — negative margin fills the full main area */
.admin-login-wrap {
  min-height: calc(100vh - 80px);
  margin: -3rem 0 -3rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, #2d5a7b 100%);
}

.admin-login-card {
  background: white;
  border-radius: 12px;
  padding: 48px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.admin-login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.admin-login-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.admin-login-logo h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 4px;
}

.admin-login-logo p {
  font-size: 13px;
  color: var(--color-text-light);
}

.admin-login-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
}

/* Responsive admin */
@media (max-width: 900px) {
  .admin-wrap { flex-direction: column; }
  .admin-sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; }
  .admin-nav { display: flex; flex-wrap: wrap; padding: 0; }
  .admin-nav-item { padding: 10px 14px; }
  .admin-main { padding: 20px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-two-col { grid-template-columns: 1fr; }
  .admin-search-wrap { flex-wrap: wrap; }
}

/* Print Styles */
@media print {
  body {
    background: var(--color-white);
  }

  .header, .footer, .modal, button, .btn, .admin-header {
    display: none;
  }

  .main-content {
    padding: 0;
  }
}
