/* ==========================================================================
   Tunas Ceria — Sistem Penilaian Kegiatan Pembiasaan Anak
   Tema: hijau-putih segar, bernuansa sekolah & alam
   ========================================================================== */

:root {
  --ink: #0E2A1C;
  --ink-soft: #1D4632;
  --muted: #5B7A69;
  --line: rgba(14, 74, 45, 0.12);
  --line-strong: rgba(14, 74, 45, 0.2);
  --green-900: #073D26;
  --green-800: #0B5133;
  --green-700: #146C43;
  --green-600: #17864F;
  --green-500: #21A05E;
  --lime: #7FBF3F;
  --cream: #F6FBF5;
  --white: #ffffff;
  --card: rgba(255, 255, 255, 0.9);
  --shadow-sm: 0 1px 2px rgba(11, 58, 36, 0.06), 0 4px 14px rgba(11, 58, 36, 0.05);
  --shadow-md: 0 10px 30px -12px rgba(11, 58, 36, 0.22), 0 2px 6px rgba(11, 58, 36, 0.05);
  --shadow-lg: 0 30px 60px -30px rgba(7, 61, 38, 0.35);
  --radius: 16px;
  --radius-lg: 22px;
  --radius-sm: 10px;
  --font: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Fraunces", "Plus Jakarta Sans", Georgia, serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.015em; font-weight: 700; }
p { margin: 0; }
a { color: var(--green-700); text-decoration: none; }
a:hover { color: var(--green-600); }
img, svg { vertical-align: middle; }
button { font-family: inherit; }

/* ---------------------------------- App shell --------------------------- */
body.app {
  background:
    radial-gradient(900px 500px at 100% -10%, rgba(127, 191, 63, 0.16), transparent 60%),
    radial-gradient(700px 420px at 0% 0%, rgba(33, 160, 94, 0.12), transparent 55%),
    var(--cream);
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 264px;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  background:
    radial-gradient(420px 260px at 100% 0%, rgba(127, 191, 63, 0.2), transparent 60%),
    linear-gradient(170deg, var(--green-900), #0A4A2F 55%, #073B25);
  color: #EAF6EC;
  z-index: 40;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-link { display: flex; align-items: center; gap: 12px; color: #fff; }
.brand-mark {
  width: 42px; height: 42px; flex: 0 0 42px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(127, 191, 63, 0.95), rgba(33, 160, 94, 0.9));
  color: #06301F;
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.45);
}
.brand-mark.has-logo {
  background: #fff;
  padding: 3px;
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.55);
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 10px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 15px; letter-spacing: -0.01em; color: #fff; }
.brand-text small { font-size: 11.5px; color: rgba(234, 246, 236, 0.62); letter-spacing: 0.04em; text-transform: uppercase; }
.brand-link:hover { color: #fff; }

.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border-radius: 12px;
  color: rgba(234, 246, 236, 0.76);
  font-size: 14px;
  font-weight: 500;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav-item.is-active {
  background: linear-gradient(100deg, rgba(127, 191, 63, 0.24), rgba(33, 160, 94, 0.18));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(190, 235, 170, 0.24);
}
.nav-icon { display: grid; place-items: center; width: 22px; opacity: .95; }

.sidebar-foot { display: flex; flex-direction: column; gap: 12px; }
.semester-chip {
  display: flex; gap: 10px; align-items: center;
  padding: 11px 12px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.semester-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(127, 191, 63, 0.18); flex: 0 0 8px; }
.semester-chip strong { display: block; font-size: 12.5px; color: #fff; }
.semester-chip small { font-size: 11px; color: rgba(234, 246, 236, 0.6); }
.nav-logout { border: 1px solid rgba(255, 255, 255, 0.1); }

.main { margin-left: 264px; min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  padding: 16px 28px;
  background: rgba(246, 251, 245, 0.82);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--line);
}
.topbar-title h1 { font-size: 19px; }
.topbar-title p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.topbar-user { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--green-600), var(--green-800));
  color: #fff; font-weight: 700; font-size: 15px;
  box-shadow: var(--shadow-sm);
}
.user-meta { display: flex; flex-direction: column; line-height: 1.25; }
.user-meta strong { font-size: 13.5px; }
.user-meta small { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.menu-btn { display: none !important; }

.content { padding: 26px 28px 40px; flex: 1; width: 100%; max-width: 1320px; }
.app-foot {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 16px 28px 26px; font-size: 12px; color: var(--muted);
}

/* ------------------------------- Components ----------------------------- */
.card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 22px 24px;
}
.card + .card { margin-top: 20px; }
.card-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.card-head h2 { font-size: 17px; }
.card-head p { font-size: 13px; color: var(--muted); margin-top: 3px; }
.card-head .spacer { flex: 1; }

.section { margin-bottom: 32px; }
.section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.section-title h2 { font-size: 16.5px; }
.section-title p { font-size: 13px; color: var(--muted); }

.grid { display: grid; gap: 20px; }
.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)); }

