/* =====================================================================
   Login + Dashboard — memakai token & font yang sama (styles.css)
   ===================================================================== */

/* ============ AUTH / LOGIN ============ */
.auth-body { background: var(--bg-alt); }
.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }

.auth-aside {
  position: relative; overflow: hidden; color: #fff; padding: 56px 56px 48px;
  background: var(--grad); display: flex; flex-direction: column;
}
.brand-light .brand-mark { background: #fff; color: var(--indigo); }
.brand-light, .brand-light .brand-name span { color: #fff; }
.auth-aside h2 { font-size: 32px; font-weight: 800; margin: auto 0 14px; letter-spacing: -.5px; }
.auth-aside > p { font-size: 16px; color: rgba(255,255,255,.9); max-width: 360px; margin-bottom: 26px; }
.auth-points { display: grid; gap: 10px; }
.auth-points li { font-weight: 600; }
.auth-aside-blob { position: absolute; width: 360px; height: 360px; border-radius: 50%; background: rgba(255,255,255,.12); bottom: -120px; right: -100px; }

.auth-main { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 24px; }
.brand-mobile { display: none; margin-bottom: 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 28px; font-weight: 800; letter-spacing: -.5px; }
.auth-sub { color: var(--muted); margin: 6px 0 28px; }
.auth-sub a, .auth-link { color: var(--indigo); font-weight: 600; }
#loginForm { display: grid; gap: 16px; }
.auth-row { display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
.checkbox { display: flex; align-items: center; gap: 8px; color: var(--slate); cursor: pointer; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--indigo); }
.auth-divider { text-align: center; position: relative; margin: 22px 0; color: var(--muted); font-size: 13px; }
.auth-divider::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 1px; background: var(--line); }
.auth-divider span { background: var(--bg-alt); padding: 0 14px; position: relative; }
.auth-main .auth-divider span { background: #fff; }
.auth-hint { font-size: 12.5px; color: var(--muted); text-align: center; margin-top: 16px; }

/* ============ DASHBOARD LAYOUT ============ */
.dash-body { background: var(--bg-alt); }
.dash { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; }

/* sidebar / daftar isi */
.sidebar {
  background: var(--ink); color: #cbd5e1; padding: 22px 16px;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar-brand { color: #fff; padding: 6px 8px 22px; }
.sidebar-brand .brand-name span { color: #a5b4fc; }
.side-nav { flex: 1; overflow-y: auto; }
.side-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #64748b; margin: 18px 8px 8px; }
.side-link {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px;
  font-weight: 600; font-size: 14.5px; color: #cbd5e1; transition: background .2s, color .2s; cursor: pointer;
}
.side-link .si {
  width: 20px; height: 20px; flex-shrink: 0;
  fill: none; stroke: url(#navgrad); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.side-link.active .si { stroke: #fff; }    /* kontras di latar indigo aktif */
.side-link.ghost .si { stroke: url(#navgrad); opacity: .9; }
.side-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-link.active { background: var(--indigo); color: #fff; }
.side-link .badge { margin-left: auto; background: rgba(255,255,255,.15); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.side-link.active .badge { background: rgba(255,255,255,.25); }
.side-foot { border-top: 1px solid rgba(255,255,255,.1); padding-top: 12px; display: grid; gap: 2px; }
.side-link.ghost { color: #94a3b8; }
.sidebar-overlay { display: none; }

/* main */
.dash-main { display: flex; flex-direction: column; min-width: 0; }
.dash-top {
  position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 14px 28px;
}
.dash-burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.dash-burger span { width: 22px; height: 2.5px; background: var(--grad); border-radius: 2px; }
.dash-search { flex: 1; max-width: 420px; display: flex; align-items: center; gap: 10px; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; }
.dash-search input { border: 0; background: transparent; outline: none; font-family: inherit; font-size: 14.5px; width: 100%; color: var(--ink); }
.dash-top-actions { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.icon-btn { position: relative; background: none; border: 0; font-size: 19px; cursor: pointer; }
.icon-btn .dot { position: absolute; top: 0; right: 0; width: 8px; height: 8px; background: #ec4899; border-radius: 50%; border: 2px solid #fff; }
.dash-user { display: flex; align-items: center; gap: 10px; }
.dash-ava { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 800; font-size: 15px; }
.dash-ava.lg { width: 72px; height: 72px; font-size: 28px; }
.dash-uname { font-weight: 700; font-size: 14.5px; }

.dash-content { padding: 28px; max-width: 1180px; width: 100%; }

/* panels */
.panel { display: none; animation: fadein .35s ease; }
.panel.active { display: block; }
@keyframes fadein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.panel-head h1 { font-size: 28px; font-weight: 800; letter-spacing: -.5px; }
.panel-sub { color: var(--muted); margin-top: 4px; }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; margin-bottom: 24px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; gap: 14px; }
.kpi-ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; }
.bg-indigo { background: var(--indigo-50); } .bg-green { background: #dcfce7; } .bg-amber { background: #fef3c7; } .bg-pink { background: #fce7f3; }
.kpi strong { display: block; font-size: 24px; font-weight: 800; }
.kpi span { font-size: 13.5px; color: var(--muted); }

/* generic card */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-head h3 { font-size: 17px; }
.card-more { font-size: 13.5px; font-weight: 700; color: var(--indigo); cursor: pointer; }

/* continue learning */
.continue { border-radius: 12px; padding: 20px; color: #fff; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.continue .chip { background: rgba(255,255,255,.2); }
.continue h4 { font-size: 18px; margin: 8px 0 12px; }
.chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--indigo-50); color: var(--indigo-600); }
.chip.live { background: #fee2e2; color: #dc2626; }
.bar { height: 7px; background: rgba(255,255,255,.3); border-radius: 999px; overflow: hidden; max-width: 320px; }
.continue .bar { background: rgba(255,255,255,.3); }
.bar i { display: block; height: 100%; background: #fff; border-radius: 999px; }
.bar-label { font-size: 12.5px; margin-top: 8px; color: rgba(255,255,255,.9); }

/* mini list */
.mini-list { display: grid; gap: 14px; }
.mini-list li { display: flex; align-items: center; gap: 14px; }
.ml-date { width: 48px; height: 48px; border-radius: 12px; background: var(--indigo-50); color: var(--indigo-600); display: grid; place-items: center; font-size: 11px; font-weight: 700; line-height: 1; text-align: center; }
.ml-date b { display: block; font-size: 18px; }
.ml-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: var(--indigo-600); }
.mini-list strong { font-size: 14.5px; display: block; }
.mini-list small { color: var(--muted); font-size: 13px; }

/* courses */
.course-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px; }
.course { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; }
.course-thumb { width: 120px; flex-shrink: 0; }
.course-info { padding: 16px; flex: 1; }
.course-info h4 { font-size: 16px; margin: 8px 0 12px; }
.course .bar { background: var(--line); }
.course .bar i { background: var(--indigo); }
.course-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.course-foot span { font-size: 13px; font-weight: 700; color: var(--slate); }
.course-foot .done { color: #059669; }

/* schedule */
.sched-list { display: grid; gap: 14px; }
.sched { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; align-items: center; gap: 18px; }
.sched-date { width: 60px; height: 60px; border-radius: 12px; background: var(--grad); color: #fff; display: grid; place-items: center; flex-shrink: 0; line-height: 1; }
.sched-date b { font-size: 24px; font-weight: 800; } .sched-date small { font-size: 11px; }
.sched-info { flex: 1; } .sched-info h4 { font-size: 16px; margin: 6px 0 4px; } .sched-info p { font-size: 13.5px; color: var(--muted); }

/* certificates */
.cert-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.cert { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cert-top { height: 110px; display: grid; place-items: center; font-size: 40px; }
.cert-body { padding: 16px; }
.cert-body h4 { font-size: 15.5px; } .cert-body small { color: var(--muted); font-size: 12.5px; display: block; margin: 4px 0 14px; }
.cert-act { display: flex; gap: 8px; }

/* membership banner + table */
.member-banner { background: var(--grad); color: #fff; border-radius: var(--radius); padding: 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 18px; flex-wrap: wrap; }
.member-banner .chip { background: rgba(255,255,255,.2); color: #fff; }
.member-banner h3 { font-size: 19px; margin: 8px 0 4px; }
.member-banner p { color: rgba(255,255,255,.9); font-size: 14px; }
.member-banner .btn-primary { background: #fff; color: var(--indigo); }
.tx { width: 100%; border-collapse: collapse; font-size: 14px; }
.tx th, .tx td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); }
.tx th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tag-ok { background: #dcfce7; color: #059669; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }

/* settings */
.settings-card { display: flex; gap: 28px; flex-wrap: wrap; }
.set-avatar { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.set-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; flex: 1; min-width: 280px; }
.set-form button, .set-form .form-note { grid-column: 1 / -1; justify-self: start; }

/* ============ HALAMAN BELAJAR (course player) ============ */
.learn-body { background: var(--bg-alt); }
.learn-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; background: var(--ink); color: #fff; padding: 12px 24px; }
.learn-back { font-weight: 700; font-size: 14px; color: #cbd5e1; }
.learn-back:hover { color: #fff; }
.learn-brand { color: #fff; margin: 0 auto 0 8px; }
.learn-brand .brand-name span { color: #a5b4fc; }
.learn-prog-top { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.learn-prog-top .bar { flex: 1; background: rgba(255,255,255,.2); max-width: none; }
.learn-prog-top .bar i { background: #a5b4fc; }
.learn-prog-top span { font-size: 13px; font-weight: 700; }

.learn { display: grid; grid-template-columns: 1fr 360px; gap: 0; align-items: start; }
.learn-main { padding: 24px; max-width: 900px; margin: 0 auto; width: 100%; }
.video-wrap { position: relative; width: 100%; aspect-ratio: 16/9; background: #000; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.learn-info { padding: 22px 0; }
.learn-info h1 { font-size: 24px; font-weight: 800; letter-spacing: -.4px; margin: 10px 0 4px; }
.learn-meta { color: var(--muted); font-size: 14px; }
.learn-actions { display: flex; align-items: center; gap: 10px; margin: 20px 0 8px; flex-wrap: wrap; }
.learn-actions .btn:disabled { opacity: .4; cursor: not-allowed; }

.learn-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin: 22px 0 16px; }
.learn-tabs .tab { background: none; border: 0; font-family: inherit; font-weight: 700; font-size: 15px; color: var(--muted); padding: 10px 6px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.learn-tabs .tab.active { color: var(--indigo); border-color: var(--indigo); }
.tab-body { display: none; }
.tab-body.active { display: block; }
#tab-about h3 { font-size: 18px; margin-bottom: 8px; }
#tab-about p { color: var(--slate); font-size: 15px; }

/* sidebar kurikulum */
.curriculum { position: sticky; top: 57px; height: calc(100vh - 57px); background: #fff; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.curr-head { padding: 20px; border-bottom: 1px solid var(--line); }
.curr-head h2 { font-size: 17px; }
.curr-head p { font-size: 13px; color: var(--muted); margin: 6px 0 10px; }
.curr-head .bar { background: var(--line); max-width: none; }
.curr-head .bar i { background: var(--indigo); }
.curr-list { overflow-y: auto; padding: 10px; flex: 1; }
.curr-sec-title { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 14px 10px 8px; }
.curr-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: none; border: 0; font-family: inherit; padding: 11px 10px; border-radius: 10px; cursor: pointer; transition: background .2s; }
.curr-item:hover { background: var(--bg-alt); }
.curr-item.active { background: var(--indigo-50); }
.ci-state { width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-size: 11px; background: var(--line); color: var(--slate); }
.ci-state.done { background: #dcfce7; color: #059669; }
.curr-item.active .ci-state { background: var(--indigo); color: #fff; }
.ci-text { display: flex; flex-direction: column; min-width: 0; }
.ci-title { font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.ci-dur { font-size: 12px; color: var(--muted); }
#tab-materi .curr-item.active { background: var(--indigo-50); }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .kpi-grid { grid-template-columns: repeat(2,1fr); }
  .grid-2, .cert-grid, .course-grid { grid-template-columns: 1fr; }
  .learn { grid-template-columns: 1fr; }
  .curriculum { position: static; height: auto; border-left: 0; border-top: 1px solid var(--line); }
  .curr-list { max-height: 460px; }
}
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .brand-mobile { display: flex; }
}
@media (max-width: 768px) {
  .dash { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 60; width: 256px; transform: translateX(-100%);
    transition: transform .3s ease;
  }
  .dash.nav-open .sidebar { transform: translateX(0); }
  .dash.nav-open .sidebar-overlay { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 55; }
  .dash-burger { display: flex; }
  .dash-search { display: none; }
  .cert-grid { grid-template-columns: 1fr; }
  .set-form { grid-template-columns: 1fr; }
  .dash-content { padding: 20px 16px; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .dash-uname { display: none; }
}
