/**
 * Nurse ClinIQ – White background + Dark blue theme
 * Clean layout, visible buttons, properly aligned inputs and textareas.
 */

:root {
  --primary: #1e40af;
  --primary-dark: #1e3a8a;
  --primary-light: #3b82f6;
  --bg: #ffffff;
  --bg-panel: #f8fafc;
  --bg-card: #f1f5f9;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
  --border-focus: #1e40af;
  --pass: #15803d;
  --fail: #b91c1c;
  --pending: #a16207;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
  --radius: 8px;
  --radius-lg: 12px;
  --input-padding: 0.75rem 1rem;
  --btn-min-height: 44px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* ========== Left sidebar – same gradient blend as dashboard/profile ========== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  min-width: 260px;
  height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1e40af 100%);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow: visible;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -40%;
  width: 80%;
  height: 160%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.sidebar.hide {
  display: none;
}

.sidebar-brand {
  padding: 1.5rem 1.25rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff !important;
  letter-spacing: 0.02em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-link {
  display: block;
  padding: 0.75rem 1.25rem;
  color: #ffffff !important;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  transition: background 0.15s;
  border-left: 3px solid transparent;
  white-space: nowrap;
  overflow: visible;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff !important;
}

.sidebar-link-active {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff !important;
  border-left-color: #ffffff;
}

.sidebar-logout {
  margin: auto 0.75rem 1.25rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff !important;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1e40af 100%);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: filter 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.25);
}

.sidebar-logout:hover {
  filter: brightness(1.15);
  color: #ffffff !important;
  box-shadow: 0 6px 16px -2px rgba(0, 0, 0, 0.3);
}

.main {
  max-width: 920px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  min-height: 100vh;
  background: var(--bg);
}

.main-with-sidebar {
  margin-left: 260px;
  max-width: none;
}

.main:has(.auth-screen),
.main:has(.landing-page) {
  max-width: none;
  margin: 0;
  padding: 0;
}

.main:has(.dashboard-page),
.main:has(.profile-page) {
  background: #f8fafc;
  padding: 2rem 1.5rem;
}

/* ========== Auth screens – white + dark blue ========== */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: var(--bg);
  background-image: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(30, 64, 175, 0.06), transparent);
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg);
  animation: authCardIn 0.4s ease-out;
}

