/* INDIKA Certification Platform — Global Styles (Mobile-First) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@700&display=swap');


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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}

/* ─── NAVBAR ─── */
.navbar {
  background: var(--navy);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--navbar-h);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-logo {
  width: 34px; height: 34px;
  background: var(--navy);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: white; font-size: 12px; letter-spacing: -0.5px;
}
.brand-text { color: white; font-weight: 700; font-size: 16px; letter-spacing: 0.5px; }
.brand-sub { color: var(--cyan-light); font-size: 8px; font-weight: 400; letter-spacing: 1.5px; text-transform: uppercase; display: block; line-height: 1; }

/* Hamburger toggle */
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  color: white;
  font-size: 22px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Nav links — mobile: vertical dropdown */
.nav-links {
  display: none;
  position: absolute;
  top: var(--navbar-h);
  left: 0;
  right: 0;
  background: var(--navy-dark);
  flex-direction: column;
  padding: 8px 0;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
  z-index: 99;
}
.nav-links.open { display: flex; }
.nav-links a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 500;
  transition: background .2s;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-links a:hover, .nav-links a.active { background: rgba(255,255,255,.1); color: white; }
.nav-links .btn-nav {
  background: var(--cyan);
  color: white !important;
  margin: 8px 16px;
  padding: 10px 18px;
  border-radius: 8px;
  justify-content: center;
}
.nav-links .btn-nav:hover { background: var(--cyan-light); }

.nav-separator {
  height: 1px;
  background: rgba(255,255,255,.15);
  margin: 4px 16px;
}

/* Always show nav-text on mobile (vertical menu has room) */
.nav-links .nav-text { display: inline; }

/* ─── HERO ─── */
.hero {
  background: var(--navy);
  color: white;
  padding: 48px 20px 64px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 30 Q15 10 30 30 Q45 50 60 30' stroke='rgba(255,255,255,.04)' fill='none' stroke-width='2'/%3E%3C/svg%3E") repeat;
  opacity: .8;
}
.hero-content { position: relative; max-width: 800px; margin: 0 auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.85); padding: 6px 16px; border-radius: 20px;
  font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  margin-bottom: 24px;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.75rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
}
.hero h1 span { color: var(--cyan-light); }
.hero p { font-size: 16px; opacity: .85; margin-bottom: 36px; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 8px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  text-decoration: none; border: 2px solid transparent;
  transition: all .2s; line-height: 1;
  min-height: 44px;
}
.btn-primary { background: var(--cyan); color: white; }
.btn-primary:hover { background: var(--cyan-light); transform: translateY(-1px); }
.btn-outline { background: transparent; color: white; border-color: rgba(255,255,255,.5); }
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: white; }
.btn-navy { background: var(--navy); color: white; }
.btn-navy:hover { background: var(--navy-dark); }
.btn-blue { background: var(--blue); color: white; }
.btn-blue:hover { background: var(--blue-light); }
.btn-green { background: var(--pass); color: white; }
.btn-green:hover { filter: brightness(1.1); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--border); }
.btn-ghost:hover { background: var(--sky); }
.btn-sm { padding: 8px 16px; font-size: 13px; min-height: 44px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ─── CONTAINER / LAYOUT ─── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.section { padding: 40px 0; }
.page-header { padding: 24px 0 20px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.page-title { font-size: 22px; font-weight: 700; color: var(--navy); }
.page-sub { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

/* ─── CARDS ─── */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px;
  border: 1px solid var(--border);
}
.card-header { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-title { font-size: 18px; font-weight: 700; color: var(--navy); }

/* ─── LEVEL CARDS ─── */
.levels-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.level-card {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  box-shadow: var(--shadow);
}
.level-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.level-card-header {
  background: var(--navy);
  color: white; padding: 16px 20px;
}
.level-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,.15); border: 2px solid rgba(255,255,255,.3);
  font-size: 18px; font-weight: 800; margin-bottom: 10px;
}
.level-card-header h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.level-card-header p { font-size: 12px; opacity: .75; }
.level-card-body { padding: 16px 20px; }
.level-fee { font-size: 22px; font-weight: 800; color: var(--navy); }
.level-fee span { font-size: 13px; font-weight: 400; color: var(--text-muted); }
.level-meta { display: flex; gap: 16px; margin: 12px 0; flex-wrap: wrap; }
.meta-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.meta-item i { color: var(--cyan); }

/* ─── FORMS ─── */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 11px 16px; border: 2px solid var(--border);
  border-radius: var(--radius-sm); font-size: 16px; color: var(--text);
  background: white; transition: border-color .2s;
  font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0,0,0,.08);
}
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 13px; color: var(--fail); margin-top: 8px; display: none; }

