:root {
  --brand: #3d9ea3;
  --brand-dark: #2d7f84;
  --brand-fg: #f7fcfc;
  --navy: #24365a;
  --navy-soft: #2f4470;
  --gold: #e4c04a;
  --gold-fg: #24365a;
  --bg: #f7fafb;
  --fg: #1e2a3a;
  --muted: #f0f5f6;
  --muted-fg: #6b7c8a;
  --card: #ffffff;
  --border: #e2eaf0;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(36, 54, 90, 0.08);
  --sidebar-w: 260px;
  --topbar-h: 64px;
  --font: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  min-height: 100vh;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 8px; padding: 10px 16px;
  font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background .15s, border-color .15s, opacity .15s;
}
.btn:hover { text-decoration: none; opacity: .95; }
.btn-brand { background: var(--brand); color: var(--brand-fg); }
.btn-brand:hover { background: var(--brand-dark); color: #fff; }
.btn-outline { background: #fff; border-color: var(--border); color: var(--fg); }
.btn-outline:hover { background: var(--muted); }
.btn-secondary { background: var(--muted); color: var(--fg); }
.btn-gold { background: var(--gold); color: var(--gold-fg); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 20px; font-size: 15px; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
button.btn {
  font-family: inherit;
  line-height: inherit;
  -webkit-appearance: none;
  appearance: none;
}

.badge {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 999px;
  padding: 2px 10px; font-size: 11px; font-weight: 600;
  background: var(--muted); color: var(--muted-fg);
}
.badge-brand { background: rgba(61,158,163,.15); color: var(--brand); }
.badge-gold { background: rgba(228,192,74,.25); color: #8a6b10; }
.badge-ok { background: #d1fae5; color: #065f46; }
.badge-warn { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-body { padding: 16px 18px; }
.card-header {
  padding: 14px 18px 0; font-size: 15px; font-weight: 700;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.card-title { margin: 0; font-size: 15px; font-weight: 700; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .md-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; background: #fff; color: var(--fg);
}
.form-control:focus { outline: 2px solid rgba(61,158,163,.35); border-color: var(--brand); }
.form-hint { font-size: 11px; color: var(--muted-fg); margin-top: 4px; }

.progress {
  height: 8px; background: var(--muted); border-radius: 999px; overflow: hidden;
}
.progress > span {
  display: block; height: 100%; background: var(--brand); border-radius: 999px;
}

/* Auth layout */
.auth-page { min-height: 100vh; display: flex; flex-direction: column; }
@media (min-width: 900px) {
  .auth-page { flex-direction: row; }
}
.auth-form-wrap {
  flex: 1; display: flex; flex-direction: column; position: relative;
  padding: 40px 28px 120px; background: #f8fdfd;
}
.auth-form-inner { width: 100%; max-width: 420px; margin: auto; padding-top: 48px; }
.login-tabs {
  display: flex; gap: 6px; margin: 0 0 16px; padding: 4px;
  background: var(--muted); border-radius: 10px;
}
.login-tab {
  flex: 1; border: 0; background: transparent; color: var(--muted-fg);
  font: inherit; font-size: 13px; font-weight: 700; padding: 8px 10px;
  border-radius: 8px; cursor: pointer;
}
.login-tab.is-active { background: #fff; color: var(--brand); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.login-panel.is-hidden { display: none !important; }
.role-toggle {
  display: flex; gap: 6px; padding: 4px; background: var(--muted); border-radius: 10px;
}
.role-toggle label { flex: 1; margin: 0; cursor: pointer; position: relative; }
.role-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.role-toggle span {
  display: block; text-align: center; font-size: 13px; font-weight: 700;
  padding: 8px 6px; border-radius: 8px; color: var(--muted-fg);
}
.role-toggle input:checked + span { background: #fff; color: var(--brand); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.role-toggle.is-invalid { outline: 2px solid #e11d48; }
.parent-banner {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(61,158,163,.1); border: 1px solid rgba(61,158,163,.25);
  border-radius: 10px; padding: 10px 12px; margin-bottom: 16px; font-size: 13px;
}
.parent-banner i { color: var(--brand); font-size: 18px; margin-top: 1px; }
.avatar-lg { width: 56px; height: 56px; font-size: 16px; }
.parent-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 960px) {
  .parent-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
a.parent-stat { text-decoration: none; color: inherit; }
.parent-stat {
  display: flex; align-items: center; gap: 12px;
  padding: 16px;
}
a.parent-stat:hover { border-color: var(--brand); }
.parent-stat-icon {
  width: 44px; height: 44px; border-radius: 12px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.parent-stat-label {
  font-size: 12px; font-weight: 600; color: var(--muted-fg);
}
.parent-stat-value { font-size: 22px; font-weight: 800; line-height: 1.2; }
.parent-badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
}
.parent-badge.is-ok { background: #ecfdf5; color: #047857; }
.parent-badge.is-no { background: #fef2f2; color: #b91c1c; }
.parent-dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 640px) {
  .parent-dl { grid-template-columns: 1fr; }
}
.parent-pager {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-top: 14px;
}
.parent-pager-pages { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.parent-pager-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 8px;
  background: #fff; color: var(--fg); text-decoration: none;
  font-size: 13px; font-weight: 600;
}
.parent-pager-btn:hover { background: var(--muted); }
.parent-pager-btn.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.parent-pager-btn.is-disabled { opacity: .45; pointer-events: none; }
.parent-pager-ellipsis { color: var(--muted-fg); padding: 0 4px; }
.parent-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 960px) {
  .parent-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.parent-stat-icon {
  width: 44px; height: 44px; border-radius: 12px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.parent-stat-label { font-size: 12px; font-weight: 600; color: var(--muted-fg); }
.parent-stat-value { font-size: 22px; font-weight: 800; line-height: 1.2; }
.avatar-lg { width: 56px; height: 56px; font-size: 16px; }
.parent-badge.is-ok { background: #ecfdf5; color: #047857; }
.parent-badge.is-no { background: #fef2f2; color: #b91c1c; }
a.list-row { text-decoration: none; color: inherit; }
.account-switch-item-child {
  display: block; font-size: 12px; font-weight: 700; color: var(--fg); margin-bottom: 2px;
}
.user-menu-badge {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--brand); background: rgba(61,158,163,.12);
  border-radius: 999px; padding: 2px 8px; margin-top: 4px;
}
.auth-hero {
  flex: 1; background: var(--brand); color: var(--brand-fg);
  display: none; flex-direction: column; padding: 40px;
}
@media (min-width: 900px) { .auth-hero { display: flex; } }
.auth-hero-mobile {
  background: var(--brand); color: var(--brand-fg); padding: 24px 20px;
}
@media (min-width: 900px) { .auth-hero-mobile { display: none; } }
.auth-logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: var(--navy); font-weight: 800; letter-spacing: .02em;
  border-radius: 8px; /*padding: 10px 16px;box-shadow: var(--shadow);*/
}
.auth-badge {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.12);
  border-radius: 999px; padding: 6px 14px; font-size: 13px; margin-bottom: 16px;
}
.auth-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); display: inline-block; }
.partner-box {
  border-radius: 16px; background: var(--muted); padding: 14px; margin-top: 24px;
  overflow: hidden;
}
.partner-box p {
  text-align: center; font-size: 10px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted-fg); margin: 0 0 10px;
}
.partner-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
}
.partner-logos img {
  flex: 1 1 0;
  min-width: 0;
  width: 0;
  max-width: 100%;
  max-height: 40px;
  height: auto;
  object-fit: contain;
  display: block;
}
.partner-logos span {
  font-size: 11px; font-weight: 700; color: var(--navy); background: #fff;
  border-radius: 8px; padding: 12px 6px;
}
.benefit-list { list-style: none; padding: 0; margin: 16px 0 0; text-align: left; }
.benefit-list li { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 8px; opacity: .92; text-align: left; }
.benefit-list li i { color: #F0C13E; flex-shrink: 0; line-height: 1; }

/* Register (Lovable-style centered card) */
.auth-register-page {
  min-height: 100vh;
  padding: 40px 16px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand) 45%, var(--navy) 100%);
}
.auth-register-shell {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.auth-register-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.auth-register-logo {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.auth-register-logo img {
  height: 36px;
  width: auto;
  display: block;
}
.auth-register-lang {
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 2px;
  display: inline-flex;
  gap: 2px;
}
.auth-register-lang a {
  color: var(--muted-fg);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
}
.auth-register-lang a.active,
.auth-register-lang a:hover {
  background: var(--brand);
  color: #fff;
  text-decoration: none;
}
.auth-register-card {
  background: #fff;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(36, 54, 90, 0.22);
  padding: 20px;
}
@media (min-width: 640px) {
  .auth-register-card { padding: 24px; }
}
.auth-register-heading { margin-bottom: 18px; }
.auth-register-row {
  display: grid;
  gap: 12px;
}
@media (min-width: 640px) {
  .auth-register-row { grid-template-columns: 1fr 1fr; }
}
.auth-register-card .form-group { margin-bottom: 12px; }
.auth-register-card .form-control {
  padding: 8px 10px;
  font-size: 13px;
}
.auth-register-card input.form-control[type="text"],
.auth-register-card textarea.form-control {
  text-transform: capitalize;
}
.auth-register-card input.form-control[type="email"],
.auth-register-card input.form-control[type="password"] {
  text-transform: none;
}
.auth-register-card .form-label { font-size: 12px; margin-bottom: 4px; }
.auth-register-card .btn { padding: 9px 14px; font-size: 13px; }
.program-pick-grid {
  display: grid;
  gap: 8px;
}
@media (min-width: 640px) {
  .program-pick-grid { grid-template-columns: 1fr 1fr; }
}
.program-pick {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  background: #fff;
  transition: background .15s, border-color .15s, box-shadow .15s;
  margin: 0;
}
.program-pick:hover { background: var(--muted); }
.program-pick input { position: absolute; opacity: 0; pointer-events: none; }
.program-pick-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  font-size: 16px;
}
.program-pick-body { min-width: 0; flex: 1; }
.program-pick-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.3;
}
.program-pick-desc {
  display: block;
  font-size: 11px;
  color: var(--muted-fg);
  margin-top: 2px;
  line-height: 1.4;
}
.program-pick-check {
  display: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  margin-top: 2px;
}
.program-pick.is-selected {
  border-color: var(--brand);
  background: rgba(61,158,163,.06);
  box-shadow: 0 0 0 1px rgba(61,158,163,.25);
}
.program-pick.is-selected .program-pick-check { display: inline-flex; }

.sub-program-wrap { margin-top: 14px; }
.sub-program-wrap[hidden] { display: none !important; }
.sub-program-list { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.sub-program-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}
.sub-program-card[hidden] { display: none !important; }
.sub-program-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.sub-program-head .program-pick-icon {
  width: 24px;
  height: 24px;
  font-size: 13px;
  border-radius: 6px;
}
.sub-program-head-name {
  font-size: 13px;
  font-weight: 700;
}
.pkg-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.pkg-mode-btn {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  text-align: left;
  cursor: pointer;
  background: #fff;
  transition: border-color .15s, box-shadow .15s, background .15s;
  margin: 0;
  display: block;
}
.pkg-mode-btn:hover { background: var(--muted); }
.pkg-mode-btn input { position: absolute; opacity: 0; pointer-events: none; }
.pkg-mode-btn.is-selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px rgba(61,158,163,.25);
  background: rgba(61,158,163,.06);
}
.pkg-mode-title { display: block; font-size: 12px; font-weight: 700; }
.pkg-mode-desc { display: block; font-size: 11px; color: var(--muted-fg); margin-top: 2px; line-height: 1.35; }
.sub-pick-panel[hidden] { display: none !important; }
.sub-pick-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}
@media (min-width: 640px) {
  .sub-pick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.sub-pick {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  background: #fff;
  margin: 0;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.sub-pick:hover { background: var(--muted); }
.sub-pick input { position: absolute; opacity: 0; pointer-events: none; }
.sub-pick.is-selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px rgba(61,158,163,.25);
  background: rgba(61,158,163,.06);
}
.sub-pick-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
}
.sub-pick-name { display: block; font-size: 11px; font-weight: 700; line-height: 1.25; }
.sub-pick-desc { display: block; font-size: 10px; color: var(--muted-fg); margin-top: 2px; line-height: 1.3; }
.online-addon {
  margin-top: 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--muted);
}
.online-addon[hidden] { display: none !important; }
.online-addon-info { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.online-addon-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(61,158,163,.12);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
}
.online-addon-title { font-size: 12px; font-weight: 700; }
.online-addon-desc { font-size: 11px; color: var(--muted-fg); margin-top: 2px; line-height: 1.35; }
.online-addon-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}
.online-addon-toggle input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}
.online-addon-slider {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background .15s;
}
.online-addon-slider:before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .15s;
}
.online-addon-toggle input:checked + .online-addon-slider {
  background: var(--brand);
}
.online-addon-toggle input:checked + .online-addon-slider:before {
  transform: translateX(18px);
}

