/* Tutoria Indonesia — brand system (aligned with static landing) */
:root {
  --ink: #10203D;
  --brand: #2C64F0;
  --brand-dark: #1E4FCB;
  --brand-light: #5C87F5;
  --sky: #EEF3FF;
  --silver: #D3D8DF;
  --slate: #5C6773;
  --white: #FFFFFF;
  --foam: #F7FAFC;
  /* aliases for existing class names */
  --deep: #10203D;
  --blue: #2C64F0;
  --coral: #2C64F0;
  --muted: #5C6773;
  --border: #D3D8DF;
  --radius: 16px;
  --shadow: 0 4px 24px rgba(16, 32, 61, 0.08);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

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

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  min-height: 100vh;
}
h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--ink); }

img { max-width: 100%; height: auto; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--silver);
  position: sticky;
  top: 0;
  z-index: 100;
}
@supports (backdrop-filter: blur(8px)) {
  @media (min-width: 961px) {
    .site-header {
      background: rgba(255,255,255,0.92);
      backdrop-filter: blur(8px);
      -webkit-backdrop-filter: blur(8px);
    }
  }
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1.5rem;
}
.logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.logo-img {
  height: 36px;
  width: auto;
  display: block;
}
.logo-img-footer {
  height: 36px;
}
.logo-footer { margin-bottom: 0.75rem; display: inline-block; }
.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.logo span { color: var(--brand); }
.nav-main { display: flex; gap: 1.5rem; align-items: center; }
.nav-main a {
  color: var(--slate);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-main a:hover, .nav-main a.active { color: var(--brand); }
.header-actions { display: flex; gap: 0.75rem; align-items: center; }
.user-name { font-size: 0.9rem; color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  text-decoration: none;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-coral { background: var(--brand); color: #fff; }
.btn-coral:hover { background: var(--brand-dark); color: #fff; }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--ink);
}
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* Hero — sky background like static landing (bukan solid brand) */
.hero {
  background: var(--sky);
  color: var(--ink);
  padding: 4rem 0 5rem;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  color: var(--ink);
}
.hero h1 .text-brand { color: var(--brand); }
.hero p { font-size: 1.05rem; color: var(--slate); max-width: 540px; margin-bottom: 1.75rem; }
.hero-ctas { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.hero .btn-outline {
  background: var(--white);
  border-color: var(--silver);
  color: var(--ink);
}
.hero .btn-outline:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.hero .badge {
  background: var(--white);
  border: 1px solid var(--silver);
  color: var(--slate);
}
.route-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
}
.route-step {
  background: var(--white);
  border: 1px solid var(--silver);
  border-radius: var(--radius);
  padding: 1rem;
}
.route-step .step-num { font-size: 0.75rem; color: var(--brand); font-weight: 600; margin-bottom: 0.25rem; }
.route-step strong { display: block; margin-bottom: 0.2rem; color: var(--ink); font-family: var(--font-display); }
.route-step span { font-size: 0.85rem; color: var(--slate); }

/* Sections */
.section { padding: 3.5rem 0; }
.section-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.section-sub { color: var(--slate); margin-bottom: 2rem; max-width: 560px; }
.section-label {
  display: block;
  color: var(--brand);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

/* Cards grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--white);
  border: 1px solid var(--silver);
  border-radius: 1rem;
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}
.card:hover { box-shadow: 0 8px 24px rgba(44, 100, 240, 0.08); border-color: var(--brand); transform: translateY(-2px); }
.card-body { padding: 1.5rem; }
.card-title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--ink); margin-bottom: 0.35rem; }
.card-meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.75rem; }
.card-desc { font-size: 0.9rem; color: var(--ink); margin-bottom: 1rem; }
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--sky);
  color: var(--brand);
}
.badge-coral { background: var(--sky); color: var(--brand); }
.price { font-weight: 700; color: var(--ink); font-size: 1.1rem; font-family: var(--font-display); }
.rating { color: #F59E0B; font-size: 0.9rem; }

/* Filters */
.filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.filter-btn {
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--ink);
}
.filter-btn.active, .filter-btn:hover {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

/* Forms */
.form-group { margin-bottom: 1.15rem; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.35rem;
  color: var(--ink);
}
.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.15s;
  background: var(--white);
}
.form-control:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(44, 100, 240, 0.18);
}
textarea.form-control { min-height: 100px; resize: vertical; }
.select-control { appearance: auto; }

.alert {
  padding: 0.85rem 1.1rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}
.alert-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.alert-info { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }

/* Auth layout */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-left {
  background: linear-gradient(160deg, var(--ink), var(--brand-dark));
  color: #fff;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--white);
}
.auth-form-box { width: 100%; max-width: 400px; }
.auth-form-box h2 { font-size: 1.5rem; color: var(--ink); margin-bottom: 0.5rem; }
.auth-form-box .sub { color: var(--muted); margin-bottom: 1.5rem; font-size: 0.95rem; }

/* Dashboard */
.dash-layout { display: flex; min-height: calc(100vh - 64px); }
.dash-sidebar {
  width: 240px;
  background: var(--white);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  flex-shrink: 0;
}
.dash-sidebar a {
  display: block;
  padding: 0.65rem 1.5rem;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
  border-left: 3px solid transparent;
}
.dash-sidebar a:hover, .dash-sidebar a.active {
  background: var(--sky);
  color: var(--brand);
  border-left-color: var(--brand);
}
.dash-content { flex: 1; padding: 2rem; }
.dash-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 0.5rem;
}
.progress-bar span {
  display: block;
  height: 100%;
  background: var(--sky);
  border-radius: 4px;
}

/* Detail page */
.detail-hero {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  margin-top: 2rem;
}
.sidebar-widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: sticky;
  top: 80px;
}
.module-list { list-style: none; }
.module-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.module-list li:last-child { border-bottom: none; }
.module-list strong { display: block; margin-bottom: 0.3rem; }
.module-list ul { padding-left: 1.2rem; font-size: 0.9rem; color: var(--muted); }