/* ─── AUTH PAGES ─── */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; }
.auth-content {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
  background: var(--navy);
}
.auth-card {
  background: white; border-radius: var(--radius);
  padding: 28px 20px; width: 100%; max-width: 460px;
  box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; margin-bottom: 24px; }
.auth-logo .brand-logo { width: 54px; height: 54px; font-size: 18px; margin: 0 auto 10px; }
.auth-logo h2 { font-size: 22px; font-weight: 700; color: var(--navy); }
.auth-logo p { color: var(--text-muted); font-size: 14px; }
.role-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.role-option { display: none; }
.role-label {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px; border: 2px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: all .2s; text-align: center;
}
.role-label i { font-size: 24px; color: var(--text-muted); }
.role-label span { font-size: 14px; font-weight: 600; color: var(--text); }
.role-option:checked + .role-label { border-color: var(--cyan); background: var(--sky); }
.role-option:checked + .role-label i { color: var(--cyan); }
.divider { text-align: center; color: var(--text-muted); font-size: 13px; margin: 20px 0; position: relative; }
.divider::before, .divider::after { content: ''; position: absolute; top: 50%; width: 42%; height: 1px; background: var(--border); }
.divider::before { left: 0; } .divider::after { right: 0; }

/* ─── ASSESSMENT FORM ─── */
.assessment-form { max-width: 900px; margin: 0 auto; }
.criteria-category { margin-bottom: 24px; }
.criteria-category-title {
  font-size: 14px; font-weight: 700; color: var(--navy);
  padding: 10px 16px; background: var(--sky); border-left: 4px solid var(--cyan);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-bottom: 10px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.criteria-row {
  background: white; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; margin-bottom: 8px;
  display: grid; grid-template-columns: 1fr;
  align-items: start; gap: 10px;
  transition: border-color .2s;
}
.criteria-row:hover { border-color: var(--cyan); }
.criteria-row.scored-pass { border-left: 4px solid var(--pass); }
.criteria-row.scored-not_yet { border-left: 4px solid var(--notyet); }
.criteria-row.scored-fail { border-left: 4px solid var(--fail); }
.criteria-name { font-weight: 600; font-size: 14px; color: var(--text); }
.criteria-desc { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.score-radios { display: flex; gap: 6px; flex-wrap: wrap; }
.score-radio-option { display: none; }
.score-radio-label {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 14px; border-radius: 20px; font-size: 13px; font-weight: 600;
  border: 2px solid var(--border); cursor: pointer; transition: all .15s;
  white-space: nowrap;
  min-height: 44px;
}
.score-radio-option.r-pass:checked + .score-radio-label { background: var(--pass-bg); border-color: var(--pass); color: var(--pass); }
.score-radio-option.r-notyet:checked + .score-radio-label { background: var(--notyet-bg); border-color: var(--notyet); color: var(--notyet); }
.score-radio-option.r-fail:checked + .score-radio-label { background: var(--fail-bg); border-color: var(--fail); color: var(--fail); }

/* ─── BADGES / TAGS ─── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-pass { background: var(--pass-bg); color: var(--pass); }
.badge-fail { background: var(--fail-bg); color: var(--fail); }
.badge-notyet, .badge-conditional_pass { background: var(--notyet-bg); color: var(--notyet); }
.badge-pending { background: var(--sky); color: var(--text-muted); }
.badge-in_progress { background: #e8e8e8; color: #333; }
.badge-completed { background: var(--pass-bg); color: var(--pass); }
.badge-payment_pending { background: #fef9c3; color: #854d0e; }
.badge-navy { background: var(--navy); color: white; }
.badge-cyan { background: var(--sky); color: var(--cyan); }

/* ─── TABLE (default) ─── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead tr { background: var(--navy); }
thead th { color: white; padding: 12px 14px; text-align: left; font-size: 12px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; white-space: nowrap; }
tbody tr { border-bottom: 1px solid var(--border); transition: background .15s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--sky); }
tbody td { padding: 12px 14px; font-size: 14px; color: var(--text); }

/* ─── RESPONSIVE TABLE (card layout on mobile) ─── */
.responsive-table thead { display: none; }
.responsive-table tbody tr {
  display: block;
  padding: 14px 16px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
}
.responsive-table tbody tr:hover { background: var(--sky); }
.responsive-table tbody td {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border: none;
  font-size: 13px;
}
.responsive-table tbody td::before {
  content: attr(data-label);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-right: 12px;
  flex-shrink: 0;
}
/* Hide the row number column on mobile for responsive tables */
.responsive-table .table-wrapper { border: none; }

/* ─── STATS / SUMMARY CARDS ─── */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
.stat-card { background: white; border-radius: var(--radius-sm); padding: 16px; border: 1px solid var(--border); text-align: center; }
.stat-number { font-size: 24px; font-weight: 800; color: var(--navy); }
.stat-label { font-size: 11px; color: var(--text-muted); font-weight: 500; margin-top: 4px; }

/* ─── ALERTS ─── */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 20px; display: flex; align-items: flex-start; gap: 10px; }
.alert-error { background: var(--fail-bg); color: #7f1d1d; border: 1px solid #fca5a5; }
.alert-success { background: var(--pass-bg); color: #14532d; border: 1px solid #86efac; }
.alert-warning { background: var(--notyet-bg); color: #78350f; border: 1px solid #fcd34d; }
.alert-info { background: var(--sky); color: var(--navy); border: 1px solid var(--border); }

/* ─── RESULT BOX ─── */
.result-box { border-radius: var(--radius); padding: 24px; text-align: center; margin: 24px 0; }
.result-box.pass { background: var(--pass-bg); border: 2px solid var(--pass); }
.result-box.conditional_pass { background: var(--conditional-bg); border: 2px solid var(--conditional); }
.result-box.fail { background: var(--fail-bg); border: 2px solid var(--fail); }
.result-icon { font-size: 48px; margin-bottom: 12px; }
.result-title { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.result-box.pass .result-title { color: var(--pass); }
.result-box.conditional_pass .result-title { color: var(--conditional); }
.result-box.fail .result-title { color: var(--fail); }
.result-msg { font-size: 14px; }

/* ─── PROGRESS BAR ─── */
.progress-bar { background: var(--border); border-radius: 10px; height: 8px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 10px; background: var(--cyan); transition: width .4s; }

/* ─── FOOTER ─── */
footer {
  background: var(--navy-dark); color: rgba(255,255,255,.7);
  text-align: center; padding: 20px 16px;
  font-size: 13px; margin-top: auto;
}
footer a { color: var(--cyan-light); text-decoration: none; }

/* ─── UTILITY ─── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.font-bold { font-weight: 700; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.hidden { display: none !important; }
.loading { opacity: .6; pointer-events: none; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: white; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── CERTIFICATE PREVIEW ─── */
.cert-preview {
  border: 3px solid var(--navy);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  background: linear-gradient(135deg, var(--sky), white);
  position: relative;
}
.cert-preview::before {
  content: 'INDIKA CERTIFICATE';
  position: absolute; top: 12px; right: 16px;
  font-size: 9px; letter-spacing: 2px; color: var(--text-muted);
}

/* ─── RESPONSIVE LAYOUT CLASSES (mobile base) ─── */

/* Main + sidebar: stacks on mobile */
.layout-main-sidebar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

/* Two-column content: stacks on mobile */
.content-two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

/* Photo strip */
.photo-strip {
  display: grid;
  grid-template-columns: 1fr;
  height: auto;
}
.photo-strip img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

/* Section title */
.section-title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--navy);
}

/* Action bar */
.action-bar {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.action-bar .btn { flex: 1; justify-content: center; min-width: 0; }

/* Level card layout */
.level-card-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
  padding: 20px;
}

/* Cert cards grid */
.cert-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* Sticky actions (assessment page) */
.sticky-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sticky-actions .btn { font-size: 12px; padding: 6px 10px; min-height: 36px; }

/* Assessment card (instructor dashboard) */
.assessment-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow .2s;
  margin-bottom: 8px;
}
.assessment-card:hover { box-shadow: var(--shadow); }
.level-dot { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; color: white; flex-shrink: 0; }
.card-meta { flex: 1; min-width: 0; }
.card-name { font-weight: 700; font-size: 15px; color: var(--navy); word-wrap: break-word; overflow-wrap: break-word; }
.card-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Assessment card top row on mobile */
.assessment-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Filter bar */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-btn { padding: 7px 12px; border-radius: 20px; border: 1px solid var(--border); background: white; font-size: 12px; font-weight: 500; cursor: pointer; transition: all .2s; color: var(--text-muted); min-height: 44px; display: inline-flex; align-items: center; gap: 4px; }
.filter-btn.active { background: var(--navy); color: white; border-color: var(--navy); }
.filter-btn:hover:not(.active) { border-color: var(--navy); color: var(--navy); }

/* Sticky header for assessment form */
.sticky-header {
  position: sticky;
  top: var(--navbar-h);
  z-index: 50;
  background: white;
  border-bottom: 2px solid var(--border);
  padding: 10px 0;
}
.progress-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}
.score-summary { display: flex; gap: 12px; font-size: 13px; font-weight: 600; }

/* Confirm modal */
.confirm-modal { display:none;position:fixed;inset:0;z-index:200;align-items:center;justify-content:center;background:rgba(0,0,0,.5); }
.confirm-modal.open { display:flex; }

/* Empty section */
.empty-section { text-align:center; padding:24px; color:var(--text-muted); font-size:14px; background:white; border-radius:var(--radius); border:1px dashed var(--border); }

/* Section heading (instructor dashboard groups) */
.section-heading { font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:.7px; color:var(--text-muted); padding:8px 0 6px; margin-top:20px; border-bottom:1px solid var(--border); margin-bottom:10px; }
.section-heading:first-child { margin-top:0; }

/* Filter bar inputs (cert-database) */
.filter-bar input, .filter-bar select {
  padding: 9px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
}
.filter-bar input:focus, .filter-bar select:focus { outline: none; border-color: var(--cyan); }

/* ─────────────────────────────────────────────────────────── */
/* ─── TABLET (768px+) ─── */
/* ─────────────────────────────────────────────────────────── */
@media (min-width: 768px) {
  :root { --navbar-h: 64px; }

  .navbar { padding: 0 24px; height: var(--navbar-h); }
  .brand-logo { width: 38px; height: 38px; font-size: 14px; }
  .brand-text { font-size: 18px; }
  .brand-sub { font-size: 9px; }

  /* Hide hamburger, show inline nav */
  .nav-toggle { display: none; }
  .nav-links {
    display: flex;
    position: static;
    flex-direction: row;
    background: none;
    padding: 0;
    box-shadow: none;
    align-items: center;
    gap: 4px;
  }
  .nav-links a {
    padding: 8px 14px;
    font-size: 14px;
    border-radius: var(--radius-sm);
  }
  .nav-links .btn-nav {
    margin: 0;
    padding: 8px 18px;
    border-radius: 20px;
  }
  .nav-separator {
    width: 1px;
    height: 24px;
    margin: 0 8px;
    background: rgba(255,255,255,.2);
  }

  .container { padding: 0 24px; }
  .section { padding: 60px 0; }
  .hero { padding: 60px 24px 80px; }
  .hero p { font-size: 18px; }
  .hero-actions { gap: 16px; }

  .card { padding: 28px; }
  .page-header { padding: 32px 0 24px; margin-bottom: 32px; }
  .page-title { font-size: 26px; }

  .btn-lg { padding: 16px 32px; font-size: 17px; }

  .auth-content { padding: 40px 24px; }
  .auth-card { padding: 40px; }

  .levels-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .level-card-header { padding: 20px 24px; }
  .level-card-body { padding: 20px 24px; }

  .stats-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; margin-bottom: 32px; }
  .stat-card { padding: 20px; }
  .stat-number { font-size: 28px; }
  .stat-label { font-size: 12px; }

  .criteria-category { margin-bottom: 32px; }
  .criteria-category-title { font-size: 16px; padding: 12px 20px; }
  .criteria-row { padding: 16px 20px; grid-template-columns: 1fr auto; gap: 16px; margin-bottom: 10px; }
  .score-radios { flex-wrap: nowrap; }
  .score-radio-label { padding: 6px 12px; font-size: 12px; min-height: auto; }

  .alert { padding: 14px 18px; }
  thead th { padding: 14px 18px; }
  tbody td { padding: 14px 18px; }

  /* Responsive table: revert to normal table on tablet+ */
  .responsive-table thead { display: table-header-group; }
  .responsive-table tbody tr {
    display: table-row;
    padding: 0;
    margin-bottom: 0;
    border: none;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
  }
  .responsive-table tbody td {
    display: table-cell;
    padding: 14px 18px;
    font-size: 14px;
  }
  .responsive-table tbody td::before { content: none; }

  /* Layout classes — tablet */
  .content-two-col { grid-template-columns: 1fr 1fr; gap: 48px; }
  .photo-strip { grid-template-columns: repeat(3, 1fr); }
  .photo-strip img { height: 220px; }
  .cert-cards-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
  .level-card-layout { grid-template-columns: 1fr auto; gap: 20px; padding: 28px; }

  /* Sticky actions */
  .sticky-actions .btn { font-size: 13px; padding: 8px 16px; min-height: auto; }

  /* Assessment card — row layout on tablet */
  .assessment-card {
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
  }

  .filter-btn { padding: 7px 16px; font-size: 13px; }

  .progress-row {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  footer { padding: 24px; }
}

/* ─────────────────────────────────────────────────────────── */
/* ─── DESKTOP (1024px+) ─── */
/* ─────────────────────────────────────────────────────────── */
@media (min-width: 1024px) {
  .hero { padding: 80px 24px 100px; }

  /* Main + sidebar side-by-side */
  .layout-main-sidebar { grid-template-columns: 1fr 340px; gap: 28px; }

  .form-input, .form-select, .form-textarea { font-size: 15px; }
  .filter-bar input, .filter-bar select { font-size: 14px; }
}

/* ─── NAV TEXT HIDING on small tablets only ─── */
@media (min-width: 768px) and (max-width: 899px) {
  .nav-links .nav-text { display: none; }
}