.reg-section {
  margin-bottom: 16px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.reg-section:last-of-type { border-bottom: none; }
.reg-section-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 800;
  color: var(--navy);
}
.reg-program-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}
.reg-program-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(61, 158, 163, .28);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(61, 158, 163, .08) 0%, rgba(255, 255, 255, .95) 48%, rgba(228, 192, 74, .08) 100%);
  box-shadow: 0 1px 2px rgba(36, 54, 90, .05);
}
.reg-program-index {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(160deg, var(--brand) 0%, var(--brand-dark) 100%);
  box-shadow: 0 4px 10px rgba(61, 158, 163, .28);
}
.reg-program-body {
  min-width: 0;
  flex: 1;
}
.reg-program-meta {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--muted-fg);
  margin-bottom: 2px;
}
.reg-program-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.3;
  word-break: break-word;
}
.reg-program-paket {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  max-width: 100%;
}
.reg-program-paket-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #8a6b10;
  background: rgba(228, 192, 74, .28);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}
.reg-program-paket-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reg-program-mark {
  flex: 0 0 auto;
  color: var(--brand);
  font-size: 20px;
  line-height: 1;
  opacity: .9;
}
.reg-confirm {
  margin: 8px 0 16px;
  padding: 14px 14px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafafa;
}
.reg-confirm-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--fg);
}
.reg-confirm-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--fg);
  cursor: pointer;
}
.reg-confirm-item input {
  margin-top: 2px;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}