/* Footer */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-grid h4 { color: #fff; margin-bottom: 0.75rem; font-size: 0.95rem; }
.footer-grid a { display: block; color: rgba(255,255,255,0.7); font-size: 0.875rem; margin-bottom: 0.4rem; }
.footer-grid a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.25rem;
  font-size: 0.85rem;
  opacity: 0.7;
  text-align: center;
}

/* Tables (admin) */
.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
table.data th, table.data td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
table.data th {
  background: #F1F5F9;
  font-weight: 600;
  color: var(--ink);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
table.data tr:hover td { background: #F8FAFC; }
.status-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.status-new, .status-pending { background: #FEF3C7; color: #92400E; }
.status-confirmed, .status-active, .status-contacted { background: #DBEAFE; color: #1E40AF; }
.status-completed, .status-won { background: #D1FAE5; color: #065F46; }
.status-cancelled, .status-lost { background: #FEE2E2; color: #991B1B; }

/* Stats */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.stat-card .stat-num { font-size: 1.75rem; font-weight: 800; color: var(--ink); }
.stat-card .stat-label { font-size: 0.85rem; color: var(--muted); }

/* Responsive */
@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dash-layout { flex-direction: column; }
  .dash-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); display: flex; overflow-x: auto; padding: 0.5rem; }
  .dash-sidebar a { white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; padding: 0.5rem 1rem; }
  .dash-sidebar a.active { border-bottom-color: var(--brand); border-left-color: transparent; }
}
@media (max-width: 640px) {
  .nav-main { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ========== Homepage layout (production UX) ========== */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}
@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
    align-items: center;
  }
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--white);
  border: 1px solid var(--silver);
  color: var(--slate);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
}
.hero-lead {
  font-size: 1.05rem;
  color: var(--slate);
  max-width: 34rem;
  margin-bottom: 1.75rem;
  line-height: 1.65;
}
.btn-lg { padding: 0.85rem 1.5rem; font-size: 0.95rem; }
.hero-trust-label {
  margin-top: 2rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate);
  opacity: 0.75;
}
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--slate);
  font-weight: 500;
}
.hero-trust .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--silver);
}
.hero-paths {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.path-card {
  background: var(--white);
  border: 1px solid var(--silver);
  border-radius: 1rem;
  padding: 1.1rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  display: block;
}
.path-card:hover {
  border-color: var(--brand);
  box-shadow: 0 8px 24px rgba(44, 100, 240, 0.1);
  transform: translateY(-2px);
  color: inherit;
}
.path-tag {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 0.35rem;
}
.path-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 0.2rem;
}
.path-card span:last-child {
  font-size: 0.8rem;
  color: var(--slate);
  line-height: 1.4;
}