@keyframes authCardIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-card h1 {
  margin: 0 0 0.25rem 0;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.auth-card .auth-subtitle {
  margin: 0 0 1.5rem 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.auth-toggle {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-toggle a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-toggle a:hover {
  text-decoration: underline;
}

.auth-back {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
.auth-back:hover {
  text-decoration: underline;
}

.auth-card .alert {
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
}

/* ========== Form groups – proper alignment for all inputs/textareas ========== */
.form-group {
  display: block;
  margin-bottom: 1.25rem;
  width: 100%;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.form-group input,
.form-group textarea,
.form-group select {
  display: block;
  width: 100%;
  padding: var(--input-padding);
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:hover,
.form-group textarea:hover {
  border-color: #cbd5e1;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
  vertical-align: top;
}

.auth-card .form-group input {
  min-height: 44px;
}

.auth-card .btn {
  width: 100%;
  min-height: var(--btn-min-height);
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1e40af 100%);
  color: #fff;
  margin-top: 0.5rem;
  transition: filter 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 12px -2px rgba(30, 64, 175, 0.4);
}

.auth-card .btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -2px rgba(30, 64, 175, 0.45);
}

/* ========== Buttons – same gradient blend as sidebar/headers ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--btn-min-height);
  padding: 0.65rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1e40af 100%);
  color: #ffffff !important;
  transition: filter 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 12px -2px rgba(30, 64, 175, 0.35);
}

.btn:hover {
  filter: brightness(1.08);
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px -2px rgba(30, 64, 175, 0.4);
}

.btn:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

.btn-block {
  width: 100%;
  margin-top: 0.5rem;
}

.btn-secondary {
  background: #ffffff;
  color: #1e3a8a !important;
  border: 2px solid #1e40af;
  box-shadow: none;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.05) 0%, rgba(30, 58, 138, 0.08) 50%, rgba(30, 64, 175, 0.05) 100%);
  color: #1e3a8a !important;
  border-color: #1e3a8a;
}

/* ========== Dashboard – polished student dashboard ========== */
.dashboard-page {
  padding-bottom: 2rem;
}

.dashboard-header {
  margin-bottom: 2rem;
  padding: 2rem 2rem 2rem 2rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1e40af 100%);
  border-radius: var(--radius-lg);
  color: #fff;
  box-shadow: 0 10px 40px -10px rgba(30, 64, 175, 0.35);
  position: relative;
  overflow: hidden;
}

.dashboard-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.dashboard-title {
  margin: 0 0 0.35rem 0;
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff !important;
  letter-spacing: -0.03em;
  position: relative;
}

.dashboard-subtitle {
  margin: 0 0 1.5rem 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  position: relative;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.stat-item {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  text-align: center;
  transition: background 0.2s, transform 0.2s;
}

.stat-item:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
}

.stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff !important;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.25rem;
}

.progress-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.progress-bar-wrap {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
  margin: 0;
  max-width: 100%;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #93c5fd 0%, #ffffff 100%);
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

.cards {
  display: grid;
  gap: 1.25rem;
}

.card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  transition: box-shadow 0.25s ease, transform 0.2s ease, border-color 0.2s;
}

.card:hover {
  box-shadow: 0 12px 24px -8px rgba(30, 64, 175, 0.15), 0 4px 12px -4px rgba(0, 0, 0, 0.06);
  border-color: rgba(30, 64, 175, 0.25);
  transform: translateY(-2px);
}

.card-info {
  flex: 1;
  min-width: 0;
}

.card-info h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.card-info p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 52ch;
}

.card-info .badge,
.card-info > span {
  margin-top: 0.65rem;
  margin-right: 0.5rem;
  display: inline-block;
}

.badge {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-pending {
  background: rgba(161, 98, 7, 0.12);
  color: #b45309;
}

.badge-completed {
  background: rgba(21, 128, 61, 0.12);
  color: var(--pass);
}

.badge-pass {
  background: rgba(21, 128, 61, 0.12);
  color: var(--pass);
}

.badge-fail {
  background: rgba(185, 28, 28, 0.12);
  color: var(--fail);
}

.card-actions {
  flex-shrink: 0;
}

.card-actions .btn,
.card-actions .btn-secondary {
  min-width: 130px;
  white-space: nowrap;
}

.card-actions .btn-secondary {
  background: #ffffff;
  color: var(--primary) !important;
  border: 2px solid var(--primary);
}

.card-actions .btn-secondary:hover {
  background: rgba(30, 64, 175, 0.08);
  color: var(--primary-dark) !important;
  border-color: var(--primary-dark);
}

/* Quiz page */
.quiz-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.quiz-header h1 {
  margin: 0 0 0.35rem 0;
  color: var(--primary);
  font-size: 1.35rem;
}

.quiz-question {
  background: var(--bg-panel);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
}

.quiz-question h3 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.mc-options {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mc-options li {
  padding: 0.85rem 1rem;
  margin-bottom: 0.5rem;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}

.mc-options li:hover {
  border-color: var(--primary-light);
  background: rgba(30, 64, 175, 0.06);
}

.mc-options li.selected {
  border-color: var(--primary);
  background: rgba(30, 64, 175, 0.1);
}

.matching-pairs {
  display: grid;
  gap: 1rem;
}

.matching-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.matching-row label {
  min-width: 120px;
  font-weight: 500;
  color: var(--text);
}

.matching-row select {
  padding: var(--input-padding);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  min-width: 200px;
  background: var(--bg);
  color: var(--text);
}

.drag-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.drag-list li {
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: grab;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
}

.drag-list li .drag-handle {
  color: var(--primary);
  font-size: 1.2rem;
}

.drag-list.sortable-ghost {
  opacity: 0.5;
}

.quiz-actions .btn {
  min-width: 140px;
}

.result-card {
  text-align: center;
  padding: 2rem;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin: 2rem 0;
}

.result-card h2 {
  margin: 0 0 0.5rem 0;
  color: var(--text);
}

.result-card .score {
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0.5rem 0;
}

.result-pass .score { color: var(--pass); }
.result-fail .score { color: var(--fail); }

/* ========== Profile page ========== */
.profile-page {
  padding-bottom: 2rem;
}

.profile-header {
  margin-bottom: 1.75rem;
  padding: 1.75rem 2rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1e40af 100%);
  border-radius: var(--radius-lg);
  color: #fff;
  box-shadow: 0 10px 40px -10px rgba(30, 64, 175, 0.35);
  position: relative;
  overflow: hidden;
}

.profile-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.profile-title {
  margin: 0 0 0.25rem 0;
  font-size: 1.75rem;
  font-weight: 800;
  color: #ffffff !important;
  letter-spacing: -0.03em;
  position: relative;
}

.profile-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  position: relative;
}

.profile-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  max-width: 480px;
  box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.profile-field {
  padding: 1.1rem 1.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.profile-field:last-child {
  border-bottom: none;
}

.profile-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-value {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

/* Admin – clean layout, readable text */
.admin-page {
  padding: 0 0.25rem;
}

.admin-section {
  margin-bottom: 2rem;
}

.admin-section h2 {
  margin: 0 0 1.25rem 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #0f172a !important;
  letter-spacing: -0.01em;
}

.admin-section h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.95rem;
}

.admin-table th,
.admin-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  color: #0f172a !important;
}

.admin-table th {
  background: var(--bg-panel);
  font-weight: 600;
  font-size: 0.8rem;
  color: #475569 !important;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: var(--bg-panel);
}

.admin-table td .btn,
.admin-table td .btn-secondary {
  font-size: 0.9rem;
  font-weight: 700;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1e40af 100%) !important;
  border-color: transparent !important;
  color: #ffffff !important;
}
.admin-table td .btn-secondary:hover,
.admin-table td .btn:hover {
  filter: brightness(1.08);
  color: #ffffff !important;
}

