/* SILAT — Sistem Informasi TindakLanjuT · Inspektorat Daerah Kabupaten Sumba Tengah */
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 800; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-800-normal.woff2') format('woff2'); }
:root {
  --navy: #0b2e6b;      /* biru emblem */
  --navy-2: #071a3d;    /* biru malam */
  --accent: #f5b301;    /* emas emblem */
  --merah: #d52b1e;     /* merah putih */
  --bg: #f3f5f8;
  --sidebar-w: 262px;
}
body { background: var(--bg); font-size: .925rem; color: #1f2933; font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; }
.min-w-0 { min-width: 0; }
.tiny { font-size: .72rem; }
.app { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar { width: var(--sidebar-w); background: linear-gradient(180deg, var(--navy), var(--navy-2)); color: #cfd9e4; position: fixed; inset: 0 auto 0 0; overflow-y: auto; z-index: 1040; transition: transform .2s; }
.sidebar .brand { display: flex; align-items: center; gap: .7rem; padding: .95rem 1.1rem; color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .brand span { display: flex; flex-direction: column; line-height: 1.15; }
.sidebar .brand strong { font-size: 1.3rem; font-weight: 800; letter-spacing: .04em; }
.sidebar .brand img { filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.sidebar .brand small { font-size: .72rem; color: #9fb3c8; }
.user-card { display: flex; gap: .7rem; align-items: center; margin: .9rem; padding: .7rem; background: rgba(255,255,255,.06); border-radius: .6rem; }
.user-card .name { color: #fff; font-weight: 600; font-size: .88rem; }
.user-card .role { font-size: .75rem; color: #9fb3c8; }
.avatar { width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--accent); color: var(--navy-2); display: grid; place-items: center; font-weight: 700; }
.avatar.sm { width: 28px; height: 28px; font-size: .8rem; }
.sidebar .nav { padding: 0 .6rem 1.5rem; }
.sidebar .nav-link { color: #cfd9e4; border-radius: .45rem; padding: .55rem .75rem; display: flex; align-items: center; gap: .65rem; font-size: .9rem; }
.sidebar .nav-link i { font-size: 1.05rem; width: 1.2rem; text-align: center; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar .nav-link.active { background: rgba(245,179,1,.16); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.nav-section { text-transform: uppercase; font-size: .68rem; letter-spacing: .08em; color: #7f97b0; padding: 1rem .75rem .35rem; }

/* Main */
.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.topbar { background: #fff; border-bottom: 1px solid #e3e8ef; padding: .6rem 1.4rem; display: flex; align-items: center; position: sticky; top: 0; z-index: 1030; }
.topbar-title .fw-semibold { color: var(--navy); }
.icon-btn { width: 40px; height: 40px; }
.content { padding: 1.4rem; flex: 1; }
.footer { padding: .9rem 1.4rem; font-size: .78rem; color: #7b8794; border-top: 1px solid #e3e8ef; background: #fff; }

.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.page-title { font-size: 1.35rem; font-weight: 700; color: var(--navy); margin: 0; }
.breadcrumb { font-size: .8rem; }
.breadcrumb a { text-decoration: none; }

.card { border: 1px solid #e3e8ef; border-radius: .7rem; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card-header { background: #fff; border-bottom: 1px solid #eef1f5; font-weight: 600; color: var(--navy); padding: .8rem 1rem; }
.stat { display: flex; gap: .9rem; align-items: center; }
.stat .ico { width: 46px; height: 46px; border-radius: .6rem; display: grid; place-items: center; font-size: 1.35rem; flex: none; }
.stat .val { font-size: 1.35rem; font-weight: 700; color: var(--navy); line-height: 1.1; }
.stat .lbl { font-size: .78rem; color: #6b7785; }

.table { font-size: .875rem; }
.table thead th { background: #f6f8fb; color: #475467; font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .02em; white-space: nowrap; vertical-align: middle; }
.table td { vertical-align: top; }
.table-hover tbody tr:hover { background: #f8fafc; }
.text-pre { white-space: pre-line; }
.dl-grid { display: grid; grid-template-columns: 180px 1fr; gap: .45rem 1rem; margin: 0; }
.dl-grid dt { color: #6b7785; font-weight: 500; }
.dl-grid dd { margin: 0; }
@media (max-width: 576px) { .dl-grid { grid-template-columns: 1fr; } .dl-grid dt { margin-top: .4rem; } }

.context-box { background: #f8fafc; border-left: 3px solid var(--navy); padding: .75rem 1rem; border-radius: .4rem; }
.overdue { color: #b42318; font-weight: 600; }
.filter-bar { background: #fff; border: 1px solid #e3e8ef; border-radius: .7rem; padding: .8rem; margin-bottom: 1rem; }
.btn-primary { background: var(--navy); border-color: var(--navy); }
.btn-primary:hover, .btn-primary:focus { background: #0d2640; border-color: #0d2640; }
.btn-outline-primary { color: var(--navy); border-color: var(--navy); }
.btn-outline-primary:hover { background: var(--navy); border-color: var(--navy); }
a { color: #1d5d99; }
.chart-box { position: relative; height: 260px; }
.legend-list a { text-decoration: none; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .4rem; }

/* Notifikasi */
.notif-menu { width: 340px; max-width: 92vw; }
.notif-item { display: flex; gap: .7rem; white-space: normal; padding: .6rem .9rem; border-bottom: 1px solid #f1f3f6; }
.notif-item i { font-size: 1.1rem; color: var(--navy); margin-top: .1rem; }
.notif-item.unread { background: #eef5fc; }

/* Pesan */
.msg-list .unread { font-weight: 700; background: #f5f9fd; }
.msg-body { white-space: pre-line; }
.quote { border-left: 3px solid #cbd5e1; padding-left: .8rem; color: #555; }

/* Timeline riwayat */
.timeline { list-style: none; padding-left: 1rem; border-left: 2px solid #e3e8ef; margin: 0; }
.timeline li { position: relative; padding: 0 0 1rem 1rem; }
.timeline li::before { content: ''; position: absolute; left: -1.43rem; top: .3rem; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--navy); }

/* ===================== Halaman depan / Masuk ===================== */
.front { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(380px, 1fr); background: #fff; }
.front-hero { position: relative; overflow: hidden; color: #fff; padding: clamp(1.5rem, 4vw, 3.5rem); display: flex; flex-direction: column; justify-content: center;
  background: radial-gradient(60% 55% at 42% 42%, rgba(245,179,1,.22), transparent 70%), radial-gradient(90% 80% at 10% 0%, #1458c9 0%, transparent 60%), linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 75%); }
/* Pita merah-putih yang menyapu di belakang emblem (hanya di area emblem, tidak menimpa teks) */
.front-stage { position: relative; margin: 0 calc(-1 * clamp(1.5rem, 4vw, 3.5rem)) 1.75rem; }
.front-stage::before, .front-stage::after { content: ''; position: absolute; left: -5%; width: 110%; transform: rotate(-8deg); z-index: 0; pointer-events: none; }
.front-stage::before { top: 52%; height: 46px; background: var(--merah); box-shadow: 0 46px 0 #fff; animation: pita 1.1s cubic-bezier(.2,.8,.2,1) both; }
.front-stage::after { top: calc(52% + 92px); height: 8px; background: var(--accent); animation: pita 1.1s .12s cubic-bezier(.2,.8,.2,1) both; }
@keyframes pita { from { transform: rotate(-8deg) translateX(-105%); } to { transform: rotate(-8deg) translateX(0); } }
.front-stage picture { position: relative; z-index: 1; display: block; }
.front-hero > * { position: relative; z-index: 1; }
.front-emblem { width: min(560px, 92%); height: auto; display: block; margin: 0 auto; filter: drop-shadow(0 18px 30px rgba(0,0,0,.45)); animation: emblem-in .9s .15s cubic-bezier(.2,.9,.25,1.15) both; }
@keyframes emblem-in { from { opacity: 0; transform: translateY(24px) scale(.94); } to { opacity: 1; transform: none; } }
.front-copy { max-width: 34rem; margin: 0 auto; text-align: center; }
.front-copy h1 { font-size: clamp(1.25rem, 2.1vw, 1.75rem); font-weight: 800; line-height: 1.25; margin: 0 0 .6rem; text-wrap: balance; }
.front-copy p { color: #d6e2f5; font-size: 1rem; line-height: 1.6; margin: 0; }
.front-instansi { margin-top: 1.4rem; display: inline-flex; align-items: center; gap: .6rem; padding: .45rem .9rem .45rem .5rem; border-radius: 1.25rem; text-align: left; background: rgba(7,26,61,.55); border: 1px solid rgba(255,255,255,.18); font-size: .85rem; font-weight: 600; }
.front-instansi img { width: 28px; height: 28px; }

.front-form { display: flex; flex-direction: column; justify-content: center; padding: clamp(1.5rem, 4vw, 4rem); background: #fff; }
.front-form .inner { width: 100%; max-width: 400px; margin: 0 auto; }
.front-form h2 { font-size: 1.75rem; font-weight: 800; color: var(--navy-2); margin: 0 0 .35rem; }
.front-form .lead-text { color: #5b6878; margin-bottom: 1.75rem; }
.front-form .form-label { font-weight: 600; color: #26323f; font-size: .88rem; }
.front-form .form-control, .front-form .input-group-text, .front-form .btn-toggle-pass { padding-top: .7rem; padding-bottom: .7rem; }
.front-form .input-group-text { background: #f3f6fb; color: var(--navy); }
.front-form .form-control:focus { border-color: #4f86e8; box-shadow: 0 0 0 .2rem rgba(20,88,201,.18); }
.captcha-q { display: inline-block; font-weight: 800; color: var(--navy); background: #fff6d6; border: 1px solid #f5d77a; border-radius: .4rem; padding: 0 .45rem; }
.btn-masuk { background: var(--navy); border: 0; color: #fff; font-weight: 700; padding: .8rem 1rem; border-radius: .6rem; box-shadow: inset 0 -3px 0 var(--accent); }
.btn-masuk:hover, .btn-masuk:focus-visible { background: #0f3d8d; color: #fff; }
.btn-masuk:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.front-foot { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid #e6ebf2; color: #6b7785; font-size: .82rem; line-height: 1.55; }
.front-form .alert { border-radius: .6rem; }

@media (max-width: 991.98px) {
  .front { grid-template-columns: 1fr; }
  .front-hero { padding: 2rem 1.25rem 2.5rem; }
  .front-emblem { width: min(340px, 86%); }
  .front-stage { margin-bottom: 1.25rem; }
  .front-stage::before { height: 30px; box-shadow: 0 30px 0 #fff; }
  .front-stage::after { top: calc(52% + 60px); height: 6px; }
  .front-copy p { font-size: .92rem; }
}
@media (prefers-reduced-motion: reduce) {
  .front-emblem, .front-stage::before, .front-stage::after { animation: none; }
}

/* Responsif */
.sidebar-backdrop { display: none; }
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .sidebar.open ~ .main + .sidebar-backdrop, body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1035; }
  .content { padding: 1rem; }
}
@media (max-width: 576px) {
  .stat { gap: .6rem; }
  .stat .ico { width: 36px; height: 36px; font-size: 1.05rem; }
  .stat .val { font-size: 1.05rem; word-break: break-word; }
  .page-title { font-size: 1.15rem; }
}

/* Tombol ikon mata pada kolom password */
.btn-toggle-pass { border-color: #dee2e6; color: #6b7785; background: #fff; }
.btn-toggle-pass:hover, .btn-toggle-pass:focus { background: #f3f5f8; color: var(--navy); border-color: #dee2e6; }

/* Halaman polos (error untuk tamu) */
.bg-auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem;
  background: radial-gradient(80% 70% at 15% 0%, #1458c9 0%, transparent 60%), linear-gradient(160deg, var(--navy), var(--navy-2)); }