.stats-bar {
  border-top: 1px solid var(--silver);
  border-bottom: 1px solid var(--silver);
  background: var(--white);
  padding: 2rem 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  text-align: center;
}
@media (min-width: 768px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}
.stat-num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.85rem;
  color: var(--ink);
  line-height: 1.2;
}
.stat-desc {
  font-size: 0.8rem;
  color: var(--slate);
  margin-top: 0.25rem;
}

.section-sky { background: var(--sky); }
.section-head { margin-bottom: 1.75rem; max-width: 36rem; }
.section-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  max-width: none;
  gap: 1rem;
}
.section-head-row .section-title { margin-bottom: 0; }

.audience-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) {
  .audience-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .audience-grid { grid-template-columns: repeat(4, 1fr); }
}
.audience-card {
  background: var(--white);
  border: 1px solid var(--silver);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.audience-card:hover {
  border-color: var(--brand);
  box-shadow: 0 8px 24px rgba(44, 100, 240, 0.08);
}
.audience-icon { font-size: 1.5rem; margin-bottom: 0.75rem; }
.audience-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.4rem;
}
.audience-card p {
  font-size: 0.875rem;
  color: var(--slate);
  line-height: 1.55;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
}
.product-card {
  background: var(--white);
  border: 1px solid var(--silver);
  border-radius: 1rem;
  padding: 1.5rem 1.5rem 1.25rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.product-card:hover {
  border-color: var(--brand);
  box-shadow: 0 8px 24px rgba(44, 100, 240, 0.1);
  transform: translateY(-2px);
  color: inherit;
}
.product-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand);
  margin-bottom: 0.5rem;
}
.product-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.product-card p {
  font-size: 0.9rem;
  color: var(--slate);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 1rem;
}
.product-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand);
}

.card-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.25rem;
}
.section-cta-mobile {
  margin-top: 1.5rem;
  text-align: center;
}
@media (min-width: 768px) {
  .section-cta-mobile { display: none; }
  .hide-mobile { display: inline-flex !important; }
}
.hide-mobile { display: none; }

.cta-banner {
  background: var(--brand);
  border-radius: 1.5rem;
  padding: 3rem 1.75rem;
  text-align: center;
  color: #fff;
}
.cta-banner h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  margin-bottom: 0.75rem;
  color: #fff;
}
.cta-banner p {
  opacity: 0.9;
  max-width: 28rem;
  margin: 0 auto 1.5rem;
  font-size: 1rem;
}
.btn-cta-light {
  background: #fff;
  color: var(--brand);
  border-radius: 999px;
  font-weight: 600;
  padding: 0.85rem 1.5rem;
}
.btn-cta-light:hover {
  background: var(--sky);
  color: var(--brand-dark);
}

.wa-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(44, 100, 240, 0.35);
  transition: background 0.15s, transform 0.15s;
}
.wa-float:hover {
  background: var(--brand-dark);
  color: #fff;
  transform: scale(1.05);
}

/* Detail page title colors → ink */
.detail-hero h1 { color: var(--ink) !important; }

