@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Playfair+Display:wght@700;800&display=swap');

:root {
  --primary: #2a9d8f;
  --primary-dark: #1f7a6e;
  --primary-light: #e6f5f3;
  --accent: #e9a825;
  --accent-light: #fdf4e0;
  --bg: #f8fafb;
  --bg-warm: #fefcf8;
  --card: #ffffff;
  --text: #2d3748;
  --text-light: #718096;
  --border: #e8eeef;
  --shadow-sm: 0 1px 3px rgba(42, 157, 143, 0.06);
  --shadow-md: 0 4px 16px rgba(42, 157, 143, 0.08);
  --shadow-lg: 0 8px 30px rgba(42, 157, 143, 0.12);
  --radius: 12px;
}

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

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ============ NAVBAR ============ */
.navbar {
  background: linear-gradient(135deg, #2a9d8f 0%, #21867a 50%, #1a6b62 100%);
  color: white;
  padding: 0.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 20px rgba(42, 157, 143, 0.2);
  position: relative;
  z-index: 10;
}

.navbar h1 {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  padding: 2px;
}

.navbar-logo.admin-logo {
  width: 144px;
  height: 144px;
  padding: 6px;
}

.navbar-links {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.navbar-links a, .navbar button {
  color: white;
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.15);
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  transition: all 0.2s;
}

.navbar-links a:hover, .navbar button:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.3);
}

/* ============ WAVE DECORATION ============ */
.wave-decoration {
  position: relative;
  height: 80px;
  overflow: hidden;
  margin-top: -1px;
}

.wave-decoration svg {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 80px;
}

/* Navbar wave - applied via ::after on pages that use it */
.navbar::after {
  content: '';
  position: absolute;
  bottom: -30px;
  left: 0;
  width: 100%;
  height: 30px;
  background: linear-gradient(135deg, #2a9d8f 0%, #21867a 50%, #1a6b62 100%);
  clip-path: ellipse(55% 100% at 50% 0%);
  z-index: -1;
}

/* ============ CONTAINER ============ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  position: relative;
}

/* ============ LOGIN PAGE — SPLIT PANEL ============ */
.login-split {
  min-height: 100vh;
  display: flex;
}

/* LEFT: Brand Panel */
.brand-panel {
  flex: 1;
  background: linear-gradient(165deg, #0B6E5F 0%, #12907B 40%, #17B89A 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.brand-panel::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -30%;
  width: 80%;
  height: 80%;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  border-radius: 50%;
}

.brand-panel::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -20%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(232, 101, 43, 0.12) 0%, transparent 70%);
  border-radius: 50%;
}

/* Decorative leaf shapes */
.leaf {
  position: absolute;
  border-radius: 0 70% 0 70%;
  opacity: 0.07;
}
.leaf-1 { width: 200px; height: 200px; background: white; top: 5%; left: 10%; transform: rotate(30deg); }
.leaf-2 { width: 120px; height: 120px; background: #E8652B; bottom: 15%; right: 10%; transform: rotate(-20deg); }
.leaf-3 { width: 80px; height: 80px; background: white; top: 60%; left: 5%; transform: rotate(60deg); }

.brand-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 420px;
}

.brand-logo {
  width: 240px;
  height: 240px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 2rem;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.25), 0 0 60px rgba(255, 255, 255, 0.3);
  overflow: hidden;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.brand-title {
  font-family: 'Playfair Display', serif;
  font-weight: 800;
  font-size: 2.4rem;
  color: white;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.brand-title span {
  color: #FF7E47;
}

.brand-subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,0.75);
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.6;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2rem;
  padding: 8px 16px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px;
  color: rgba(255,255,255,0.85);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.brand-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #1CD4B1;
  border-radius: 50%;
  box-shadow: 0 0 8px #1CD4B1;
}

/* RIGHT: Login Panel */
.login-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem;
  position: relative;
  background: #FDF9F3;
}

.login-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(11, 110, 95, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(232, 101, 43, 0.03) 0%, transparent 50%);
}

.login-card {
  width: 100%;
  max-width: 460px;
  position: relative;
  z-index: 2;
  background: white;
  padding: 3rem;
  border-radius: 18px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.1), 0 4px 16px rgba(0, 0, 0, 0.05);
}

.login-header {
  margin-bottom: 2rem;
}

.login-header h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.8rem;
  color: #1A2E2A;
  margin-bottom: 0.5rem;
}

.login-header p {
  color: #5A7A73;
  font-size: 0.95rem;
  line-height: 1.5;
}

