﻿:root {
  --green-950: #04231a;
  --green-900: #052e22;
  --green-800: #0a3d2c;
  --green-700: #0c5f43;
  --green-600: #0f7a54;
  --green-500: #16a34a;
  --green-400: #22c55e;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f1f5f4;
  --card: #ffffff;
  --blue: #2563eb;
  --amber: #d97706;
  --purple: #7c3aed;
  --red: #dc2626;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 8px 24px rgba(15, 23, 42, .06);
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.5;
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: var(--green-600); text-decoration: none; }

/* ============ LOGIN ============ */
.login-body {
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  display: flex;
  align-items: center;
  align-items: safe center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(1100px 550px at 85% -10%, rgba(22, 163, 74, .45) 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(15, 122, 84, .5) 0%, transparent 55%),
    linear-gradient(135deg, var(--green-950) 0%, var(--green-800) 50%, var(--green-700) 100%);
}

.login-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .35;
  animation: floaty 12s ease-in-out infinite;
}
.b1 { width: 380px; height: 380px; background: #22c55e; top: -120px; left: -100px; }
.b2 { width: 300px; height: 300px; background: #0ea5e9; bottom: -80px; right: -60px; animation-delay: -4s; }
.b3 { width: 220px; height: 220px; background: #f59e0b; top: 40%; left: 70%; opacity: .2; animation-delay: -8s; }

@keyframes floaty {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.08); }
}

.login-wrap { width: 100%; max-width: 420px; z-index: 2; }

.login-card {
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 22px;
  padding: 26px 28px 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  color: #fff;
  animation: fadeUp .6s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.login-card.shake { animation: shake .4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(10px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

.login-brand { text-align: center; margin-bottom: 14px; }

.brand-badge {
  width: 54px; height: 54px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--green-400), var(--green-600));
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(22, 163, 74, .45);
}
.brand-badge svg { width: 30px; height: 30px; }
.brand-badge.large { width: 66px; height: 66px; margin-bottom: 14px; }
.brand-badge.large svg { width: 36px; height: 36px; }

.login-brand h1 { font-size: 20px; font-weight: 700; letter-spacing: .2px; }
.login-brand p { color: rgba(255, 255, 255, .65); font-size: 13px; margin-top: 4px; }
.login-tagline {
  display: inline-block;
  width: 100%;
  margin: 10px auto 0;
  padding: 8px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(22, 163, 74, .28), rgba(255, 255, 255, .10) 60%, rgba(22, 163, 74, .16));
  border: 1px solid rgba(255, 255, 255, .25);
  font-size: clamp(10px, 2.9vw, 13px);
  font-weight: 600;
  letter-spacing: .4px;
  color: rgba(255, 255, 255, .95);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}

.login-error {
  background: rgba(220, 38, 38, .18);
  border: 1px solid rgba(248, 113, 113, .5);
  color: #fecaca;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13.5px;
  margin-bottom: 16px;
}

.field { margin-bottom: 11px; }
.field label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: rgba(255, 255, 255, .7);
  margin-bottom: 5px;
}

.input-group {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 12px;
  padding: 0 14px;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.input-group:focus-within {
  border-color: var(--green-400);
  background: rgba(255, 255, 255, .14);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .18);
}
.input-group svg { width: 18px; height: 18px; color: rgba(255, 255, 255, .6); flex-shrink: 0; }
.input-group input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  padding: 10px 0;
  font-size: 14.5px;
  line-height: 1.3;
}
.input-group input::placeholder { color: rgba(255, 255, 255, .45); }
.input-group input:-webkit-autofill,
.input-group input:-webkit-autofill:hover,
.input-group input:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px #0a3d2c inset;
  transition: background-color 9999s ease-in-out 0s;
}

.eye-btn {
  background: none; border: none; padding: 4px;
  color: rgba(255, 255, 255, .6);
  display: flex; align-items: center;
}
.eye-btn svg { width: 19px; height: 19px; }
.eye-btn .eye-off { display: none; }
.eye-btn.active .eye-on { display: none; }
.eye-btn.active .eye-off { display: block; }

.login-options { margin: 0 0 12px; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: rgba(255, 255, 255, .8); cursor: pointer; user-select: none; }
.checkbox input { accent-color: var(--green-400); width: 16px; height: 16px; cursor: pointer; }

.btn-login {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 11px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .4px;
  color: #fff;
  background: linear-gradient(135deg, var(--green-400), var(--green-600));
  box-shadow: 0 12px 26px rgba(22, 163, 74, .4);
  transition: transform .15s, box-shadow .15s, filter .15s;
}
.btn-login:hover { filter: brightness(1.08); transform: translateY(-1px); box-shadow: 0 16px 32px rgba(22, 163, 74, .5); }
.btn-login:active { transform: translateY(0); }

.login-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-login.ghost {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .32);
  box-shadow: none;
}
.btn-login.ghost:hover {
  filter: none;
  background: rgba(255, 255, 255, .2);
  border-color: rgba(255, 255, 255, .5);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .18);
}

/* ============ REGISTER AKUN (modern, dua panel responsif) ============ */
.login-wrap.wrap-wide { max-width: 940px; }

.reg-card {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  width: 100%;
  padding: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .42);
  color: var(--ink);
}

.reg-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 30px;
  color: #fff;
  background:
    radial-gradient(420px 320px at 120% -10%, rgba(34, 197, 94, .55) 0%, transparent 60%),
    radial-gradient(380px 320px at -20% 115%, rgba(12, 95, 67, .9) 0%, transparent 55%),
    linear-gradient(165deg, var(--green-800) 0%, var(--green-600) 100%);
  overflow: hidden;
}
.reg-aside::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: .35;
  pointer-events: none;
}
.reg-aside-inner { position: relative; z-index: 1; }
.reg-aside-logo {
  width: 62px; height: 62px;
  border-radius: 18px;
  background: #fff;
  color: var(--green-600);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .28);
  margin-bottom: 22px;
}
.reg-aside-logo svg { width: 32px; height: 32px; }
.reg-aside h2 { font-size: 20px; line-height: 1.3; font-weight: 700; letter-spacing: .2px; }
.reg-aside-tag {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .3);
  font-size: 11px; font-weight: 600; letter-spacing: 1px;
}
.reg-aside-list { margin-top: 30px; display: grid; gap: 16px; list-style: none; }
.reg-aside-list li {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 13.5px; line-height: 1.5; color: rgba(255, 255, 255, .92);
}
.reg-aside-list li svg { width: 18px; height: 18px; flex-shrink: 0; color: #86efac; margin-top: 1px; }
.reg-aside-foot { position: relative; z-index: 1; font-size: 12px; color: rgba(255, 255, 255, .6); }

.reg-main { min-width: 0; padding: 20px 30px 14px; }

.reg-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.reg-badge {
  width: 40px; height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green-400), var(--green-600));
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 22px rgba(22, 163, 74, .35);
}
.reg-badge svg { width: 20px; height: 20px; }
.reg-head h1 { font-size: 16.5px; font-weight: 700; color: var(--ink); line-height: 1.25; letter-spacing: .1px; }
.reg-head p { font-size: 12px; color: var(--muted); margin-top: 1px; line-height: 1.3; }