/* ========== Global page polish (non-homepage) ========== */

/* Listing page headers */
.page-header {
  padding: 2.5rem 0 0.5rem;
}
.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 0.5rem;
}

/* Detail hero */
.detail-hero {
  background: var(--sky);
  border-bottom: 1px solid var(--silver);
  padding: 2.5rem 0;
}
.detail-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--ink);
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  margin: 0.5rem 0;
}
.detail-hero .card-meta {
  color: var(--slate);
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}
@media (min-width: 900px) {
  .detail-grid {
    grid-template-columns: 1fr 320px;
  }
}
.detail-grid h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.75rem;
}
.sidebar-widget {
  background: var(--white);
  border: 1px solid var(--silver);
  border-radius: 1rem;
  padding: 1.5rem;
  position: sticky;
  top: 80px;
}
.sidebar-widget h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1rem;
}
.module-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--silver);
}
.module-list strong {
  font-family: var(--font-display);
  color: var(--ink);
}

/* Forms */
.form-group label {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.875rem;
}
.form-control {
  border: 1.5px solid var(--silver);
  border-radius: 10px;
  padding: 0.7rem 0.95rem;
}
.form-control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(44, 100, 240, 0.18);
}

/* Auth */
.auth-form-box h2 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--ink);
}
.auth-form-box .sub { color: var(--slate); }
.auth-form-box a { color: var(--brand); font-weight: 600; }

/* Dashboard */
.dash-content h1 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--ink);
  font-size: 1.4rem;
}
.dash-sidebar {
  background: var(--white);
  border-right: 1px solid var(--silver);
}
.dash-sidebar a {
  color: var(--slate);
  font-weight: 500;
}
.dash-sidebar a:hover,
.dash-sidebar a.active {
  background: var(--sky);
  color: var(--brand);
  border-left-color: var(--brand);
}
.dash-card {
  background: var(--white);
  border: 1px solid var(--silver);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.dash-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
}
.progress-bar {
  height: 8px;
  background: var(--silver);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar span {
  background: var(--brand);
}

/* Tables */
table.data th {
  background: var(--sky);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
table.data td {
  border-bottom: 1px solid var(--silver);
  color: var(--ink);
}
table.data tr:hover td {
  background: #F8FAFC;
}

/* Filters */
.filter-btn {
  border: 1.5px solid var(--silver);
  background: var(--white);
  color: var(--slate);
  border-radius: 999px;
  font-weight: 500;
}
.filter-btn.active,
.filter-btn:hover {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

/* Section on listing pages */
.section .section-title,
.section h1.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--ink);
}
.section-sub { color: var(--slate); }

/* Admin overrides */
.admin-nav {
  background: var(--ink) !important;
}
.admin-topbar {
  border-bottom: 1px solid var(--silver);
}
.admin-body h1,
.admin-body h2,
.admin-body h3 {
  font-family: var(--font-display);
  color: var(--ink);
}
.stat-card {
  border: 1px solid var(--silver);
  border-radius: 1rem;
}
.stat-card .stat-num {
  font-family: var(--font-display);
  color: var(--ink);
}
.stat-card .stat-label {
  color: var(--slate);
}

/* Price & rating */
.price { color: var(--ink); font-family: var(--font-display); }
.rating { color: #F59E0B; }

/* Footer links */
.site-footer a:hover { color: #fff; }
.footer-grid h4 {
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
}

/* Payment finish */
.payment-result {
  max-width: 480px;
  margin: 3rem auto;
  text-align: center;
  padding: 2rem;
}
.payment-result h1 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--ink);
}

/* Outline button consistency */
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--silver);
  color: var(--ink);
  border-radius: 999px;
}
.btn-outline:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--sky);
}
.btn-sm { border-radius: 999px; }

/* Card meta */
.card-meta { color: var(--slate); font-size: 0.85rem; }
.card-desc { color: var(--ink); font-size: 0.9rem; line-height: 1.55; }

