:root {
  --hijau: #14532d;
  --hijau2: #166534;
  --sb-w: 256px;
  --top-h: 56px;
}
body { background: #f3f5f4; font-size: .925rem; }
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--top-h); z-index: 1030;
  background: linear-gradient(90deg, var(--hijau), var(--hijau2));
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.brand { font-weight: 700; letter-spacing: .5px; font-size: 1.1rem; }
.sidebar {
  position: fixed; top: var(--top-h); bottom: 0; left: 0; width: var(--sb-w);
  background: linear-gradient(180deg, #0f3d22 0%, #14532d 55%, #0b2e1a 100%);
  color: #d1e7d9; overflow-y: auto; z-index: 1020; transition: transform .25s ease;
  display: flex; flex-direction: column; box-shadow: 2px 0 12px rgba(0,0,0,.12);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent;
}
.sb-profile { display: flex; align-items: center; gap: .75rem; padding: 1.1rem 1.1rem 1rem; margin: 0 .3rem .2rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.sb-avatar {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center;
  background: linear-gradient(135deg, #facc15, #ca8a04); color: #14532d; font-weight: 800; font-size: 1rem;
  box-shadow: 0 3px 8px rgba(0,0,0,.25);
}
.sb-name { color: #fff; font-weight: 600; line-height: 1.2; word-break: break-word; }
.sb-role { font-size: .72rem; color: #fde68a; margin-top: 2px; }
.sb-mini { font-size: .7rem; color: #a7c4b2; }
.sb-menu { padding: .2rem .6rem; flex-grow: 1; }
.sidebar .nav-head { font-size: .66rem; font-weight: 700; color: #86b79a; padding: .9rem .6rem .35rem; letter-spacing: 1.2px; }
.sidebar .nav-link {
  display: flex; align-items: center; gap: .65rem; color: #d1e7d9; padding: .45rem .55rem; margin-bottom: 2px;
  border-radius: 10px; transition: background .15s, color .15s, transform .15s; font-size: .9rem; white-space: nowrap;
}
.sb-ico {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0;
  background: rgba(255,255,255,.08); color: #bbf7d0; font-size: 1rem; transition: .15s;
}
.sidebar .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; transform: translateX(2px); }
.sidebar .nav-link:hover .sb-ico { background: rgba(255,255,255,.16); color: #fff; }
.sidebar .nav-link.active { background: #fff; color: #14532d; font-weight: 700; box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.sidebar .nav-link.active .sb-ico { background: linear-gradient(135deg, #facc15, #eab308); color: #14532d; }
.sb-badge { font-size: .68rem; font-weight: 700; padding: .15rem .45rem; border-radius: 20px; line-height: 1.3; }
.sb-badge-garapan { background: #facc15; color: #422006; }
.sb-badge-pemilih { background: rgba(255,255,255,.18); color: #fff; }
.nav-link.active .sb-badge-pemilih { background: #e2e8f0; color: #334155; }
.sb-footer { padding: .8rem .9rem 1rem; border-top: 1px solid rgba(255,255,255,.08); }
.sb-calon { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.sb-cfoto {
  position: relative; width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  border: 2px solid #facc15; background: rgba(255,255,255,.1); color: #bbf7d0; font-size: 1.5rem;
}
.sb-cfoto img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 50%; }
.sb-no {
  position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: #facc15; color: #14532d; font-weight: 800; font-size: .72rem; border: 2px solid #0f3d22;
}
.sb-calon-nama { color: #fff; font-size: .8rem; font-weight: 600; }
.sb-logout {
  display: block; text-align: center; padding: .45rem; border-radius: 9px; font-size: .82rem; text-decoration: none;
  color: #fecaca; background: rgba(220,38,38,.15); border: 1px solid rgba(248,113,113,.25); transition: .15s;
}
.sb-logout:hover { background: #dc2626; color: #fff; }
.content { margin-left: var(--sb-w); padding: calc(var(--top-h) + 1.2rem) 1.5rem 1rem; }
.sb-backdrop { display: none; }
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .content { margin-left: 0; padding: calc(var(--top-h) + .8rem) .75rem 1rem; }
  body.sb-open .sidebar { transform: none; }
  body.sb-open .sb-backdrop { display: block; position: fixed; inset: var(--top-h) 0 0 0; background: rgba(0,0,0,.45); backdrop-filter: blur(2px); z-index: 1010; }
  body.sb-open .sidebar { box-shadow: 6px 0 24px rgba(0,0,0,.35); }
}
.page-title { font-weight: 700; color: #1f2d27; margin-bottom: .2rem; }
.card { border: 0; box-shadow: 0 1px 3px rgba(0,0,0,.07); border-radius: .7rem; }
.stat { border-radius: .7rem; padding: 1rem 1.1rem; color: #fff; position: relative; overflow: hidden; }
.stat .num { font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.stat .lbl { font-size: .8rem; opacity: .9; }
.stat i.bg-ico { position: absolute; right: .6rem; bottom: -.4rem; font-size: 3.4rem; opacity: .2; }
.stat-total { background: #334155; }
.stat-real  { background: #15803d; }
.stat-ragu  { background: #ca8a04; }
.stat-lawan { background: #b91c1c; }
.stat-belum { background: #64748b; }
.bar-stack { display: flex; height: 22px; border-radius: 6px; overflow: hidden; background: #e5e7eb; font-size: .72rem; color: #fff; }
.bar-stack > div { display: flex; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; }
.bg-real { background: #16a34a; } .bg-ragu { background: #eab308; } .bg-lawan { background: #dc2626; } .bg-belum { background: #94a3b8; }
.table td, .table th { vertical-align: middle; }
.table thead th { background: #f1f5f3; font-size: .8rem; text-transform: uppercase; color: #556; }

/* Form penilaian */
.ind-item { border: 1px solid #e5e7eb; border-radius: .6rem; padding: .7rem .9rem; margin-bottom: .5rem; cursor: pointer; background: #fff; transition: .15s; }
.ind-item:hover { border-color: #9ca3af; }
.ind-item.on.pos { border-color: #16a34a; background: #f0fdf4; }
.ind-item.on.neg { border-color: #dc2626; background: #fef2f2; }
.ind-item .form-check-input { transform: scale(1.3); margin-top: .35rem; }
.score-box { position: sticky; top: calc(var(--top-h) + 1rem); }
.score-ring { width: 150px; height: 150px; border-radius: 50%; margin: 0 auto; display: grid; place-items: center;
  background: conic-gradient(var(--c, #94a3b8) calc(var(--p, 0) * 1%), #e5e7eb 0); transition: .3s; }
.score-ring .inner { width: 118px; height: 118px; border-radius: 50%; background: #fff; display: grid; place-items: center; text-align: center; }
.score-ring .val { font-size: 2.2rem; font-weight: 800; line-height: 1; }
.pernyataan .btn { flex: 1; }
@media (max-width: 991.98px) { .score-box { position: fixed; bottom: 0; left: 0; right: 0; top: auto; z-index: 1000; border-radius: 0; }
  .score-box .score-ring { display: none; } .has-scorebar { padding-bottom: 140px; } }
.login-wrap { min-height: 100vh; background: linear-gradient(135deg, #14532d, #166534 50%, #ca8a04); }

/* ---------- Foto calon: login & pengaturan ---------- */
.login-card { max-width: 400px; width: 100%; overflow: hidden; border-radius: 1.1rem; }
.login-hero { background: linear-gradient(160deg, #14532d, #166534 60%, #a16207); color: #fff; text-align: center; padding: 1.6rem 1rem 1.2rem; position: relative; }
.login-foto {
  width: 132px; height: 132px; border-radius: 50%; margin: 0 auto .7rem; position: relative; display: grid; place-items: center;
  border: 4px solid #facc15; background: rgba(255,255,255,.12); box-shadow: 0 8px 24px rgba(0,0,0,.3); font-size: 4rem; color: #bbf7d0;
}
.login-foto img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 50%; }
.login-no {
  position: absolute; right: 0; bottom: 2px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: #facc15; color: #14532d; font-weight: 900; font-size: 1.2rem; border: 3px solid #14532d;
}
.login-nama { font-size: 1.15rem; font-weight: 700; }
.login-sub { font-size: .8rem; color: #fde68a; }
.foto-prev { width: 76px; height: 76px; border-radius: 50%; overflow: hidden; flex-shrink: 0; display: grid; place-items: center; background: #e2e8f0; color: #94a3b8; font-size: 2.4rem; border: 3px solid #facc15; }
.foto-prev img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* foto selalu terpotong rapi di dalam lingkaran */
.login-foto img, .sb-cfoto img, .foto-prev img {
  position: absolute; inset: 0; width: 100% !important; height: 100% !important; object-fit: cover; object-position: center 20%; border-radius: 50%;
}
.foto-prev { position: relative; }
.login-no, .sb-no { z-index: 2; }