.admin-overview-desc {
  margin: -0.5rem 0 1.25rem 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.admin-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--border);
  flex-wrap: wrap;
}

.admin-tabs button {
  padding: 0.65rem 1rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}

.admin-tabs button.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.admin-tabs button:hover {
  color: var(--text);
}

/* Inline forms – aligned inputs and textareas, buttons never truncated */
.inline-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 1rem;
}


.inline-form label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.inline-form input,
.inline-form select {
  padding: var(--input-padding);
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
}

.inline-form textarea {
  padding: var(--input-padding);
  min-height: 80px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
}

.inline-form .btn {
  min-height: 44px;
  flex-shrink: 0;
  min-width: 8rem;
  white-space: nowrap;
}

/* Admin add-question form: no JSON, plain inputs */
.add-q-options-block {
  padding: 0.75rem 0;
}
.add-q-add-btn {
  margin-top: 0.5rem;
}
.add-q-correct {
  max-width: 20rem;
}

/* Admin add-question form: form-group stack */
.admin-section .form-group {
  margin-bottom: 1rem;
}

.admin-section .form-group label {
  display: block;
  margin-bottom: 0.4rem;
}

.admin-section .form-group input,
.admin-section .form-group select,
.admin-section .form-group textarea {
  width: 100%;
  padding: var(--input-padding);
}

.admin-section .form-group textarea {
  min-height: 80px;
  resize: vertical;
}

.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.alert-error {
  background: rgba(185, 28, 28, 0.1);
  color: #b91c1c;
  border: 1px solid rgba(185, 28, 28, 0.3);
}

.alert-success {
  background: rgba(21, 128, 61, 0.1);
  color: var(--pass);
  border: 1px solid rgba(21, 128, 61, 0.3);
}

.hide {
  display: none !important;
}

/* ========== Responsive – pipeline stays clear, buttons visible ========== */
@media (max-width: 768px) {
  .main,
  .main-with-sidebar {
    padding: 1rem 0.75rem;
    max-width: 100%;
  }

  .sidebar {
    width: 220px;
  }

  .main-with-sidebar {
    margin-left: 220px;
  }

  .sidebar-brand {
    padding: 1.25rem 1rem;
    font-size: 1.1rem;
  }

  .sidebar-link {
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
  }

  .card {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem;
  }

  .card-actions {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
  }

  .card-actions .btn,
  .card-actions .btn-secondary {
    width: 100%;
    min-width: 0;
    display: block;
    text-align: center;
  }

  .dashboard-header {
    padding: 1.5rem 1.25rem;
  }

  .dashboard-title {
    font-size: 1.4rem;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
  }

  .stat-item {
    padding: 0.85rem 1rem;
  }

  .stat-value {
    font-size: 1.4rem;
  }

  .progress-bar-wrap {
    height: 10px;
  }

  .profile-header {
    padding: 1.5rem 1.25rem;
  }

  .profile-title {
    font-size: 1.4rem;
  }

  .profile-field {
    padding: 1rem 1.25rem;
  }

  .matching-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .matching-row select {
    min-width: 100%;
    width: 100%;
  }

  .admin-tabs {
    gap: 0.15rem;
  }

  .admin-tabs button {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }

  .quiz-actions .btn {
    width: 100%;
    min-width: 0;
  }
}