/* ========== Mobile navigation ========== */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--silver);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.menu-toggle .hidden { display: none !important; }
.mobile-menu {
  display: none;
  border-top: 1px solid var(--silver);
  background: var(--white);
  padding: 0.75rem 1.25rem 1.25rem;
}
.mobile-menu[hidden] { display: none !important; }
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.mobile-nav a {
  display: block;
  padding: 0.75rem 0.5rem;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 8px;
}
.mobile-nav a:hover { background: var(--sky); color: var(--brand); }
.mobile-nav-divider {
  height: 1px;
  background: var(--silver);
  margin: 0.5rem 0;
}
.mobile-user {
  font-size: 0.8rem;
  color: var(--slate);
  padding: 0.35rem 0.5rem;
  font-weight: 600;
}
.mobile-cta {
  background: var(--brand) !important;
  color: #fff !important;
  text-align: center;
  font-weight: 600 !important;
  margin-top: 0.35rem;
}
body.menu-open { overflow: hidden; }

/* ========== Responsive breakpoints ========== */
@media (max-width: 960px) {
  .nav-main { display: none; }
  .menu-toggle { display: inline-flex; }
  .mobile-menu:not([hidden]) { display: block; }

  .header-actions .user-name,
  .header-actions .hide-sm { display: none !important; }

  .hero { padding: 2.5rem 0 3rem; }
  .hero h1 { font-size: clamp(1.6rem, 6vw, 2.2rem); }
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .hero-paths { grid-template-columns: 1fr 1fr; gap: 0.65rem; }
  .path-card { padding: 0.9rem 0.75rem; }
}