.btn-login {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #0B6E5F 0%, #12907B 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(11, 110, 95, 0.3);
  margin-top: 0.5rem;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(11, 110, 95, 0.4);
}

.btn-login:active {
  transform: translateY(0);
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 1.75rem 0;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #E2E8E6;
}

.login-divider span {
  font-size: 0.8rem;
  color: #5A7A73;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-help {
  text-align: center;
  font-size: 0.85rem;
  color: #5A7A73;
}

.login-footer {
  position: absolute;
  bottom: 1.5rem;
  font-size: 0.75rem;
  color: #B0C4BF;
  text-align: center;
}

/* Certificate logo */
.cert-logo {
  display: block;
  margin: 0 auto 1rem;
  width: 100px;
  height: 100px;
  object-fit: contain;
}

/* ============ FORMS ============ */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
  color: var(--text);
  font-size: 0.9rem;
}

.form-group input {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--bg);
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.1);
}

/* ============ PASSWORD TOGGLE ============ */
.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 3rem;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.password-toggle:hover {
  color: var(--primary);
}

/* ============ BUTTONS ============ */
.btn {
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
}

.btn-primary:not(.btn-sm) {
  width: 100%;
}

.action-buttons .btn,
.table-header .btn {
  width: auto;
}

.btn-success {
  background: #10b981;
  color: white;
}

.btn-danger {
  background: #ef4444;
  color: white;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  border-radius: 8px;
}

.error-msg {
  background: #fef2f2;
  color: #dc2626;
  padding: 0.75rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  text-align: center;
  border: 1px solid #fecaca;
  font-size: 0.9rem;
}

/* ============ DASHBOARD ============ */
.welcome-section {
  text-align: center;
  margin-bottom: 2rem;
}