.reg-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--green-700);
  margin: 12px 0 7px;
}
.reg-sep {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  white-space: nowrap;
}
.reg-sep::before, .reg-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.reg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 15px; }
.reg-cell { margin-bottom: 8px; min-width: 0; }
.reg-cell.span2 { grid-column: 1 / -1; }
.reg-card label {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  margin-bottom: 4px;
  line-height: 1.3;
}
.reg-card .req { color: #dc2626; }
.reg-card .reg-hint { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.3; }

.reg-input {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #f8fafc;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0 11px;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.reg-input:focus-within {
  border-color: var(--green-500);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .12);
}
.reg-input svg { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.reg-input input, .reg-input textarea {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  padding: 7px 0;
  font-size: 13.5px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reg-input input::placeholder, .reg-input textarea::placeholder { color: #94a3b8; }
.reg-input textarea { min-height: 34px; resize: vertical; line-height: 1.35; white-space: normal; }

.reg-card .login-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 11px;
  padding: 8px 13px;
  font-size: 12.5px;
  margin-bottom: 10px;
  line-height: 1.35;
}
.reg-card .login-error.success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.reg-card .login-switch { text-align: center; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.reg-card .login-switch .link-btn {
  background: none;
  border: none;
  padding: 0 4px;
  color: var(--green-600);
  font-weight: 600;
  font-size: 12.5px;
}
.reg-card .login-switch .link-btn:hover { text-decoration: underline; }

.reg-card .btn-login { padding: 10px; font-size: 13.5px; }

@media (max-width: 860px) {
  .login-wrap.wrap-wide { max-width: 620px; }
  .login-body { padding: 16px; }
  .reg-card { grid-template-columns: 1fr; }
  .reg-aside { display: none; }
  .reg-main { padding: 20px 22px 14px; }
  .reg-head { margin-bottom: 12px; }
}

@media (max-width: 380px) {
  .reg-main { padding: 10px 10px 6px; }
  .reg-head { gap: 9px; margin-bottom: 7px; }
  .reg-head h1 { font-size: 13px; }
  .reg-head p { display: none; }
  .reg-badge { width: 30px; height: 30px; border-radius: 8px; }
  .reg-badge svg { width: 15px; height: 15px; }
  .reg-input svg { display: none; }
  .reg-grid { gap: 0 7px; }
  .reg-cell { margin-bottom: 5px; }
  .reg-card label { font-size: 9px; margin-bottom: 3px; }
  .reg-input input, .reg-input textarea {
    font-size: 11.5px;
    padding: 5px 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .reg-input { padding: 0 8px; }
  .reg-section-title { margin: 6px 0 5px; }
  .reg-sep { margin: 8px 0 6px; }
  .reg-card .btn-login { padding: 8px; font-size: 12.5px; }
  .reg-card .login-switch { margin-top: 7px; font-size: 12px; }
}

@media (max-width: 560px) {
  .reg-main { padding: 14px 12px 10px; }
  .reg-head h1 { font-size: 14.5px; }
  .reg-head p { font-size: 11px; }
  .reg-badge { width: 36px; height: 36px; border-radius: 10px; }
  .reg-badge svg { width: 18px; height: 18px; }
  .reg-cell { margin-bottom: 7px; }
  .reg-input input, .reg-input textarea { padding: 6px 0; font-size: 13px; }
  .reg-input { padding: 0 9px; }
  .reg-grid { gap: 0 8px; }
  .reg-input textarea { min-height: 30px; }
  .reg-section-title { margin-top: 10px; }
  .reg-sep { margin: 9px 0 7px; }
  .reg-card label { font-size: 9.5px; }
  .reg-card .reg-hint { font-size: 10.5px; }
  .reg-card .btn-login { padding: 9px; font-size: 13px; }
  .reg-card .login-switch { margin-top: 8px; }
}

.login-foot { text-align: center; margin-top: 14px; font-size: 12px; color: rgba(255, 255, 255, .55); }
.login-foot .foot-line + .foot-line { margin-top: 3px; }
.login-foot .foot-line:first-child { padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .14); }

.login-logo {
  position: relative;
  width: 72px; height: 72px;
  margin: 0 auto 10px;
  border-radius: 16px;
  overflow: hidden;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, .45);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
  display: flex; align-items: center; justify-content: center;
}
.login-logo .logo-fallback { width: 38px; height: 38px; color: var(--green-600); }
.login-logo .logo-img {
  position: absolute; inset: 4px;
  width: calc(100% - 8px); height: calc(100% - 8px);
  object-fit: contain;
}

.sel-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  flex-shrink: 0;
  background: rgba(34, 197, 94, .22);
  color: #86efac;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s;
}
.sel-icon.violet { background: rgba(124, 58, 237, .22); color: #c4b5fd; }
.sel-icon.blue { background: rgba(14, 165, 233, .22); color: #7dd3fc; }
.sel-icon svg { width: 18px; height: 18px; }

.select-group select {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  padding: 12px 0;
  font-size: 14.5px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  color-scheme: dark;
}
.select-group select option { background: var(--green-900); color: #fff; }

.sel-chevron { display: flex; align-items: center; flex-shrink: 0; pointer-events: none; }
.sel-chevron svg { width: 18px; height: 18px; color: rgba(255, 255, 255, .6); }

/* ============ LOGIN: SEGMENTED ROLE ============ */
.role-seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 14px;
  padding: 6px;
}
.seg-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 4px 8px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, .6);
  cursor: pointer;
  transition: background .25s, color .25s, transform .15s, box-shadow .25s;
}
.seg-btn:hover { background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .9); }
.seg-btn:active { transform: scale(.97); }
.seg-btn.active {
  color: #fff;
  background: linear-gradient(135deg, var(--green-400), var(--green-600));
  box-shadow: 0 8px 18px rgba(34, 197, 94, .35);
  transform: translateY(-1px);
}
.seg-btn[data-role="admin"].active {
  background: linear-gradient(135deg, #a78bfa, #7c3aed);
  box-shadow: 0 8px 18px rgba(124, 58, 237, .4);
}
.seg-btn[data-role="dinas"].active {
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  box-shadow: 0 8px 18px rgba(14, 165, 233, .4);
}
.seg-icon {
  width: 34px; height: 34px;
  border-radius: 10px;
  flex-shrink: 0;
  background: rgba(34, 197, 94, .22);
  color: #86efac;
  display: flex; align-items: center; justify-content: center;
  transition: background .25s, color .25s;
}
.seg-icon svg { width: 18px; height: 18px; }
.seg-icon.violet { background: rgba(124, 58, 237, .22); color: #c4b5fd; }
.seg-icon.blue { background: rgba(14, 165, 233, .22); color: #7dd3fc; }
.seg-btn.active .seg-icon { background: rgba(255, 255, 255, .18); color: #fff; }
.seg-label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 1.25;
  text-align: center;
}

/* ============ LAYOUT DASHBOARD ============ */
.sidebar {
  position: fixed;
  top: 0; bottom: 0; left: 0;
  width: 262px;
  background: linear-gradient(180deg, var(--green-900), var(--green-800));
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 80;
  transition: transform .3s ease;
}

.sidebar-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.sidebar-head .brand-badge { width: 42px; height: 42px; border-radius: 12px; box-shadow: 0 8px 20px rgba(0, 0, 0, .3); }
.sidebar-head .brand-badge svg { width: 24px; height: 24px; }
.brand-text { line-height: 1.2; }
.brand-text strong { display: block; font-size: 16px; letter-spacing: .5px; }
.brand-text span { font-size: 11.5px; color: rgba(255, 255, 255, .6); }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 14px 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 18px;
  margin: 2px 12px;
  border-radius: 10px;
  color: rgba(255, 255, 255, .78);
  font-size: 14px;
  font-weight: 500;
  border: none;
  background: none;
  width: calc(100% - 24px);
  text-align: left;
  transition: background .2s, color .2s, transform .1s;
}
.nav-item svg { width: 19px; height: 19px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, var(--green-500), var(--green-600));
  color: #fff;
  box-shadow: 0 6px 16px rgba(22, 163, 74, .35);
}
.nav-item:active { transform: scale(.98); }

.sidebar-foot { padding: 16px; border-top: 1px solid rgba(255, 255, 255, .1); }
.btn-logout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .07);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transition: background .2s;
}
.btn-logout:hover { background: rgba(220, 38, 38, .85); border-color: transparent; }
.btn-logout svg { width: 17px; height: 17px; }