.reg-confirm-item span { min-width: 0; }
.req { color: #dc2626; font-weight: 700; }
.form-error {
  margin-top: 4px;
  font-size: 11px;
  color: #b91c1c;
}
.form-control.is-invalid,
.program-pick-grid.is-invalid {
  border-color: #ef4444;
}
.form-control.is-invalid:focus {
  outline-color: rgba(239, 68, 68, .35);
  border-color: #ef4444;
}
textarea.form-control {
  resize: vertical;
  min-height: 64px;
}

/* App shell */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); background: var(--navy); color: #eef3f8;
  display: none; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 40;
}
@media (min-width: 960px) { .sidebar { display: flex; } }
.sidebar-brand {
  height: var(--topbar-h); padding: 0 15px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center;
}
.sidebar-brand .auth-logo-mark { width: 100%; justify-content: flex-start; font-size: 13px; padding: 10px; }
.sidebar-brand .auth-logo-mark img { width: 100%; height: auto; max-height: 44px; object-fit: contain; padding: 0; }
.sidebar-nav { padding: 12px; flex: 1; overflow: auto; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px; color: rgba(255,255,255,.85);
  font-size: 14px; margin-bottom: 4px; text-decoration: none;
}
.nav-item:hover { background: var(--navy-soft); color: #fff; text-decoration: none; }
.nav-item.active { background: var(--brand); color: #fff; }
.nav-item .ico { width: 18px; text-align: center; opacity: .9; }
.sidebar-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.08); }

.main-wrap { flex: 1; min-width: 0; }
@media (min-width: 960px) { .main-wrap { margin-left: var(--sidebar-w); } }

.topbar {
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 16px; background: #fff; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-left { flex: 1; }
.topbar-right { flex: 0 0 auto; }
.topbar-logo {
  display: none;
  align-items: center;
  flex: 0 0 auto;
  line-height: 0;
}
.topbar-logo img {
  height: 28px;
  width: auto;
  max-width: 168px;
  object-fit: contain;
  display: block;
}
.topbar-brand {
  font-size: 14px;
  white-space: nowrap;
  flex: 0 0 auto;
}
@media (max-width: 959px) {
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar-left { gap: 8px; }
  .topbar-right { gap: 6px; }
  .topbar-logo { display: inline-flex; }
  .topbar-brand { display: none; }
  .topbar .lang-switch a {
    padding: 3px 6px;
    font-size: 11px;
    margin-left: 0;
  }
  .topbar .lang-switch a + a { margin-left: 3px; }
  .topbar .avatar { width: 32px; height: 32px; font-size: 11px; }
  .topbar .select-inline {
    max-width: min(180px, 52vw);
    font-size: 12px;
    padding: 6px 8px;
  }
  .user-menu-name { display: none; }
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--brand);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  overflow: hidden; position: relative; flex: 0 0 auto;
}
.avatar-img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.avatar-upload {
  position: relative;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  flex: 0 0 auto;
  box-shadow: 0 0 0 3px rgba(61, 158, 163, .18);
}
.avatar-upload input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
}
.avatar-upload-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(36, 54, 90, .45);
  color: #fff;
  font-size: 18px;
  opacity: 0;
  transition: opacity .15s ease;
}
.avatar-upload:hover .avatar-upload-overlay,
.avatar-upload:focus-within .avatar-upload-overlay { opacity: 1; }
.avatar-initials { line-height: 1; font-weight: 700; }
.user-menu { position: relative; }
.user-menu-toggle {
  border: none; cursor: pointer; padding: 0; font: inherit;
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: inherit; max-width: 100%;
}
.user-menu-toggle:hover { opacity: .92; }
.user-menu-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--fg);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-menu-dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50;
  width: 240px; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 8px; display: none;
}
.user-menu.open .user-menu-dropdown { display: block; }
.user-menu-head {
  padding: 10px 12px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px;
}
.user-menu-head .fw-bold { font-size: 14px; color: var(--fg); word-break: break-word; }
.user-menu-head .muted { margin-top: 2px; word-break: break-all; }
.user-menu-link {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 8px; color: var(--fg);
  font-size: 13px; font-weight: 600; text-decoration: none;
}
.user-menu-link:hover { background: var(--muted); text-decoration: none; }
.user-menu-link i { font-size: 16px; color: var(--muted-fg); }
.user-menu-logout { color: #b42318; }
.user-menu-logout i { color: #b42318; }
.user-menu-logout:hover { background: #fef3f2; }
.content { padding: 20px 16px 88px; max-width: 1100px; margin: 0 auto; }
@media (min-width: 960px) { .content { padding: 24px 28px 40px; } }

.mobile-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: #fff; border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
@media (min-width: 960px) { .mobile-nav { display: none; } }
.mobile-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 10px; font-weight: 400; color: var(--muted-fg); text-decoration: none; padding: 6px 2px;
}
.mobile-nav a i { font-weight: normal; }
.mobile-nav a.active { color: var(--brand); }

.page-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}
.page-head.mb-0 { margin-bottom: 0; }
.flex-between > .page-head { flex: 1 1 auto; min-width: 0; }
.page-head-icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #339797;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.page-head-icon i { line-height: 1; }
.page-head-text { min-width: 0; flex: 1; }
.page-head-eyebrow {
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand);
}
.page-title { margin: 0 0 4px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.page-sub { margin: 0 0 20px; color: var(--muted-fg); font-size: 14px; }
.page-head .page-sub { margin-bottom: 0; }
.muted { color: var(--muted-fg); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-lg { font-size: 18px; }
.fw-bold { font-weight: 700; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 6px; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 18px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 18px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.stack > * + * { margin-top: 10px; }
.list-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--muted);
}
.pill {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: rgba(61,158,163,.12); color: var(--brand); font-size: 12px; font-weight: 700;
}
.countdown-card {
  background: linear-gradient(145deg, var(--navy), #1a2740); color: #fff; border: none;
}
.countdown-num { font-size: 48px; font-weight: 800; line-height: 1; }
.accent-bar {
  height: 4px; border-radius: 999px; background: var(--brand); margin-bottom: 10px;
}
.empty-state { text-align: center; padding: 48px 20px; }
.empty-state h2 { margin: 8px 0; }
.alert {
  padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 13px;
}
.alert-success { background: #d1fae5; color: #065f46; }
.alert-info { background: #e0f2fe; color: #075985; }
.alert-danger { background: #fee2e2; color: #991b1b; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; }
.table th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted-fg); }
.program-chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; background: #fff;
  min-width: 0; max-width: 100%;
}
.program-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.account-switch { position: relative; max-width: min(320px, 46vw); min-width: 0; }
.account-switch-toggle {
  width: 100%;
  max-width: 100%;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
@media (max-width: 959px) {
  .account-switch { max-width: min(96px, 22vw); flex: 0 1 auto; width: auto; }
  .account-switch-toggle { padding: 3px 6px; gap: 3px; }
  .account-switch-toggle .program-chip-ico-sm {
    width: 16px; height: 16px; border-radius: 4px; font-size: 9px;
  }
  .account-switch-current { font-size: 9px; }
  .account-switch-caret { font-size: 12px; }
  .account-switch-dropdown {
    position: fixed;
    top: calc(var(--topbar-h) + 8px);
    left: 12px;
    right: 12px;
    width: auto;
    min-width: 0;
    max-width: none;
  }
}
.account-switch-toggle:disabled {
  cursor: default;
  opacity: 1;
}
.account-switch-current {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-switch-caret {
  font-size: 16px;
  color: var(--muted-fg);
  flex: 0 0 auto;
  transition: transform .15s ease;
}
.account-switch.open .account-switch-caret { transform: rotate(180deg); }
.account-switch-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: auto;
  right: 0;
  min-width: 260px;
  max-width: min(360px, 90vw);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(36, 54, 90, .12);
  z-index: 50;
  padding: 6px;
}
.account-switch.open .account-switch-dropdown { display: block; }
.account-switch-head {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted-fg);
  padding: 8px 10px 6px;
}
.account-switch-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 10px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: var(--fg);
}
.account-switch-item:hover:not(:disabled) { background: var(--muted); }
.account-switch-item.is-active {
  background: rgba(61, 158, 163, .1);
  color: var(--brand-dark);
  cursor: default;
}
.account-switch-item i { color: var(--brand); font-size: 16px; flex: 0 0 auto; }
.account-switch-item-main {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}
.account-switch-item-program {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}
.account-switch-item-sep {
  color: var(--muted-fg);
  font-weight: 700;
}
.account-switch-item-paket {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-fg);
}
.select-inline {
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; font-size: 13px; background: #fff;
}
.hero-tryout {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; border: none;
}