.stat {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.stat .stat-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.stat .stat-value { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.stat .stat-hint { font-size: 12px; color: var(--muted); }
.stat.is-accent { background: linear-gradient(150deg, var(--green-800), #0B4E33 60%, #12673F); color: #fff; border-color: transparent; }
.stat.is-accent .stat-label, .stat.is-accent .stat-hint { color: rgba(255, 255, 255, 0.7); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--white);
  color: var(--ink-soft);
  font-size: 13.5px; font-weight: 600;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease, border-color .14s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--green-600), var(--green-800));
  color: #fff;
  box-shadow: 0 10px 22px -12px rgba(11, 81, 51, 0.8);
}
.btn-primary:hover { color: #fff; box-shadow: 0 14px 26px -12px rgba(11, 81, 51, 0.85); }
.btn-ghost { background: rgba(255, 255, 255, 0.6); border-color: var(--line-strong); }
.btn-ghost:hover { background: #fff; }
.btn-soft { background: rgba(33, 160, 94, 0.12); color: var(--green-800); }
.btn-soft:hover { background: rgba(33, 160, 94, 0.18); }
.btn-danger { background: rgba(190, 18, 60, 0.1); color: #B0122F; }
.btn-danger:hover { background: rgba(190, 18, 60, 0.16); }
.btn-sm { padding: 7px 11px; font-size: 12.5px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; padding: 0; color: var(--green-700); font-weight: 600; cursor: pointer; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink-soft);
  cursor: pointer;
}
.icon-btn:hover { background: #fff; }
.icon-btn.danger { color: #B0122F; border-color: rgba(176, 18, 47, 0.2); }

/* Forms */
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.col-span-2 { grid-column: span 2; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.field .hint { font-size: 11.5px; color: var(--muted); }
input[type="text"], input[type="password"], input[type="date"], input[type="month"],
input[type="number"], input[type="tel"], input[type="file"], select, textarea {
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(33, 160, 94, 0.15);
}
input[type="file"] { padding: 8px 10px; background: #fff; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.checkline { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.checkline input { width: auto; }

/* Filter bar */
.filterbar {
  display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.filterbar .field { min-width: 150px; }
.filterbar .spacer { flex: 1; }
.search-field { position: relative; }
.search-field input { padding-left: 36px; }
.search-field svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }

/* Tables */
.table-wrap {
  overflow: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th {
  text-align: left;
  padding: 11px 14px;
  font-size: 11.5px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  background: #F2F8F1;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  position: sticky; top: 0; z-index: 1;
}
table.tbl td { padding: 11px 14px; border-bottom: 1px solid rgba(14, 74, 45, 0.07); vertical-align: middle; }
table.tbl tbody tr:hover { background: #F8FCF7; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl .num { text-align: center; font-variant-numeric: tabular-nums; }
table.tbl .actions { display: flex; gap: 6px; }
.table-empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 13.5px; }

/* Badges & scale pills */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
  background: rgba(33, 160, 94, 0.12); color: var(--green-800);
}
.pill.neutral { background: rgba(91, 122, 105, 0.12); color: var(--muted); }

.s-BB  { --sc: #BE123C; --sc-bg: rgba(190, 18, 60, 0.1); }
.s-MB  { --sc: #B45309; --sc-bg: rgba(180, 83, 9, 0.11); }
.s-BSH { --sc: #0369A1; --sc-bg: rgba(3, 105, 161, 0.1); }
.s-BSB { --sc: #15803D; --sc-bg: rgba(21, 128, 61, 0.12); }
.s-none { --sc: #7D9387; --sc-bg: rgba(125, 147, 135, 0.1); }

.scale-pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; padding: 3px 9px;
  border-radius: 8px;
  background: var(--sc-bg); color: var(--sc);
  font-size: 11.5px; font-weight: 800; letter-spacing: .03em;
}
.scale-legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); align-items: center; }

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  margin-bottom: 18px;
  border: 1px solid transparent;
}
.alert-success { background: rgba(33, 160, 94, 0.12); color: #0B5133; border-color: rgba(33, 160, 94, 0.25); }
.alert-error { background: rgba(190, 18, 60, 0.09); color: #9F1239; border-color: rgba(190, 18, 60, 0.2); }
.alert-info { background: rgba(3, 105, 161, 0.08); color: #075985; border-color: rgba(3, 105, 161, 0.18); }
.alert-warn { background: rgba(180, 83, 9, 0.09); color: #92400E; border-color: rgba(180, 83, 9, 0.2); }

/* Empty state */
.empty { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty .emoji { font-size: 34px; display: block; margin-bottom: 10px; }
.empty h3 { font-size: 16px; color: var(--ink); margin-bottom: 6px; }

/* Segmented tabs */
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: rgba(255, 255, 255, 0.7); border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.tabs a {
  padding: 7px 14px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted);
}
.tabs a.is-active { background: linear-gradient(135deg, var(--green-600), var(--green-800)); color: #fff; box-shadow: 0 6px 14px -8px rgba(11, 81, 51, .8); }

/* Progress */
.progress { height: 7px; border-radius: 99px; background: rgba(14, 74, 45, 0.1); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--lime), var(--green-600)); }
.progress-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }

/* -------------------------------- Penilaian grid ------------------------ */
.assess-table td, .assess-table th { padding: 6px 6px; }
.assess-table th.act-col {
  writing-mode: initial;
  font-size: 10.5px;
  letter-spacing: 0;
  text-transform: none;
  font-weight: 600;
  color: var(--ink-soft);
  min-width: 74px;
  max-width: 92px;
  white-space: normal;
  line-height: 1.25;
  vertical-align: bottom;
}
.assess-table th.sticky-col, .assess-table td.sticky-col {
  position: sticky; left: 0; z-index: 3;
  background: #fff;
  min-width: 190px;
  box-shadow: 1px 0 0 var(--line);
}
.assess-table th.sticky-col { background: #F2F8F1; z-index: 4; }
.assess-table tbody tr:hover td.sticky-col { background: #F8FCF7; }
.score-cell {
  width: 100%;
  min-width: 58px;
  padding: 7px 4px;
  border-radius: 9px;
  border: 1px dashed rgba(14, 74, 45, 0.18);
  background: #fff;
  color: #7D9387;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.score-cell:hover { transform: translateY(-1px); border-color: var(--green-500); }
.score-cell.filled { border-style: solid; border-color: transparent; background: var(--sc-bg); color: var(--sc); }
.score-cell.filled:hover { border-color: rgba(14, 74, 45, 0.15); }
.score-cell.has-note::after { content: "•"; color: var(--green-700); margin-left: 2px; }
.student-name { font-weight: 600; font-size: 13px; }
.student-sub { font-size: 11px; color: var(--muted); }

/* ---------------------------- Isi per kegiatan -------------------------- */
.view-switch {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 18px;
}

.act-picker {
  display: flex; gap: 7px;
  flex-wrap: wrap;
  overflow-x: auto;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #F6FBF5, #fff);
  scrollbar-width: thin;
}
.act-chip {
  flex: 0 1 auto;
  display: flex; flex-direction: row; align-items: center; gap: 8px;
  min-width: 0; max-width: 148px;
  padding: 9px 12px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink-soft);
  font-size: 12.5px; font-weight: 600; line-height: 1.25;
  transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
.act-chip:hover { border-color: var(--green-500); color: var(--green-800); transform: translateY(-1px); }
.act-chip-name { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-chip-meta { flex: 0 0 auto; font-size: 10.5px; font-weight: 700; letter-spacing: .03em; color: var(--muted); }
.act-chip.is-active {
  background: linear-gradient(135deg, var(--green-600), var(--green-800));
  border-color: transparent; color: #fff;
  box-shadow: 0 10px 20px -14px rgba(11, 81, 51, .9);
}
.act-chip.is-active .act-chip-meta { color: rgba(255, 255, 255, .78); }
.act-chip.is-done { border-color: rgba(33, 160, 94, .38); background: rgba(33, 160, 94, .07); }

.act-head {
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.act-head .act-progress { margin-left: auto; min-width: 224px; flex: 0 1 260px; }

.act-list { list-style: none; margin: 0; padding: 4px 0; }
.act-row {
  display: flex; align-items: center; gap: 16px;
  padding: 11px 22px;
  border-bottom: 1px solid rgba(14, 74, 45, 0.07);
}
.act-row:last-child { border-bottom: 0; }
.act-row:hover { background: #F8FCF7; }
.act-who { flex: 1 1 auto; min-width: 160px; }
.act-btns { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.act-score {
  width: 50px; height: 38px;
  border-radius: 10px;
  border: 1px dashed rgba(14, 74, 45, 0.22);
  background: #fff;
  color: #8AA398;
  font-size: 11.5px; font-weight: 800; letter-spacing: .03em;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, color .12s ease;
}
.act-score:hover { transform: translateY(-1px); border-color: var(--green-500); color: var(--green-700); }
.act-score.is-on {
  border-style: solid; border-color: transparent;
  background: var(--sc-bg); color: var(--sc);
  box-shadow: inset 0 0 0 1.5px var(--sc), 0 6px 14px -10px var(--sc);
}
.act-clear {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  transition: color .12s ease, border-color .12s ease;
}
.act-clear:hover { color: #BE123C; border-color: rgba(190, 18, 60, .35); }

.act-foot {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  padding: 13px 22px;
  border-top: 1px solid var(--line);
  background: #FBFEF9;
}
.act-foot .btn { white-space: nowrap; }

@media (max-width: 720px) {
  .act-row { flex-wrap: wrap; gap: 9px; padding: 12px 16px; }
  .act-who { flex-basis: 100%; min-width: 0; }
  .act-btns { flex: 1 1 100%; gap: 7px; }
  .act-score { flex: 1 1 0; width: auto; height: 42px; }
  .act-head { padding: 16px; }
  .act-head .act-progress { margin-left: 0; flex-basis: 100%; }
  .act-picker { padding: 12px 14px; flex-wrap: nowrap; }
  .act-foot { padding: 12px 16px; }
  .act-foot .row { margin-left: 0 !important; width: 100%; }
}

/* Modal */
.scrim {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(7, 40, 26, 0.42);
  backdrop-filter: blur(3px);
  display: grid; place-items: center;
  padding: 18px;
}
.scrim[hidden] { display: none; }
.modal {
  width: min(440px, 100%);
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  animation: pop .18s ease;
}
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 4px; }
.modal-head h3 { font-size: 17px; }
.modal-head p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.scale-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.scale-btn {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--sc-bg);
  background: var(--sc-bg);
  color: var(--sc);
  cursor: pointer;
  font-weight: 800; font-size: 15px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.scale-btn small { font-size: 10.5px; font-weight: 600; opacity: .85; line-height: 1.25; text-align: left; }
.scale-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 20px -14px rgba(7, 61, 38, .7); }
.scale-btn.is-current { border-style: solid; border-color: var(--sc); }

/* ------------------------------- Landing page --------------------------- */
body.landing {
  background:
    radial-gradient(900px 520px at 88% 4%, rgba(127, 191, 63, 0.24), transparent 62%),
    radial-gradient(720px 460px at 4% 12%, rgba(33, 160, 94, 0.16), transparent 60%),
    radial-gradient(620px 420px at 55% 96%, rgba(190, 242, 100, 0.22), transparent 65%),
    linear-gradient(180deg, #F4FAF1 0%, #FBFEF8 45%, #F1F9EE 100%);
  min-height: 100vh;
  overflow-x: hidden;
}
.landing-wrap { width: min(1160px, calc(100% - 48px)); margin: 0 auto; }

.land-nav {
  display: flex; align-items: center; gap: 18px;
  padding: 20px 0;
}
.land-brand { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.land-brand .brand-mark { box-shadow: 0 10px 22px -12px rgba(11, 81, 51, .8); color: #06301F; }
.land-brand strong { font-size: 16px; letter-spacing: -0.02em; }
.land-brand small { display: block; font-size: 10.5px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.land-links { display: flex; gap: 24px; margin-left: auto; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.land-links a { color: var(--ink-soft); }
.land-links a:hover { color: var(--green-700); }
.land-nav .btn { padding: 10px 18px; }

.hero { display: grid; grid-template-columns: 1.06fr 0.94fr; gap: 48px; align-items: center; padding: 46px 0 30px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(21, 128, 61, 0.18);
  color: var(--green-800);
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
  box-shadow: var(--shadow-sm);
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(34px, 4.4vw, 55px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin: 20px 0 18px;
  font-weight: 600;
  color: #0A2E1E;
}
.hero h1 em { font-style: italic; color: var(--green-700); }
.hero p.lead { font-size: 16.5px; color: var(--muted); max-width: 520px; line-height: 1.65; }
.hero-cta { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero-cta .btn { padding: 13px 22px; font-size: 14px; border-radius: 13px; }
.hero-mini { display: flex; gap: 22px; margin-top: 32px; flex-wrap: wrap; }
.hero-mini div { display: flex; flex-direction: column; }
.hero-mini strong { font-size: 20px; letter-spacing: -0.02em; }
.hero-mini span { font-size: 12px; color: var(--muted); }

.hero-art { position: relative; }
.art-card {
  position: relative;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 26px;
  padding: 22px;
  box-shadow: 0 40px 70px -40px rgba(7, 61, 38, 0.45), 0 2px 10px rgba(7, 61, 38, .05);
}
.art-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.art-head strong { font-size: 13.5px; }
.art-head span { font-size: 11.5px; color: var(--muted); }
.art-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed rgba(14, 74, 45, 0.12); }
.art-row:last-child { border-bottom: 0; }
.art-avatar { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: rgba(33, 160, 94, .13); color: var(--green-800); flex: 0 0 30px; }
.art-row .grow { flex: 1; font-size: 12.5px; font-weight: 600; }
.art-row .grow small { display: block; font-weight: 500; color: var(--muted); font-size: 10.5px; }
.art-badge {
  position: absolute; right: -18px; bottom: -22px;
  background: linear-gradient(140deg, var(--green-700), #0A4A2F);
  color: #fff; border-radius: 18px; padding: 14px 18px;
  box-shadow: 0 24px 40px -24px rgba(7, 61, 38, .9);
  display: flex; gap: 10px; align-items: center;
}
.art-badge strong { font-size: 20px; }
.art-badge span { font-size: 11px; color: rgba(255,255,255,.75); max-width: 92px; line-height: 1.3; }
.leaf-deco { position: absolute; color: rgba(21, 128, 61, 0.16); z-index: -1; }

.land-section { padding: 62px 0; }
.land-section-head { max-width: 660px; margin-bottom: 34px; }
.land-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--green-700); }
.land-section-head h2 { font-family: var(--display); font-size: clamp(26px, 3vw, 36px); margin: 12px 0 12px; letter-spacing: -0.025em; font-weight: 600; }
.land-section-head p { color: var(--muted); font-size: 15px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feature .f-icon {
  width: 44px; height: 44px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, rgba(127, 191, 63, .22), rgba(33, 160, 94, .16));
  color: var(--green-800);
  margin-bottom: 16px;
}
.feature h3 { font-size: 15.5px; margin-bottom: 8px; }
.feature p { font-size: 13.5px; color: var(--muted); line-height: 1.6; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: step; }
.step {
  position: relative;
  padding: 26px 24px 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(170deg, rgba(255,255,255,.94), rgba(240, 250, 238, .86));
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: var(--shadow-sm);
}
.step::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--display);
  font-size: 30px;
  color: rgba(21, 128, 61, .28);
  display: block;
  margin-bottom: 10px;
  letter-spacing: -0.03em;
}
.step h3 { font-size: 15.5px; margin-bottom: 7px; }
.step p { font-size: 13.5px; color: var(--muted); }

.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.role-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .8);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: var(--shadow-sm);
}
.role-card .pill { margin-bottom: 12px; }
.role-card h3 { font-size: 16px; margin-bottom: 10px; }
.role-card ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; display: flex; flex-direction: column; gap: 6px; }

.cta-band {
  margin: 20px 0 60px;
  padding: 42px;
  border-radius: 28px;
  background:
    radial-gradient(500px 240px at 92% 10%, rgba(127, 191, 63, .38), transparent 60%),
    linear-gradient(120deg, #0A4A2F, #073D26 60%, #0E5535);
  color: #fff;
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  box-shadow: 0 40px 70px -45px rgba(7, 61, 38, .9);
}
.cta-band h2 { font-family: var(--display); font-size: clamp(24px, 2.6vw, 32px); font-weight: 600; letter-spacing: -0.02em; }
.cta-band p { color: rgba(255, 255, 255, .74); font-size: 14px; margin-top: 8px; max-width: 520px; }
.cta-band .btn-primary { background: #fff; color: var(--green-900); box-shadow: 0 16px 30px -18px rgba(0,0,0,.7); }
.cta-band .btn-primary:hover { color: var(--green-900); }
.cta-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.cta-band .btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.24); }

.land-foot { padding: 26px 0 40px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); }

/* --------------------------------- Login -------------------------------- */
body.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  background: var(--cream);
}
.auth-aside {
  position: relative;
  padding: 48px;
  display: flex; flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background:
    radial-gradient(600px 340px at 80% 8%, rgba(127, 191, 63, .35), transparent 62%),
    radial-gradient(500px 380px at 6% 90%, rgba(33, 160, 94, .3), transparent 60%),
    linear-gradient(160deg, #0A4A2F, #073D26 55%, #062F1E);
  overflow: hidden;
}
.auth-aside h2 { font-family: var(--display); font-size: clamp(28px, 3vw, 40px); line-height: 1.12; letter-spacing: -0.025em; margin: 26px 0 16px; font-weight: 600; }
.auth-aside p { color: rgba(255, 255, 255, .76); font-size: 14.5px; max-width: 420px; }
.auth-aside .quotes { display: flex; flex-direction: column; gap: 12px; margin-top: 30px; }
.auth-aside .quotes div { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: rgba(255,255,255,.82); }
.auth-aside .quotes span { color: var(--lime); }
.auth-main { display: grid; place-items: center; padding: 40px 24px; }
.auth-card {
  width: min(400px, 100%);
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  padding: 32px 30px;
}
.auth-card h1 { font-size: 22px; margin-bottom: 6px; letter-spacing: -0.02em; }
.auth-card > p { font-size: 13.5px; color: var(--muted); margin-bottom: 22px; }
.auth-card .field + .field { margin-top: 14px; }
.auth-card .btn { margin-top: 20px; padding: 12px; font-size: 14px; }
.demo-box {
  margin-top: 22px; padding: 14px 16px;
  border-radius: 14px;
  background: rgba(33, 160, 94, .08);
  border: 1px dashed rgba(21, 128, 61, .28);
  font-size: 12px; color: var(--ink-soft);
}
.demo-box strong { display: block; margin-bottom: 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--green-800); }
.demo-box code { background: rgba(255,255,255,.8); padding: 1px 5px; border-radius: 5px; font-size: 11.5px; }
.demo-box div + div { margin-top: 4px; }

/* --------------------------------- Logo --------------------------------- */
.logo-current { display: flex; align-items: center; gap: 16px; }
.logo-preview {
  width: 74px; height: 74px; flex: 0 0 74px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  object-fit: contain;
  padding: 6px;
  box-shadow: var(--shadow-sm);
}
.logo-preview.logo-empty {
  display: grid; place-items: center;
  color: var(--green-700);
  background: rgba(33, 160, 94, 0.1);
  padding: 0;
}
.logo-meta { display: flex; flex-direction: column; gap: 3px; }
.logo-meta strong { font-size: 14px; }

/* --------------------------------- Print -------------------------------- */
body.print { background: #fff; color: #000; font-size: 12px; --sheet-w: 210mm; }
body.print.print-landscape { --sheet-w: 297mm; }

.print-toolbar {
  max-width: var(--sheet-w); margin: 0 auto; padding: 16px 0;
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
}
.print-toolbar-hint { flex: 1 1 100%; }
.print-orient {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 4px; border: 1px solid var(--line);
  border-radius: 12px; background: rgba(255, 255, 255, .8);
}
.print-orient .orient-label {
  padding: 0 7px; font-size: 10px; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; color: var(--muted);
}
.print-orient .orient-btn { padding: 6px 13px; border-radius: 9px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.print-orient .orient-btn:hover { color: var(--green-800); }
.print-orient .orient-btn.is-active {
  background: linear-gradient(135deg, var(--green-600), var(--green-800));
  color: #fff; box-shadow: 0 6px 14px -8px rgba(11, 81, 51, .8);
}

.print-sheet {
  max-width: var(--sheet-w); margin: 0 auto 40px;
  background: #fff; padding: 14mm 12mm;
  box-shadow: 0 10px 30px -20px rgba(0, 0, 0, .35);
  border: 1px solid #E3EADF;
}
.print-head { text-align: center; border-bottom: 2px solid #14532D; padding-bottom: 10px; margin-bottom: 14px; }
.print-logo {
  height: 22mm;
  width: auto;
  max-width: 40mm;
  object-fit: contain;
  margin: 0 auto 6px;
  display: block;
}
.print-head h2 { font-size: 17px; letter-spacing: .02em; text-transform: uppercase; color: #14532D; }
.print-head h3 { font-size: 13.5px; font-weight: 600; margin-top: 4px; }
.print-head p { font-size: 10.5px; color: #555; }

/* Identitas: menyesuaikan lebar kertas (2 kolom di portrait, 4 di landscape) */
.print-ident {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(72mm, 1fr));
  gap: 3px 14px; font-size: 10.5px; margin-bottom: 12px;
}
.print-ident b { display: inline-block; min-width: 88px; font-weight: 600; }
.print-landscape .print-ident { grid-template-columns: repeat(auto-fit, minmax(56mm, 1fr)); }

/* Tabel: layout tetap supaya lebar kolom tidak melar mengikuti isi */
table.print-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 9.4px; }
table.print-table th, table.print-table td {
  border: 1px solid #7f8f81; padding: 3.5px 4px;
  vertical-align: middle; word-break: break-word; overflow-wrap: anywhere;
}
table.print-table th { background: #EAF3E6; font-weight: 700; text-align: center; line-height: 1.2; }
table.print-table td.c, table.print-table th.c { text-align: center; }
table.print-table td.wrap { white-space: normal; }
table.print-table tbody tr:nth-child(even) > td { background: #FAFCF8; }
table.print-table tfoot td { background: #EFF6EC; font-weight: 700; }
body.print-dense table.print-table { font-size: 8.5px; }
body.print-dense table.print-table th, body.print-dense table.print-table td { padding: 2.5px 3px; }

/* Lebar kolom per jenis berkas */
table.print-rapor col.c-no { width: 6%; }
table.print-rapor col.c-kegiatan { width: 27%; }
table.print-rapor col.c-aspek { width: 12%; }
table.print-rapor col.c-dinilai { width: 9%; }
table.print-rapor col.c-rata { width: 8%; }
table.print-rapor col.c-capaian { width: 8%; }
table.print-rapor thead th:nth-child(2), table.print-rapor thead th:nth-child(7),
table.print-rapor tbody td:nth-child(2), table.print-rapor tbody td:nth-child(7) { text-align: left; }

table.print-matrix col.c-no { width: 6%; }
table.print-matrix col.c-name { width: 24%; }
table.print-matrix col.c-note { width: 13%; }
table.print-matrix col.c-avg { width: 8%; }
table.print-matrix col.c-pred { width: 8%; }
table.print-matrix thead th:nth-child(2), table.print-matrix tbody td:nth-child(2) { text-align: left; }
.print-landscape table.print-matrix col.c-name { width: 18%; }
.print-landscape table.print-matrix col.c-note { width: 15%; }
.print-landscape table.print-matrix col.c-avg,
.print-landscape table.print-matrix col.c-pred { width: 7%; }
.print-landscape table.print-rapor col.c-kegiatan { width: 30%; }

/* Lembar harian dipakai untuk menulis manual → baris lebih lega */
table.print-matrix.is-form tbody td { height: 7mm; }

/* Legenda kolom kegiatan (dipakai bila header tabel bernomor) */
.print-legend {
  margin-top: 8px; padding-top: 6px;
  border-top: 1px dashed #9aa79b;
  font-size: 8.4px; line-height: 1.5; color: #222;
  columns: 3; column-gap: 7mm;
}
.print-legend > b { display: block; column-span: all; margin-bottom: 3px; font-size: 8.8px; }
.print-legend span { display: block; break-inside: avoid; }
.print-landscape .print-legend { columns: 4; }

.print-note { font-size: 9.4px; color: #222; margin-top: 9px; line-height: 1.5; }
.sign-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 22px; font-size: 10.5px; text-align: center; }
.sign-grid .space { height: 54px; }
.sign-grid b { text-decoration: underline; }

@media print {
  @page { size: A4 portrait; margin: 11mm 10mm; }
  body.print { background: #fff; }
  .print-toolbar, .no-print { display: none !important; }
  .print-sheet { box-shadow: none; border: 0; margin: 0; padding: 0; max-width: none; }
  .print-sheet + .print-sheet { page-break-before: always; }
  table.print-table { font-size: 9px; }
  body.print-dense table.print-table { font-size: 8.2px; }
  table.print-table tr, table.print-table td, table.print-table th { page-break-inside: avoid; }
  table.print-table tfoot { display: table-row-group; }
  thead { display: table-header-group; }
  .print-legend, .print-note, .sign-grid { page-break-inside: avoid; }
}

/* ------------------------------- Utilities ------------------------------ */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 700; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.divider { height: 1px; background: var(--line); margin: 20px 0; }
.scroll-x { overflow-x: auto; }
.badge-role { font-size: 10.5px; padding: 3px 9px; border-radius: 999px; background: rgba(33,160,94,.12); color: var(--green-800); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }

/* ------------------------------- Responsive ----------------------------- */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 24px; }
  .hero-art { max-width: 460px; }
  .feature-grid, .roles, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform .24s ease;
    width: 272px;
    box-shadow: 0 0 60px rgba(0, 0, 0, .35);
  }
  body.nav-open .sidebar { transform: none; }
  .sidebar-backdrop {
    position: fixed; inset: 0; background: rgba(7, 40, 26, .45);
    z-index: 35; opacity: 0; pointer-events: none; transition: opacity .2s ease;
  }
  body.nav-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; }
  .menu-btn { display: inline-grid !important; }
  .topbar { padding: 12px 16px; gap: 10px; }
  .content { padding: 18px 16px 32px; }
  .app-foot { padding: 16px; }
  .user-meta { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field.col-span-2 { grid-column: span 1; }
  body.auth { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .land-links { display: none; }
  .feature-grid, .roles, .steps { grid-template-columns: 1fr; }
  .cta-band { padding: 28px; }
  .cta-actions { margin-left: 0; }
  .landing-wrap { width: calc(100% - 32px); }
  .hero-mini { gap: 16px; }
  .art-badge { right: 0; bottom: -18px; }
  .print-toolbar { padding: 12px; }
  .print-sheet { padding: 14px; }
}
