/* ============================================================
   MyRemoteVA Academy — Complete Stylesheet
   Google Grow palette + Skilljar-inspired layout
   ============================================================ */

/* ---- VARIABLES ---- */
:root {
  --primary:       #1a73e8;
  --primary-dark:  #1557b0;
  --primary-light: #e8f0fe;
  --success:       #34a853;
  --success-light: #e6f4ea;
  --warning:       #fbbc04;
  --warning-light: #fef7e0;
  --error:         #ea4335;
  --error-light:   #fce8e6;
  --dark:          #202124;
  --mid:           #5f6368;
  --light:         #80868b;
  --border:        #e8eaed;
  --bg:            #f8f9fa;
  --white:         #ffffff;
  --font-sans:     -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:     'Courier New', Courier, monospace;
  --radius:        12px;
  --radius-sm:     8px;
  --radius-xs:     4px;
  --shadow:        0 1px 4px rgba(0,0,0,.10);
  --shadow-md:     0 4px 16px rgba(0,0,0,.12);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.14);
  --nav-h:         64px;
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--dark);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { font-family: inherit; }
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.25; color: var(--dark); }

/* ---- CONTAINER ---- */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 720px; margin: 0 auto; padding: 0 24px; }
.container-lg { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}
.navbar-inner {
  display: flex; align-items: center; gap: 20px;
  height: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px;
}
.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1rem; color: var(--dark);
  text-decoration: none; flex-shrink: 0;
}
.navbar-brand:hover { text-decoration: none; }
.navbar-logo { height: 36px; width: auto; max-width: 200px; object-fit: contain; }
.navbar-site-name { font-weight: 700; font-size: .95rem; color: var(--dark); }
.navbar-links {
  display: flex; align-items: center; gap: 4px; flex: 1;
}
.nav-link {
  padding: 6px 14px; border-radius: 20px;
  font-size: .875rem; font-weight: 500; color: var(--mid);
  transition: all .15s; text-decoration: none;
}
.nav-link:hover { background: var(--bg); color: var(--dark); text-decoration: none; }
.nav-link-active { background: var(--primary-light); color: var(--primary) !important; font-weight: 600; }
.navbar-search {
  display: flex; align-items: center;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 24px; overflow: hidden;
  transition: border-color .15s;
}
.navbar-search:focus-within { border-color: var(--primary); }
.navbar-search-input {
  border: none; background: none; padding: 7px 14px;
  font-size: .875rem; outline: none; width: 200px;
}
.navbar-search-btn {
  border: none; background: none; padding: 7px 12px;
  cursor: pointer; font-size: .9rem;
}
.navbar-auth { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.navbar-user-menu { position: relative; }
.navbar-user-btn {
  display: flex; align-items: center; gap: 8px;
  background: none; border: 1px solid var(--border);
  padding: 6px 12px 6px 6px; border-radius: 24px;
  cursor: pointer; font-size: .875rem; font-weight: 500;
  transition: all .15s;
}
.navbar-user-btn:hover { border-color: var(--primary); background: var(--primary-light); }
.navbar-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
}
.navbar-avatar-initial {
  background: var(--primary); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700;
}
.navbar-username { font-weight: 500; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropdown-caret { font-size: .7rem; color: var(--light); }
.navbar-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  min-width: 200px; padding: 6px 0;
  display: none; z-index: 200;
}
.navbar-dropdown.open { display: block; }
.dropdown-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px; font-size: .875rem; color: var(--dark);
  transition: background .12s; text-decoration: none;
}
.dropdown-item:hover { background: var(--bg); text-decoration: none; }
.dropdown-divider { height: 1px; background: var(--border); margin: 6px 0; }
.navbar-hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.navbar-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--dark); border-radius: 2px; transition: .2s;
}
.navbar-mobile {
  display: none; flex-direction: column;
  background: var(--white); border-top: 1px solid var(--border);
  padding: 12px 24px 16px;
}
.navbar-mobile.open { display: flex; }
.mobile-nav-link {
  padding: 12px 0; font-size: 1rem; font-weight: 500;
  color: var(--dark); border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.mobile-nav-link:last-child { border-bottom: none; }
.mobile-nav-cta {
  margin-top: 8px; background: var(--primary); color: var(--white) !important;
  text-align: center; padding: 12px; border-radius: var(--radius-sm);
}

/* ============================================================
   FLASH BANNER
   ============================================================ */
.flash-banner {
  padding: 12px 0; font-size: .875rem; font-weight: 500;
}
.flash-banner .container {
  display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
}
.flash-success { background: var(--success-light); color: #1e7e34; border-bottom: 1px solid #a8d5b0; }
.flash-error   { background: var(--error-light);   color: #c62828; border-bottom: 1px solid #f5c6c4; }
.flash-warning { background: var(--warning-light); color: #b45309; border-bottom: 1px solid #fde68a; }
.flash-info    { background: var(--primary-light); color: #1a56db; border-bottom: 1px solid #c3d9fd; }
.flash-close { background: none; border: none; cursor: pointer; font-size: 1rem; opacity: .6; color: inherit; }
.flash-close:hover { opacity: 1; }
.flash-msg { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: .9rem; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px; border-radius: 24px; font-size: .875rem; font-weight: 600;
  border: 2px solid transparent; cursor: pointer; transition: all .15s;
  text-decoration: none; line-height: 1; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary  { background: var(--primary);  color: var(--white); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--white); }
.btn-locked { background: var(--mid) !important; border-color: var(--mid) !important; color: var(--white) !important; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.btn-locked:hover { background: var(--dark) !important; border-color: var(--dark) !important; }
.btn-unlock-hint { font-size: .72em; font-weight: 400; background: rgba(255,255,255,0.2); border-radius: 20px; padding: 1px 8px; }
.btn-success  { background: var(--success);  color: var(--white); border-color: var(--success); }
.btn-success:hover { background: #2d9147; color: var(--white); }
.btn-warning  { background: var(--warning);  color: var(--dark);  border-color: var(--warning); }
.btn-warning:hover { background: #f0a500; color: var(--dark); }
.btn-outline  { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-ghost    { background: transparent; color: var(--mid);  border-color: transparent; }
.btn-ghost:hover { background: var(--bg); }
.btn-sm   { padding: 7px 16px; font-size: .8rem; }
.btn-xs   { padding: 4px 10px; font-size: .75rem; border-radius: 12px; }
.btn-full { width: 100%; display: flex; }
.btn-center { text-align: center; margin: 20px 0; }
.btn-paypal { background: #ffc439; color: var(--dark); border-color: #ffc439; }
.btn-paypal:hover { background: #f0b429; color: var(--dark); }
.btn-social {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 11px 20px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border); background: var(--white);
  font-size: .9rem; font-weight: 600; color: var(--dark); cursor: pointer;
  transition: all .15s; text-decoration: none;
}
.btn-social:hover { border-color: var(--mid); background: var(--bg); text-decoration: none; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: .9rem; margin-bottom: 16px; border: 1px solid transparent;
}
.alert-success { background: var(--success-light); color: #1e7e34; border-color: #a8d5b0; }
.alert-error   { background: var(--error-light);   color: #c62828; border-color: #f5c6c4; }
.alert-warning { background: var(--warning-light); color: #b45309; border-color: #fde68a; }
.alert-info    { background: var(--primary-light); color: #1a56db; border-color: #c3d9fd; }
.text-error   { color: var(--error); }
.text-success { color: var(--success); }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 6px; color: var(--dark); }
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group textarea,
.form-group select {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: .9rem; font-family: inherit;
  background: var(--white); transition: border-color .15s; outline: none;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,115,232,.12);
}
.form-note { font-size: .8rem; color: var(--light); margin-top: 5px; }
.form-control-sm { padding: 7px 12px !important; font-size: .8rem !important; }
.checkbox-label {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .9rem; cursor: pointer; user-select: none;
}
.checkbox-label input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; width: 16px; height: 16px; }

/* ============================================================
   CARDS & GRID
   ============================================================ */
.card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--border); overflow: hidden;
  box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.card-badge {
  position: absolute; top: 12px; right: 12px;
  background: var(--warning); color: var(--dark);
  font-size: .7rem; font-weight: 700; padding: 3px 8px;
  border-radius: 12px; text-transform: uppercase; letter-spacing: .5px;
}

/* ============================================================
   HOMEPAGE — Hero, Stats, Sections
   ============================================================ */
.hero {
  background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
  padding: 80px 0; text-align: center; color: var(--white);
}
.hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 16px; color: var(--white); }
.hero p { font-size: 1.15rem; opacity: .9; margin-bottom: 32px; max-width: 560px; margin-left: auto; margin-right: auto; }
.hero-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.stats-bar {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.stats-bar .container { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; }
.stat-item { text-align: center; }
.stat-num { font-size: 1.6rem; font-weight: 800; color: var(--primary); display: block; }
.stat-linked { color: var(--primary); text-decoration: none; }
.stat-linked:hover { text-decoration: underline; }
.stat-label { font-size: .8rem; color: var(--light); text-transform: uppercase; letter-spacing: .8px; }
.section-heading {
  font-size: 1.4rem; font-weight: 700; margin-bottom: 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.trust-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3);
  padding: 6px 14px; border-radius: 20px; font-size: .8rem;
  color: rgba(255,255,255,.9);
}
.feature-list { display: flex; flex-direction: column; gap: 8px; }
.feature-list li {
  display: flex; align-items: center; gap: 8px;
  font-size: .9rem; color: var(--mid);
}

/* ============================================================
   LISTING PAGES (Tests, Courses)
   ============================================================ */
.listing-page { padding: 40px 0; }
.listing-header { margin-bottom: 32px; }
.listing-title { font-size: 2rem; font-weight: 800; margin-bottom: 6px; }
.listing-subtitle { color: var(--mid); font-size: 1rem; }
.search-section { margin-bottom: 24px; }
.search-form { display: flex; gap: 10px; max-width: 480px; }
.search-form-lg { max-width: 600px; }
.search-input {
  flex: 1; padding: 10px 16px; border: 1.5px solid var(--border);
  border-radius: 24px; font-size: .9rem; outline: none;
  transition: border-color .15s;
}
.search-input:focus { border-color: var(--primary); }
.search-icon { position: relative; }
.pill-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.pill {
  padding: 6px 16px; border-radius: 20px; font-size: .8rem; font-weight: 600;
  border: 1.5px solid var(--border); background: var(--white); color: var(--mid);
  cursor: pointer; transition: all .15s; text-decoration: none; display: inline-block;
}
.pill:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.pill-active { background: var(--primary); color: var(--white) !important; border-color: var(--primary); }
.meta-category, .meta-difficulty, .meta-type, .meta-locked {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .75rem; font-weight: 600; padding: 3px 8px;
  border-radius: 10px; text-transform: capitalize;
}
.meta-category { background: var(--primary-light); color: var(--primary); }
.meta-difficulty { background: var(--warning-light); color: #92600a; }
.meta-type { background: var(--bg); color: var(--mid); }
.meta-locked { background: var(--error-light); color: var(--error); }
.type-test { background: #e6f4ea; color: var(--success); }
.type-course { background: var(--primary-light); color: var(--primary); }
.social-proof-row {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: .78rem; color: var(--light); margin-top: 8px;
}
.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 3rem; display: block; margin-bottom: 12px; }

/* ============================================================
   COURSE PAGE
   ============================================================ */
.course-layout {
  display: flex; align-items: flex-start; min-height: calc(100vh - var(--nav-h));
}
.course-sidebar {
  width: 280px; flex-shrink: 0; position: sticky; top: var(--nav-h);
  height: calc(100vh - var(--nav-h)); overflow-y: auto;
  background: var(--white); border-right: 1px solid var(--border);
  padding: 24px 16px;
}
.course-main { flex: 1; padding: 32px 40px; min-width: 0; }
.sidebar-header { margin-bottom: 16px; }
.sidebar-title { font-size: .95rem; font-weight: 700; color: var(--dark); line-height: 1.3; }
.sidebar-progress {
  margin-top: 10px;
}
.progress-bar {
  height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; margin: 6px 0;
}
.progress-bar-fill { height: 100%; background: var(--success); border-radius: 3px; transition: width .3s; }
.progress-label { font-size: .75rem; color: var(--light); }
.sidebar-nav { margin-top: 16px; }
.sidebar-nav li { margin-bottom: 2px; }
.sidebar-nav li a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  font-size: .85rem; font-weight: 500; color: var(--mid);
  transition: all .12s; text-decoration: none;
}
.sidebar-nav li a:hover { background: var(--bg); color: var(--dark); text-decoration: none; }
.sidebar-nav li a.active, .sidebar-item-active { background: var(--primary-light) !important; color: var(--primary) !important; font-weight: 600 !important; }
.sidebar-item-done { color: var(--success) !important; }
.sidebar-num { font-size: .75rem; font-weight: 700; color: var(--light); min-width: 18px; }
.sidebar-page-title { flex: 1; line-height: 1.3; }
.sidebar-test-cta {
  margin-top: 20px; padding: 14px; background: var(--success-light);
  border-radius: var(--radius-sm); border: 1px solid #a8d5b0;
}
.sidebar-test-cta p { font-size: .8rem; color: #1e7e34; margin-bottom: 8px; }
.course-page-header { margin-bottom: 28px; }
.course-page-title { font-size: 1.6rem; font-weight: 700; margin-bottom: 8px; }
.page-breadcrumb { font-size: .8rem; color: var(--light); margin-bottom: 8px; }
.page-breadcrumb a { color: var(--mid); }
.page-progress-label { font-size: .8rem; color: var(--mid); }
.content-card-wrap {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px; margin-bottom: 24px;
}
.content-card-wrap h2 { font-size: 1.3rem; margin: 28px 0 10px; }
.content-card-wrap h2:first-child { margin-top: 0; }
.content-card-wrap h3 { font-size: 1.1rem; margin: 20px 0 8px; }
.content-card-wrap p { font-size: .95rem; color: var(--mid); margin-bottom: 14px; line-height: 1.7; }
.content-card-wrap ul, .content-card-wrap ol { padding-left: 20px; margin-bottom: 14px; }
.content-card-wrap li { font-size: .95rem; color: var(--mid); margin-bottom: 6px; line-height: 1.6; list-style: disc; }
.content-card-wrap ol li { list-style: decimal; }
.content-card-wrap strong { color: var(--dark); }
.video-wrap { position: relative; padding-top: 56.25%; margin: 16px 0; border-radius: var(--radius-sm); overflow: hidden; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.block-caption { font-size: .8rem; color: var(--light); text-align: center; margin-top: 6px; }
.code-block { background: #1e1e2e; color: #cdd6f4; padding: 20px; border-radius: var(--radius-sm); overflow-x: auto; font-size: .85rem; line-height: 1.6; margin: 16px 0; }
blockquote { border-left: 4px solid var(--primary); padding: 12px 20px; background: var(--primary-light); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 16px 0; }
blockquote cite { display: block; font-size: .8rem; color: var(--light); margin-top: 8px; font-style: normal; }
.callout { padding: 14px 18px; border-radius: var(--radius-sm); margin: 16px 0; font-size: .9rem; }
.callout-info    { background: var(--primary-light); border-left: 4px solid var(--primary); color: var(--primary-dark); }
.callout-success { background: var(--success-light); border-left: 4px solid var(--success); color: #1e7e34; }
.callout-warning { background: var(--warning-light); border-left: 4px solid var(--warning); color: #92600a; }
.callout-error   { background: var(--error-light);   border-left: 4px solid var(--error);   color: #c62828; }
.action-card {
  background: var(--white); border: 2px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-top: 24px;
}
.action-card-guest { opacity: .6; pointer-events: none; }
.action-title { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.action-form { display: flex; flex-direction: column; gap: 12px; }
.action-checkbox { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.action-done-icon { color: var(--success); font-size: 1.5rem; }
.action-completed { display: flex; align-items: center; gap: 8px; color: var(--success); font-weight: 600; }
.course-page-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; border-top: 1px solid var(--border); margin-top: 24px;
}

/* ============================================================
   TEST PAGE
   ============================================================ */
.test-page { min-height: 100vh; background: var(--bg); }
.test-header {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 12px 0; position: sticky; top: 0; z-index: 50;
}
.test-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.test-name { font-size: .9rem; font-weight: 600; color: var(--dark); }
.test-locked {
  text-align: center; padding: 80px 20px;
  background: var(--white); border-radius: var(--radius); border: 1px solid var(--border);
  max-width: 480px; margin: 60px auto;
}
.warning-screen {
  max-width: 600px; margin: 40px auto; padding: 0 24px;
}
.violation-banner {
  background: var(--error-light); border: 2px solid var(--error);
  border-radius: var(--radius-sm); padding: 10px 16px;
  font-size: .85rem; color: #c62828; margin-bottom: 12px;
  display: none;
}
.violation-banner.show { display: block; }
.timer-wrap { display: flex; align-items: center; gap: 10px; }
.timer-svg { transform: rotate(-90deg); }
.timer-track { fill: none; stroke: var(--border); stroke-width: 3; }
.timer-fill  { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke .3s; }
.countdown { font-size: 1rem; font-weight: 700; min-width: 28px; text-align: center; }
.options-list { display: flex; flex-direction: column; gap: 10px; margin: 24px 0; }
.option-item {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px; border: 2px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
  transition: all .15s; user-select: none; background: var(--white);
}
.option-item:hover { border-color: var(--primary); background: var(--primary-light); }
.option-item.selected { border-color: var(--primary); background: var(--primary-light); }
.option-item.correct   { border-color: var(--success); background: var(--success-light); }
.option-item.incorrect { border-color: var(--error);   background: var(--error-light); }
.option-key {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; color: var(--mid); flex-shrink: 0;
}
.option-text { font-size: .95rem; color: var(--dark); flex: 1; }
.score-ring-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; }

/* ============================================================
   RESULT PAGE
   ============================================================ */
.result-hero {
  background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
  padding: 60px 0; text-align: center; color: var(--white);
}
.result-hero h1 { color: var(--white); font-size: 2rem; margin-bottom: 8px; }
.score-ring { position: relative; display: inline-block; }
.result-stats { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin: 24px 0; }
.stat-box {
  text-align: center; background: rgba(255,255,255,.15);
  border-radius: var(--radius-sm); padding: 14px 20px; min-width: 90px;
}
.stat-box .val   { font-size: 1.5rem; font-weight: 800; display: block; color: var(--white); }
.stat-box .lbl   { font-size: .7rem; text-transform: uppercase; letter-spacing: .8px; opacity: .8; color: var(--white); }
.stat-box-warn   { background: var(--warning-light); }
.stat-box-warn .val { color: var(--dark); }
.stat-box-warn .lbl { color: var(--mid); }
.result-body { padding: 40px 0; }
.result-list { display: flex; flex-direction: column; gap: 16px; margin: 24px 0; }
.result-item { display: flex; align-items: center; gap: 12px; }
.result-meta { font-size: .85rem; color: var(--mid); }
.result-cta  { text-align: center; padding: 32px 0; }
.grade-badge-lg { font-size: 4rem; line-height: 1; display: block; margin-bottom: 8px; }
.grade-badge-sm { font-size: 1.2rem; }
.grade-badge-inline { font-size: 1.4rem; }
.grade-label { font-weight: 700; font-size: 1.2rem; color: var(--dark); }
.grade-level { font-size: .8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--light); }
.grade-banner { background: var(--warning-light); border: 2px solid var(--warning); border-radius: var(--radius); padding: 20px; text-align: center; margin: 20px 0; }
.passed { color: var(--success); }
.failed { color: var(--error);   }
.score-val  { font-size: 3rem; font-weight: 800; display: block; }
.score-sub  { font-size: .85rem; color: var(--mid); }
.score-banner { background: var(--error-light); border: 2px solid var(--error-light); border-radius: var(--radius); padding: 20px; text-align: center; margin: 16px 0; }
.pass-needed { font-size: .85rem; color: var(--error); font-weight: 600; }
.attempt-summary { font-size: .85rem; color: var(--mid); }
.tip-box { background: var(--primary-light); border-left: 4px solid var(--primary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 14px 18px; margin: 16px 0; }
.tip-list { padding-left: 18px; margin-top: 8px; }
.tip-list li { font-size: .9rem; color: var(--mid); margin-bottom: 5px; list-style: disc; }
.info-box { background: var(--success-light); border-left: 4px solid var(--success); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 14px 18px; margin: 16px 0; }
.info-box p { font-size: .9rem; color: var(--mid); margin: 0; }
.first-attempt { background: var(--primary-light); border: 1px solid #c5cae9; border-radius: var(--radius-sm); padding: 10px 16px; text-align: center; margin: 12px 0; }
.first-attempt p { font-size: .85rem; color: var(--primary); font-weight: 600; margin: 0; }
.first-attempt-badge { display: inline-flex; align-items: center; gap: 6px; background: #fff3cd; border: 1px solid var(--warning); border-radius: 20px; padding: 4px 12px; font-size: .8rem; font-weight: 600; color: #856404; }
.renew-box { background: var(--success-light); border-left: 4px solid var(--success); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 14px 18px; margin: 16px 0; }
.renew-box p { font-size: .9rem; color: var(--mid); margin: 0; }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-page {
  min-height: calc(100vh - var(--nav-h)); display: flex;
  align-items: center; justify-content: center; padding: 40px 20px;
  background: var(--bg);
}
.auth-container {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--border); padding: 40px;
  width: 100%; max-width: 440px; box-shadow: var(--shadow-md);
}
.auth-brand { text-align: center; margin-bottom: 28px; }
.auth-logo { height: 40px; margin: 0 auto 12px; }
.auth-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 4px; }
.auth-subtitle { color: var(--mid); font-size: .9rem; }
.social-login-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  font-size: .8rem; color: var(--light); margin: 16px 0;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.auth-form { display: flex; flex-direction: column; }
.auth-footer-links { text-align: center; font-size: .85rem; color: var(--mid); margin-top: 16px; }

/* ============================================================
   CERTIFICATE PAGE
   ============================================================ */
.certificate-page { padding: 40px 0; }
.cert-wrap { max-width: 900px; margin: 0 auto; }
.cert-display-wrap {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  margin-bottom: 24px; text-align: center;
  box-shadow: var(--shadow-md);
}
.cert-image { width: 100%; height: auto; display: block; }
.cert-image-wrap { position: relative; }
.cert-expired-banner {
  background: var(--error-light); border-bottom: 2px solid var(--error);
  padding: 10px 20px; text-align: center; font-size: .85rem;
  color: #c62828; font-weight: 600;
}
.banner-expired { background: var(--error); color: var(--white); padding: 8px 16px; font-size: .85rem; font-weight: 600; }
.cert-actions-bar {
  display: flex; flex-wrap: wrap; gap: 10px;
  align-items: center; justify-content: center;
  padding: 20px; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 24px;
}
.cert-details-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; margin-bottom: 24px;
}
.cert-detail-row { display: flex; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.cert-detail-row:last-child { border-bottom: none; }
.cert-detail-label { font-size: .8rem; font-weight: 600; color: var(--light); text-transform: uppercase; letter-spacing: .6px; min-width: 140px; }
.cert-detail-value { font-size: .9rem; color: var(--dark); }
.cert-id-block { background: var(--bg); border-radius: var(--radius-sm); padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cert-id-mono { font-family: var(--font-mono); font-size: .9rem; color: var(--dark); font-weight: 600; }
.copy-btn { background: none; border: none; cursor: pointer; font-size: .8rem; color: var(--primary); padding: 4px 8px; border-radius: var(--radius-xs); transition: background .12s; }
.copy-btn:hover { background: var(--primary-light); }
.cert-qr-wrap { text-align: center; margin: 16px 0; }
.cert-qr { max-width: 120px; border: 1px solid var(--border); border-radius: var(--radius-xs); }
.qr-label { font-size: .75rem; color: var(--light); margin-top: 6px; }
.cert-proctored-badge, .badge-proctor {
  display: inline-flex; align-items: center; gap: 6px;
  background: #e8f5e9; border: 1px solid #a5d6a7;
  color: #2e7d32; font-size: .75rem; font-weight: 600;
  padding: 5px 12px; border-radius: 20px;
}
.cert-first-attempt {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff3e0; border: 1px solid #ffcc80;
  color: #e65100; font-size: .75rem; font-weight: 600;
  padding: 5px 12px; border-radius: 20px;
}
.badges-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.cert-pdf-unlock { margin: 24px 0; }
.unlock-options { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.unlock-option {
  border: 2px solid var(--border); border-radius: var(--radius); padding: 20px;
  transition: border-color .15s;
}
.unlock-option:hover { border-color: var(--primary); }
.unlock-option-num { font-size: 1.4rem; margin-bottom: 8px; }
.unlock-option-header { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.cert-pdf-progress { background: var(--bg); border-radius: var(--radius-xs); height: 6px; overflow: hidden; margin: 8px 0; }
.unlock-progress-text { font-size: .8rem; color: var(--mid); margin-bottom: 12px; }
.review-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.review-platform {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--white);
}
.review-platform-info { display: flex; align-items: center; gap: 10px; }
.review-platform-name { font-size: .875rem; font-weight: 600; }
.review-done { opacity: .5; }
.review-submit-form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.review-url-input { flex: 1; }
.review-progress-bar { background: var(--border); height: 6px; border-radius: 3px; overflow: hidden; margin: 8px 0; }
.review-steps { display: flex; flex-direction: column; gap: 12px; }
.step { display: flex; align-items: flex-start; gap: 12px; }
.step-num {
  background: var(--primary); color: var(--white); border-radius: 50%;
  width: 26px; height: 26px; min-width: 26px; display: flex;
  align-items: center; justify-content: center; font-size: .8rem; font-weight: 700;
}
.step-text { font-size: .9rem; color: var(--mid); padding-top: 3px; line-height: 1.5; }
.pdf-unlock { background: var(--warning-light); border: 1px solid var(--warning); border-radius: var(--radius-sm); padding: 16px; margin: 16px 0; }
.pdf-unlock p { font-size: .875rem; color: var(--mid); margin: 0; }
.share-section { background: var(--bg); border-radius: var(--radius-sm); padding: 16px; margin: 16px 0; }
.share-link { font-family: var(--font-mono); font-size: .8rem; color: var(--primary); word-break: break-all; display: block; margin-top: 6px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.skill-tag {
  background: var(--primary-light); color: var(--primary);
  font-size: .75rem; font-weight: 600; padding: 3px 10px;
  border-radius: 12px; border: 1px solid #c3d9fd;
}
.skills-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }

/* ============================================================
   VERIFY CERTIFICATE PAGE
   ============================================================ */
.verify-page { min-height: calc(100vh - var(--nav-h)); padding: 60px 0; background: var(--bg); }
.verify-header { text-align: center; margin-bottom: 40px; }
.verify-logo { height: 48px; margin: 0 auto 16px; }
.verify-subtitle { color: var(--mid); font-size: 1rem; }
.verify-form { max-width: 480px; margin: 0 auto 40px; display: flex; gap: 10px; }
.verify-input { flex: 1; padding: 11px 16px; border: 1.5px solid var(--border); border-radius: 24px; font-size: .9rem; outline: none; }
.verify-input:focus { border-color: var(--primary); }
.verify-result { max-width: 600px; margin: 0 auto; }
.verify-status-banner {
  border-radius: var(--radius); padding: 24px; text-align: center; margin-bottom: 24px;
}
.verify-valid   { background: var(--success-light); border: 2px solid var(--success); }
.verify-expired { background: var(--warning-light); border: 2px solid var(--warning); }
.verify-invalid { background: var(--error-light);   border: 2px solid var(--error);   }
.verify-status-icon { font-size: 2.5rem; display: block; margin-bottom: 8px; }
.verify-status-label { font-size: 1.2rem; font-weight: 700; }
.verify-status-sub { font-size: .85rem; color: var(--mid); margin-top: 4px; }
.verify-details { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.verify-row { display: flex; padding: 10px 0; border-bottom: 1px solid var(--border); }
.verify-row:last-child { border-bottom: none; }
.verify-label { font-size: .8rem; font-weight: 600; color: var(--light); text-transform: uppercase; min-width: 140px; }
.verify-value { font-size: .9rem; color: var(--dark); }
.verify-name  { font-size: 1.1rem; font-weight: 700; }
.verify-url   { font-size: .85rem; color: var(--primary); word-break: break-all; }
.verify-note  { font-size: .8rem; color: var(--light); margin-top: 4px; }
.verify-note-inline { font-size: .8rem; color: var(--light); }
.verify-footer { text-align: center; margin-top: 24px; font-size: .85rem; color: var(--light); }

/* ============================================================
   DASHBOARD
   ============================================================ */
.dashboard-page { padding: 40px 0; }
.dashboard-header { margin-bottom: 32px; }
.dashboard-user { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.dashboard-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.dashboard-avatar-placeholder {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--primary); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 700;
}
.dashboard-name { font-size: 1.4rem; font-weight: 700; }
.dashboard-username { font-size: .85rem; color: var(--light); }
.stats-strip {
  display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 32px;
}
.stats-strip .stat-box {
  flex: 1; min-width: 110px; background: var(--white);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 16px; text-align: center;
}
.stats-strip .stat-box .val { color: var(--primary); }
.stats-strip .stat-box .lbl { color: var(--light); }
.dashboard-section { margin-bottom: 40px; }
.cert-list { display: flex; flex-direction: column; gap: 12px; }
.cert-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 20px;
  display: flex; align-items: center; gap: 16px;
  transition: box-shadow .15s;
}
.cert-card:hover { box-shadow: var(--shadow); }
.cert-card-left { flex-shrink: 0; font-size: 2rem; }
.cert-card-body { flex: 1; min-width: 0; }
.cert-title { font-size: .95rem; font-weight: 700; margin-bottom: 3px; }
.cert-meta { font-size: .8rem; color: var(--light); display: flex; gap: 12px; flex-wrap: wrap; }
.cert-dates { font-size: .78rem; color: var(--light); margin-top: 4px; }
.cert-badge { font-size: 1.2rem; }
.cert-expired { opacity: .6; }
.cert-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cert-row:last-child { border-bottom: none; }
.progress-list { display: flex; flex-direction: column; gap: 12px; }
.progress-item { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 18px; }
.progress-item-title { font-size: .9rem; font-weight: 600; margin-bottom: 8px; }
.progress-stats { font-size: .8rem; color: var(--light); margin-top: 6px; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; padding: 10px 14px; font-size: .78rem; text-transform: uppercase; letter-spacing: .6px; color: var(--light); border-bottom: 2px solid var(--border); }
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: .875rem; }
.data-table tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }

/* ============================================================
   LEADERBOARD
   ============================================================ */
.leaderboard-page { padding: 40px 0; }
.leaderboard-header { margin-bottom: 32px; text-align: center; }
.leaderboard-selector { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 20px 0; }
.leaderboard-test-info { text-align: center; margin-bottom: 24px; }
.leaderboard-table-wrap { overflow-x: auto; }
.leaderboard-table { width: 100%; border-collapse: collapse; }
.leaderboard-table th { padding: 10px 16px; font-size: .78rem; text-transform: uppercase; letter-spacing: .6px; color: var(--light); border-bottom: 2px solid var(--border); text-align: left; }
.leaderboard-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: .875rem; }
.leaderboard-table tr:last-child td { border-bottom: none; }
.leaderboard-table tr:hover td { background: var(--bg); }
.col-rank  { width: 60px; }
.col-learner { flex: 1; }
.col-score  { width: 90px; text-align: right; }
.col-grade  { width: 80px; }
.col-date   { width: 120px; }
.rank-num { font-weight: 800; font-size: 1rem; color: var(--mid); }
.leaderboard-name { font-weight: 600; }
.leaderboard-user { font-weight: 700; background: var(--primary-light) !important; }
.your-rank-banner { background: var(--primary-light); border: 1px solid var(--primary); border-radius: var(--radius-sm); padding: 14px 20px; margin: 16px 0; display: flex; align-items: center; justify-content: space-between; }
.leaderboard-optout { text-align: center; margin-top: 24px; font-size: .85rem; color: var(--light); }

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-page { padding: 0 0 60px; }
.profile-hero { background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%); padding: 48px 0 32px; }
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid var(--white); }
.profile-avatar-placeholder {
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(255,255,255,.3); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 700; border: 3px solid rgba(255,255,255,.5);
}
.profile-info { margin-top: 16px; }
.profile-name { font-size: 1.6rem; font-weight: 700; color: var(--white); }
.profile-handle { font-size: .85rem; color: rgba(255,255,255,.7); margin-top: 2px; }
.profile-bio { color: rgba(255,255,255,.85); font-size: .9rem; margin-top: 8px; max-width: 480px; }
.profile-stats { display: flex; gap: 24px; margin-top: 16px; }
.profile-stats .stat-item .stat-num { color: var(--white); }
.profile-stats .stat-item .stat-label { color: rgba(255,255,255,.7); }
.profile-section { padding: 32px 0; border-top: 1px solid var(--border); }
.profile-certs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.profile-cert-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.profile-cert-title { font-size: .9rem; font-weight: 700; margin-bottom: 4px; }
.profile-cert-meta { font-size: .78rem; color: var(--light); }
.profile-cert-body { margin-top: 8px; }
.profile-share { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.profile-owner-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.bio-edit-form { display: flex; flex-direction: column; gap: 10px; max-width: 480px; margin-top: 12px; }
.achievement-text { font-size: .85rem; color: var(--mid); }

/* ============================================================
   SEARCH PAGE
   ============================================================ */
.search-hero { background: var(--white); border-bottom: 1px solid var(--border); padding: 40px 0; }
.search-form-lg { display: flex; gap: 10px; max-width: 600px; margin: 0 auto; }
.search-type-pills { display: flex; gap: 8px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.result-hero .result-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 4px; }
.result-desc { font-size: .85rem; color: var(--mid); }
.result-thumb { width: 80px; height: 56px; border-radius: var(--radius-xs); object-fit: cover; flex-shrink: 0; }
.result-thumb-placeholder { width: 80px; height: 56px; background: var(--bg); border-radius: var(--radius-xs); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--dark); color: rgba(255,255,255,.7);
  padding: 48px 0 24px;
}
.footer-logo-link { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.footer-logo { height: 32px; width: auto; object-fit: contain; }
.logo-text { font-weight: 700; color: var(--white); }
.footer-tagline { font-size: .875rem; color: rgba(255,255,255,.5); margin-bottom: 24px; }
.footer-cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-col-title { font-size: .8rem; font-weight: 700; color: var(--white); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 14px; }
.site-footer ul li { margin-bottom: 8px; }
.site-footer a { color: rgba(255,255,255,.6); font-size: .875rem; text-decoration: none; }
.site-footer a:hover { color: var(--white); }
.footer-copy { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: .8rem; color: rgba(255,255,255,.4); }
.footer-trust { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-verify-note { font-size: .78rem; color: rgba(255,255,255,.4); margin-top: 12px; }

/* ============================================================
   CERTIFICATE TEMPLATE (for generated PNG/PDF)
   ============================================================ */
.cert-header { text-align: center; padding: 32px; }
.cert-headline { font-size: 2.2rem; font-weight: 800; color: var(--primary); }
.cert-subheadline { font-size: 1rem; color: var(--light); margin-top: 4px; }
.presented-to { text-align: center; margin: 16px 0; font-size: 1rem; color: var(--mid); }
.recipient-block { text-align: center; margin: 8px 0 16px; }
.recipient-name { font-size: 2rem; font-weight: 700; color: var(--dark); }
.recipient-email { font-size: .9rem; color: var(--light); margin-top: 4px; }
.cert-test-name { text-align: center; font-size: 1.2rem; color: var(--primary); font-weight: 600; margin: 8px 0; }
.cert-footer { display: flex; justify-content: space-between; align-items: flex-end; padding: 24px 32px; }
.sig-block { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sig-img { height: 48px; }
.sig-line { width: 140px; height: 1px; background: var(--dark); }
.sig-name { font-size: .8rem; font-weight: 700; color: var(--dark); }
.sig-title { font-size: .75rem; color: var(--light); }
.qr-block { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.frame-outer { border: 6px solid var(--primary); border-radius: 4px; padding: 8px; }
.frame-inner { border: 2px solid var(--primary-light); border-radius: 2px; padding: 4px; }
.watermark { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); font-size: .7rem; color: var(--light); letter-spacing: 1px; }
.corner { position: absolute; width: 28px; height: 28px; }
.corner-tl { top: 8px; left: 8px;  border-top: 3px solid var(--primary); border-left: 3px solid var(--primary); }
.corner-tr { top: 8px; right: 8px; border-top: 3px solid var(--primary); border-right: 3px solid var(--primary); }
.corner-bl { bottom: 8px; left: 8px;  border-bottom: 3px solid var(--primary); border-left: 3px solid var(--primary); }
.corner-br { bottom: 8px; right: 8px; border-bottom: 3px solid var(--primary); border-right: 3px solid var(--primary); }
.cert-name  { font-weight: 700; color: var(--dark); }
.cert-label { font-size: .75rem; color: var(--light); text-transform: uppercase; letter-spacing: .6px; }
.cert-id    { font-family: var(--font-mono); font-size: .85rem; font-weight: 600; }
.cert-title-block { text-align: center; }
.issuer-logo { height: 36px; margin: 0 auto 8px; }
.small-note { font-size: .8rem; color: var(--light); }
.mono { font-family: var(--font-mono); }

/* ============================================================
   ADS
   ============================================================ */
.ad-slot { text-align: center; padding: 12px 0; min-height: 90px; }
.ad-slot-top { border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.ad-slot-bottom { border-top: 1px solid var(--border); margin-top: 24px; }

/* ============================================================
   UTILITIES
   ============================================================ */
.hidden  { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-muted  { color: var(--light); font-size: .875rem; }
.mt-0  { margin-top: 0; }
.mt-1  { margin-top: 8px; }
.mt-2  { margin-top: 16px; }
.mt-3  { margin-top: 24px; }
.mt-4  { margin-top: 32px; }
.mb-0  { margin-bottom: 0; }
.mb-2  { margin-bottom: 16px; }
.mb-3  { margin-bottom: 24px; }
.divider { height: 1px; background: var(--border); margin: 24px 0; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 10px; font-size: .75rem; font-weight: 600; }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: #856404; }
.badge-error   { background: var(--error-light);   color: var(--error);  }
.badge-info    { background: var(--primary-light);  color: var(--primary);}
.icon { display: inline-block; }
.progress-bar-done { background: var(--success) !important; }
.stat-row { display: flex; gap: 16px; flex-wrap: wrap; margin: 16px 0; }
.bg-layer { position: absolute; inset: 0; z-index: 0; }
.greeting { font-size: 1.1rem; font-weight: 600; color: var(--dark); }
.count { font-size: .85rem; color: var(--light); }
.days { font-size: 3rem; font-weight: 800; color: var(--warning); display: block; }
.days-lbl { font-size: .75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--light); }
.expiry { font-size: .85rem; color: var(--mid); }
.val { font-size: 1.4rem; font-weight: 800; display: block; }
.lbl { font-size: .7rem; text-transform: uppercase; letter-spacing: .8px; color: var(--light); }
.score { font-size: 1.4rem; font-weight: 800; color: var(--dark); }
.alt-box { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; text-align: center; }
.platform-list { list-style: none; }
.error-page { min-height: calc(100vh - var(--nav-h)); display: flex; align-items: center; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .unlock-options { grid-template-columns: 1fr; }
  .course-sidebar { width: 240px; padding: 16px 12px; }
  .course-main { padding: 24px 20px; }
}

@media (max-width: 768px) {
  .navbar-links, .navbar-search { display: none; }
  .navbar-hamburger { display: flex; }
  .navbar-mobile { display: none; }
  .navbar-mobile.open { display: flex; }
  .hero h1 { font-size: 1.8rem; }
  .course-layout { flex-direction: column; }
  .course-sidebar { width: 100%; height: auto; position: static; border-right: none; border-bottom: 1px solid var(--border); }
  .auth-container { padding: 28px 20px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .stats-bar .container { gap: 24px; }
  .result-stats { gap: 12px; }
  .cert-actions-bar { flex-direction: column; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero { padding: 48px 0; }
  .hero h1 { font-size: 1.5rem; }
  .footer-cols { grid-template-columns: 1fr; }
  .profile-stats { gap: 16px; }
  .stats-strip { gap: 8px; }
  .stats-strip .stat-box { min-width: 80px; }
  .btn { padding: 9px 16px; font-size: .825rem; }
  .auth-container { margin: 0 8px; }
}

/* ============================================================
   SUPPLEMENTAL — missing classes from template audit
   ============================================================ */

/* Buttons */
.btn-lg        { padding: 13px 28px; font-size: 1rem; }
.btn-block     { width: 100%; display: flex; justify-content: center; }
.btn-google    { background: #fff; color: var(--dark); border-color: var(--border); }
.btn-google:hover  { background: #f7f7f7; border-color: var(--mid); }
.btn-facebook  { background: #1877f2; color: #fff; border-color: #1877f2; }
.btn-facebook:hover { background: #1560cc; color: #fff; }
.btn-linkedin  { background: #0a66c2; color: #fff; border-color: #0a66c2; }
.btn-linkedin:hover { background: #084ea3; color: #fff; }

/* Cards — generic */
.card-header   { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-body     { padding: 20px; }
.card-footer   { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--bg); }
.card-title    { font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: 4px; }
.card-desc     { font-size: .85rem; color: var(--light); line-height: 1.5; margin-bottom: 10px; }
.card-meta     { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: .78rem; color: var(--light); }
.card-stats    { display: flex; gap: 12px; flex-wrap: wrap; font-size: .78rem; color: var(--light); margin-top: 8px; }
.card-thumb    { width: 100%; height: 160px; object-fit: cover; border-bottom: 1px solid var(--border); }
.card-thumb-placeholder {
  width: 100%; height: 160px; background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; border-bottom: 1px solid var(--border);
}
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.content-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; margin-bottom: 20px;
  box-shadow: var(--shadow);
}

/* Category pills alias */
.category-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }

/* Containers */
.container-narrow { max-width: 640px; margin: 0 auto; padding: 0 24px; }

/* Course content area */
.course-content { flex: 1; min-width: 0; padding: 32px 40px; }

/* Footer */
.footer-grid    { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand   { display: flex; flex-direction: column; }
.footer-col     { display: flex; flex-direction: column; }
.footer-heading { font-size: .78rem; font-weight: 700; color: var(--white); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 12px; }
.footer-links   { display: flex; flex-direction: column; gap: 8px; }
.footer-desc    { font-size: .85rem; color: rgba(255,255,255,.5); line-height: 1.6; margin-bottom: 16px; }
.footer-bottom  { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }

/* Forms */
.form-control  {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: .9rem; font-family: inherit;
  background: var(--white); transition: border-color .15s; outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,115,232,.12); }
.form-label    { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 6px; color: var(--dark); }

/* Flash (alias without type suffix) */
.flash { padding: 12px 16px; border-radius: var(--radius-sm); font-size: .9rem; margin-bottom: 16px; }

/* Grade dynamic classes */
.grade-bronze  { color: #cd7f32; }
.grade-silver  { color: #9e9e9e; }
.grade-gold    { color: #f0a500; }
.grade-diamond { color: #00bcd4; }
.grade-badge   { display: inline-block; font-size: 1.8rem; line-height: 1; }
.grade-emoji   { font-size: 2rem; display: block; margin-bottom: 6px; }

/* Hero extras */
.hero-title    { font-size: 2.5rem; font-weight: 800; color: var(--white); margin-bottom: 14px; }
.hero-subtitle { font-size: 1.1rem; color: rgba(255,255,255,.85); margin-bottom: 28px; max-width: 520px; margin-left: auto; margin-right: auto; }
.hero-search   { max-width: 480px; margin: 0 auto 24px; display: flex; gap: 8px; }
.hero-stats    { display: flex; gap: 32px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.hero-stat     { text-align: center; }

/* Navbar aliases */
.navbar-nav    { display: flex; align-items: center; gap: 4px; }
.navbar-actions { display: flex; align-items: center; gap: 8px; }
.site-header   { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }

/* Progress bar variants */
.progress-bar-wrap { background: var(--border); border-radius: 4px; height: 8px; overflow: hidden; margin: 8px 0; }

/* Question card (test page) */
.test-container { max-width: 700px; margin: 32px auto; padding: 0 24px; }
.question-card  {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.question-number  { font-size: .78rem; font-weight: 600; color: var(--light); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 8px; }
.question-section { font-size: .78rem; color: var(--primary); font-weight: 600; margin-bottom: 6px; }
.question-text    { font-size: 1.1rem; font-weight: 600; color: var(--dark); line-height: 1.5; margin-bottom: 4px; }
.question-timer   { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* Sections */
.section-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.section-sub   { font-size: .95rem; color: var(--light); margin-bottom: 24px; }

/* Sidebar items */
.sidebar-item  { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); font-size: .85rem; font-weight: 500; color: var(--mid); transition: all .12s; text-decoration: none; }
.sidebar-item:hover { background: var(--bg); color: var(--dark); }

/* Stats */
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; }
.stat-value { font-size: 1.8rem; font-weight: 800; color: var(--primary); display: block; }

/* Text utilities */
.text-small { font-size: .8rem; color: var(--light); }

/* Verify icon */
.verify-icon { font-size: 2.5rem; display: block; margin-bottom: 8px; }

/* Warnings, welcome */
.warning-list { display: flex; flex-direction: column; gap: 8px; padding-left: 0; list-style: none; }
.warning-list li { display: flex; gap: 10px; font-size: .9rem; color: var(--mid); padding: 8px 0; border-bottom: 1px solid var(--border); }
.warning-list li:last-child { border-bottom: none; }
.welcome-icon { font-size: 3rem; display: block; text-align: center; margin-bottom: 16px; }

/* Email template classes (for HTML email previews) */
.email-wrapper { background: #f1f3f4; padding: 32px 16px; }
.email-card    { background: #fff; border-radius: 12px; max-width: 560px; margin: 0 auto; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.email-header  { padding: 32px 40px 28px; text-align: center; }
.email-body    { padding: 32px 40px 24px; }
.email-footer  { padding: 20px 40px; text-align: center; border-top: 1px solid #e8eaed; background: #f8f9fa; }

/* Cert actions (inside certificate page) */
.cert-actions  { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* Responsive additions */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .course-content { padding: 24px 20px; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .test-container { padding: 0 16px; }
  .cards-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; }
  .hero-title { font-size: 1.8rem; }
}

/* ============================================================
   FIX PASS — navbar logo size, hero span, counters
   ============================================================ */

/* Ensure navbar logo never overflows */
.navbar-logo {
  height: 32px !important;
  width: auto !important;
  max-width: 140px !important;
  object-fit: contain;
  display: block;
}
.navbar-brand img {
  height: 32px !important;
  width: auto !important;
  max-width: 140px !important;
}

/* Hero accent span */
.hero-title span { color: var(--warning); }

/* Stats counter — show immediately before JS animation */
[data-target] { display: inline-block; min-width: 2ch; }

/* Counter shows seed value server-rendered, JS animates from 0 */
.stat-count { font-weight: 800; }

/* Verify page standalone lookup form */
.verify-form {
  display: flex; gap: 10px; max-width: 480px; margin: 0 auto 32px;
}
.verify-form .verify-input { flex: 1; }

/* Courses listing page - ensure card-thumb image contained */
.card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

/* Fix inline style on test thumb in index.php */
.card-thumb { position: relative; overflow: hidden; }
.card-thumb img.thumb-img {
  width: 100%; height: 100%;
  object-fit: cover;
  margin-top: 0 !important;
  position: static !important;
}

/* Navbar inner layout fix - prevent logo from pushing links off */
.navbar-inner {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
}
.navbar-brand { flex-shrink: 0 !important; }
.navbar-links { flex: 1 !important; overflow: hidden; }
.navbar-search { flex-shrink: 0; }
.navbar-auth   { flex-shrink: 0; }

/* ============================================================
   FIX PASS — navbar logo, hero, counters, verify, courses
   ============================================================ */

/* Navbar logo - hard cap so SVG/PNG never blows up */
.navbar-logo,
.navbar-brand img {
  height: 32px !important;
  width: auto !important;
  max-width: 140px !important;
  object-fit: contain;
  display: block;
}

/* Navbar inner — flex with no overflow */
.navbar-inner {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
  overflow: hidden;
}
.navbar-brand { flex-shrink: 0 !important; max-width: 200px; }
.navbar-links { flex: 1 !important; min-width: 0; overflow: hidden; }
.navbar-search { flex-shrink: 0; min-width: 0; }
.navbar-auth   { flex-shrink: 0; white-space: nowrap; }
.navbar-hamburger { flex-shrink: 0; margin-left: auto; }

/* Hero title accent span */
.hero-title span { color: #fbbc04; }

/* Counters — visible immediately, JS animates */
[data-target] { display: inline; }

/* Verify form layout */
.verify-form {
  display: flex; gap: 10px; max-width: 480px; margin: 0 auto 32px;
}
.verify-form .verify-input { flex: 1; }

/* Card thumbnails */
.card-thumb { position: relative; overflow: hidden; height: 160px; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-thumb-placeholder { height: 160px; }

/* ============================================================
   COMPREHENSIVE RESPONSIVE OVERHAUL
   Covers: navbar, all pages, forms, tables, cards, test page,
   cert page, dashboard, profile, leaderboard, search
   ============================================================ */

/* === TABLET (max 900px) === */
@media (max-width: 900px) {
  /* Navbar */
  .navbar-search { display: none; }
  .navbar-site-name { font-size: .85rem; }

  /* Auth */
  .auth-page { padding: 24px 16px; align-items: flex-start; }

  /* Dashboard stats */
  .stats-strip { grid-template-columns: repeat(2, 1fr); display: grid; }
  .dash-cols { flex-direction: column; }

  /* Profile */
  .profile-hero .container { text-align: center; }
  .profile-stats { justify-content: center; }
  .profile-certs { grid-template-columns: 1fr; }

  /* Certificate */
  .cert-wrap { padding: 0 16px; }
  .unlock-options { grid-template-columns: 1fr; }
  .cert-detail-row { flex-direction: column; gap: 4px; }
  .cert-detail-label { min-width: auto; }

  /* Leaderboard */
  .leaderboard-selector { gap: 6px; }
  .col-date { display: none; }

  /* Test */
  .test-container { padding: 0 16px; }
  .question-card { padding: 20px; }

  /* Result */
  .result-hero { padding: 40px 0; }
  .result-stats { gap: 8px; }
  .stat-box { padding: 12px 10px; min-width: 80px; }
  .stat-box .val { font-size: 1.3rem; }

  /* Tables */
  .data-table th:nth-child(n+4),
  .data-table td:nth-child(n+4) { display: none; }
}

/* === MOBILE (max 768px) === */
@media (max-width: 768px) {
  /* Layout */
  .container, .container-sm, .container-lg { padding: 0 16px; }

  /* Navbar */
  .navbar-links { display: none; }
  .navbar-hamburger { display: flex; }
  .navbar-inner { padding: 0 16px; }

  /* Course layout */
  .course-layout { flex-direction: column; }
  .course-sidebar {
    width: 100%; height: auto; position: static;
    border-right: none; border-bottom: 1px solid var(--border);
    padding: 16px;
  }
  .course-sidebar .sidebar-nav { display: flex; flex-wrap: wrap; gap: 6px; }
  .course-sidebar .sidebar-nav li { flex: 0 0 auto; }
  .course-sidebar .sidebar-nav li a { padding: 6px 12px; font-size: .78rem; }
  .course-main, .course-content { padding: 20px 16px; }
  .content-card-wrap { padding: 20px; }

  /* Cards */
  .card-grid, .cards-grid { grid-template-columns: 1fr; }
  .card-meta { flex-wrap: wrap; gap: 4px; }

  /* Auth */
  .auth-container { padding: 24px 20px; max-width: 100%; }
  .social-login-group .btn-social { padding: 10px 14px; }

  /* Certificate */
  .cert-actions-bar { flex-direction: column; align-items: stretch; }
  .cert-actions-bar .btn { text-align: center; justify-content: center; }
  .cert-qr-wrap { display: none; }
  .unlock-options { grid-template-columns: 1fr; gap: 12px; }

  /* Dashboard */
  .stats-strip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cert-list { gap: 10px; }
  .cert-card { flex-direction: column; align-items: flex-start; }
  .cert-card .btn { width: 100%; justify-content: center; }

  /* Result page */
  .result-hero { padding: 32px 0; }
  .result-stats { grid-template-columns: repeat(2, 1fr); display: grid; gap: 8px; }
  .grade-badge-lg { font-size: 3rem; }

  /* Test page */
  .test-header .container { flex-wrap: wrap; gap: 8px; }
  .options-list { gap: 8px; }
  .option-item { padding: 12px 14px; }
  .option-text { font-size: .875rem; }

  /* Leaderboard */
  .leaderboard-table th:nth-child(n+4),
  .leaderboard-table td:nth-child(n+4) { display: none; }
  .your-rank-banner { flex-direction: column; gap: 8px; }

  /* Profile */
  .profile-hero { padding: 32px 0 24px; }
  .profile-name { font-size: 1.3rem; }
  .profile-avatar, .profile-avatar-placeholder { width: 64px; height: 64px; font-size: 1.6rem; }
  .bio-edit-form { max-width: 100%; }

  /* Search */
  .search-form-lg { flex-direction: column; }
  .search-form-lg .btn { width: 100%; justify-content: center; }

  /* Footer */
  .footer-cols, .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-copy { flex-direction: column; text-align: center; gap: 8px; }
  .footer-trust { justify-content: center; }

  /* Verify page */
  .verify-form { flex-direction: column; }
  .verify-form .btn { width: 100%; justify-content: center; }
  .verify-row { flex-direction: column; gap: 4px; }
  .verify-label { min-width: auto; }

  /* Flash */
  .flash-banner .container { flex-wrap: wrap; gap: 8px; }

  /* Typography scale down */
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.3rem; }
  .listing-title { font-size: 1.5rem; }
  .dashboard-name { font-size: 1.2rem; }
}

/* === SMALL MOBILE (max 480px) === */
@media (max-width: 480px) {
  /* Containers */
  .container { padding: 0 12px; }

  /* Buttons */
  .btn { padding: 9px 14px; font-size: .82rem; }
  .btn-lg { padding: 11px 20px; font-size: .9rem; }
  .hero-buttons { flex-direction: column; }

  /* Navbar */
  .navbar { height: 56px; }
  .navbar-logo { height: 28px; }
  :root { --nav-h: 56px; }

  /* Stats */
  .stats-strip { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .stats-strip .stat-box { padding: 14px 10px; }
  .stats-strip .stat-box .val { font-size: 1.4rem; }

  /* Test */
  .question-card { padding: 16px; }
  .question-text { font-size: 1rem; }
  .option-key { width: 28px; height: 28px; font-size: .75rem; }
  .test-name { font-size: .8rem; }
  .countdown { font-size: .9rem; min-width: 24px; }

  /* Cert page */
  .cert-details-card { padding: 16px; }
  .cert-detail-row { padding: 8px 0; }
  .cert-id-mono { font-size: .78rem; }

  /* Dashboard */
  .cert-card { padding: 14px; }
  .cert-card-left { font-size: 1.5rem; }

  /* Auth */
  .auth-container { padding: 20px 16px; margin: 0; border-radius: 0; border-left: none; border-right: none; }
  .auth-page { padding: 0; align-items: flex-start; }
  .auth-page .container { padding: 0; }

  /* Tables scrollable */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table { min-width: 500px; }
  .leaderboard-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .leaderboard-table { min-width: 400px; }

  /* Footer */
  .footer-cols, .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .site-footer { padding: 32px 0 20px; }

  /* Progress bar label */
  .progress-label { font-size: .7rem; }

  /* Profile certs */
  .profile-certs { grid-template-columns: 1fr; }
  .profile-share, .profile-owner-actions { flex-direction: column; }
  .profile-share .btn, .profile-owner-actions .btn { width: 100%; justify-content: center; }

  /* Grade grid on leaderboard/result */
  .result-stats { grid-template-columns: repeat(2, 1fr); }
  .stat-box .val { font-size: 1.2rem; }
  .stat-box .lbl { font-size: .65rem; }
}

/* === TOUCH IMPROVEMENTS === */
@media (hover: none) and (pointer: coarse) {
  .option-item { min-height: 52px; }
  .btn { min-height: 44px; }
  .nav-link { padding: 10px 14px; }
  .mobile-nav-link { padding: 16px 0; min-height: 52px; }
  .sidebar-nav li a { min-height: 44px; }
  .dropdown-item { min-height: 48px; }
}

/* === PRINT STYLES (for certificates) === */
@media print {
  .navbar, .site-footer, .cert-actions-bar,
  .cert-pdf-unlock, .flash-banner { display: none !important; }
  .cert-display-wrap { box-shadow: none; border: none; }
  body { background: #fff; }
}

/* ============================================================
   CARD THUMBNAIL — always-visible, never broken layout
   ============================================================ */
.card-thumb-wrap {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--primary-light);
}
.card-thumb-wrap a {
  display: block;
  width: 100%;
  height: 100%;
}
.card-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f0fe 0%, #d2e3fc 100%);
  font-size: 3rem;
}
.card-badge-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: .72rem;
  font-weight: 700;
  z-index: 1;
}

/* ============================================================
   NAVBAR — ensure mobile nav hidden without JS dependency
   ============================================================ */
.navbar-mobile {
  display: none !important;
}
.navbar-mobile.open {
  display: flex !important;
}

/* ============================================================
   LISTING PAGE LAYOUT — explicit grid so no CSS cascade issues
   ============================================================ */
.listing-page {
  padding: 40px 0 60px;
}
.listing-page .card-grid,
.listing-page .content-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.listing-page .card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.listing-page .card-body {
  padding: 16px 20px;
}
.listing-page .card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.listing-page .card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.listing-page .card-title a {
  color: var(--dark);
  text-decoration: none;
}
.listing-page .card-title a:hover {
  color: var(--primary);
}
.listing-page .card-desc {
  font-size: .875rem;
  color: var(--mid);
  line-height: 1.6;
  margin-bottom: 10px;
}

/* ============================================================
   REGISTER / LOGIN PAGE — explicit layout
   ============================================================ */
.auth-page {
  min-height: calc(100vh - 64px);
  background: var(--bg);
  padding: 48px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.auth-container {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.auth-page h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 6px;
}

/* Register page logo banner — prevent SVG from rendering huge */
.auth-page .auth-brand img {
  height: 48px !important;
  width: auto !important;
  max-width: 200px !important;
  object-fit: contain !important;
}

@media (max-width: 600px) {
  .listing-page .card-grid {
    grid-template-columns: 1fr;
  }
  .auth-page {
    padding: 20px 12px;
    align-items: flex-start;
  }
  .auth-container {
    padding: 24px 16px;
  }
}