/* Beranda — program chip & sub-program cards (Lovable parity) */
.program-chip-lg { padding: 10px 14px; gap: 12px; }
.program-chip-ico {
  width: 40px; height: 40px; border-radius: 10px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px;
}
.program-chip-ico-sm {
  width: 24px; height: 24px; border-radius: 6px; font-size: 13px;
}
.program-sub-badge {
  display: flex; align-items: center; gap: 6px; margin-top: 4px;
}
.program-sub-ico {
  width: 16px; height: 16px; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 10px;
}
.card-title i {
  margin-right: 6px;
  vertical-align: -1px;
  color: var(--brand);
}
.countdown-card .card-title i,
.countdown-card i { color: inherit; }
.live-banner { border: none; color: #fff; }
.live-banner .btn-secondary {
  color: var(--navy);
  white-space: nowrap;
  min-width: 14.5rem;
  box-sizing: border-box;
}
.live-banner .btn-secondary:disabled {
  color: var(--navy);
  opacity: .6;
}
.live-banner-main { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.live-banner-ico {
  width: 40px; height: 40px; border-radius: 10px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.2); color: #fff; font-size: 18px;
}
.live-banner-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; opacity: .8; margin-bottom: 2px;
}
.sub-hero { border: none; color: #fff; }
.sub-hero-grid {
  display: grid; gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
}
@media (max-width: 759px) {
  .sub-hero-grid { grid-template-columns: 1fr; }
}
.sub-feat-list {
  list-style: none; padding: 0; margin: 12px 0 0;
}
.sub-feat-list li {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: 12px; opacity: .92; margin-top: 6px;
}
.sub-feat-list li i { flex: 0 0 auto; margin-top: 1px; }
.sub-hero-panel {
  background: rgba(255,255,255,.12); border-radius: 12px; padding: 14px;
  backdrop-filter: blur(4px);
}
.sub-panel-box {
  background: rgba(255,255,255,.12); border-radius: 10px; padding: 10px 12px;
}
.sub-agenda-row {
  display: flex; gap: 10px; align-items: baseline;
  font-size: 12px; padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.sub-agenda-row:last-child { border-bottom: 0; }
.sub-agenda-row .fw-bold { min-width: 42px; }
.q-card { border: 1px solid var(--border); border-radius: 12px; padding: 16px; background: #fff; margin-bottom: 12px; }
.q-choices label {
  display: block; border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; margin-top: 8px; cursor: pointer;
}
.q-choices input { margin-right: 8px; }
.q-choices label:hover { background: var(--muted); }
.correct { border-color: #10b981 !important; background: #ecfdf5 !important; }
.wrong { border-color: #ef4444 !important; background: #fef2f2 !important; }
.lang-switch a {
  display: inline-block; padding: 4px 8px; border-radius: 6px; font-size: 12px; font-weight: 700;
  color: var(--muted-fg); border: 1px solid var(--border); margin-left: 4px;
}
.lang-switch a.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.topbar .lang-switch a { background: #fff; }
.topbar .lang-switch a.active { background: var(--brand); color: #fff; }
.sidebar .lang-switch a { border-color: rgba(255,255,255,.2); color: rgba(255,255,255,.8); }
.sidebar .lang-switch a.active { background: var(--brand); color: #fff; }

/* Informasi / pengumuman */
.info-search-wrap { position: relative; }
.info-search-ico {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted-fg); font-size: 18px; pointer-events: none;
}
.info-search { padding-left: 38px; }
.info-tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.info-tab {
  appearance: none; border: 1px solid var(--border); background: #fff; color: var(--muted-fg);
  border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 700;
  cursor: pointer; font-family: inherit; line-height: 1.3;
}
.info-tab:hover { background: var(--muted); color: var(--fg); }
.info-tab.is-active {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
.info-item {
  width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit;
  padding: 0; display: block; transition: border-color .15s, box-shadow .15s;
}
.info-item:hover { border-color: rgba(61,158,163,.45); box-shadow: 0 4px 14px rgba(36,54,90,.08); }
.info-item.is-unread { border-left: 3px solid var(--brand); }
.info-item.is-pinned .info-item-title::before { content: none; }
.info-item-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.info-item-title { margin-bottom: 4px; }
body.info-modal-open { overflow: hidden; }
.info-modal {
  position: fixed; inset: 0; z-index: 1000; display: flex;
  align-items: center; justify-content: center; padding: 16px;
}
.info-modal.is-hidden,
.info-modal-image.is-hidden,
.info-item.is-hidden,
#info-empty.is-hidden { display: none !important; }
.info-modal-backdrop {
  position: absolute; inset: 0; background: rgba(30, 42, 58, .45);
}
.info-modal-dialog {
  position: relative; z-index: 1; width: min(640px, 100%);
  max-height: min(88vh, 760px); overflow: auto;
  background: #fff; border-radius: 14px; border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(36, 54, 90, .22);
  padding: 18px 20px 16px;
}
.info-modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  margin-bottom: 14px;
}
.info-modal-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.info-modal-close {
  appearance: none; border: 1px solid var(--border); background: #fff;
  width: 36px; height: 36px; border-radius: 10px; cursor: pointer;
  color: var(--muted-fg); font-size: 20px; display: inline-flex;
  align-items: center; justify-content: center; flex: 0 0 auto;
}
.info-modal-close:hover { background: var(--muted); color: var(--fg); }
.info-modal-title {
  margin: 0 0 14px; font-size: 20px; line-height: 1.3; color: var(--navy);
}
.info-modal-image { margin-bottom: 14px; }
.info-modal-image img {
  width: 100%; border-radius: 10px; border: 1px solid var(--border); display: block;
}
.info-modal-body {
  font-size: 14px; line-height: 1.65; color: var(--fg);
}
.info-modal-body p { margin: 0 0 12px; }
.info-modal-body p:last-child { margin-bottom: 0; }
.info-modal-foot {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap;
}
#jadwal-modal-foot {
  justify-content: flex-start;
}
@media (max-width: 640px) {
  .info-modal { align-items: flex-end; padding: 0; }
  .info-modal-dialog {
    width: 100%; max-height: 92vh; border-radius: 16px 16px 0 0;
  }
}

/* Jadwal — calendar (Lovable parity) */
.btn-icon {
  width: 36px; height: 36px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.jadwal-nav {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.jadwal-label { margin-left: 4px; font-size: 15px; text-transform: capitalize; }
.jadwal-filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
}
.jadwal-select {
  min-width: 180px; flex: 1 1 180px; max-width: 260px;
  height: 38px; padding: 6px 10px;
}
.jadwal-legend {
  display: flex; flex-wrap: wrap; gap: 10px 14px;
  margin-left: auto; align-items: center;
}
.jadwal-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.jadwal-dot {
  width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto;
}
.jadwal-month-head {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px; margin-bottom: 4px;
}
.jadwal-month-dow {
  text-align: center; font-size: 11px; font-weight: 700;
  color: var(--muted-fg); padding: 6px 0; text-transform: uppercase;
}
.jadwal-month-grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.jadwal-day {
  min-height: 110px; border: 1px solid var(--border);
  border-radius: 10px; padding: 6px; background: var(--card, #fff);
  display: flex; flex-direction: column; gap: 4px;
}
.jadwal-day.is-out { opacity: .45; background: var(--muted); }
.jadwal-day.is-today {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 1px rgba(61,158,163,.25);
}
.jadwal-day-num {
  font-size: 12px; font-weight: 700; color: var(--fg);
  width: 24px; height: 24px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
}
.jadwal-day.is-today .jadwal-day-num {
  background: var(--brand); color: #fff;
}
.jadwal-day-events { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.jadwal-chip {
  display: flex; gap: 4px; align-items: baseline;
  width: 100%; border: 1px solid transparent; border-radius: 6px;
  padding: 2px 5px; font-size: 10px; line-height: 1.3;
  text-align: left; cursor: pointer; background: transparent;
  overflow: hidden;
}
.jadwal-chip:hover { filter: brightness(.96); }
.jadwal-chip-time { font-weight: 700; flex: 0 0 auto; }
.jadwal-chip-title {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.jadwal-more {
  font-size: 10px; font-weight: 700; color: var(--brand);
  text-decoration: none; padding: 2px 4px;
}
.jadwal-week { align-items: stretch; }
.grid-7 {
  display: grid; gap: 12px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.jadwal-week-today { border-color: var(--brand); }
.jadwal-list-item {
  display: flex; gap: 8px; align-items: flex-start;
  width: 100%; text-align: left; border: 0; background: transparent;
  padding: 4px 0; cursor: pointer; border-radius: 6px;
}
.jadwal-list-item:hover { background: var(--muted); }
.jadwal-day-row {
  width: 100%; border: 1px solid var(--border); background: var(--card, #fff);
  cursor: pointer; text-align: left;
}
.jadwal-day-row:hover { border-color: var(--brand); }
.jadwal-kind-ico {
  width: 36px; height: 36px; border-radius: 10px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.jadwal-modal-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
#jadwal-modal-when { line-height: 1.4; }
.jadwal-detail-row {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 0; border-bottom: 1px solid var(--border);
}
.jadwal-detail-row:last-child { border-bottom: 0; }
.jadwal-detail-row > i {
  margin-top: 2px; color: var(--brand); flex: 0 0 auto;
}
.card-body.p-2 { padding: 8px; }
@media (max-width: 900px) {
  .grid-7 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jadwal-day { min-height: 88px; }
  .jadwal-chip-title { display: none; }
  .jadwal-legend { margin-left: 0; width: 100%; }
}
/* Progress page (Lovable parity) */
.progress-overall-pct { font-size: 22px; font-weight: 800; color: var(--brand); line-height: 1; }
.progress-break-item {
  border: 1px solid var(--border);
  background: var(--muted);
  border-radius: 10px;
  padding: 10px 12px;
}
.progress-trend-stats {
  display: none;
  gap: 16px;
  align-items: flex-start;
}
@media (min-width: 640px) {
  .progress-trend-stats { display: flex; }
}
.progress-trend-stat { text-align: right; }
.progress-trend-stat .label {
  font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted-fg);
}
.progress-trend-stat .value { font-size: 14px; font-weight: 700; }
.progress-trend-stat .value.is-brand { color: var(--brand); }
.progress-chart-wrap { height: 240px; position: relative; }
.progress-component-meta { display: inline-flex; align-items: center; gap: 8px; }
.progress-with-mark { position: relative; }
.progress-pass-mark {
  position: absolute; top: 0; bottom: 0; width: 2px;
  background: #e11d48; transform: translateX(-50%); pointer-events: none;
}
.progress-physical-note {
  margin-top: 4px;
  border: 1px dashed var(--border);
  background: rgba(61,158,163,.06);
  border-radius: 10px;
  padding: 12px;
}
.progress-material-list { list-style: none; margin: 0; padding: 0; }
.progress-material-list li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.progress-material-list li:last-child { border-bottom: 0; }
.progress-status-pill {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--border); border-radius: 999px;
  padding: 3px 10px; font-size: 11px; font-weight: 600; white-space: nowrap;
}
.progress-status-pill.is-done { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.progress-status-pill.is-ongoing { background: rgba(61,158,163,.1); color: var(--brand-dark); border-color: rgba(61,158,163,.3); }
.progress-status-pill.is-pending { background: var(--muted); color: var(--muted-fg); }
@media (max-width: 640px) {
  .jadwal-month-dow { font-size: 10px; }
  .jadwal-day { min-height: 72px; padding: 4px; }
  .jadwal-chip { padding: 2px 3px; }
}

/* Ujian & Try Out */
.badge-outline {
  background: #fff; color: var(--muted-fg); border: 1px solid var(--border);
}
.text-brand { color: var(--brand); }
.ujian-tabs { margin-bottom: 16px; }
.ujian-tabs .info-tab {
  display: inline-flex; align-items: center; gap: 6px;
}
.ujian-panel.is-hidden { display: none !important; }
.ujian-empty { padding: 28px 18px; text-align: center; border-style: dashed; }
.tryout-tab-count {
  min-width: 18px; height: 18px; padding: 0 6px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; line-height: 1;
  background: var(--muted); color: var(--muted-fg);
}
.info-tab.is-active .tryout-tab-count {
  background: rgba(255,255,255,.22); color: #fff;
}
.tryout-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 800px) {
  .tryout-grid { grid-template-columns: 1fr; }
}
.tryout-card {
  height: 100%;
  display: flex; flex-direction: column; gap: 14px;
  padding: 16px 18px;
  border-left: 3px solid var(--border);
}
.tryout-card.is-start,
.tryout-card.is-continue { border-left-color: var(--brand); }
.tryout-card.is-upcoming { border-left-color: var(--gold); }
.tryout-card.is-done { border-left-color: #34d399; }
.tryout-card.is-closed { border-left-color: #f87171; }
.tryout-card-top {
  display: flex; align-items: flex-start; gap: 12px;
}
.tryout-icon {
  width: 42px; height: 42px; border-radius: 12px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(61,158,163,.12); color: var(--brand); font-size: 20px;
}
.tryout-card.is-upcoming .tryout-icon { background: rgba(228,192,74,.18); color: #8a6b10; }
.tryout-card.is-done .tryout-icon { background: #d1fae5; color: #065f46; }
.tryout-card.is-closed .tryout-icon { background: #fee2e2; color: #991b1b; }
.tryout-top-text { min-width: 0; flex: 1; }
.tryout-badge { margin-bottom: 6px; }
.tryout-title {
  margin: 0; font-size: 15px; font-weight: 700; line-height: 1.35;
}
.tryout-meta {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 8px;
}
.tryout-meta li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px;
}
.tryout-meta i {
  width: 18px; margin-top: 2px; flex: 0 0 auto;
  color: var(--brand); font-size: 16px;
}
.tryout-meta-label {
  display: block; font-size: 11px; font-weight: 600;
  color: var(--muted-fg); line-height: 1.2;
}
.tryout-meta strong { font-weight: 700; }
.tryout-duration {
  margin-top: auto;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  align-self: center;
  min-width: 120px; padding: 8px 14px; border-radius: 999px;
  background: var(--muted); color: var(--navy);
  font-size: 13px; font-weight: 800;
}
.tryout-card-footer { margin-top: 2px; }
.tryout-card-footer .btn i { font-size: 16px; }
.tryout-btn-closed { color: #991b1b; border-color: #fecaca; background: #fff7f7; }
.tryout-btn-done { color: #065f46; border-color: #a7f3d0; background: #f0fdf4; }

/* Exam taking */
.exam-body { background: var(--bg); min-height: 100vh; padding-bottom: 72px; }
.exam-topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 18px; background: #fff; border-bottom: 1px solid var(--border);
}
.exam-topbar-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.exam-back {
  width: 36px; height: 36px; border-radius: 10px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); color: var(--fg); background: #fff;
}
.exam-back:hover { background: var(--muted); text-decoration: none; }
.exam-kicker { font-size: 11px; font-weight: 700; color: var(--muted-fg); text-transform: uppercase; letter-spacing: .04em; }
.exam-topbar-title h1 { margin: 0; font-size: 16px; line-height: 1.3; }
.exam-timer { text-align: right; }
.exam-timer-label { display: block; font-size: 11px; color: var(--muted-fg); font-weight: 600; }
.exam-timer .time { font-size: 18px; font-variant-numeric: tabular-nums; color: var(--navy); }
.exam-layout {
  display: grid; gap: 16px; padding: 16px 18px;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: start;
}
@media (max-width: 900px) {
  .exam-layout { grid-template-columns: 1fr; }
  .exam-side { display: none; }
}
.exam-soal { padding: 16px 18px; }
.exam-soal.is-hidden, .navigasi.is-hidden, .exam-mapel.is-hidden, .exam-sheet.is-hidden { display: none !important; }
.exam-soal-head { font-weight: 800; color: var(--navy); margin-bottom: 10px; }
.exam-soal-body { font-size: 15px; line-height: 1.65; margin-bottom: 14px; }
.exam-soal-body img { max-width: 100%; height: auto; }
.exam-audio { width: 100%; margin: 12px 0; }
.exam-rest { text-align: center; padding: 28px 12px; color: var(--muted-fg); }
.exam-rest i { font-size: 42px; color: var(--brand); display: block; margin-bottom: 8px; }
.exam-choices { display: grid; gap: 8px; }
.exam-choice {
  display: flex; align-items: flex-start; gap: 10px;
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
  cursor: pointer; background: #fff;
}
.exam-choice:hover { border-color: rgba(61,158,163,.45); }
.exam-choice input { margin-top: 4px; }
.exam-choice-key {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--muted); font-size: 12px; font-weight: 800; color: var(--navy);
}
.exam-choice-text { flex: 1; min-width: 0; }
.exam-soal-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.exam-side { display: grid; gap: 12px; }
.exam-side-card { padding: 14px; }
.exam-side-title { font-size: 13px; font-weight: 800; margin-bottom: 10px; }
.exam-ticks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.exam-ticks strong { display: block; font-size: 20px; line-height: 1.1; }
.exam-ticks span { font-size: 11px; color: var(--muted-fg); }
.exam-mapel-list { display: grid; gap: 6px; }
.exam-mapel {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; cursor: pointer;
}
.exam-mapel input { margin: 0; }
.exam-mapel-name { flex: 1; font-size: 13px; font-weight: 700; }
.exam-mapel-pct { font-size: 11px; font-weight: 800; color: var(--brand); }
.exam-qnav {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px;
}
.exam-qnav li {
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 4px;
  text-align: center; font-size: 12px; font-weight: 700; cursor: pointer; background: #fff;
}
.exam-qnav li.filled { background: rgba(61,158,163,.12); border-color: var(--brand); color: var(--brand); }
.exam-qnav li.is-wrong { background: #dc3545; border-color: #dc3545; color: #fff; }
.exam-qnav li.is-wrong span { color: #fff; }
.exam-qnav li span { display: block; font-size: 10px; }
.exam-choice.is-correct { border-color: #198754; background: rgba(25,135,84,.08); }
.exam-choice.is-wrong { border-color: #dc3545; background: rgba(220,53,69,.08); }
.exam-pembahasan { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.exam-pembahasan h3 { font-size: 16px; font-weight: 800; margin: 16px 0 8px; }
.exam-pembahasan-kunci { font-size: 15px; margin: 0 0 10px; }
.exam-pembahasan-body { font-size: 15px; line-height: 1.55; }
.exam-pembahasan iframe { width: 100%; max-width: 560px; height: 315px; border: 0; border-radius: 10px; }
.ujian-hasil-footer { display: flex; justify-content: center; padding: 16px; border-top: 1px solid var(--border); }
.exam-mobile-bar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  gap: 8px; padding: 10px 12px; background: #fff; border-top: 1px solid var(--border);
}
@media (max-width: 900px) {
  .exam-mobile-bar { display: flex; }
}
.exam-sheet {
  position: fixed; inset: 0; z-index: 40; background: rgba(30,42,58,.45);
  display: flex; align-items: flex-end;
}
.exam-sheet-inner {
  width: 100%; max-height: 80vh; overflow: auto;
  background: #fff; border-radius: 16px 16px 0 0; padding: 16px;
}
.exam-ab-wrap { overflow: auto; }
.exam-ab th, .exam-ab td { font-size: 12px; }

/* Hasil ujian */
.ujian-hasil-hero { background: linear-gradient(135deg, var(--brand), var(--navy)); color: #fff; border: 0; }
.ujian-hasil-hero .muted { color: rgba(255,255,255,.75); }
.ujian-hasil-hero-body {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.ujian-hasil-total { font-size: 36px; font-weight: 800; line-height: 1.1; }
.ujian-hasil-back.btn-outline {
  background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); color: #fff;
}
.ujian-hasil-back.btn-outline:hover { background: rgba(255,255,255,.2); }

.ujian-compare-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px 18px;
  min-width: min(100%, 420px);
  flex: 1;
}
.ujian-compare-score {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.16);
}
.ujian-compare-score.is-latest {
  background: rgba(255,255,255,.2);
  border-color: rgba(255,255,255,.28);
}
.ujian-compare-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
  margin-bottom: 4px;
}
.ujian-compare-value {
  display: block;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
}
.ujian-compare-score.is-first .ujian-compare-value { font-size: 26px; opacity: .95; }
.ujian-compare-bridge {
  display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 72px;
}
.ujian-compare-delta {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 10px; border-radius: 999px;
  font-size: 14px; font-weight: 800; line-height: 1;
  background: rgba(255,255,255,.16);
}
.ujian-compare-delta--up { background: rgba(34,197,94,.22); color: #dcfce7; }
.ujian-compare-delta--down { background: rgba(239,68,68,.22); color: #fee2e2; }
.ujian-compare-delta--same { color: rgba(255,255,255,.92); }
.ujian-compare-delta-label {
  font-size: 11px; font-weight: 700; color: rgba(255,255,255,.78);
}

.ujian-trend {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; line-height: 1.2; white-space: nowrap;
}
.ujian-trend--up { background: rgba(34,197,94,.14); color: #15803d; }
.ujian-trend--down { background: rgba(239,68,68,.12); color: #b91c1c; }
.ujian-trend--same { background: var(--muted); color: var(--muted-fg); }
.ujian-trend--solid.ujian-trend--up { background: #dcfce7; }
.ujian-trend--solid.ujian-trend--down { background: #fee2e2; }
.ujian-trend--solid.ujian-trend--same { background: #eef2f5; }

.ujian-hasil-body--banding { padding-top: 14px; }
.ujian-compare-list { display: grid; gap: 12px; }
.ujian-compare-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(61,158,163,.04), transparent 48%),
    #fff;
  padding: 14px 16px;
}
.ujian-compare-card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.ujian-compare-card-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; margin-right: 8px; border-radius: 7px;
  background: rgba(61,158,163,.12); color: var(--brand);
  font-size: 11px; font-weight: 800; vertical-align: 2px;
}
.ujian-compare-card-title {
  display: inline; margin: 0; font-size: 16px; font-weight: 800; color: var(--navy);
}
.ujian-compare-card-meta {
  margin-top: 4px; font-size: 12px; color: var(--muted-fg); font-weight: 600;
}

.ujian-compare-scoreline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  margin-bottom: 12px;
}
.ujian-compare-scorechip {
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--muted);
  border: 1px solid transparent;
}
.ujian-compare-scorechip span {
  display: block; font-size: 11px; font-weight: 700; color: var(--muted-fg); margin-bottom: 2px;
}
.ujian-compare-scorechip strong {
  display: block; font-size: 22px; font-weight: 800; color: var(--navy); line-height: 1.15;
}
.ujian-compare-scorechip.is-latest {
  background: rgba(61,158,163,.1);
  border-color: rgba(61,158,163,.22);
}
.ujian-compare-scorechip.is-latest strong { color: var(--brand-dark); }
.ujian-compare-scorechip-mid {
  display: flex; align-items: center; justify-content: center; min-width: 56px;
}
.ujian-compare-chip-delta {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 48px; padding: 6px 8px; border-radius: 999px;
  font-size: 13px; font-weight: 800;
}
.ujian-compare-chip-delta--up { background: #dcfce7; color: #15803d; }
.ujian-compare-chip-delta--down { background: #fee2e2; color: #b91c1c; }
.ujian-compare-chip-delta--same { background: #eef2f5; color: var(--muted-fg); }

.ujian-compare-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.ujian-compare-stat {
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fbfc;
  border: 1px solid var(--border);
}
.ujian-compare-stat--ok { border-color: rgba(34,197,94,.18); background: rgba(34,197,94,.05); }
.ujian-compare-stat--bad { border-color: rgba(239,68,68,.16); background: rgba(239,68,68,.04); }
.ujian-compare-stat--blank { border-color: rgba(107,124,138,.18); background: rgba(107,124,138,.05); }
.ujian-compare-stat-label {
  display: block; font-size: 11px; font-weight: 700; color: var(--muted-fg); margin-bottom: 6px;
}
.ujian-compare-stat-values {
  display: inline-flex; align-items: center; gap: 4px;
  font-variant-numeric: tabular-nums; font-weight: 800; color: var(--navy);
}
.ujian-compare-stat-values .is-old { color: var(--muted-fg); font-weight: 700; }
.ujian-compare-stat-values i { color: var(--muted-fg); font-size: 14px; }
.ujian-compare-stat-values.is-up .is-new { color: #15803d; }
.ujian-compare-stat-values.is-down .is-new { color: #b91c1c; }

.ujian-hasil-mobile { display: none; list-style: none; margin: 0; padding: 0; }
@media (max-width: 720px) {
  .ujian-hasil-table { display: none; }
  .ujian-hasil-mobile { display: grid; gap: 8px; }
  .ujian-hasil-mobile li {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
  }
  .ujian-compare-hero {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .ujian-compare-bridge {
    grid-column: 1 / -1;
    order: 3;
    flex-direction: row;
    justify-content: center;
    gap: 8px;
  }
  .ujian-compare-scoreline { grid-template-columns: 1fr 1fr; }
  .ujian-compare-scorechip-mid {
    grid-column: 1 / -1;
    order: 3;
  }
  .ujian-compare-stats { grid-template-columns: 1fr; }
  .ujian-compare-card-head { flex-wrap: wrap; }
}
.mt-2 { margin-top: 8px; }

/* Materi Pembelajaran (Lovable parity) */
.materi-progress-card {
  border-color: rgba(61,158,163,.35);
  background: linear-gradient(135deg, rgba(61,158,163,.06), #fff 45%, rgba(36,54,90,.04));
}
.materi-progress-count { font-size: 28px; font-weight: 800; line-height: 1; color: var(--brand); }
.materi-progress-count .muted { font-size: 16px; font-weight: 600; }
.materi-filters-grid {
  display: grid; gap: 10px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .materi-filters-grid { grid-template-columns: 1fr minmax(140px, 180px); }
}
.materi-type-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: var(--muted);
}
@media (max-width: 640px) {
  .materi-type-tab { font-size: 12px; padding: 8px 6px; }
}
.materi-type-tab {
  appearance: none; border: 0; background: transparent;
  color: var(--muted-fg); border-radius: 8px; padding: 8px 10px;
  font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.materi-type-tab.is-active {
  background: #fff; color: var(--brand);
  box-shadow: 0 1px 2px rgba(36,54,90,.12);
}
.materi-video-wrap iframe {
  width: 100%; height: 100%; border: 0; display: block;
}
.materi-search-wrap { position: relative; }
.materi-search-ico {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted-fg); font-size: 18px; pointer-events: none;
}
.materi-search { padding-left: 38px; }
.materi-select-wrap { position: relative; }
.materi-select-wrap > i {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted-fg); font-size: 16px; pointer-events: none; z-index: 1;
}
.materi-select-wrap select { padding-left: 34px; }
.materi-subject { overflow: hidden; }
.materi-subject-sum {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; user-select: none;
}
.materi-subject-sum::-webkit-details-marker { display: none; }
.materi-subject-sum-main { min-width: 0; flex: 1; }
.materi-subject-sum-side {
  display: flex; align-items: center; gap: 10px; flex: 0 0 auto;
}
.materi-chevron {
  font-size: 20px; color: var(--muted-fg);
  transition: transform .15s ease;
}
.materi-subject[open] .materi-chevron { transform: rotate(180deg); }
.materi-subject-body {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.materi-topic-grid {
  display: grid; gap: 12px;
  grid-template-columns: 1fr;
  padding-top: 0;
  border-top: 0;
}
.materi-topic-grid.is-hidden { display: none !important; }
@media (min-width: 720px) {
  .materi-topic-grid { grid-template-columns: 1fr 1fr; }
}
.materi-topic {
  border: 1px solid var(--border); border-radius: 12px;
  background: #fff; padding: 12px; display: flex; flex-direction: column; gap: 8px;
  transition: border-color .15s, background .15s;
}
.materi-topic:hover { border-color: rgba(61,158,163,.4); }
.materi-topic.is-done {
  border-color: rgba(61,158,163,.45);
  background: rgba(61,158,163,.05);
}
.materi-topic.is-hidden,
.materi-subject.is-hidden,
.materi-empty-filter.is-hidden,
.materi-modal.is-hidden,
.materi-panel.is-hidden,
.materi-filters-grid.is-hidden,
.latihan-hasil.is-hidden,
.latihan-start.is-hidden,
.latihan-locked.is-hidden,
#materi-subjects.is-hidden,
#materi-modal-done.is-hidden { display: none !important; }
.materi-topic-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.materi-cat-badge {
  text-transform: uppercase; letter-spacing: .04em; font-size: 10px;
  border-color: rgba(36,54,90,.25); background: rgba(36,54,90,.05); color: var(--navy);
}
.materi-status-badge { font-size: 10px; }
.materi-status-badge i { margin-right: 2px; }
.materi-topic-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.materi-topic-summary {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.materi-topic-meta {
  display: flex; flex-wrap: wrap; gap: 10px 14px;
}
.materi-topic-meta i { margin-right: 2px; vertical-align: -1px; }
.materi-topic-actions { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.materi-topic-actions .flex-1 { flex: 1 1 auto; }
.materi-topic-actions form.flex-1 { min-width: 0; }
.materi-topic-actions form.flex-1 .btn { width: 100%; }
.materi-topic-actions .materi-toggle { width: 36px; padding-left: 0; padding-right: 0; }
.materi-empty-filter { grid-column: 1 / -1; margin: 4px 0 0; }
body.materi-modal-open { overflow: hidden; }
.materi-modal {
  position: fixed; inset: 0; z-index: 1000; display: flex;
  align-items: center; justify-content: center; padding: 16px;
}
.materi-modal-backdrop {
  position: absolute; inset: 0; background: rgba(30, 42, 58, .45);
}
.materi-modal-dialog {
  position: relative; z-index: 1; width: min(75%);
  max-height: min(90vh, 820px); overflow: auto;
  background: #fff; border-radius: 14px; border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(36, 54, 90, .22);
  padding: 18px 20px 16px;
}
.materi-modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  margin-bottom: 8px;
}
.materi-modal-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.materi-modal-close {
  appearance: none; border: 1px solid var(--border); background: #fff;
  width: 36px; height: 36px; border-radius: 10px; cursor: pointer;
  color: var(--muted-fg); font-size: 20px; display: inline-flex;
  align-items: center; justify-content: center; flex: 0 0 auto;
}
.materi-modal-close:hover { background: var(--muted); color: var(--fg); }
.materi-modal-title {
  margin: 0 0 6px; font-size: 20px; line-height: 1.3; color: var(--navy);
}
.materi-modal-desc { margin: 0 0 14px; }
.materi-modal-body { min-height: 80px; margin-bottom: 14px; }
.materi-pdf-frame {
  width: 100%; height: min(52vh, 420px); border: 1px solid var(--border);
  border-radius: 10px; background: #fff;
}
.materi-modal-close i { pointer-events: none; }
.materi-tabs {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px;
  margin-bottom: 12px;
}
.materi-tab {
  appearance: none; border: 1px solid var(--border); background: var(--muted);
  color: var(--muted-fg); border-radius: 8px; padding: 8px 6px;
  font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.materi-tab.is-active {
  background: #fff; border-color: var(--brand); color: var(--brand);
  box-shadow: 0 0 0 1px rgba(61,158,163,.2);
}
.materi-tab:disabled { opacity: .45; cursor: not-allowed; }
.materi-panel { min-height: 80px; }
.materi-video-wrap {
  aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: var(--navy);
}
.materi-video-wrap video { width: 100%; height: 100%; display: block; }
.materi-resource-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--muted); padding: 14px;
}
.materi-resource-ico {
  width: 40px; height: 40px; border-radius: 8px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(61,158,163,.12); color: var(--brand); font-size: 20px;
}
.materi-text-panel {
  border: 1px solid var(--border); border-radius: 10px;
  background: rgba(36,54,90,.03); padding: 14px;
  font-size: 14px; line-height: 1.65;
}
.materi-text-panel p { margin: 0 0 10px; }
.materi-text-panel ul { margin: 0; padding-left: 18px; color: var(--muted-fg); }
.materi-text-panel li { margin-bottom: 4px; }
.materi-empty-tab {
  border: 1px dashed var(--border); border-radius: 10px;
  padding: 28px 12px; text-align: center; color: var(--muted-fg); font-size: 13px;
}
.materi-modal-foot {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end;
}
@media (max-width: 640px) {
  .materi-modal { align-items: flex-end; padding: 0; }
  .materi-modal-dialog {
    width: 100%; max-height: 92vh; border-radius: 16px 16px 0 0;
  }
  .materi-tabs { grid-template-columns: 1fr 1fr; }
  .materi-subject-sum-side .materi-subject-bar { display: none; }
}