@media (max-width: 640px) {
  .container { padding: 0 1rem; }
  .logo-img { height: 30px; }

  .header-inner { height: 56px; gap: 0.5rem; }
  .header-actions { gap: 0.4rem; }
  .header-actions .hide-xs { display: none !important; }
  .header-actions .btn-sm { padding: 0.35rem 0.7rem; font-size: 0.8rem; }

  .hero { padding: 2rem 0 2.5rem; }
  .hero-paths { grid-template-columns: 1fr; }
  .hero-trust { font-size: 0.75rem; gap: 0.4rem; }
  .hero-lead { font-size: 0.95rem; }

  .card-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.35rem;
    margin-left: -0.25rem;
    margin-right: -0.25rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
  .filter-btn { flex-shrink: 0; }

  .section { padding: 2.5rem 0; }
  .section-title { font-size: 1.4rem; }
  .section-head-row { flex-direction: column; align-items: flex-start; }

  .stats-grid { gap: 1rem; }
  .stat-num { font-size: 1.5rem; }

  .audience-grid,
  .product-grid { grid-template-columns: 1fr; }

  .detail-hero { padding: 1.75rem 0; }
  .detail-grid { gap: 1.5rem; margin-top: 1.5rem; }
  .sidebar-widget { position: static; }

  .dash-content { padding: 1.25rem 1rem; }
  .dash-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--silver);
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem;
    gap: 0.15rem;
  }
  .dash-sidebar a {
    white-space: nowrap;
    border-left: none;
    border-bottom: 3px solid transparent;
    padding: 0.55rem 0.9rem;
    font-size: 0.85rem;
  }
  .dash-sidebar a.active,
  .dash-sidebar a:hover {
    border-left-color: transparent;
    border-bottom-color: var(--brand);
    background: var(--sky);
  }
  .dash-layout { flex-direction: column; }

  .auth-page { grid-template-columns: 1fr; min-height: 100vh; }
  .auth-left { display: none; }
  .auth-right { padding: 1.5rem 1rem; }
  .auth-form-box { max-width: 100%; }

  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .site-footer { padding: 2.5rem 0 1.25rem; margin-top: 2rem; }

  .cta-banner { padding: 2.25rem 1.25rem; border-radius: 1.25rem; }
  .cta-banner h2 { font-size: 1.35rem; }

  .wa-float {
    width: 3.25rem;
    height: 3.25rem;
    bottom: 1rem;
    right: 1rem;
  }

  .table-wrap {
    margin: 0 -0.25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table.data { min-width: 520px; font-size: 0.85rem; }
  table.data th, table.data td { padding: 0.6rem 0.75rem; }

  .stat-grid { grid-template-columns: 1fr 1fr; gap: 0.75rem; }

  /* Admin mobile */
  .admin-wrap { flex-direction: column; }
  .admin-nav {
    width: 100% !important;
    padding: 0.75rem 0 !important;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0;
  }
  .admin-nav .brand {
    display: none;
  }
  .admin-nav a {
    white-space: nowrap;
    padding: 0.6rem 1rem !important;
    font-size: 0.85rem;
  }
  .admin-body { padding: 1rem !important; }
  .admin-topbar { padding: 0.75rem 1rem !important; flex-wrap: wrap; gap: 0.5rem; }

  /* Forms full width */
  .form-control { font-size: 16px; /* prevent iOS zoom */ }

  /* Training form grids */
  .dash-card [style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 380px) {
  .path-card strong { font-size: 0.9rem; }
  .btn-lg { padding: 0.75rem 1.15rem; font-size: 0.9rem; }
  .logo-img { height: 26px; }
}

/* Safe area for notched phones */
@supports (padding: max(0px)) {
  .wa-float {
    bottom: max(1rem, env(safe-area-inset-bottom));
    right: max(1rem, env(safe-area-inset-right));
  }
  .site-header {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

/* Prevent horizontal scroll */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}
img, video, iframe {
  max-width: 100%;
  height: auto;
}

/* ========== Mobile performance optimizations ========== */

/* Reduce paint/composite work on touch devices */
@media (max-width: 960px) {
  .card:hover,
  .path-card:hover,
  .product-card:hover,
  .audience-card:hover {
    transform: none;
    box-shadow: none;
  }
  .card,
  .path-card,
  .product-card,
  .audience-card {
    transition: border-color 0.15s;
  }
  .wa-float {
    box-shadow: 0 4px 12px rgba(44, 100, 240, 0.25);
    transition: background-color 0.15s;
  }
  .wa-float:hover { transform: none; }
  /* Sticky header solid — no backdrop-filter on mobile */
  .site-header {
    background: var(--white);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  /* Contain layout for long lists */
  .card-grid,
  .product-grid,
  .audience-grid {
    contain: layout style;
  }
  main {
    contain: layout;
  }
}

/* Prefer less motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Content visibility for below-fold sections (skip offscreen work) */
@media (max-width: 960px) {
  .section:not(:first-of-type),
  .section-sky,
  .stats-bar {
    content-visibility: auto;
    contain-intrinsic-size: 1px 480px;
  }
}

/* GPU-friendly float button without constant layer promotion */
.wa-float {
  will-change: auto;
  transform: translateZ(0); /* one stable layer */
}
@media (max-width: 960px) {
  .wa-float {
    transform: none; /* avoid extra layer on weak GPUs */
  }
}

/* Font rendering tradeoff: faster on mobile */
@media (max-width: 960px) {
  body {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeSpeed;
  }
}
@media (min-width: 961px) {
  body {
    text-rendering: optimizeLegibility;
  }
}

/* Images: avoid layout shift hints where used as logos */
.logo-img,
.logo-img-footer {
  height: 36px;
  width: auto;
  aspect-ratio: auto;
  content-visibility: auto;
}
@media (max-width: 640px) {
  .logo-img { height: 30px; }
}

/* Tables: only paint visible overflow container */
.table-wrap {
  contain: content;
}

/* Admin mobile: lighter */
@media (max-width: 640px) {
  .admin-nav a:hover {
    background: rgba(255,255,255,0.08);
  }
  .dash-card,
  .card,
  .sidebar-widget {
    box-shadow: none;
  }
}
