/* Tema hijau; menimpa variabel Bootstrap 5.3 (tanpa kompilasi Sass) */
:root, [data-bs-theme=light] {
  --bs-primary: #0b7a62; --bs-primary-rgb: 11,122,98;
  --bs-link-color: #0b7a62; --bs-link-color-rgb: 11,122,98;
  --bs-link-hover-color: #085c4a; --bs-link-hover-color-rgb: 8,92,74;
  --bs-body-bg: #f4f7f6;
  --nav-h: 58px;
}
[data-bs-theme=dark] {
  --bs-primary: #19a085; --bs-primary-rgb: 25,160,133;
  --bs-link-color: #4fd1b5; --bs-link-color-rgb: 79,209,181;
  --bs-link-hover-color: #7fe0cb; --bs-link-hover-color-rgb: 127,224,203;
  --bs-body-bg: #0f1514;
}
.btn-primary { --bs-btn-bg: var(--bs-primary); --bs-btn-border-color: var(--bs-primary); --bs-btn-hover-bg: #085c4a; --bs-btn-hover-border-color: #085c4a; --bs-btn-active-bg: #064a3b; --bs-btn-active-border-color: #064a3b; --bs-btn-disabled-bg: var(--bs-primary); --bs-btn-disabled-border-color: var(--bs-primary); }
.btn-outline-primary { --bs-btn-color: var(--bs-primary); --bs-btn-border-color: var(--bs-primary); --bs-btn-hover-bg: var(--bs-primary); --bs-btn-hover-border-color: var(--bs-primary); --bs-btn-active-bg: var(--bs-primary); --bs-btn-active-border-color: var(--bs-primary); --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff; }
.text-bg-primary { background-color: var(--bs-primary) !important; }
.progress { --bs-progress-bar-bg: var(--bs-primary); }
.text-primary { color: var(--bs-primary) !important; }

body { padding-bottom: env(safe-area-inset-bottom); -webkit-tap-highlight-color: transparent; }
body.has-nav .page { padding-bottom: calc(var(--nav-h) + 24px); }
.card { border-radius: .9rem; --bs-card-border-color: var(--bs-border-color-translucent); }

/* Header */
.topbar { background: var(--bs-primary); color: #fff; padding: .6rem 0; z-index: 1030; }
.topbar a { color: #fff; }
.brand { font-weight: 700; letter-spacing: .2px; }
.nav-link-top { padding: .35rem .8rem; border-radius: 2rem; text-decoration: none; opacity: .85; }
.nav-link-top.active, .nav-link-top:hover { background: rgba(255,255,255,.18); opacity: 1; }
.user-chip { max-width: 46vw; opacity: .95; }
.topbar .btn-outline-secondary { --bs-btn-color: #fff; --bs-btn-border-color: rgba(255,255,255,.5); --bs-btn-hover-bg: rgba(255,255,255,.2); --bs-btn-hover-border-color: #fff; }

/* Bottom nav (mobile) */
.bottom-nav { position: fixed; inset: auto 0 0 0; z-index: 1030; display: flex; height: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--bs-body-bg); border-top: 1px solid var(--bs-border-color); }
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .68rem; text-decoration: none; color: var(--bs-secondary-color); }
.bottom-nav a i { font-size: 1.3rem; line-height: 1; }
.bottom-nav a.active { color: var(--bs-primary); font-weight: 600; }

/* Login */
.login-logo { width: 72px; height: 72px; margin: 0 auto; border-radius: 22px; display: grid; place-items: center; font-size: 2rem; color: #fff; background: linear-gradient(135deg, #0b7a62, #19a085); }

/* Hero + ring */
.hero { background: linear-gradient(135deg, #0b7a62, #139a7d); color: #fff; border: 0; }
.ring { --p: 0; flex: none; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255,255,255,.25) 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #0e8a70; }
.ring span { position: relative; font-weight: 700; font-size: 1.35rem; }

/* 7-day strip */
.daystrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem; }
.daystrip .day { display: flex; flex-direction: column; align-items: center; padding: .45rem 0; border-radius: .7rem; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); color: var(--bs-body-color); text-decoration: none; line-height: 1.15; }
.daystrip .day small { font-size: .65rem; color: var(--bs-secondary-color); }
.daystrip .day span { font-size: .7rem; color: var(--bs-secondary-color); }
.daystrip .day.done { border-color: var(--bs-primary); } .daystrip .day.done span { color: var(--bs-primary); font-weight: 700; }
.daystrip .day.today { box-shadow: 0 0 0 2px var(--bs-primary) inset; }

/* Date / class chips */
.daychips { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.daychips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-width: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: .4rem .5rem; border-radius: .8rem; border: 1px solid var(--bs-border-color); background: var(--bs-body-bg); color: var(--bs-body-color); text-decoration: none; line-height: 1.15; }
.chip small { font-size: .65rem; color: var(--bs-secondary-color); }
.chip.active { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }
.chip.active small { color: rgba(255,255,255,.8); }

/* Form harian */
.act-icon { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem; color: var(--bs-primary); background: rgba(var(--bs-primary-rgb), .12); }
.seg .btn { padding: .65rem .25rem; font-weight: 600; }
.sc { min-width: 2.4rem; }
.sc.on { background: var(--bs-primary) !important; }
.savebar { position: fixed; z-index: 1020; inset: auto 0 calc(var(--nav-h) + env(safe-area-inset-bottom)) 0; padding: .6rem 0; background: var(--bs-body-bg); border-top: 1px solid var(--bs-border-color); box-shadow: 0 -4px 12px rgba(0,0,0,.06); }
body.has-nav form#logform { padding-bottom: 72px; }
@media (min-width: 768px) {
  .savebar { bottom: 0; }
  body.has-nav .page { padding-bottom: 24px; }
  .page { max-width: 880px; }
  form#logform { max-width: 640px; }
}

/* Avatar */
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--bs-primary); background: rgba(var(--bs-primary-rgb), .14); }
.avatar-lg { width: 56px; height: 56px; font-size: 1.4rem; }

/* Rincian harian */
.daily-wrap { max-height: 70vh; }
.daily thead th { position: sticky; top: 0; background: var(--bs-tertiary-bg); z-index: 2; }
.daily .stick { position: sticky; left: 0; background: var(--bs-body-bg); z-index: 1; }
.daily thead .stick { z-index: 3; background: var(--bs-tertiary-bg); }
.daily td, .daily th { white-space: nowrap; font-size: .8rem; }

/* Laporan */
.identity dt { color: var(--bs-secondary-color); font-weight: 500; }
.sign-space { height: 64px; }

@media print {
  .no-print, .topbar, .bottom-nav, .savebar { display: none !important; }
  body { background: #fff !important; }
  .page { max-width: 100% !important; padding: 0 !important; }
  .card { border: 0 !important; box-shadow: none !important; }
  .d-none.d-sm-table-cell, .d-none.d-md-table-cell { display: table-cell !important; }
  .badge { border: 1px solid #000; color: #000 !important; background: #fff !important; }
}


/* Login modern v2.3 */
body:has(.login-shell) { background: #f3f7f6; }
body:has(.login-shell) .page { max-width: 1180px; min-height: 100vh; display:flex; align-items:center; padding:clamp(1rem,4vw,3rem) !important; }
.login-shell { width:100%; min-height:min(720px, calc(100vh - 3rem)); display:grid; grid-template-columns:1fr 1fr; overflow:hidden; border-radius:1.5rem; background:#fff; box-shadow:0 24px 70px rgba(13,54,45,.12); border:1px solid rgba(11,122,98,.08); }
.login-visual { position:relative; overflow:hidden; align-items:stretch; padding:clamp(2.5rem,5vw,5rem); color:#fff; background:linear-gradient(145deg,#075c4b 0%,#0b7a62 52%,#18a486 100%); }
.login-visual-content { position:relative; z-index:1; display:flex; flex-direction:column; align-items:flex-start; max-width:440px; }
.login-mark { width:58px;height:58px;display:grid;place-items:center;border:1px solid rgba(255,255,255,.32);border-radius:18px;background:rgba(255,255,255,.14);font-size:1.65rem;margin-bottom:3.5rem;backdrop-filter:blur(8px); }
.login-eyebrow,.login-kicker { font-size:.7rem;font-weight:800;letter-spacing:.16em; }
.login-visual h1 { font-size:clamp(2.4rem,4vw,3.8rem);font-weight:800;line-height:1.08;letter-spacing:-.04em;margin:1rem 0 1.2rem; }
.login-visual p { max-width:390px;color:rgba(255,255,255,.82);line-height:1.8;font-size:1rem; }
.login-visual-foot { margin-top:auto;padding-top:3rem;font-size:.85rem;color:rgba(255,255,255,.85); }
.login-orb { position:absolute;border:1px solid rgba(255,255,255,.12);border-radius:50%; }
.login-orb-one { width:390px;height:390px;right:-170px;top:-120px;box-shadow:0 0 0 45px rgba(255,255,255,.035),0 0 0 95px rgba(255,255,255,.025); }
.login-orb-two { width:260px;height:260px;right:-80px;bottom:-110px;background:rgba(255,255,255,.045); }
.login-panel { display:flex;align-items:center;justify-content:center;padding:clamp(2rem,5vw,5rem); }
.login-form-wrap { width:100%;max-width:410px; }
.login-kicker { color:var(--bs-primary);margin-bottom:.8rem; }
.login-form .form-label { font-size:.9rem; }
.login-input { border:1px solid #dce6e2;border-radius:.8rem;overflow:hidden;background:#f8fbfa; }
.login-input .input-group-text { border:0;background:transparent;color:#668078;padding-left:1rem; }
.login-input .form-control { border:0;background:transparent;min-height:52px;box-shadow:none; }
.login-input:focus-within { border-color:var(--bs-primary);box-shadow:0 0 0 .2rem rgba(var(--bs-primary-rgb),.12); }
.login-submit { min-height:54px;border-radius:.8rem;font-weight:700;box-shadow:0 8px 18px rgba(var(--bs-primary-rgb),.18); }
.login-school { color:#405b53;font-weight:700;font-size:.9rem; }
.login-mobile-brand { margin-bottom:2rem; }
@media(max-width:991.98px){body:has(.login-shell) .page{max-width:560px}.login-shell{grid-template-columns:1fr;min-height:auto;border-radius:1.25rem}.login-panel{padding:clamp(1.5rem,6vw,3rem)}.login-mobile-brand .login-logo{margin:0;width:56px;height:56px;border-radius:16px;font-size:1.5rem}.login-visual{display:none!important}}
@media(max-width:420px){.login-panel{padding:1.35rem}.login-shell{border-radius:1rem}}