.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(4, 35, 26, .55);
  z-index: 70;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 26px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar h2 { font-size: 18px; font-weight: 700; }
.topbar p { font-size: 12.5px; color: var(--muted); }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.topbar-date { font-size: 12.5px; color: var(--muted); }
.user-chip {
  display: flex; align-items: center; gap: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: var(--green-700);
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.user-chip svg { width: 15px; height: 15px; }

.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  flex-shrink: 0;
}
.pm-txt { text-align: left; line-height: 1.25; }
.pm-txt strong { display: block; font-size: 12.5px; }
.pm-txt small { display: block; font-size: 10.5px; color: rgba(12, 95, 67, .75); font-weight: 500; }
.pm-caret { color: var(--green-700); }

.profile-menu { position: relative; }
.pm-dropdown {
  position: absolute;
  right: 0; top: calc(100% + 8px);
  min-width: 210px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .16);
  padding: 6px;
  z-index: 70;
  animation: fadeUp .18s ease both;
}
.pm-head {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.pm-head strong { display: block; font-size: 13.5px; color: var(--ink); }
.pm-head span { display: block; font-size: 11.5px; color: var(--muted); }
.pm-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  border: none;
  background: none;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
}
.pm-item svg { width: 16px; height: 16px; }
.pm-item:hover { background: #f1f5f9; }
.pm-item.danger { color: var(--red); }
.pm-item.danger:hover { background: #fef2f2; }

/* ============ NOTIFIKASI ============ */
.notif-wrap { position: relative; }
.notif-bell {
  position: relative;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.notif-bell:hover { background: #f1f5f9; }
.notif-bell svg { width: 19px; height: 19px; }
.notif-badge {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
  pointer-events: none;
}
.notif-panel {
  position: absolute;
  right: 0; top: calc(100% + 8px);
  width: 330px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .16);
  z-index: 70;
  overflow: hidden;
  animation: fadeUp .18s ease both;
}
.notif-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}
.notif-head strong { font-size: 13.5px; color: var(--ink); }
.notif-list { max-height: 340px; overflow-y: auto; }
.notif-item {
  display: flex; gap: 10px;
  width: 100%;
  border: none; background: none;
  padding: 11px 14px;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid #f8fafc;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: #f8fafc; }
.notif-item.unread { background: #f0fdf4; }
.notif-item.unread:hover { background: #dcfce7; }
.notif-ico {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  margin-top: 2px;
}
.notif-ico.t-i { background: #dbeafe; color: #1d4ed8; }
.notif-ico.t-s { background: #dcfce7; color: #15803d; }
.notif-ico.t-w { background: #fef3c7; color: #b45309; }
.notif-ico.t-e { background: #fee2e2; color: #b91c1c; }
.notif-txt { line-height: 1.35; min-width: 0; flex: 1; }
.notif-txt strong { display: block; font-size: 12.5px; color: var(--ink); }
.notif-txt > span { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.notif-txt em { display: block; font-style: normal; font-size: 10.5px; color: #94a3b8; margin-top: 3px; }
.notif-empty { padding: 22px 14px; text-align: center; color: var(--muted); font-size: 12.5px; }

.hamburger {
  display: none;
  border: none;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  color: var(--ink);
}
.hamburger svg { width: 20px; height: 20px; }

.content { padding: 26px; flex: 1; }
.page { display: none; animation: pageIn .3s ease both; }
.page.active { display: block; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ============ CARDS & ELEMENTS ============ */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 22px;
  border: 1px solid #f1f5f9;
}
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.card-head h3 { font-size: 15.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-head-toolbar { flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.card-head-toolbar h3 { margin: 0; }

.badge {
  background: #ecfdf5;
  color: var(--green-700);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
#page-data .grid-2 { grid-template-columns: 1fr; }

.form-group { margin-bottom: 14px; flex: 1; min-width: 0; }
.form-group label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 13px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.form-group textarea { resize: vertical; min-height: 62px; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--green-500);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, .12);
}
.form-row { display: flex; gap: 14px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

.form-sec { padding: 16px 18px 18px; margin-bottom: 16px; border: 1.5px solid var(--line); border-radius: 14px; background: linear-gradient(180deg, #fbfdfb, #fff); }
.form-sec-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; letter-spacing: .3px; color: var(--green-700, #0f7a54); margin-bottom: 14px; text-transform: uppercase; }
.form-sec-title::before { content: ''; width: 4px; height: 14px; border-radius: 3px; background: linear-gradient(180deg, var(--green-500), #4ade80); }
.form-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  transition: filter .15s, transform .1s, background .15s, box-shadow .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: linear-gradient(135deg, var(--green-500), var(--green-600)); color: #fff; box-shadow: 0 6px 16px rgba(22, 163, 74, .3); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-green { background: #ecfdf5; color: var(--green-700); border: 1px solid #bbf7d0; }
.btn-green:hover { background: #d1fae5; }
.btn-outline { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn-outline:hover { border-color: var(--green-500); color: var(--green-700); background: #f0fdf4; }
.btn-ghost { background: #f8fafc; color: var(--muted); border: 1px solid var(--line); }
.btn-ghost:hover { background: #f1f5f9; color: var(--ink); }
.btn-danger { background: #fef2f2; color: var(--red); border: 1px solid #fecaca; }
.btn-danger:hover { background: #fee2e2; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; }
.multi-tools { display: flex; gap: 8px; margin-bottom: 6px; }
.multi-box { border: 1px solid var(--line); border-radius: 10px; max-height: 220px; overflow-y: auto; background: #fff; }
.multi-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; cursor: pointer; border-bottom: 1px solid #f1f5f9; }
.multi-item:last-child { border-bottom: 0; }
.multi-item:hover { background: #f8fafc; }
.multi-item input { accent-color: var(--green-600); flex-shrink: 0; }
.multi-item span { font-weight: 600; font-size: 13px; }
.multi-item small { color: var(--muted); font-size: 11.5px; margin-left: auto; }
.multi-empty { padding: 12px; color: var(--muted); font-size: 12.5px; }

.hint { font-size: 12px; color: var(--muted); margin-top: 8px; }

/* ============ STAT CARDS ============ */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }

.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid #f1f5f9;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: '';
  position: absolute;
  right: -30px; top: -30px;
  width: 90px; height: 90px;
  border-radius: 50%;
  opacity: .08;
}
.stat-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 25px; height: 25px; }
.stat-value { font-size: 26px; font-weight: 800; line-height: 1.1; }
.stat-label { font-size: 12.5px; color: var(--muted); font-weight: 500; }

.c-green .stat-icon { background: #ecfdf5; color: var(--green-600); }
.c-green::after { background: var(--green-500); }
.c-blue .stat-icon { background: #eff6ff; color: var(--blue); }
.c-blue::after { background: var(--blue); }
.c-amber .stat-icon { background: #fffbeb; color: var(--amber); }
.c-amber::after { background: var(--amber); }
.c-purple .stat-icon { background: #f5f3ff; color: var(--purple); }
.c-purple::after { background: var(--purple); }
.c-red .stat-icon { background: #fef2f2; color: var(--red); }
.c-red::after { background: var(--red); }

/* ============ STATUS BERKAS ============ */
.badge-status {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .3px;
  white-space: nowrap;
}
.st-draft { background: #f3f4f6; color: #4b5563; border: 1px solid #e5e7eb; }
.st-diajukan { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.st-disetujui { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.st-dikembalikan { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.alasan {
  display: inline-block;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  font-size: 12px;
  color: var(--muted);
}

/* ============ KELEMBAGAAN (admin) ============ */
.lembaga-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
.lembaga-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  transition: transform .15s, box-shadow .15s;
}
.lembaga-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(15, 23, 42, .1); }
.lc-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.lc-badge {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.lc-badge svg { width: 22px; height: 22px; }
.lc-txt { flex: 1; min-width: 0; }
.lc-txt strong { display: block; font-size: 14px; line-height: 1.4; color: var(--ink); }
.lc-txt span { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.lc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.lc-stat {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 6px;
  text-align: center;
}
.lc-stat b { display: block; font-size: 16px; color: var(--ink); }
.lc-stat span { font-size: 10px; color: var(--muted); font-weight: 600; letter-spacing: .3px; }
.lc-stat.amber b { color: var(--amber); }
.lc-stat.green b { color: var(--green-600); }
.lc-stat.red b { color: var(--red); }
.lc-actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* ============ PENGATURAN KELEMBAGAAN ============ */
.sel-lembaga { min-width: 280px; }
.detail-card { position: relative; overflow: hidden; }
.detail-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--green-500), var(--green-700));
}
.lembaga-detail {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 24px 26px;
  border-radius: 14px;
  background: linear-gradient(120deg, #0c3b2b 0%, #11522f 48%, #177d3d 100%);
  color: #fff;
}
.lembaga-detail::before,
.lembaga-detail::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}
.lembaga-detail::before { width: 210px; height: 210px; top: -80px; right: -50px; }
.lembaga-detail::after { width: 140px; height: 140px; bottom: -70px; right: 150px; }
.ld-logo {
  width: 74px; height: 74px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .2);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  color: #fff;
  position: relative;
  z-index: 1;
}
.ld-logo svg { width: 36px; height: 36px; }
.ld-logo img { width: 100%; height: 100%; object-fit: contain; }
.ld-info { flex: 1; min-width: 220px; position: relative; z-index: 1; }
.ld-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.ld-head h3 { font-size: 21px; font-weight: 800; color: #fff; margin: 0; letter-spacing: .2px; }
.ld-type {
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
  color: #eafff4;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
}
.ld-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .24);
  color: #eafff4;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: 999px;
  padding: 4px 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.chip b { font-weight: 700; }
.ld-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 8px;
  margin-left: auto;
}
.ld-stat {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 12px;
  padding: 12px 16px;
  text-align: center;
  min-width: 88px;
  backdrop-filter: blur(4px);
}
.ld-stat b { display: block; font-size: 20px; color: #fff; }
.ld-stat span { font-size: 10px; color: rgba(255, 255, 255, .8); font-weight: 600; letter-spacing: .3px; }
.ld-stat.amber b { color: #fcd34d; }
.ld-stat.green b { color: #86efac; }
.ld-stat.red b { color: #fca5a5; }
.ld-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.ld-info-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdfc;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ld-info-item:hover { border-color: #c6e9d6; box-shadow: 0 4px 12px rgba(22, 163, 74, .08); }
.ld-info-ico {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: var(--green-700);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ld-info-ico svg { width: 17px; height: 17px; }
.ld-info-item small {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.ld-info-item strong { font-size: 13px; color: var(--ink); font-weight: 600; line-height: 1.5; word-break: break-word; }
.ro-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0369a1;
  font-size: 12.5px;
  font-weight: 500;
}
.ro-banner svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ============ SWITCH (akun aktif) ============ */
.switch {
  position: relative;
  width: 40px; height: 22px;
  border-radius: 999px;
  border: none;
  background: #cbd5e1;
  cursor: pointer;
  transition: background .2s;
  padding: 0;
}
.switch span {
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: left .2s;
}
.switch.on { background: var(--green-500); }
.switch.on span { left: 20px; }

.tag-aktif, .tag-pending {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  padding: 2px 9px;
  border-radius: 999px;
  margin-right: 8px;
  vertical-align: middle;
}
.tag-aktif { background: #dcfce7; color: #15803d; }
.tag-pending { background: #fef3c7; color: #b45309; }

.cell-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; font-weight: 400; }

/* ============ USULAN (dinas/admin) ============ */
.us-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.us-stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.us-stat b { display: block; font-size: 24px; color: var(--ink); }
.us-stat span { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .3px; }
.us-stat.c-green b { color: var(--green-600); }
.us-stat.c-amber b { color: var(--amber); }
.us-stat.c-red b { color: var(--red); }

.us-group {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  overflow: hidden;
}
.us-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, var(--green-50, #f0fdf4), #fff);
}
.us-group-txt strong { display: block; font-size: 15px; color: var(--ink); }
.us-group-txt span { font-size: 12px; color: var(--muted); margin-top: 3px; display: block; }
.us-group-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.us-lcard { cursor: pointer; }
.us-group .table-wrap { padding: 0; }

@media (max-width: 720px) {
  .us-summary { grid-template-columns: 1fr 1fr; }
}
.actions .btn-xs { margin-right: 6px; }
.btn-xs {
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.act-btn.submit { background: #ecfdf5; color: #047857; }
.act-btn.submit:hover { background: #d1fae5; }

/* ============ MODAL ============ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(6, 23, 17, .55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
  overflow: hidden;
  animation: fadeUp .25s ease both;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 { font-size: 16px; }
.modal-close {
  border: none;
  background: #f3f4f6;
  color: var(--muted);
  width: 30px; height: 30px;
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: #e5e7eb; color: var(--ink); }
.modal-sm { max-width: 380px; }
.modal-sm .modal-body { padding: 16px 20px 18px; }
.modal-body { padding: 18px 20px 20px; }
.modal-sub { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

/* ============ TIMELINE ============ */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 6px; bottom: 6px;
  width: 2px;
  background: var(--line);
}
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute;
  left: -24px; top: 3px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--amber);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--line);
}
.tl-dot.ok { background: var(--green-500); }
.tl-dot.no { background: var(--red); }
.tl-txt strong { display: block; font-size: 13.5px; }
.tl-txt span { font-size: 12px; color: var(--muted); }
.tl-txt em {
  display: block;
  font-style: normal;
  font-size: 12.5px;
  color: var(--red);
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 7px 10px;
  margin-top: 6px;
}
.muted { color: var(--muted); font-size: 13px; }

/* ============ CHARTS ============ */
.chart-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; }
.chart-box { height: 300px; position: relative; }

/* ============ TABLES ============ */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left;
  padding: 11px 12px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .6px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 11px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.table tbody tr:hover { background: #f8fafc; }
.table .empty-row td { text-align: center; color: var(--muted); padding: 30px; }

.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.act-btn {
  border: none;
  border-radius: 8px;
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.act-btn svg { width: 15px; height: 15px; }
.act-btn.edit { background: #eff6ff; color: var(--blue); }
.act-btn.edit:hover { background: #dbeafe; }
.act-btn.del { background: #fef2f2; color: var(--red); }
.act-btn.del:hover { background: #fee2e2; }
.act-btn.print { background: #ecfdf5; color: var(--green-700); }
.act-btn.print:hover { background: #d1fae5; }
.act-btn.pdf { background: #fef2f2; color: var(--red); }
.act-btn.pdf:hover { background: #fee2e2; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar input[type="search"], .toolbar select {
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 9px 13px;
  font-size: 13px;
  outline: none;
  background: #fff;
  min-width: 180px;
}
.toolbar input:focus, .toolbar select:focus { border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(22, 163, 74, .12); }

/* ============ DROPZONE ============ */
.dropzone {
  border: 2px dashed #bbf7d0;
  border-radius: 14px;
  background: #f7fef9;
  padding: 28px 20px;
  text-align: center;
  color: var(--muted);
  transition: background .2s, border-color .2s;
}
.dropzone.drag { background: #ecfdf5; border-color: var(--green-500); }
.dz-icon { width: 54px; height: 54px; margin: 0 auto 12px; background: #ecfdf5; color: var(--green-600); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.dz-icon svg { width: 26px; height: 26px; }
.dropzone p { font-size: 14px; font-weight: 600; color: var(--ink); }
.dropzone span { display: block; font-size: 12px; margin: 8px 0; color: var(--muted); }
.dz-hint { font-size: 12px !important; font-weight: 400 !important; color: var(--muted) !important; margin-top: 12px; }

/* ============ SURAT ============ */
.surat-controls { display: grid; grid-template-columns: 1.4fr 1.4fr 1fr 1fr auto; gap: 14px; align-items: end; }

.sheet-preview {
  background: #e8eeec;
  border-radius: 12px;
  padding: 26px;
  display: flex;
  justify-content: center;
  overflow-x: auto;
}
.empty-state { color: var(--muted); font-size: 14px; padding: 50px 20px; text-align: center; }

.sheet {
  width: 210mm;
  min-height: 296mm;
  background: #fff;
  padding: 16mm 20mm 15mm;
  font-family: 'Times New Roman', Times, serif;
  font-size: 12pt;
  line-height: 1.5;
  color: #000;
  box-shadow: 0 6px 28px rgba(15, 23, 42, .22);
  margin: 0 auto;
  flex-shrink: 0;
}
.sheet.kop-prev { min-height: 0; padding: 12mm 16mm; width: 210mm; }
.sheet.fisik-kerat { width: 215.9mm; min-height: 330mm; padding: 10mm 15mm; display: flex; flex-direction: column; }
.sheet.fisik-kerat .l-title { font-size: 12pt; margin-top: 0; }
.sheet.fisik-kerat .l-body { flex: 1; display: flex; flex-direction: column; font-size: 11pt; line-height: 1.24; }
.sheet.fisik-kerat .l-body p { margin: 0.7mm 0; }
.sheet.fisik-kerat .l-table { margin: 1mm 0; }
.sheet.fisik-kerat .l-table td { padding: .5mm 1.5mm; }
.sheet.fisik-kerat .l-table td.l-w { width: 30mm; }
.sheet.fisik-kerat .l-points { margin: 1mm 0 1.4mm 6mm; }
.sheet.fisik-kerat .l-points li { margin-bottom: .5mm; }
.sheet.fisik-kerat .l-saksi-num { break-inside: avoid; }
.sheet.fisik-kerat .l-no2 { width: 7mm; }
.sheet.fisik-kerat .l-num-top td { padding-top: 2.5mm; }
.sheet.fisik-kerat .l-saksi-sign { margin-top: 1mm; break-inside: avoid; width: auto; }
.sheet.fisik-kerat .l-sn { width: 22mm; }
.sheet.fisik-kerat .l-ws-sig { font-size: 11pt; white-space: nowrap; width: 22mm; }
.sheet.fisik-kerat .l-batas-duo { break-inside: avoid; }
.sheet.fisik-kerat .l-sign-2 { margin-top: auto; break-inside: avoid; }
.sheet.fisik-kerat .l-sign-left { width: 92mm; }
.sheet.fisik-kerat .l-sign-right .l-space { height: 18mm; }

.kop { margin-bottom: 6mm; }
.kop-row { display: flex; align-items: center; justify-content: center; gap: 16px; }
.kop-logo { width: 76px; height: 76px; object-fit: contain; flex-shrink: 0; }
.kop-txt { text-align: center; }
.kop-jenis { font-weight: bold; font-size: 12pt; line-height: 1.4; text-transform: uppercase; }
.kop-kec { font-weight: bold; font-size: 11.5pt; line-height: 1.4; margin-top: 1mm; text-transform: uppercase; }
.kop-nama {
  font-weight: bold;
  font-size: 26px;
  text-transform: uppercase;
  letter-spacing: .5px;
  line-height: 1.3;
}
.kop-sekretariat { font-size: 11pt; margin-top: 1mm; }
.kop-alamat { font-size: 10.5pt; line-height: 1.45; }
.kop-rule { margin-top: 5px; }
.kop-rule.thin { border-top: 1px solid #000; }
.kop-rule.thick { border-top: 2.5px solid #000; margin-top: 2px; }

.l-title { text-align: center; font-weight: bold; font-size: 13.5pt; text-decoration: underline; margin: 7mm 0 2mm; }
.l-title.no-underline { text-decoration: none; }
.l-title-sub { text-align: center; font-weight: bold; font-size: 12.5pt; margin-bottom: 4mm; }
.l-nomor { text-align: center; font-size: 11pt; margin-bottom: 2mm; }
.l-gap3 { margin-top: 18mm !important; } /* jarak 3 baris kosong antara judul surat dan awal paragraf */

.l-body p { text-indent: 1.27cm; text-align: justify; margin: 2.5mm 0; }
.l-body p.no-indent { text-indent: 0; }

.l-table { width: 100%; border-collapse: collapse; margin: 4mm 0; }
.l-table td { padding: .8mm 2mm; vertical-align: top; }
.l-table td.l-w { width: 42mm; }
.l-table td.l-c { width: 6mm; }
.l-table-list th, .l-table-list td { border: 0.5pt solid #000; overflow-wrap: anywhere; word-break: break-word; }
.l-table-list th { padding: .8mm 2mm; font-weight: bold; text-align: left; vertical-align: middle; }
.l-table-list .l-no { width: 12mm; text-align: center; }
.l-table-list.l-tanah { table-layout: fixed; }
.l-table-list.l-tanah th { text-align: center; font-size: 10pt; }
.l-table-list.l-tanah td { font-size: 10px; vertical-align: top; padding: 0.6mm 1mm; }
.l-table-list.l-tanah thead tr:first-child th:nth-child(1) { width: 4.5%; }
.l-table-list.l-tanah thead tr:first-child th:nth-child(2) { width: 16.5%; }
.l-table-list.l-tanah thead tr:first-child th:nth-child(3) { width: 12%; font-size: 8.5pt; }
.l-table-list.l-tanah thead tr:first-child th:nth-child(4) { width: 8%; }
.l-table-list.l-tanah thead tr:first-child th:nth-child(5) { width: 12%; }
.l-table-list.l-tanah thead tr:first-child th:nth-child(6) { width: 47%; }
.l-table-list.l-tanah thead tr:nth-child(2) th { font-size: 9.5pt; }
.l-table-list.l-tanah thead tr:nth-child(2) th:nth-child(3) { font-size: 10pt; }
.l-table-list.l-tanah td.l-no { width: 4.5%; }
.l-sub { letter-spacing: .2px; }

.l-sign { width: 66mm; text-align: center; margin: 7mm 0 0 auto; }
.l-sign.left { margin-left: 0; }
.l-sign.center { margin-left: auto; margin-right: auto; margin-top: 12mm; }
.l-sign-row { display: flex; justify-content: space-between; gap: 10mm; margin-top: 7mm; }
.l-sign-row .l-sign { margin-top: 0; }
.l-space { height: 26mm; }
.l-name { font-weight: bold; text-transform: uppercase; }
.l-sign .l-sub-line { font-size: 11.5pt; }

/* ============ SURAT PERNYATAAN PENGUASAAN FISIK ============ */
.l-points { margin: 3mm 0 4mm 7mm; padding: 0; }
.l-points li { margin-bottom: 2mm; text-align: justify; }
.l-table-saksi { margin-top: 1mm; }
.l-table-saksi + .l-table-saksi { margin-top: 3mm; }
.l-sign-2 { display: flex; justify-content: space-between; align-items: flex-end; gap: 8mm; margin-top: 7mm; }
.l-sign-left { width: 78mm; }
.l-sign-right { width: 66mm; text-align: center; }
.l-sign-cap { font-weight: bold; }
.l-saksi-box { display: flex; justify-content: space-between; gap: 4mm; margin-top: 4mm; }
.l-saksi-box-item {
  width: 36mm;
  height: 22mm;
  border: 0.5pt solid #000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 2mm;
  font-size: 10.5pt;
}
.l-meterai { text-align: center; font-size: 9pt; margin: 2mm 0; }

/* ============ TENTANG ============ */
.about-wrap { max-width: 720px; margin: 0 auto; }
.about-card { text-align: center; padding: 36px 32px; position: relative; overflow: hidden; }
.about-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, var(--green-500), var(--green-400), #0ea5e9, var(--amber));
}
.about-head { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 16px; }
.about-head .brand-badge { width: 48px; height: 48px; }
.about-head .brand-badge svg { width: 26px; height: 26px; }
.about-head h3 { font-size: 19px; font-weight: 800; }
.about-desc { color: var(--ink); font-size: 14.5px; max-width: 560px; margin: 0 auto 22px; }

.about-info { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.info-item {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
}
.info-item svg { width: 22px; height: 22px; color: var(--green-600); flex-shrink: 0; }
.info-item strong { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.info-item span { font-size: 13.5px; font-weight: 600; color: var(--ink); word-break: break-word; }
.info-item a { color: var(--green-600); }

.about-note { font-size: 13.5px; color: var(--muted); max-width: 480px; margin: 0 auto 14px; }
.about-wassalam { font-size: 15px; font-weight: 700; color: var(--green-700); font-style: italic; }

/* ============ ABOUT PHOTO (pasfoto 4x6) ============ */
.about-photo { position: relative; max-width: 250px; margin: 0 auto 24px; }
.photo-glow { position: absolute; inset: -24px; z-index: 0; border-radius: 50%; background: radial-gradient(circle, rgba(22, 163, 74, .3), rgba(251, 191, 36, .16) 55%, transparent 74%); filter: blur(7px); animation: photoGlow 4.5s ease-in-out infinite; }
@keyframes photoGlow { 0%, 100% { opacity: .75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.07); } }
.photo-frame {
  position: relative; z-index: 1; width: max-content; margin: 0 auto;
  padding: 6px; border-radius: 10px;
  background: linear-gradient(135deg, #0f7a54, #16a34a 48%, #fbbf24);
  box-shadow: 0 14px 32px rgba(15, 122, 84, .32), 0 3px 10px rgba(15, 122, 84, .18);
  transition: transform .3s ease, box-shadow .3s ease;
}
.photo-frame::after {
  content: '';
  position: absolute; inset: 3px; z-index: 2; border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, .55);
  pointer-events: none;
}
.about-photo:hover .photo-frame { transform: translateY(-5px) scale(1.02); box-shadow: 0 20px 40px rgba(15, 122, 84, .42), 0 4px 14px rgba(15, 122, 84, .22); }
.photo-frame img { display: block; width: 4cm; height: 6cm; object-fit: cover; object-position: center; border-radius: 5px; background: #eef2f7; }
.photo-badge { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 16px; border-radius: 12px; background: rgba(15, 23, 42, .66); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; border: 1px solid rgba(255, 255, 255, .38); white-space: nowrap; text-align: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.photo-badge strong { font-size: 13px; font-weight: 800; letter-spacing: .3px; line-height: 1.25; }
.photo-badge span { font-size: 10.5px; font-weight: 500; opacity: .88; letter-spacing: .4px; line-height: 1.3; }
.photo-caption { position: relative; z-index: 1; margin: 16px auto 0; font-size: 12.5px; color: var(--muted); font-style: italic; }

/* ============ LOGO PREVIEW ============ */
.logo-area { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.logo-preview {
  width: 120px; height: 120px;
  border: 2px dashed var(--line);
  border-radius: 16px;
  background: #f8fafc;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  color: #cbd5e1;
}
.logo-preview svg { width: 40px; height: 40px; }
.logo-preview img { width: 100%; height: 100%; object-fit: contain; }

/* ============ TOAST ============ */
#toastWrap {
  position: fixed;
  bottom: 22px; right: 22px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(360px, calc(100vw - 44px));
}
.toast {
  background: var(--green-900);
  color: #fff;
  border-radius: 12px;
  padding: 13px 18px;
  font-size: 13.5px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .35);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: #7f1d1d; }
.toast.warn { background: #78350f; }

/* ============ PRINT ============ */
#printArea { display: none; }
#pdfOverlay { position: absolute; top: 0; left: 0; z-index: -9999; pointer-events: none; }
#pdfOverlay .print-doc.landscape { width: 269mm; }

.print-doc { font-family: 'Times New Roman', Times, serif; color: #000; }
.pd-title { text-align: center; font-weight: bold; font-size: 14pt; margin: 6mm 0 3mm; text-decoration: underline; }
.pd-meta { text-align: center; font-size: 11pt; margin-bottom: 4mm; }
.pd-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pd-table { width: 100%; border-collapse: collapse; font-size: 8pt; }
.pd-table th, .pd-table td { border: 1px solid #000; padding: 1.5mm 2mm; text-align: left; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word; }
.pd-table thead th { white-space: nowrap; }
.pd-table th { background: #eee; }
.pd-foot { margin-top: 6mm; font-size: 10.5pt; }

@media (max-width: 700px) {
  .sheet, .sheet.kop-prev { zoom: 0.72; }
}

@media print {
  @page { size: A4; margin: 0; }
  @page docPage { size: A4; margin: 15mm 20mm; }
  @page docPageLandscape { size: A4 landscape; margin: 12mm 14mm; }
  @page fisikKerat { size: 215.9mm 330mm; margin: 10mm 15mm; }
  body { background: #fff !important; }
  body.printing > *:not(#printArea) { display: none !important; }
  #printArea { display: block !important; }
  .sheet { width: 210mm; min-height: auto; box-shadow: none; margin: 0; }
  .print-doc { page: docPage; padding: 0; }
  .print-doc.landscape { page: docPageLandscape; }
  .sheet.fisik-kerat { page: fisikKerat; padding: 0; min-height: 0; width: 185.9mm; height: 310mm; }
  .print-doc .kop-logo { display: inline-block !important; visibility: visible !important; }
  .l-table-list th, .l-table-list td, .pd-table th, .pd-table td { border: 0.5pt solid #000 !important; }
  .l-saksi-box-item { border: 0.5pt solid #000 !important; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .surat-controls { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 920px) {
  .chart-grid, .grid-2 { grid-template-columns: 1fr; }
  .form-grid-4 { grid-template-columns: 1fr 1fr; }
  .sidebar { transform: translateX(-100%); }
  body.nav-open .sidebar { transform: translateX(0); box-shadow: 0 0 60px rgba(0, 0, 0, .4); }
  body.nav-open .sidebar-overlay { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; }
  .hamburger { display: inline-flex; }
  .content { padding: 18px; }
  .about-info { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .topbar { padding: 12px 16px; }
  .topbar h2 { font-size: 16px; }
  .topbar-date { display: none; }
  .topbar-right { gap: 8px; }
  .content { padding: 14px; }
  .card { padding: 16px; margin-bottom: 16px; }
  .grid-2 { gap: 14px; }
  .chart-grid { gap: 14px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; gap: 12px; }
  .stat-value { font-size: 20px; }
  .stat-icon { width: 42px; height: 42px; }
  .stat-icon svg { width: 20px; height: 20px; }
  .form-row { flex-direction: column; gap: 0; }
  .form-grid-4 { grid-template-columns: 1fr; }
  .toolbar { width: 100%; }
  .toolbar input[type="search"], .toolbar select { min-width: 0; width: 100%; }
  .sel-lembaga { width: 100%; }
  .lembaga-detail { flex-direction: column; gap: 14px; }
  .ld-info { width: 100%; }
  .ld-stats { grid-template-columns: repeat(2, 1fr); width: 100%; margin-left: 0; }
  .ld-stat { min-width: 0; }
  .btn { padding: 9px 14px; }
  .table th, .table td { padding: 10px 8px; }
  .sheet-preview { padding: 10px; }
  .login-card { padding: 24px 20px 18px; }
  .login-logo { width: 60px; height: 60px; margin-bottom: 12px; }
  .login-brand { margin-bottom: 18px; }
  .login-brand h1 { font-size: 18px; }
  .login-brand p { font-size: 12px; margin-top: 2px; }
  .field { margin-bottom: 13px; }
  .field label { margin-bottom: 6px; font-size: 11px; }
  .input-group { padding: 0 12px; }
  .input-group input { padding: 11px 0; font-size: 14px; }
  .role-seg { gap: 5px; padding: 5px; }
  .seg-btn { gap: 5px; padding: 8px 3px 7px; }
  .seg-icon { width: 30px; height: 30px; }
  .seg-label { font-size: 10.5px; }
  .login-options { margin: 0 0 10px; }
  .btn-login { padding: 11px; font-size: 14px; }
  .login-switch { margin-top: 10px; }
  .login-foot { margin-top: 16px; }
  .modal { max-width: 100%; }
  .modal-actions .btn { flex: 1; }
  .surat-controls { grid-template-columns: 1fr; }
  .about-card { padding: 24px 16px; }
  .l-sign-row { flex-direction: column; align-items: flex-start; gap: 4mm; }
  .l-sign { width: 100%; margin-left: 0; }
}

@media (max-width: 380px) {
  .login-card { padding: 16px 16px 12px; }
  .login-logo { width: 50px; height: 50px; margin-bottom: 8px; }
  .login-logo .logo-fallback { width: 32px; height: 32px; }
  .login-brand { margin-bottom: 8px; }
  .login-brand h1 { font-size: 16.5px; }
  .login-brand p { font-size: 11px; margin-top: 1px; }
  .field { margin-bottom: 9px; }
  .field label { margin-bottom: 4px; font-size: 10.5px; }
  .input-group { padding: 0 11px; }
  .input-group input { padding: 9px 0; font-size: 13.5px; line-height: 1.3; }
  .role-seg { gap: 4px; padding: 4px; }
  .seg-btn { gap: 5px; padding: 6px 2px; }
  .login-options { margin: 0 0 8px; }
  .btn-login { padding: 10px; }
  .login-switch { margin-top: 8px; }
  .login-foot { margin-top: 12px; }
  .login-foot .foot-line:first-child { padding-top: 8px; }
}

@media (max-width: 400px) {
  .stat-grid { grid-template-columns: 1fr; }
  .stat-card { flex-direction: row; align-items: center; }
  .user-chip span { max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ============ LOGIN: TANPA SCROLL DI LAYAR PENDEK ============ */
@media (max-height: 520px) {
  .login-card { padding: 16px 20px 14px; }
  .login-brand { margin-bottom: 12px; }
  .login-logo { width: 48px; height: 48px; margin-bottom: 8px; }
  .login-brand h1 { font-size: 16px; }
  .field { margin-bottom: 10px; }
  .seg-icon { width: 26px; height: 26px; }
  .seg-label { font-size: 10px; }
  .btn-login { padding: 10px; }
  .login-options { margin: 0 0 10px; }
  .login-foot { margin-top: 10px; }
}
@media (max-height: 430px) {
  .login-foot { display: none; }
  .login-brand { margin-bottom: 8px; }
  .login-logo { width: 42px; height: 42px; margin-bottom: 6px; }
  .login-brand p { display: none; }
  .field { margin-bottom: 8px; }
}


/* ============ DOKUMEN (PDF) ============ */
.act-btn.doc { background: #f5f3ff; color: #6d28d9; }
.act-btn.doc:hover { background: #ede9fe; }
.modal-lg { max-width: 640px; }
.doc-upload {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border: 2px dashed var(--line);
  border-radius: 12px;
  background: #fafbfd;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.doc-upload.drag { border-color: var(--blue); background: #f0f7ff; }
.doc-upload-hint { font-size: 12.5px; color: var(--muted); }
.doc-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.doc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.doc-ico {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 8px;
  background: #fef2f2;
  color: #dc2626;
  font-size: 10.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: .5px;
}
.doc-info { flex: 1; min-width: 0; }
.doc-info strong { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-info span { font-size: 12px; color: var(--muted); }
.doc-actions { display: flex; gap: 8px; flex: none; }

/* ============ DETAIL PEKEBUN ============ */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
  background: #fafbfd;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}
.detail-row { display: flex; flex-direction: column; gap: 2px; padding: 4px 0; }
.detail-row span { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.detail-row strong { font-size: 13.5px; font-weight: 600; }
.detail-section { margin-top: 16px; }
.detail-section h4 { font-size: 14px; margin-bottom: 10px; }
@media (max-width: 560px) {
  .detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .modal-lg { max-width: 100%; }
}

/* ============ BATAS WAKTU USULAN (kunci otomatis dinas) ============ */
.alert-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.55;
}
.alert-banner.info { background: #f0f9ff; border: 1px solid #bae6fd; color: #075985; }
.alert-banner.lock { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.ab-ico { flex: none; width: 22px; height: 22px; margin-top: 2px; color: inherit; }
.ab-ico svg { width: 22px; height: 22px; }
.ab-txt { flex: 1; min-width: 0; }
.ab-txt strong { display: block; font-size: 13.5px; margin-bottom: 2px; }
.ab-txt span { opacity: .92; }
.alert-banner .btn { flex: none; align-self: center; }

.btn-lock {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  color: var(--muted);
  cursor: default;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.btn-lock svg { width: 13px; height: 13px; }

.lock-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 999px;
  padding: 2px 8px;
  vertical-align: 2px;
}
.lock-chip svg { width: 11px; height: 11px; }
.us-lcard.lcard-locked { border-color: #fecaca; background: #fffbfb; }

/* ============ MODAL PERINGATAN USULAN ============ */
.warn-modal { text-align: center; padding: 6px 4px 2px; }
.warn-ico {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.warn-ico svg { width: 30px; height: 30px; }
.warn-ico.w-amber {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #b45309;
  box-shadow: 0 8px 18px rgba(180, 83, 9, .18);
}
.warn-ico.w-red {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #b91c1c;
  box-shadow: 0 8px 18px rgba(185, 28, 28, .18);
}
.warn-modal h3 { font-size: 18px; margin: 0 0 6px; color: var(--ink); }
.warn-modal .modal-sub { margin: 0 auto 14px; max-width: 380px; }
.warn-box {
  text-align: left;
  background: #fafbfd;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px 14px;
  margin-bottom: 16px;
}
.warn-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 12.5px;
}
.warn-row:last-child { border-bottom: none; }
.warn-row span { color: var(--muted); flex: none; }
.warn-row strong { text-align: right; word-break: break-word; }
.modal-actions.center { justify-content: center; }

/* ============ KARTU BATAS WAKTU (pengaturan) ============ */
.batas-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.batas-form .form-group { margin-bottom: 0; }
.batas-form input[type=datetime-local] { min-width: 230px; }

@media (max-width: 380px) {
  .reg-head { margin-bottom: 5px; }
  .reg-head h1 { font-size: 12.5px; }
  .reg-cell { margin-bottom: 4px; }
  .reg-grid { gap: 0 6px; }
  .reg-card label { font-size: 8.5px; margin-bottom: 2px; }
  .reg-input input, .reg-input textarea { font-size: 11px; padding: 4px 0; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .reg-input { padding: 0 7px; }
  .reg-input textarea { min-height: 24px; }
  .reg-section-title { margin: 4px 0 3px; }
  .reg-sep { margin: 6px 0 4px; }
  .reg-card .btn-login { padding: 7px; font-size: 12px; }
  .reg-card .login-switch { margin-top: 5px; }
  .reg-card .login-error { padding: 6px 10px; margin-bottom: 6px; }
}

/* ============ HALAMAN PENGATURAN (redesign profesional) ============ */
.settings-toolbar-card { padding: 16px 20px; }
.st-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.st-head h3 { margin: 0; font-size: 15.5px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.st-head p { margin: 3px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }

.card-ico {
  width: 42px; height: 42px; border-radius: 13px;
  background: linear-gradient(135deg, #d1fae5, #ecfdf5);
  border: 1px solid #bbf7d0;
  color: var(--green-700);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(22, 163, 74, .14);
}
.card-ico svg { width: 20px; height: 20px; }
.card-ico.small { width: 34px; height: 34px; border-radius: 10px; }
.card-ico.small svg { width: 17px; height: 17px; }
.card-ico.green { background: linear-gradient(135deg, #d1fae5, #ecfdf5); border-color: #bbf7d0; color: var(--green-700); box-shadow: 0 4px 12px rgba(22, 163, 74, .14); }
.card-ico.amber { background: linear-gradient(135deg, #fef3c7, #fffbeb); border-color: #fde68a; color: #b45309; box-shadow: 0 4px 12px rgba(217, 119, 6, .14); }
.card-ico.violet { background: linear-gradient(135deg, #ede9fe, #f5f3ff); border-color: #ddd6fe; color: #6d28d9; box-shadow: 0 4px 12px rgba(109, 40, 217, .14); }
.card-ico.blue { background: linear-gradient(135deg, #dbeafe, #eff6ff); border-color: #bfdbfe; color: #1d4ed8; box-shadow: 0 4px 12px rgba(29, 78, 216, .14); }
.card-ico.red { background: linear-gradient(135deg, #fee2e2, #fef2f2); border-color: #fecaca; color: #b91c1c; box-shadow: 0 4px 12px rgba(220, 38, 38, .14); }
.ta-right { text-align: right; }
.bk-danger-note { padding: 10px 12px; border-radius: 10px; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

.card-sub { margin: 2px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }

.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
  gap: 18px;
  align-items: start;
}
.settings-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.settings-form-card .card-head { margin-bottom: 16px; }
.settings-form-card .form-sec { margin-bottom: 16px; }
.form-sec-title svg { width: 15px; height: 15px; flex-shrink: 0; }
.form-sec-title small { font-size: 10.5px; font-weight: 600; color: var(--muted); text-transform: none; letter-spacing: 0; margin-left: 2px; }
.form-sec-title small::before { content: '—'; margin-right: 5px; color: var(--green-500); }

.settings-note {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 11px 14px; margin-bottom: 16px;
  border-radius: 11px;
  background: #fffbeb; border: 1px solid #fde68a;
  color: #92400e;
  font-size: 12px; line-height: 1.55;
}
.settings-note svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; color: #d97706; }
.settings-note p { margin: 0; }

.settings-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.settings-actions .btn { padding: 11px 22px; font-size: 14px; font-weight: 700; }

.settings-logo-card .card-head { margin-bottom: 16px; }
.logo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.logo-slot {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 18px 12px 14px;
  border: 1.5px solid var(--line); border-radius: 14px;
  background: linear-gradient(180deg, #fbfdfb, #fff);
  transition: border-color .2s, box-shadow .2s;
}
.logo-slot:hover { border-color: #d1d5db; box-shadow: 0 6px 16px rgba(15, 23, 42, .06); }
.logo-slot-label { font-size: 10.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.logo-slot .logo-preview { width: 104px; height: 104px; }
.logo-slot .form-actions { justify-content: center; margin-top: 0; }
.logo-slot .hint { margin: 0; text-align: center; }

.batas-card { border-left: 4px solid var(--green-500); }
.batas-card .badge { font-size: 10.5px; padding: 3px 10px; }
.batas-form input[type=datetime-local] { min-width: 230px; flex: 1; }

#kopCard .sheet-preview { padding: 22px; }

@media (max-width: 1020px) {
  .settings-grid { grid-template-columns: 1fr; }
  .settings-col-side { position: static; }
}
@media (max-width: 640px) {
  .settings-toolbar-card .toolbar { width: 100%; }
  .settings-toolbar-card .toolbar select { flex: 1; }
  .settings-toolbar-card .st-head p { font-size: 11.5px; }
  .logo-grid { grid-template-columns: 1fr; }
  .batas-form input[type=datetime-local] { width: 100%; }
  #kopCard .sheet-preview { padding: 12px; }
}
