/* ============================================================
   SIM Kurikulum — brand theme
   Palet diambil dari logo: teal (#0E9C9C) + lime (#A7C936) + aksen hijau
   Tipografi ringkas & rapat untuk tampilan rapi/elegans.
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #16322F;
  --muted: #5E7C77;
  --teal: #0E9C9C;
  --teal-2: #19B5A2;
  --lime: #A7C936;
  --rose: #BE185D;
  --grad: linear-gradient(135deg, #0D9494, #1FB5A2);
  --grad-soft: linear-gradient(135deg, rgba(13,148,148,.13), rgba(167,201,54,.13));
  --card: rgba(255,255,255,.62);
  --card-border: rgba(255,255,255,.75);
  --shadow: 0 10px 26px rgba(13,148,136,.14), 0 2px 8px rgba(22,50,47,.06);
  --shadow-sm: 0 3px 10px rgba(13,148,136,.10);
  --radius: 14px;
  --radius-sm: 9px;
  --danger: #E11D48;
  --ok: #059669;
}

html, body { height: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(167,201,54,.14), transparent 60%),
    radial-gradient(900px 600px at -10% 20%, rgba(13,148,148,.15), transparent 60%),
    radial-gradient(800px 500px at 60% 110%, rgba(14,116,107,.13), transparent 60%),
    radial-gradient(600px 400px at 100% 70%, rgba(46,176,154,.12), transparent 60%),
    #EEF7F3;
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
a { color: var(--teal); }

/* ================= TOAST ================= */
.toast-root {
  position: fixed; right: 16px; bottom: 16px; z-index: 999;
  display: flex; flex-direction: column; gap: 8px; max-width: 340px;
}
.toast {
  padding: 10px 14px; border-radius: var(--radius-sm);
  background: rgba(22,50,47,.92); color: #fff; font-size: 12.5px; font-weight: 500;
  box-shadow: var(--shadow); backdrop-filter: blur(12px);
  animation: toastIn .25s ease;
}
.toast.ok { background: linear-gradient(135deg, #047857, #059669); }
.toast.err { background: linear-gradient(135deg, #BE123C, #E11D48); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ================= MODAL ================= */
.modal-overlay {
  position: fixed; inset: 0; z-index: 90; background: rgba(22,50,47,.45);
  backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  background: rgba(255,255,255,.92); backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid var(--card-border); border-radius: 16px;
  box-shadow: 0 24px 48px rgba(22,50,47,.28);
  width: 100%; max-width: 520px; max-height: 88vh; overflow: auto;
  animation: modalIn .22s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 0;
}
.modal-head h3 { font-size: 15px; font-weight: 700; }
.modal-close {
  border: 0; background: rgba(22,50,47,.07); color: var(--muted);
  width: 28px; height: 28px; border-radius: 50%; font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: .15s;
}
.modal-close:hover { background: rgba(22,50,47,.14); color: var(--ink); }
.modal-body { padding: 12px 20px 18px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }

/* ================= LOGIN ================= */
.login-wrap {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 16px; gap: 20px; position: relative; z-index: 1;
}
.login-brand { text-align: center; color: var(--ink); }
.login-logo {
  width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 18px;
  background: #fff; box-shadow: 0 12px 26px rgba(13,148,148,.28);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.login-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.login-brand h1 { font-size: 23px; font-weight: 800; letter-spacing: -.5px; }
.login-brand p { color: var(--muted); font-size: 12.5px; margin-top: 4px; max-width: 420px; }
.login-card { width: 100%; max-width: 410px; padding: 20px; }
.tabs {
  display: flex; background: rgba(22,50,47,.06); border-radius: 10px; padding: 3px;
  margin-bottom: 16px; gap: 3px;
}
.tab {
  flex: 1; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px;
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; transition: .18s;
}
.tab.active { background: #fff; color: var(--teal); box-shadow: var(--shadow-sm); }

/* ================= LAYOUT ================= */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; flex-shrink: 0; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: linear-gradient(178deg, #0A3E3A 0%, #0D6F69 55%, #129C93 100%);
  color: #fff; padding: 16px 12px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px 14px; border-bottom: 1px solid rgba(255,255,255,.14); }
.brand-logo {
  width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.92);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.16); overflow: hidden;
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-name { font-weight: 800; font-size: 13.5px; letter-spacing: -.2px; }
.brand-sub { font-size: 10.5px; color: rgba(255,255,255,.65); margin-top: 1px; }

.side-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; overflow-y: auto; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 11px; border-radius: 9px;
  color: rgba(255,255,255,.82); font-size: 13px; font-weight: 500; cursor: pointer;
  border: 0; background: transparent; font-family: inherit; text-align: left; width: 100%; transition: .16s;
}
.nav-item:hover { background: rgba(255,255,255,.10); color: #fff; }
.nav-item.active { background: rgba(255,255,255,.18); color: #fff; font-weight: 600; box-shadow: inset 0 0 0 1px rgba(255,255,255,.16); }
.nav-item .ic { font-size: 16px; width: 20px; text-align: center; }
.nav-badge {
  margin-left: auto; background: var(--lime); color: var(--ink); font-size: 10.5px; font-weight: 700;
  padding: 1px 7px; border-radius: 99px; min-width: 20px; text-align: center;
}

.side-foot { border-top: 1px solid rgba(255,255,255,.14); padding-top: 10px; display: flex; align-items: center; gap: 8px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.side-user { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; }
.side-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-role { font-size: 10.5px; color: rgba(255,255,255,.6); }
.btn-logout {
  border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff;
  padding: 6px 10px; border-radius: 8px; font-size: 11.5px; font-weight: 600; cursor: pointer; font-family: inherit; transition: .16s; white-space: nowrap;
}
.btn-logout:hover { background: rgba(255,255,255,.18); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  padding: 16px 28px 6px; display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.topbar h1 { font-size: 18px; font-weight: 800; letter-spacing: -.4px; }
.topbar-user {
  font-size: 12px; color: var(--muted); background: rgba(255,255,255,.6); border: 1px solid var(--card-border);
  padding: 5px 12px; border-radius: 99px; font-weight: 600; backdrop-filter: blur(10px);
}
.page-content { padding: 12px 28px 30px; display: flex; flex-direction: column; gap: 14px; }

/* ================= CARDS ================= */
.card {
  background: var(--card); backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--card-border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 15px 16px;
}
.card h2 { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.card .sub { color: var(--muted); font-size: 11.5px; margin-bottom: 10px; }
.section-gap { margin-top: 6px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.stat-card {
  background: var(--card); backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--card-border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 10px 13px;
  display: flex; align-items: center; gap: 10px; transition: transform .16s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-ic {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  background: var(--grad-soft);
}
.stat-num { font-size: 19px; font-weight: 800; letter-spacing: -.4px; line-height: 1.1; }
.stat-label { font-size: 11px; color: var(--muted); font-weight: 500; margin-top: 1px; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }

/* ================= FORM ================= */
.fld { display: flex; flex-direction: column; gap: 4px; margin-bottom: 9px; }
.fld > span { font-size: 12px; font-weight: 600; color: var(--ink); }
.fld > span em { color: var(--muted); font-weight: 400; font-style: normal; }
.inp {
  width: 100%; padding: 7px 11px; border-radius: var(--radius-sm);
  border: 1.5px solid rgba(22,50,47,.12); background: rgba(255,255,255,.85);
  font-family: inherit; font-size: 13px; color: var(--ink); outline: none; transition: .16s;
}
.inp:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13,148,148,.16); background: #fff; }
textarea.inp { resize: vertical; min-height: 56px; }
.inp-nilai {
  width: 56px; padding: 5px 4px; text-align: center; border-radius: 7px;
  border: 1.5px solid rgba(22,50,47,.12); background: rgba(255,255,255,.9);
  font-family: inherit; font-size: 12.5px; color: var(--ink); outline: none; transition: .14s;
}
.inp-nilai:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13,148,148,.15); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--grad); color: #fff; border: 0; border-radius: var(--radius-sm);
  padding: 8px 14px; font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  box-shadow: 0 6px 16px rgba(13,148,148,.28); transition: .16s; white-space: nowrap;
}
.btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }
.btn-ghost {
  background: rgba(22,50,47,.06); color: var(--ink); box-shadow: none; border: 1px solid rgba(22,50,47,.08);
}
.btn-ghost:hover { background: rgba(22,50,47,.10); filter: none; }
.btn-danger {
  background: linear-gradient(135deg, #BE123C, #E11D48); box-shadow: 0 6px 16px rgba(225,29,72,.22);
}
.btn-danger-ghost { background: rgba(225,29,72,.08); color: var(--danger); box-shadow: none; border: 1px solid rgba(225,29,72,.18); }
.btn-danger-ghost:hover { background: rgba(225,29,72,.14); filter: none; }
.btn-sm { padding: 5px 10px; font-size: 11.5px; border-radius: 8px; box-shadow: 0 3px 10px rgba(13,148,148,.20); }
.form-note { font-size: 11.5px; color: var(--muted); margin-top: 10px; text-align: center; line-height: 1.5; }

/* Tombol mata utk kolom password */
.pw-wrap { position: relative; }
.pw-wrap .inp { padding-right: 40px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; cursor: pointer; color: var(--muted);
  display: flex; align-items: center; justify-content: center; padding: 4px;
  border-radius: 6px; transition: .15s;
}
.pw-toggle .ic-svg { width: 17px; height: 17px; }
.pw-toggle:hover { color: var(--teal); background: rgba(13,148,148,.08); }

/* Footer */
.app-footer {
  text-align: center; color: var(--muted); font-size: 11px;
  padding: 4px 16px 20px;
}
.login-footer {
  text-align: center; color: var(--muted); font-size: 11.5px; margin-top: 4px;
}

/* ================= LIST / TABLE ================= */
.list { display: flex; flex-direction: column; gap: 8px; }
.row-item {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.7);
  border-radius: 11px; padding: 9px 12px; box-shadow: var(--shadow-sm);
}
.row-item .grow { flex: 1; min-width: 0; }
.row-item .t-main { font-weight: 600; font-size: 13px; }
.row-item .t-sub { color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.row-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

.tbl-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 460px; }
.tbl th {
  text-align: left; padding: 6px 9px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px;
  color: var(--muted); border-bottom: 1px solid rgba(22,50,47,.09); background: rgba(22,50,47,.025); white-space: nowrap;
}
.tbl td { padding: 6px 9px; border-bottom: 1px solid rgba(22,50,47,.06); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: rgba(13,148,148,.05); }

/* ================= BADGES ================= */
.badge {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 99px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .2px; white-space: nowrap;
}
.badge-indigo { background: rgba(13,148,148,.12); color: #0B7C7C; }
.badge-violet { background: rgba(46,160,120,.14); color: #0E7A5F; }
.badge-pink { background: rgba(190,24,93,.12); color: #BE185D; }
.badge-green { background: rgba(5,150,105,.12); color: #047857; }
.badge-amber { background: rgba(217,119,6,.14); color: #B45309; }

/* ================= NILAI GRID ================= */
.grid-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.chip {
  border: 1.5px solid rgba(22,50,47,.10); background: rgba(255,255,255,.55);
  padding: 6px 13px; border-radius: 99px; font-family: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--muted); cursor: pointer; transition: .15s;
}
.chip:hover { border-color: rgba(13,148,148,.45); color: var(--teal); }
.chip.active {
  background: var(--grad); color: #fff; border-color: transparent;
  box-shadow: 0 4px 12px rgba(13,148,148,.30);
}
table.tbl-grid { min-width: 620px; }
.tbl-grid th.group-pk { background: rgba(13,148,148,.10); color: #0B7777; text-align: center; }
.tbl-grid th.group-sk { background: rgba(46,160,120,.13); color: #0C7A5F; text-align: center; }
/* Desktop: kolom nama lebar cukup, kolom nilai DIKUNCI sempit sesuai input */
table.tbl-grid { table-layout: fixed; width: max-content; min-width: 100%; }
.tbl-grid th.sticky-name, .tbl-grid td.sticky-name {
  width: 150px; max-width: 150px; min-width: 150px;
  white-space: normal; word-break: break-word; overflow-wrap: anywhere; line-height: 1.2;
  padding-left: 4px; padding-right: 8px;
}
.tbl-grid td.sticky-name:first-child, .tbl-grid th.sticky-name:first-child {
  width: 34px; min-width: 34px; max-width: 34px; padding: 0 2px; text-align: center;
}
.tbl-grid td.sticky-name {
  position: sticky; left: 0; background: rgba(255,255,255,.96); z-index: 2;
  box-shadow: 1px 0 0 rgba(22,50,47,.06); font-weight: 600;
}
.tbl-grid th.sticky-name { position: sticky; left: 0; z-index: 3; background: #fff; }
.tbl-grid .kd-head { text-align: center; font-weight: 700; font-size: 11.5px; padding: 5px 4px; cursor: help; }
.tbl-grid .kd-avg { font-size: 11px; color: var(--teal); font-weight: 700; text-align: center; white-space: nowrap; }
.tbl-grid td.c { text-align: center; width: 60px; min-width: 60px; max-width: 60px; padding-left: 2px; padding-right: 2px; }
.tbl-grid td.c .inp-nilai { width: 100%; padding: 5px 2px; font-size: 12.5px; }
/* kolom sticky (No/Nama) TIDAK difreeze di layar kecil — biarkan bergeser agar
   tidak memakan tempat & semua kolom nilai terlihat (geser horizontal bebas) */
@media (max-width: 980px) {
  .tbl-grid td.sticky-name,
  .tbl-grid th.sticky-name {
    position: static; box-shadow: none; z-index: auto; background: transparent;
  }
  /* table-layout fixed + lebar eksplisit: kolom nama DIKUNCI sempit, nilai juga sempit */
  table.tbl-grid { table-layout: fixed; width: max-content; min-width: 100%; }
  .tbl-grid th.sticky-name, .tbl-grid td.sticky-name {
    width: 78px; max-width: 78px; min-width: 78px;
    font-size: 11px; white-space: normal; word-break: break-word; overflow-wrap: anywhere;
    line-height: 1.2; padding-left: 3px; padding-right: 6px;
  }
  .tbl-grid td.sticky-name:first-child, .tbl-grid th.sticky-name:first-child {
    width: 24px; min-width: 24px; max-width: 24px; padding: 0 2px; text-align: center;
  }
  .tbl-grid th.sticky-name { font-size: 10px; }
  .tbl-grid td.c { padding-left: 1px; padding-right: 1px; width: 48px; min-width: 48px; max-width: 48px; }
  .tbl-grid td.c .inp-nilai { width: 100%; min-width: 40px; max-width: 48px; padding: 5px 1px; font-size: 12px; }
}

.kd-tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.65); border: 1px solid rgba(22,50,47,.10);
  border-radius: 9px; padding: 5px 9px; font-size: 12px; font-weight: 600;
}
.kd-tag .kode { color: var(--teal); font-weight: 700; }
.kd-tag button {
  border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 12px; padding: 0 2px;
}
.kd-tag button:hover { color: var(--danger); }

/* ================= JURNAL / REKAP ================= */
.jurnal-photo {
  width: 44px; height: 44px; border-radius: 9px; object-fit: cover; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.8); box-shadow: var(--shadow-sm); transition: transform .15s;
}
.jurnal-photo:hover { transform: scale(1.06); }
td.c { text-align: center; }

/* ================= EMPTY ================= */
.empty {
  text-align: center; padding: 24px 16px; color: var(--muted); font-size: 13px;
  background: rgba(255,255,255,.45); border: 1.5px dashed rgba(22,50,47,.14); border-radius: var(--radius);
}
.empty .em { font-size: 28px; display: block; margin-bottom: 8px; }

/* Ikon SVG minimalis 1 warna */
.ic-svg {
  display: inline-block; width: 1em; height: 1em;
  vertical-align: -0.14em; flex-shrink: 0;
}
.nav-item .ic-svg { width: 16px; height: 16px; }
.stat-ic .ic-svg { width: 21px; height: 21px; }
.btn .ic-svg { width: 14px; height: 14px; }
.btn-sm .ic-svg { width: 12px; height: 12px; }
.mini-btn .ic-svg { width: 12px; height: 12px; }
.kd-tag button .ic-svg { width: 13px; height: 13px; }
.empty .em .ic-svg { width: 30px; height: 30px; }
.desc-actions .mini-btn .ic-svg { width: 12px; height: 12px; }
.tbl .ic-svg { width: 13px; height: 13px; }

/* Pilih banyak kelas (penugasan) */
.kelas-check-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 6px; max-height: 160px; overflow-y: auto;
  background: rgba(255,255,255,.6); border: 1.5px solid rgba(22,50,47,.12);
  border-radius: 9px; padding: 8px;
}
.kelas-check {
  display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; cursor: pointer;
  padding: 5px 7px; border-radius: 7px; transition: .12s;
}
.kelas-check:hover { background: rgba(13,148,148,.07); }
.kelas-check input { width: 15px; height: 15px; accent-color: var(--teal); cursor: pointer; }

/* Filter admin */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.filter-bar .inp { max-width: 200px; }

/* Tabel penempatan (guru/mapel/kelas) — font kecil & wrap agar muat banyak */
.tbl-penempatan { font-size: 12px; }
.tbl-penempatan th { font-size: 10.5px; padding: 6px 8px; }
.tbl-penempatan td {
  padding: 5px 8px; font-size: 12px;
  white-space: normal; word-break: break-word; overflow-wrap: anywhere;
}
.tbl-penempatan .kelas-list { line-height: 1.7; }
.kelas-chip {
  display: inline-block; background: rgba(13,148,148,.10); color: #0B7C7C;
  border-radius: 6px; padding: 1px 7px; margin: 1px 2px 1px 0;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
}

/* ================= KURIKULUM MERDEKA (tambahan) ================= */
.badge-teal { background: rgba(13,148,148,.13); color: #0B7C7C; }
.mini-btn {
  border: 0; background: rgba(22,50,47,.06); color: var(--muted);
  width: 20px; height: 20px; border-radius: 6px; font-size: 10.5px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.mini-btn:hover { background: rgba(225,29,72,.12); color: var(--danger); }

.absen-list { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; padding-right: 4px; }
.absen-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.7);
  border-radius: 9px; padding: 6px 10px; box-shadow: var(--shadow-sm);
}
.absen-check { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; cursor: pointer; }
.absen-check input { width: 16px; height: 16px; accent-color: var(--teal); cursor: pointer; }
.absen-status { width: 140px; padding: 5px 8px; font-size: 12px; }
.absen-sum { color: var(--muted); font-size: 12px; }
.kode-big {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 16px; font-weight: 800; letter-spacing: 3px; color: var(--teal);
  background: rgba(13,148,148,.08); border-radius: 7px; padding: 3px 8px;
}

/* Keterangan TP / komponen nilai di atas tabel */
.desc-list { display: flex; flex-direction: column; gap: 6px; }
.desc-item {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.75);
  border-radius: 9px; padding: 7px 12px; box-shadow: var(--shadow-sm);
}
.desc-label {
  font-weight: 800; font-size: 12px; color: var(--teal);
  background: rgba(13,148,148,.10); border-radius: 6px; padding: 2px 8px; flex-shrink: 0;
}
.desc-text { flex: 1; min-width: 170px; font-size: 12.5px; color: var(--ink); }
.desc-actions { display: inline-flex; gap: 4px; flex-shrink: 0; }

.autosave { font-size: 11.5px; color: var(--muted); font-weight: 600; }

/* ================= RAPOR (cetak) ================= */
.rapor-print { font-family: 'Times New Roman', serif; color: #000; }
.rapor-print .rp-kop { text-align: center; margin-bottom: 10px; }
.rapor-print .rp-kop h3 { font-size: 18px; margin: 0; letter-spacing: 1px; }
.rapor-print .rp-kop h4 { font-size: 16px; margin: 4px 0 0; text-decoration: underline; }
.rapor-print table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rapor-print .rp-ident { margin: 6px 0; }
.rapor-print .rp-ident td { padding: 1px 4px; font-size: 12px; }
.rapor-print .rp-nilai, .rapor-print .rp-tambahan { border: 1px solid #000; margin: 8px 0; }
.rapor-print .rp-nilai th, .rapor-print .rp-nilai td, .rapor-print .rp-tambahan th, .rapor-print .rp-tambahan td { border: 1px solid #000; padding: 3px 5px; }
.rapor-print .rp-nilai th { background: #eee; font-size: 11px; text-align: center; }
.rapor-print .rp-nilai td { font-size: 11.5px; }
.rapor-print .rp-nilai td.kelompok { background: #eee; font-weight: 700; text-align: left; }
.rapor-print .rp-tambahan { margin-top: 10px; }
.rapor-print .rp-tambahan th { background: #eee; font-size: 11px; }
.rapor-print .rp-ttd { margin-top: 18px; font-size: 12px; }
.rapor-print .rp-ttd td { width: 33%; text-align: center; vertical-align: top; }
.rapor-print .rp-ttd .rp-nama td { font-weight: 700; text-decoration: underline; }

@media print {
  .rapor-print { box-shadow: none !important; border: none !important; background: #fff !important; backdrop-filter: none !important; }
  .rapor-print table { page-break-inside: auto; }
  .rapor-print tr { page-break-inside: avoid; }
}

/* ================= SCAN KELAS ================= */
.scan-pilih {
  border-color: var(--teal) !important;
  background: rgba(240,253,250,.95) !important;
  font-weight: 700;
  border-width: 2.5px !important;
  padding: 10px 14px !important;
}
.scan-pilih:focus { box-shadow: 0 0 0 3px rgba(13,148,148,.25) !important; }
.scan-btn {
  font-size: 15px; padding: 12px 22px; border-radius: 12px;
  box-shadow: 0 8px 22px rgba(13,148,148,.35) !important;
}

/* ================= QR KELAS (cetak) ================= */
@media print {
  .qr-print .card { break-inside: avoid; }
}

/* ================= CETAK (rekap bulanan jurnal) ================= */
@media print {
  body { background: #fff !important; }
  .sidebar, .topbar, .toast-root, #modalRoot, .no-print, .btn, .chip { display: none !important; }
  .layout { display: block !important; }
  .page-content { padding: 0 !important; }
  .card { box-shadow: none !important; border: none !important; background: #fff !important; backdrop-filter: none !important; }
  .tbl th { background: #f0f0f0 !important; }
  .tbl, .tbl td, .tbl th { border-color: #333 !important; color: #000 !important; }
  a { color: #000 !important; text-decoration: none; }
}

/* ================= BOTTOM NAV (mobile) ================= */
.bottom-nav {
  display: none;
}
@media (max-width: 980px) {
  .bottom-nav {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(22,50,47,.10);
    box-shadow: 0 -6px 24px rgba(13,148,136,.12);
    overflow-x: auto;
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    gap: 2px;
    -webkit-overflow-scrolling: touch;
  }
  .bn-item {
    flex: 1 0 64px; max-width: 96px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 6px 4px; border-radius: 12px;
    border: 0; background: transparent; cursor: pointer; font-family: inherit;
    color: var(--muted); transition: .16s;
  }
  .bn-item .bn-ic { display: flex; align-items: center; justify-content: center; }
  .bn-item .bn-ic .ic-svg { width: 22px; height: 22px; }
  .bn-item .bn-label {
    font-size: 10px; font-weight: 600; white-space: nowrap;
    max-width: 80px; overflow: hidden; text-overflow: ellipsis;
  }
  .bn-item:hover { background: rgba(13,148,148,.06); color: var(--teal); }
  .bn-item.active { color: var(--teal); }
  .bn-item.active .bn-ic {
    background: var(--grad); border-radius: 10px; width: 40px; height: 28px;
    display: flex; align-items: center; justify-content: center;
  }
  .bn-item.active .bn-ic .ic-svg { color: #fff; }
  .bn-item.active .bn-label { color: var(--teal); font-weight: 700; }
  .bn-item.bn-logout { color: var(--danger); flex: 0 0 auto; max-width: none; }
  .bn-item.bn-logout .bn-label { color: var(--danger); font-weight: 700; }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 980px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: sticky; top: 0; z-index: 40; padding: 12px 14px; }
  .brand { padding-bottom: 10px; }
  /* navigasi sidebar disembunyikan di HP — ganti dgn bottom-nav */
  .side-nav { display: none; }
  .nav-item { width: auto; white-space: nowrap; }
  .nav-item .ic { display: none; }
  .side-foot { display: none; }
  .topbar { padding: 14px 16px 6px; }
  .page-content { padding: 10px 16px 84px; } /* ruang utk bottom-nav */
  .stats-grid { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
  .topbar-user { display: none; }
}

@media (max-width: 560px) {
  .login-card { padding: 16px 14px; }
  .row-item { flex-wrap: wrap; }
}
