/* Ruang Kuliah — lapisan gaya di atas Bootstrap 5.3
   Palet: Laut Banda (teal tua), Pala (cokelat), Fuli (merah tenggat), kertas abu kehijauan. */
:root {
  --rk-sea: #0f4c5c;
  --rk-sea-2: #16697e;
  --rk-sea-tint: #e3eff1;
  --rk-pala: #7a4a2b;
  --rk-fuli: #b23a2e;
  --rk-fuli-tint: #f8e6e3;
  --rk-leaf: #2f7d5b;
  --rk-leaf-tint: #e2f1e9;
  --rk-paper: #f5f7f5;
  --rk-ink: #1c2527;
  --rk-muted: #5d6b6e;
  --rk-line: #d8dfdd;

  --bs-body-font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-color: var(--rk-ink);
  --bs-body-bg: var(--rk-paper);
  --bs-border-color: var(--rk-line);
  --bs-link-color: var(--rk-sea-2);
  --bs-link-color-rgb: 22, 105, 126;
  --bs-link-hover-color: var(--rk-sea);
  --bs-primary: var(--rk-sea);
  --bs-primary-rgb: 15, 76, 92;
  --bs-border-radius: .5rem;
  --bs-secondary-color: var(--rk-muted);
}

body { font-size: .95rem; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5 { font-weight: 700; letter-spacing: -.01em; color: var(--rk-ink); }
.page-title { font-size: 1.6rem; margin: 0; }
.muted { color: var(--rk-muted); }
.tabular { font-variant-numeric: tabular-nums; }
.prose { max-width: 72ch; }
.prose p:last-child { margin-bottom: 0; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--rk-sea-2) 55%, white); outline-offset: 2px; }

