/* Akademik al-Karomah */
:root {
  --hijau: #1E4D3A; --hijau-tua: #14241B; --tinta: #1B231E; --teks: #424A43; --redup: #5A6159;
  --emas: #8A6420; --krem: #F7F5EF; --garis: #E4E0D5; --garis2: #EEEBE3; --biru: #1F4E6B;
  --merah: #8E2F1F; --amber: #6E4F15;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--krem); color: var(--tinta); font: 15px/1.55 'Plus Jakarta Sans', system-ui, sans-serif; }
a { color: var(--hijau); }
a:hover { color: #14352A; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h2 { font-size: 17px; }
h3 { font-size: 15px; margin-top: 18px; }
.serif, .top h1, .hello strong, .stat b, .big { font-family: Lora, Georgia, serif; font-weight: 600; }
code { background: var(--garis2); padding: 1px 6px; border-radius: 4px; font-size: 13px; }
.muted { color: var(--redup); }
.small, small { font-size: 13px; }
.gold { color: var(--emas); font-weight: 600; }
.green { color: var(--hijau); } .red { color: var(--merah); } .amber { color: var(--amber); } .blue { color: var(--biru); }

/* Kerangka */
.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.side { flex: 1 1 250px; max-width: 280px; background: #fff; border-right: 1px solid var(--garis); padding: 20px 14px; display: flex; flex-direction: column; gap: 18px; }
.main { flex: 999 1 560px; min-width: 0; padding: 24px 28px 40px; display: flex; flex-direction: column; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.brand > div:nth-child(2) { display: flex; flex-direction: column; line-height: 1.2; }
.brand strong { font-size: 15px; } .brand span { font-size: 12px; color: var(--redup); }
.logo { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; background: var(--hijau); color: #fff; display: flex; align-items: center; justify-content: center; font: 600 17px Lora, serif; }
.menu-toggle { display: none; margin-left: auto; min-height: 40px; padding: 6px 14px; border: 1px solid var(--garis); border-radius: 8px; background: #fff; font: inherit; font-weight: 600; cursor: pointer; }
nav { display: flex; flex-direction: column; gap: 3px; }
nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 12px; border-radius: 8px; color: var(--teks); text-decoration: none; font-weight: 500; font-size: 14px; }
nav a:hover { background: var(--krem); color: var(--tinta); }
nav a.on { background: #E3ECE6; color: #14352A; font-weight: 700; }
.badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--merah); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.me { margin-top: auto; border-top: 1px solid var(--garis2); padding: 14px 6px 0; display: flex; align-items: center; gap: 10px; }
.me-t { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; flex: 1; }
.me-t strong { font-size: 14px; } .me-t span { font-size: 12px; color: var(--redup); }
.avatar { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; background: #E3ECE6; color: var(--hijau); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.top h1 { font-size: 28px; color: var(--hijau-tua); }
.bell { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--garis); background: #fff; display: flex; align-items: center; justify-content: center; color: var(--tinta); }
.bell .badge { position: absolute; top: -4px; right: -6px; }
.foot { margin-top: auto; padding-top: 24px; font-size: 12px; color: var(--redup); }

/* Komponen */
.card { background: #fff; border: 1px solid var(--garis); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.card.slim { padding: 12px 16px; }
.card.note { border-color: var(--emas); background: #FFFBF2; }
.hello { background: var(--hijau); color: #fff; border-radius: 14px; padding: 22px 24px; display: flex; flex-direction: column; gap: 2px; }
.hello span { font-size: 13px; color: #D5E3DA; } .hello strong { font-size: 23px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: #fff; border: 1px solid var(--garis); border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.stat span { font-size: 13px; color: var(--redup); } .stat b { font-size: 26px; color: var(--hijau); } .stat small { color: var(--redup); font-size: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; align-items: start; }
.split { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.split > .list { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.split > .detail { flex: 2 1 440px; }
.row-between { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border: 1px solid var(--hijau); border-radius: 8px; background: var(--hijau); color: #fff; font: inherit; font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; }
.btn:hover { background: #14352A; color: #fff; }
.btn.ghost { background: #fff; color: var(--tinta); border-color: #C9C3B3; }
.btn.ghost:hover { background: var(--krem); }
.btn.danger { background: #fff; color: var(--merah); border-color: #C98A7E; }
.btn.wide { width: 100%; }
.btn.push { margin-left: auto; }
.link { background: none; border: 0; padding: 0; color: var(--hijau); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: underline; }
.chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; background: var(--garis2); color: var(--teks); }
.chip.green { background: #E3ECE6; color: var(--hijau); } .chip.amber { background: #FBEFD9; color: var(--amber); }
.chip.red { background: #F6E1DC; color: var(--merah); } .chip.blue { background: #E2EBF2; color: var(--biru); }
.chips-nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chips-nav a { min-height: 40px; display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 999px; border: 1px solid #C9C3B3; background: #fff; color: var(--tinta); text-decoration: none; font-weight: 600; font-size: 14px; }
.chips-nav a.on { background: var(--hijau); border-color: var(--hijau); color: #fff; }
.chips-nav a.btn { border-radius: 8px; background: var(--hijau); color: #fff; border-color: var(--hijau); }
.chips-nav.sub a { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.flash { padding: 12px 16px; border-radius: 10px; background: #E3ECE6; color: #14352A; font-weight: 500; font-size: 14px; }
.flash.warn { background: #FBEFD9; color: var(--amber); } .flash.err { background: #F6E1DC; color: #6E2416; }
.flash.center { max-width: 420px; margin: 16px auto 0; }
.err { margin: 0; color: var(--merah); font-weight: 600; font-size: 14px; }
.warn { margin: 0; color: var(--amber); font-weight: 600; font-size: 14px; }
.box { background: var(--krem); border-radius: 10px; padding: 12px 14px; margin: 0; }

/* Formulir */
.form label, .filters label { display: block; font-size: 14px; font-weight: 600; margin: 4px 0 6px; }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #C9C3B3; border-radius: 8px; background: #fff; font: inherit; font-size: 14px; color: var(--tinta); }
textarea { min-height: 0; resize: vertical; }
input:focus, select:focus, textarea:focus, a:focus-visible, button:focus-visible { outline: 3px solid #9CC3AE; outline-offset: 1px; }
fieldset { border: 1px solid var(--garis); border-radius: 10px; padding: 12px 14px; margin: 0; }
legend { font-weight: 600; font-size: 14px; padding: 0 6px; }
.fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 14px; }
.fields .w2 { grid-column: span 2; } .fields .w3 { grid-column: span 3; } .fields .w4 { grid-column: 1 / -1; }
.radios, .checks { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.radio, .check { display: flex !important; align-items: center; gap: 8px; min-height: 36px; font-weight: 500 !important; margin: 0 !important; }
.radio input, .check input { width: 18px; height: 18px; min-height: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filters > div { flex: 1 1 180px; max-width: 320px; }
.act { background: #EEF4F0; border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
form.inline { display: inline; }
.acts { white-space: nowrap; } .acts a, .acts form { margin-right: 10px; display: inline; }

/* Tabel */
.table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--redup); text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--garis); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--garis2); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
.dl dt { color: var(--redup); } .dl dd { margin: 0; }

/* Daftar & notifikasi */
.todo, .notif, .item { display: flex; text-decoration: none; color: var(--tinta); border: 1px solid var(--garis2); border-radius: 10px; padding: 12px 14px; background: var(--krem); }
.todo { justify-content: space-between; align-items: center; gap: 12px; }
.todo span:first-child { display: flex; flex-direction: column; } .todo small { color: var(--redup); }
.notif { flex-direction: column; gap: 2px; background: #fff; }
.notif.new { background: #EEF4F0; border-color: #CFE0D5; }
.notif span { font-size: 14px; color: var(--teks); } .notif small { color: var(--redup); }
.item { flex-direction: column; gap: 4px; background: #fff; border-color: var(--garis); }
.item.on { border-color: var(--hijau); background: #EEF4F0; }
.log { display: flex; flex-direction: column; gap: 3px; padding: 10px 0; border-bottom: 1px solid var(--garis2); font-size: 14px; }

/* Alur izin */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; gap: 12px; position: relative; padding-bottom: 14px; }
.steps li:not(:last-child)::before { content: ""; position: absolute; left: 12px; top: 28px; bottom: 2px; width: 2px; background: var(--garis); }
.steps li.done:not(:last-child)::before { background: var(--hijau); }
.steps .dot { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; border: 2px solid #C9C3B3; background: #fff; color: var(--redup); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.steps li > div { display: flex; flex-direction: column; line-height: 1.35; }
.steps small { color: var(--redup); }
.steps li.done .dot { background: var(--hijau); border-color: var(--hijau); color: #fff; }
.steps li.cur .dot { border-color: #B07A1E; color: var(--amber); }
.steps li.rej .dot { background: var(--merah); border-color: var(--merah); color: #fff; }
.steps li:not(.done):not(.cur):not(.rej) strong { font-weight: 500; color: var(--redup); }

/* Progress Qur'an */
.surahs { display: flex; flex-direction: column; gap: 4px; max-height: 620px; overflow-y: auto; padding-right: 4px; }
.surah { display: grid; grid-template-columns: 34px 1fr 70px 42px; gap: 10px; align-items: center; min-height: 48px; padding: 8px 10px; border: 1px solid var(--garis2); border-radius: 8px; text-decoration: none; color: var(--tinta); }
.surah.on { border-color: var(--hijau); background: #EEF4F0; }
.surah .no { font-size: 12px; font-weight: 700; color: var(--emas); }
.surah .nm { display: flex; flex-direction: column; line-height: 1.3; } .surah small { color: var(--redup); font-size: 12px; }
.surah .pct { font-size: 12px; font-weight: 700; text-align: right; }
.bar { height: 6px; border-radius: 3px; background: var(--garis2); overflow: hidden; display: block; }
.bar i { display: block; height: 6px; background: var(--hijau); } .bar.tahsin i { background: var(--biru); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--teks); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend .ay { width: 16px; height: 16px; min-height: 0; padding: 0; }
.ayat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px; }
.ay { height: 38px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; border: 1px solid #C9C3B3; background: #fff; color: var(--teks); }
.ay.h { background: var(--hijau); border-color: var(--hijau); color: #fff; }
.ay.h.tahsin { background: var(--biru); border-color: var(--biru); }
.ay.m { background: #F3D9A4; border-color: #C99A45; color: #5C3F0C; }

/* Login */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login { width: 100%; max-width: 400px; gap: 4px; }
.login h1 { font: 600 26px Lora, serif; margin: 18px 0 8px; color: var(--hijau-tua); }
.login label { font-weight: 600; font-size: 14px; margin: 10px 0 6px; display: block; }
.login .btn { margin-top: 16px; }
.brand.plain { padding: 0; }

/* Ponsel */
@media (max-width: 820px) {
  .side { max-width: none; flex-basis: 100%; border-right: 0; border-bottom: 1px solid var(--garis); padding: 12px 14px; gap: 10px; }
  .menu-toggle { display: inline-flex; align-items: center; }
  .side nav, .side .me { display: none; }
  .side.open nav, .side.open .me { display: flex; }
  .main { padding: 18px 16px 32px; }
  .top h1 { font-size: 23px; }
  .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fields .w3 { grid-column: 1 / -1; }
  .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .fields { grid-template-columns: 1fr; }
  .fields .w2 { grid-column: auto; }
}
@media print {
  .side, .bell, .chips-nav, form, .foot { display: none !important; }
  .main { padding: 0; } .card { border: 0; padding: 0; }
}
.card.form { gap: 6px; }
.card.form > h2, .card.form > .row-between { margin-bottom: 6px; }
.card.form > .btn, .card.form > .actions, .card.form > fieldset { margin-top: 10px; }