.welcome-section h2 {
  font-size: 1.75rem;
  color: var(--text);
  margin-bottom: 0.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.welcome-section p {
  color: var(--text-light);
}

/* ============ PROGRESS BAR ============ */
.progress-container {
  background: var(--card);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.progress-bar {
  background: var(--primary-light);
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
}

.progress-fill {
  background: linear-gradient(90deg, var(--primary) 0%, #34c4b4 100%);
  height: 100%;
  transition: width 0.5s ease;
  border-radius: 7px;
}

.progress-text {
  text-align: center;
  margin-top: 0.5rem;
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ============ MODULE CARDS ============ */
.modules-grid {
  display: grid;
  gap: 1rem;
}

.module-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
}

.module-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(42, 157, 143, 0.2);
}

.module-card.locked {
  opacity: 0.55;
}

.module-card.locked:hover {
  transform: none;
  cursor: not-allowed;
  box-shadow: var(--shadow-sm);
  border-color: var(--border);
}

.module-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.module-icon.locked { background: #f1f3f4; }
.module-icon.unlocked { background: var(--primary-light); }
.module-icon.quiz_ready { background: var(--accent-light); }
.module-icon.completed { background: #d1fae5; }

.module-info {
  flex: 1;
}

.module-info h3 {
  margin-bottom: 0.2rem;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}

.module-info p {
  color: var(--text-light);
  font-size: 0.85rem;
}

.module-status {
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.status-locked { background: #f1f3f4; color: #9ca3af; }
.status-unlocked { background: var(--primary-light); color: var(--primary-dark); }
.status-quiz_ready { background: var(--accent-light); color: #b8860b; }
.status-completed { background: #d1fae5; color: #059669; }

.module-action {
  flex-shrink: 0;
}

/* ============ MODAL ============ */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(45, 55, 72, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--card);
  border-radius: 16px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  padding: 1.5rem;
}

/* ============ VIDEO ============ */
.video-container {
  background: #1a2332;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
  aspect-ratio: 16/9;
}

.video-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.video-placeholder {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  padding: 2rem;
}

.video-placeholder .icon {
  font-size: 3.5rem;
  margin-bottom: 0.75rem;
}

/* ============ QUIZ ============ */
.quiz-question {
  background: var(--bg);
  padding: 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
}

.quiz-question h4 {
  margin-bottom: 0.75rem;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-size: 0.9rem;
}

.quiz-option:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.quiz-option input {
  display: none;
}

.quiz-option input:checked + .quiz-option-content {
  color: var(--primary-dark);
  font-weight: 500;
}

.quiz-option:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
}

/* ============ RESULTS ============ */
.result-box {
  text-align: center;
  padding: 2rem;
}

.result-box.pass {
  background: #d1fae5;
  border-radius: var(--radius);
  border: 1px solid #a7f3d0;
}

.result-box.fail {
  background: #fef2f2;
  border-radius: var(--radius);
  border: 1px solid #fecaca;
}

.result-box h3 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.result-box p {
  margin-bottom: 0.75rem;
  color: var(--text-light);
}

/* ============ CERTIFICATE ============ */
.certificate-section {
  text-align: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 2.5rem;
  border-radius: 16px;
  margin-top: 2rem;
  position: relative;
  overflow: hidden;
}

/* Wave decoration on certificate section */
.certificate-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='rgba(255,255,255,0.05)' d='M0,96L48,112C96,128,192,160,288,165.3C384,171,480,149,576,149.3C672,149,768,171,864,165.3C960,160,1056,128,1152,122.7C1248,117,1344,139,1392,149.3L1440,160L1440,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") no-repeat bottom;
  background-size: cover;
}

.certificate-section h2 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  position: relative;
}

.certificate-preview {
  background: white;
  color: var(--text);
  padding: 2.5rem;
  border-radius: var(--radius);
  margin: 1.5rem auto;
  max-width: 600px;
  border: 3px solid #d4af37;
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.certificate-preview h1 {
  color: var(--primary);
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
}

.certificate-preview h2 {
  color: var(--text);
  margin: 0.75rem 0;
  font-size: 1.2rem;
}

.certificate-preview p {
  color: var(--text-light);
}

/* ============ ADMIN STATS ============ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card);
  padding: 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.15s, box-shadow 0.2s;
}

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

.stat-card h3 {
  font-size: 2.25rem;
  color: var(--primary);
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.stat-card p {
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 500;
}

.stat-card.green h3 { color: #10b981; }
.stat-card.yellow h3 { color: var(--accent); }
.stat-card.red h3 { color: #ef4444; }

/* ============ TABLE ============ */
.table-container {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.table-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
}

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

th, td {
  padding: 0.85rem 1.5rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

th {
  background: var(--bg);
  font-weight: 600;
  color: var(--text-light);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tr:hover {
  background: var(--primary-light);
}

.action-buttons {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}

.action-buttons .btn {
  width: auto;
  flex: none;
}

.action-buttons .btn-sm {
  white-space: nowrap;
}

.progress-mini {
  background: var(--primary-light);
  height: 6px;
  border-radius: 3px;
  width: 100px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.5rem;
}

.progress-mini-fill {
  background: var(--primary);
  height: 100%;
  border-radius: 3px;
}

/* ============ TABS ============ */
.tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  background: var(--card);
  padding: 0.35rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.tab {
  padding: 0.65rem 1.25rem;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 9px;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 500;
  color: var(--text-light);
  transition: all 0.2s;
}

.tab.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(42, 157, 143, 0.25);
}

.tab:hover:not(.active) {
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* ============ BACKGROUND WAVE (dashboard/admin) ============ */
.page-bg-wave {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 250px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.page-bg-wave::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(42, 157, 143, 0.04) 0%, rgba(233, 168, 37, 0.02) 100%);
  clip-path: polygon(0 40%, 10% 35%, 25% 50%, 40% 30%, 55% 45%, 70% 25%, 85% 40%, 100% 20%, 100% 100%, 0 100%);
}

.page-bg-wave::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 70%;
  background: linear-gradient(135deg, rgba(42, 157, 143, 0.03) 0%, rgba(42, 157, 143, 0.01) 100%);
  clip-path: polygon(0 55%, 15% 45%, 30% 60%, 50% 40%, 70% 55%, 85% 35%, 100% 50%, 100% 100%, 0 100%);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
  }

  .navbar h1 {
    font-size: 1.1rem;
  }

  .module-card {
    flex-direction: column;
    text-align: center;
    padding: 1.25rem;
  }

  .container {
    padding: 1.5rem 1rem;
  }

  .login-split {
    flex-direction: column;
  }

  .brand-panel {
    padding: 2.5rem 2rem;
    min-height: auto;
  }

  .brand-title {
    font-size: 1.8rem;
  }

  .brand-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1.25rem;
  }

  .login-panel {
    padding: 2.5rem 1.5rem 4rem;
  }

  .login-footer {
    position: relative;
    bottom: auto;
    margin-top: 2rem;
  }

  .welcome-section h2 {
    font-size: 1.4rem;
  }

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

/* ============ PRINT CERTIFICATE ============ */
@media print {
  body * {
    visibility: hidden;
  }

  .certificate-preview, .certificate-preview * {
    visibility: visible;
  }

  .certificate-preview {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
}