/* ---------- Tombol & formulir ---------- */
.btn { font-weight: 600; border-radius: .45rem; }
.btn-primary { --bs-btn-bg: var(--rk-sea); --bs-btn-border-color: var(--rk-sea); --bs-btn-hover-bg: #0b3b47; --bs-btn-hover-border-color: #0b3b47; --bs-btn-active-bg: #0b3b47; --bs-btn-disabled-bg: var(--rk-sea); --bs-btn-disabled-border-color: var(--rk-sea); }
.btn-outline-primary { --bs-btn-color: var(--rk-sea); --bs-btn-border-color: var(--rk-sea); --bs-btn-hover-bg: var(--rk-sea); --bs-btn-hover-border-color: var(--rk-sea); --bs-btn-active-bg: var(--rk-sea); }
.btn-danger { --bs-btn-bg: var(--rk-fuli); --bs-btn-border-color: var(--rk-fuli); }
.btn-outline-danger { --bs-btn-color: var(--rk-fuli); --bs-btn-border-color: #e2b4ae; --bs-btn-hover-bg: var(--rk-fuli); --bs-btn-hover-border-color: var(--rk-fuli); }
.form-label { font-weight: 600; font-size: .88rem; margin-bottom: .3rem; }
.form-control, .form-select { border-color: #c9d2d0; }
.form-control:focus, .form-select:focus { border-color: var(--rk-sea-2); box-shadow: 0 0 0 .2rem rgba(22,105,126,.15); }
.form-text { color: var(--rk-muted); }

/* ---------- Kerangka ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 248px; flex-shrink: 0; background: var(--rk-sea); color: #d7e7ea;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { padding: 1.25rem 1.25rem 1rem; color: #fff; text-decoration: none; display: block; }
.sidebar .brand strong { display: block; font-size: 1.15rem; letter-spacing: -.01em; }
.sidebar .brand span { font-size: .78rem; color: #9fc3cb; }
.sidebar nav { padding: .25rem .75rem; overflow-y: auto; flex: 1; }
.sidebar .nav-group { font-size: .78rem; color: #8fb6bf; padding: 1rem .6rem .35rem; font-weight: 600; }
.sidebar a.nav-item-link {
  display: flex; align-items: center; gap: .65rem; padding: .5rem .6rem; border-radius: .4rem;
  color: #d7e7ea; text-decoration: none; font-weight: 500;
}
.sidebar a.nav-item-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar a.nav-item-link.active { background: #fff; color: var(--rk-sea); font-weight: 700; }
.sidebar a.nav-item-link .bi { font-size: 1.05rem; width: 1.1rem; }
.sidebar .course-link { font-size: .87rem; line-height: 1.3; }
.sidebar .course-link small { display: block; color: #8fb6bf; font-weight: 400; }
.sidebar a.active .course-link small { color: var(--rk-muted); }
.sidebar .me { border-top: 1px solid rgba(255,255,255,.12); padding: .9rem 1.25rem; font-size: .85rem; }
.sidebar .me .name { color: #fff; font-weight: 600; }
.sidebar .me a, .sidebar .me button { color: #b9d6dc; }

.main { flex: 1; min-width: 0; }
.topbar { display: none; }
.content { padding: 2rem 2.25rem 4rem; max-width: 1180px; }

@media (max-width: 991.98px) {
  .sidebar { position: fixed; left: 0; z-index: 1045; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: none; }
  .sidebar-backdrop { position: fixed; inset: 0; background: rgba(12,30,35,.45); z-index: 1040; display: none; }
  .sidebar.open + .sidebar-backdrop { display: block; }
  .topbar { display: flex; align-items: center; gap: .75rem; padding: .7rem 1rem; background: var(--rk-sea); color: #fff; position: sticky; top: 0; z-index: 1030; }
  .topbar .btn { color: #fff; border: 0; padding: .25rem .5rem; font-size: 1.35rem; }
  .content { padding: 1.25rem 1rem 3rem; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }

/* ---------- Panel ---------- */
.panel { background: #fff; border: 1px solid var(--rk-line); border-radius: .6rem; }
.panel-head { padding: .9rem 1.1rem; border-bottom: 1px solid var(--rk-line); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.panel-head h2, .panel-head h3 { font-size: 1rem; margin: 0; }
.panel-body { padding: 1.1rem; }
.panel + .panel { margin-top: 1.25rem; }
.list-row { padding: .8rem 1.1rem; border-bottom: 1px solid #e8edec; }
.list-row:last-child { border-bottom: 0; }

.table { --bs-table-bg: transparent; margin: 0; font-size: .9rem; }
.table > :not(caption) > * > * { padding: .6rem .8rem; border-color: #e6ebea; }
.table thead th { font-size: .8rem; color: var(--rk-muted); font-weight: 600; border-bottom-color: var(--rk-line); white-space: nowrap; }
.table-hover tbody tr:hover > * { background: #f3f7f7; }

/* ---------- Status ---------- */
.tag { display: inline-flex; align-items: center; gap: .3rem; font-size: .76rem; font-weight: 600; padding: .15rem .55rem; border-radius: 99px; background: #eef1f0; color: var(--rk-muted); white-space: nowrap; }
.tag-sea { background: var(--rk-sea-tint); color: var(--rk-sea); }
.tag-ok { background: var(--rk-leaf-tint); color: var(--rk-leaf); }
.tag-due { background: var(--rk-fuli-tint); color: var(--rk-fuli); }
.tag-pala { background: #f1e8e0; color: var(--rk-pala); }

.stat { padding: 1rem 1.1rem; }
.stat b { display: block; font-size: 1.75rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--rk-muted); font-size: .85rem; }

/* ---------- Kepala kelas ---------- */
.class-head { margin-bottom: 1.25rem; }
.class-head .code { color: var(--rk-pala); font-weight: 700; font-size: .85rem; }
.class-head h1 { font-size: 1.75rem; margin: .1rem 0 .3rem; }
.class-head .meta { color: var(--rk-muted); font-size: .88rem; display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; }
.class-tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--rk-line); margin: 1rem 0 1.5rem; overflow-x: auto; scrollbar-width: none; }
.class-tabs a { padding: .6rem .85rem; color: var(--rk-muted); text-decoration: none; font-weight: 600; font-size: .9rem; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.class-tabs a:hover { color: var(--rk-ink); }
.class-tabs a.active { color: var(--rk-sea); border-bottom-color: var(--rk-sea); }

/* ---------- Lintasan pertemuan (elemen khas) ---------- */
.weeks { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: .5rem; }
@media (max-width: 991.98px) { .weeks { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 420px) { .weeks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.week {
  position: relative; display: flex; flex-direction: column; min-height: 118px;
  padding: .6rem .65rem .7rem; background: #fff; border: 1px solid var(--rk-line); border-radius: .5rem;
  text-decoration: none; color: var(--rk-ink); overflow: hidden;
}
.week:hover { border-color: var(--rk-sea-2); color: var(--rk-ink); }
.week .n { font-size: 1.9rem; font-weight: 800; line-height: 1; color: #c3cfcd; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.week.filled .n { color: var(--rk-sea); }
.week .t { font-size: .78rem; line-height: 1.3; margin-top: .35rem; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.week .t.empty { color: #9aa8a6; font-weight: 500; }
.week .icons { margin-top: auto; padding-top: .4rem; display: flex; gap: .45rem; font-size: .78rem; color: var(--rk-muted); }
.week .icons span { display: inline-flex; gap: .15rem; align-items: center; }
.week.today { border: 2px solid var(--rk-pala); padding: calc(.6rem - 1px) calc(.65rem - 1px) calc(.7rem - 1px); }
.week.today::after { content: "Minggu ini"; position: absolute; top: .55rem; right: .55rem; font-size: .66rem; font-weight: 700; color: var(--rk-pala); }
.week .att { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; }
.week .att.hadir { background: var(--rk-leaf); }
.week .att.izin, .week .att.sakit { background: #d8a24a; }
.week .att.alpa { background: var(--rk-fuli); }
.week-legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .8rem; color: var(--rk-muted); margin-top: .75rem; }
.week-legend i.sw { display: inline-block; width: 14px; height: 4px; vertical-align: middle; margin-right: .3rem; border-radius: 2px; }

/* ---------- Materi ---------- */
.material { display: flex; gap: .9rem; align-items: flex-start; padding: .85rem 1.1rem; border-bottom: 1px solid #e8edec; }
.material:last-child { border-bottom: 0; }
.material .ico { width: 40px; height: 40px; border-radius: .45rem; display: grid; place-items: center; font-size: 1.15rem; flex-shrink: 0; background: var(--rk-sea-tint); color: var(--rk-sea); }
.material .ico.pdf { background: var(--rk-fuli-tint); color: var(--rk-fuli); }
.material .ico.ppt { background: #f6eadf; color: #b0561b; }
.material .ico.video { background: #1c2527; color: #fff; }
.ratio iframe { border: 0; border-radius: .45rem; }

/* ---------- Kode presensi ---------- */
.att-code { font-size: 2.6rem; font-weight: 800; letter-spacing: .18em; color: var(--rk-sea); font-variant-numeric: tabular-nums; line-height: 1; }

/* ---------- Kuis ---------- */
.q-card { background: #fff; border: 1px solid var(--rk-line); border-radius: .6rem; padding: 1.2rem 1.25rem; margin-bottom: 1rem; }
.q-num { font-weight: 800; color: var(--rk-sea); margin-right: .35rem; }
.q-option { display: flex; gap: .7rem; align-items: flex-start; padding: .65rem .8rem; border: 1px solid var(--rk-line); border-radius: .45rem; margin-top: .5rem; cursor: pointer; }
.q-option:hover { border-color: var(--rk-sea-2); }
.q-option input { margin-top: .2rem; }
.q-option:has(input:checked) { border-color: var(--rk-sea); background: var(--rk-sea-tint); }
.q-option .letter { font-weight: 700; color: var(--rk-muted); min-width: 1.1rem; }
.q-option.correct { border-color: var(--rk-leaf); background: var(--rk-leaf-tint); }
.quiz-bar { position: sticky; top: 0; z-index: 20; background: var(--rk-paper); padding: .75rem 0; border-bottom: 1px solid var(--rk-line); margin-bottom: 1rem; }
.timer { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--rk-sea); }
.timer.low { color: var(--rk-fuli); }
@media (max-width: 991.98px) { .quiz-bar { top: 52px; } }

/* ---------- Matriks presensi & nilai ---------- */
.matrix th, .matrix td { text-align: center; }
.matrix th.left, .matrix td.left { text-align: left; }
.matrix .s-hadir { color: var(--rk-leaf); font-weight: 700; }
.matrix .s-izin, .matrix .s-sakit { color: #a8741d; font-weight: 700; }
.matrix .s-alpa { color: var(--rk-fuli); font-weight: 700; }
.sticky-col { position: sticky; left: 0; background: #fff; z-index: 1; }
.grade-input { width: 5.2rem; text-align: right; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-side { background: var(--rk-sea); color: #d7e7ea; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-side h1 { color: #fff; font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.08; letter-spacing: -.025em; max-width: 13ch; }
.login-side .grid16 { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; max-width: 420px; }
.login-side .grid16 span { aspect-ratio: 1; border: 1px solid rgba(255,255,255,.22); border-radius: 5px; display: grid; place-items: center; font-weight: 700; font-size: .8rem; color: rgba(255,255,255,.55); }
.login-side .grid16 span.on { background: #fff; color: var(--rk-sea); border-color: #fff; }
.login-form { display: grid; place-items: center; padding: 2rem; background: #fff; }
.login-form form { width: 100%; max-width: 360px; }
@media (max-width: 767.98px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-side { padding: 1.75rem 1.5rem; }
  .login-side .grid16 { display: none; }
}

.empty { text-align: center; padding: 2.25rem 1rem; color: var(--rk-muted); }
.empty .bi { font-size: 1.8rem; display: block; margin-bottom: .4rem; color: #a9b7b5; }

@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .content { padding: 0; max-width: none; }
  body { background: #fff; }
}

/* ---------- LMS Christi Matitaputty v1.1 ---------- */
.login-v2 .login-side::before { content:""; position:absolute; width:420px; height:420px; border:1px solid rgba(255,255,255,.09); border-radius:50%; right:-170px; top:-130px; }
.login-v2 .login-side::after { content:""; position:absolute; width:280px; height:280px; border:1px solid rgba(255,255,255,.07); border-radius:50%; right:-80px; top:-45px; }
.login-v2 .login-side > * { position:relative; z-index:1; }
.login-mark { width:54px; height:54px; display:grid; place-items:center; border-radius:14px; background:#fff; color:var(--rk-sea); font-size:1.45rem; box-shadow:0 10px 30px rgba(0,0,0,.12); }
.login-kicker { color:#a9ced5; font-weight:700; font-size:.8rem; text-transform:uppercase; letter-spacing:.08em; margin-top:1.25rem; }
.login-v2 .login-side h1 { max-width:15ch; }
.login-lead { max-width:48ch; color:#c8dde1; font-size:1rem; }
.login-features { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.65rem; max-width:580px; }
.login-features span { display:flex; gap:.55rem; align-items:center; padding:.65rem .75rem; border:1px solid rgba(255,255,255,.13); border-radius:.55rem; background:rgba(255,255,255,.045); font-size:.82rem; }
.login-features i { color:#fff; }
.login-card { padding:2rem; border:1px solid var(--rk-line); border-radius:.85rem; box-shadow:0 18px 55px rgba(23,45,49,.08); background:#fff; }
.login-form form.login-card { max-width:430px; }
.panel { transition:border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
a.panel:hover { border-color:#b7cbc8; box-shadow:0 10px 28px rgba(28,55,59,.07); transform:translateY(-1px); }
.sidebar .brand strong { line-height:1.35; }
.sidebar .brand .bi { font-size:1rem; }
@media (max-width:767.98px) { .login-features { grid-template-columns:1fr; margin-top:1.25rem; } .login-card { padding:1.35rem; box-shadow:none; } }