/* ========== Landing page – hero + 6 features ========== */
.landing-page {
  min-height: 100vh;
  background: var(--bg);
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.landing-nav-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary) !important;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.landing-nav-brand:hover {
  color: var(--primary-dark) !important;
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.landing-nav-links a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}

.landing-nav-links a:hover {
  color: var(--primary);
  background: rgba(30, 64, 175, 0.08);
}

.landing-nav-cta {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1e40af 100%) !important;
  color: #fff !important;
  padding: 0.6rem 1.25rem !important;
}

.landing-nav-cta:hover {
  filter: brightness(1.08);
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1e40af 100%) !important;
  color: #fff !important;
}

.landing-hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem 5rem;
  text-align: center;
  overflow: hidden;
}

.landing-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('/hero_image.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.landing-hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 58, 138, 0.75) 50%, rgba(30, 64, 175, 0.8) 100%);
  pointer-events: none;
}

.landing-hero-bg::after {
  content: '';
  position: absolute;
  top: -40%;
  left: -20%;
  width: 80%;
  height: 140%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.landing-hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
}

.landing-hero-title {
  margin: 0 0 0.5rem 0;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: #ffffff !important;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.landing-hero-tagline {
  margin: 0 0 1rem 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.02em;
}

.landing-hero-desc {
  margin: 0 0 2rem 0;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.landing-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.btn-landing-primary {
  background: #ffffff !important;
  color: var(--primary) !important;
  padding: 0.85rem 1.75rem !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15) !important;
}

.btn-landing-primary:hover {
  filter: brightness(0.97);
  color: var(--primary-dark) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2) !important;
}

.btn-landing-secondary {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
  border: 2px solid rgba(255, 255, 255, 0.6) !important;
  padding: 0.85rem 1.75rem !important;
}

.btn-landing-secondary:hover {
  background: rgba(255, 255, 255, 0.3) !important;
  border-color: #fff !important;
  color: #fff !important;
}

.landing-features {
  padding: 4rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.landing-features-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  letter-spacing: -0.03em;
}

.landing-features-subtitle {
  margin: 0 0 2.5rem 0;
  font-size: 1rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.landing-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.landing-feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s, transform 0.2s, border-color 0.2s;
}

.landing-feature-card:hover {
  box-shadow: 0 12px 28px -8px rgba(30, 64, 175, 0.15);
  border-color: rgba(30, 64, 175, 0.2);
  transform: translateY(-3px);
}

.landing-feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  background: rgba(30, 64, 175, 0.08);
  color: var(--primary);
}

.landing-feature-icon svg {
  flex-shrink: 0;
}

.landing-feature-title {
  margin: 0 0 0.6rem 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.landing-feature-desc {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.landing-cta {
  padding: 3.5rem 1.5rem;
  background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg) 100%);
  border-top: 1px solid var(--border);
  text-align: center;
}

.landing-cta-title {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}

.landing-cta-desc {
  margin: 0 0 1.5rem 0;
  font-size: 1rem;
  color: var(--text-muted);
}

.landing-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.landing-cta-buttons .btn-landing-primary {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1e40af 100%) !important;
  color: #fff !important;
}

.landing-cta-buttons .btn-landing-primary:hover {
  filter: brightness(1.08);
  color: #fff !important;
}

.landing-cta-buttons .btn-landing-secondary {
  background: #fff !important;
  color: var(--primary) !important;
  border: 2px solid var(--primary) !important;
}

.landing-cta-buttons .btn-landing-secondary:hover {
  background: rgba(30, 64, 175, 0.08) !important;
  color: var(--primary-dark) !important;
}

.landing-footer {
  padding: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.landing-footer p {
  margin: 0;
}

@media (max-width: 768px) {
  .landing-hero {
    padding: 3rem 1rem 4rem;
  }

  .landing-features {
    padding: 3rem 1rem;
  }

  .landing-features-grid {
    grid-template-columns: 1fr;
  }

  .landing-nav-links a {
    font-size: 0.9rem;
    padding: 0.45rem 0.6rem;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 1.5rem 1.25rem;
  }

  .card-info .badge,
  .card-info > span {
    display: block;
    margin-right: 0;
    margin-top: 0.35rem;
  }
}
