:root {
  --tk-primary: #0f766e;
  --tk-primary-dark: #115e59;
  --tk-primary-soft: #e6f5f2;
  --tk-accent: #f59e0b;
  --tk-bg: #f4f7f7;
  --tk-surface: #ffffff;
  --tk-text: #172b2a;
  --tk-muted: #71807f;
  --tk-border: #e3ebea;
  --tk-radius: 16px;
  --tk-shadow: 0 10px 30px rgba(20, 63, 59, .07);
  --tk-sidebar: 270px;
}

* { scrollbar-width: thin; scrollbar-color: #b9cfcc transparent; }
.lucide, .modern-icon { display:inline-block; width:1em; height:1em; flex-shrink:0; stroke:currentColor; vertical-align:-.15em; }
.lucide.fe-12,.modern-icon.fe-12{width:12px;height:12px}.lucide.fe-16,.modern-icon.fe-16{width:16px;height:16px}.lucide.fe-24,.modern-icon.fe-24{width:24px;height:24px}.lucide.fe-32,.modern-icon.fe-32{width:32px;height:32px}
.btn .lucide { transition:transform .2s ease; }.btn:hover .lucide.fe-refresh-cw,.btn:hover .lucide.fe-refresh-ccw{transform:rotate(35deg)}
body {
  font-family: "Plus Jakarta Sans", sans-serif !important;
  color: var(--tk-text);
  background: var(--tk-bg);
  letter-spacing: -.01em;
}
a { transition: color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease; }
.wrapper { min-height: 100vh; }
#spa-content { min-height: calc(100vh - 150px); transition: opacity .16s ease, transform .16s ease; }
body.spa-loading #spa-content { opacity: .45; transform: translateY(2px); pointer-events: none; }
body.spa-loading::after { position: fixed; z-index: 1200; top: 0; left: 0; width: 100%; height: 3px; content: ''; background: linear-gradient(90deg, transparent, var(--tk-primary), #2dd4bf, transparent); background-size: 200% 100%; animation: spa-progress .9s linear infinite; }
@keyframes spa-progress { from { background-position: 100% 0; } to { background-position: -100% 0; } }

/* App shell */
.vertical .sidebar-left {
  width: var(--tk-sidebar);
  padding: 14px 12px 28px;
  border-right: 1px solid var(--tk-border) !important;
  box-shadow: none !important;
  background: rgba(255, 255, 255, .96) !important;
}
.vertical .main-content { margin-left: var(--tk-sidebar); padding: 92px 28px 0; min-height: 100vh; }
.vertical .topnav {
  position: fixed;
  z-index: 990;
  top: 0;
  right: 0;
  left: 0;
  bottom: auto;
  width: auto;
  height: 76px;
  margin-left: var(--tk-sidebar);
  padding: 0 28px;
  background: rgba(244, 247, 247, .94);
  border: 0;
  border-bottom: 1px solid rgba(215, 228, 226, .9);
  box-shadow: 0 5px 18px rgba(28, 67, 63, .035);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.topnav-left { display: flex; align-items: center; min-width: 0; gap: 16px; }
.topnav .navbar-toggler { display: grid; flex: 0 0 40px; width: 40px; height: 40px; margin: 0; padding: 0; place-items: center; border: 1px solid var(--tk-border) !important; border-radius: 12px; background: var(--tk-surface); }
.topnav .navbar-toggler i { display: block; font-size: 18px; line-height: 1; }
.topnav-actions { flex-wrap: nowrap; gap: 3px; margin-left: auto; padding: 4px; border: 1px solid var(--tk-border); border-radius: 15px; background: var(--tk-surface); box-shadow: 0 5px 16px rgba(20, 63, 59, .045); }
.topnav .nav-link { min-height: 42px; display: flex; align-items: center; gap: 9px; margin: 0; padding: 7px 10px !important; border-radius: 12px; color: var(--tk-text) !important; }
.topnav .topnav-icon-btn { justify-content: center; width: 38px; height: 38px; min-height: 38px; padding: 0 !important; border: 0; }
.topnav .nav-link:hover { background: var(--tk-primary-soft); box-shadow: none; }
.topnav .avatar { margin: 0 !important; }
.topnav .topnav-avatar { position: relative; display: grid; flex: 0 0 36px; width: 36px; height: 36px; place-items: center; overflow: visible; }
.topnav .topnav-avatar .avatar-img, .topnav .avatar-fallback { display: grid; width: 36px; height: 36px; place-items: center; overflow: hidden; border: 2px solid var(--tk-surface); border-radius: 50%; object-fit: cover; object-position: center; box-shadow: 0 0 0 1px var(--tk-border); }
.topnav .avatar-fallback { color: #fff; background: linear-gradient(145deg, var(--tk-primary), #14a89b); font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.topnav .avatar-presence { position: absolute; right: -1px; bottom: 0; width: 9px; height: 9px; border: 2px solid var(--tk-surface); border-radius: 50%; background: #22c55e; }
.topnav-divider { width: 1px; height: 26px; margin: 0 5px; background: var(--tk-border); }
.user-menu .nav-link { padding-right: 7px !important; }
.user-menu .dropdown-toggle::after { margin-left: 2px; color: var(--tk-muted); vertical-align: middle; }
.user-meta { min-width: 0; flex-direction: column; line-height: 1.2; }
.user-meta strong { max-width: 145px; overflow: hidden; color: var(--tk-text); font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.user-meta small { display: flex; align-items: center; gap: 6px; color: var(--tk-muted); font-size: 9px; font-weight: 600; }
.topnav .dot { top: 5px; right: 4px; width: 9px; height: 9px; border: 2px solid var(--tk-surface); background: #ef4444 !important; }
.user-menu .dropdown-menu { width: 190px; margin-top: 9px; }
.user-menu .dropdown-item { display: flex; align-items: center; gap: 9px; }
.dropdown-user { display: flex; padding: 8px 12px 11px; flex-direction: column; }
.dropdown-user strong { font-size: 12px; }
.dropdown-user small { color: var(--tk-muted); font-size: 10px; }

/* Navigation */
.sidebar-left .toggle-btn { position: absolute; z-index: 4; top: 15px; right: 14px; display: grid; width: 36px; height: 36px; margin: 0 !important; padding: 0; place-items: center; border: 1px solid var(--tk-border); border-radius: 11px; background: var(--tk-surface); }
.vertnav { padding: 0; }
.sidebar-brand { min-height: 58px; margin-bottom: 14px !important; padding-bottom: 14px; border-bottom: 1px solid var(--tk-border); }
.sidebar-brand .navbar-brand { display: flex; align-items: center; gap: 11px; margin: 0 !important; padding: 4px 9px; text-align: left !important; }
.sidebar-brand .navbar-brand-img { width: 42px; height: 42px; flex: 0 0 42px; object-fit: cover; border: 1px solid var(--tk-border); }
.brand-copy { display: flex; min-width: 0; flex-direction: column; color: var(--tk-text); line-height: 1.25; }
.brand-copy strong { max-width: 165px; overflow: hidden; font-size: 14px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.brand-copy small { color: var(--tk-muted); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.vertnav .navbar-nav { padding: 0 2px; }
.vertnav .nav-heading { width: 100%; margin: 0 !important; padding: 18px 12px 7px; color: #98a8a6 !important; font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.vertnav .navbar-nav .nav-link { position: relative; display: flex; align-items: center; min-height: 42px; margin: 2px 0; padding: 9px 11px; border-radius: 11px; color: #556563; font-size: 12px; font-weight: 650; }
.vertnav .navbar-nav .nav-link > i { display: grid; flex: 0 0 31px; width: 31px; height: 31px; margin: -4px 0; place-items: center; border-radius: 9px; color: #849492; }
.vertnav .navbar-nav .nav-link .item-text { flex: 1; margin-left: 9px !important; }
.vertnav .navbar-nav .dropdown-toggle::after { margin-left: auto; color: #9aabaa; transform: rotate(0); transition: transform .2s ease; }
.vertnav .navbar-nav .dropdown-toggle[aria-expanded="true"]::after { transform: rotate(90deg); }
.vertnav .navbar-nav .nav-link:hover { color: var(--tk-primary); background: var(--tk-primary-soft); transform: translateX(2px); }
.vertnav .navbar-nav .nav-link.active { color: #fff !important; background: linear-gradient(135deg, var(--tk-primary), #11998e); box-shadow: 0 8px 20px rgba(15, 118, 110, .22); }
.vertnav .navbar-nav .nav-link.active i { color: #fff; }
.vertnav .navbar-nav .nav-link.parent-active { color: var(--tk-primary); background: var(--tk-primary-soft); }
.vertnav .collapse { position: relative; margin: 3px 0 6px 26px; padding-left: 15px !important; }
.vertnav .collapse::before { position: absolute; top: 4px; bottom: 4px; left: 5px; width: 1px; content: ''; background: #dce7e5; }
.vertnav .collapse .nav-link { min-height: 32px; margin: 1px 0; padding: 6px 9px !important; border-radius: 8px; font-size: 11px; }
.vertnav .collapse .nav-link .item-text { margin-left: 0 !important; }
.vertnav .collapse .nav-link.active { color: var(--tk-primary) !important; background: var(--tk-primary-soft); box-shadow: none; }
.vertnav .collapse .nav-link.active::before { position: absolute; top: 50%; left: -13px; width: 5px; height: 5px; content: ''; border-radius: 50%; background: var(--tk-primary); transform: translateY(-50%); box-shadow: 0 0 0 3px var(--tk-surface); }
.sidebar-badge { margin-left: auto; padding: 3px 7px; border-radius: 999px; color: #fff; background: #ef4444; font-size: 9px; font-weight: 800; }

/* Content and shared components */
.container-fluid { max-width: 1600px; }
.page-title { margin: 0; color: var(--tk-text); font-size: 24px; font-weight: 800; letter-spacing: -.035em; }
.page-eyebrow { display: block; margin-bottom: 5px; color: var(--tk-primary); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.page-subtitle { margin-top: 5px; color: var(--tk-muted); font-size: 13px; }
.toolbar { align-items: center; margin-bottom: 22px !important; }
.card {
  overflow: hidden;
  border: 1px solid var(--tk-border);
  border-radius: var(--tk-radius);
  background: var(--tk-surface);
  box-shadow: var(--tk-shadow) !important;
}
.card-header { min-height: 60px; padding: 19px 22px; border-bottom: 1px solid var(--tk-border); background: transparent; }
.card-header strong { color: var(--tk-text); font-size: 14px; font-weight: 750; }
.card-body { padding: 22px; }
.btn { border-radius: 10px; font-weight: 700; letter-spacing: -.01em; box-shadow: none; }
.btn-primary { border-color: var(--tk-primary); background: var(--tk-primary); }
.btn-primary:hover, .btn-primary:focus { border-color: var(--tk-primary-dark); background: var(--tk-primary-dark); box-shadow: 0 8px 18px rgba(15, 118, 110, .2); transform: translateY(-1px); }
.btn-outline-warning { color: #b56c00; border-color: #f3d498; background: #fffaf0; }
.btn-danger { color: #be3b3b; border-color: #f3d0d0; background: #fff3f3; }
.btn-outline-danger { color: #657573; border-color: var(--tk-border); background: #fff; }
.btn-sm { min-height: 36px; padding: 8px 11px; }
.form-control, .custom-select, .select2-container--bootstrap4 .select2-selection {
  min-height: 44px;
  border: 1px solid #dbe5e4;
  border-radius: 10px;
  color: var(--tk-text);
  background-color: #fbfcfc;
  font-size: 13px;
}
.form-control:focus, .custom-select:focus { border-color: #68bcb5; background: #fff; box-shadow: 0 0 0 3px rgba(15, 118, 110, .11); }
label { margin-bottom: 8px; color: #405350; font-size: 12px; font-weight: 700; }
.table { color: #394b49; }
.table thead th { padding: 13px 15px; border: 0; background: #f6f9f8; color: #738280; font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.table thead th:first-child { border-radius: 10px 0 0 10px; }
.table thead th:last-child { border-radius: 0 10px 10px 0; }
.table td { padding: 14px 15px; border-top: 1px solid #edf2f1; vertical-align: middle; font-size: 12px; }
.table-hover tbody tr:hover { background: #f8fbfa; }
.badge { padding: 6px 9px; border-radius: 999px; font-weight: 700; }
.pagination .page-link { margin: 0 3px; border: 1px solid var(--tk-border); border-radius: 9px !important; color: var(--tk-muted); }
.pagination .active .page-link { border-color: var(--tk-primary); background: var(--tk-primary); }
.dropdown-menu { padding: 8px; border: 1px solid var(--tk-border); border-radius: 13px; box-shadow: 0 16px 42px rgba(20, 63, 59, .13); }
.dropdown-item { padding: 9px 12px; border-radius: 8px; font-size: 12px; }
.dropdown-item:hover { color: var(--tk-primary); background: var(--tk-primary-soft); }
.modal-content { border: 0; border-radius: 18px; box-shadow: 0 24px 70px rgba(15, 44, 42, .2); }
.modal-header { padding: 20px 22px; border-bottom-color: var(--tk-border); }
.image-area { overflow: hidden; min-height: 180px; border: 1px dashed #bed0ce; border-radius: 14px; background: #f8fbfa; }
.image-area img { width: 100%; max-height: 380px; object-fit: contain; box-shadow: none !important; }
.ql-toolbar.ql-snow { border-color: var(--tk-border); border-radius: 10px 10px 0 0; background: #f8fbfa; }
.ql-container.ql-snow { border-color: var(--tk-border); border-radius: 0 0 10px 10px; }

/* Dashboard */
.dashboard-heading { padding: 7px 0 2px; }
.dashboard-hero { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom:24px; padding-top:4px; }
.dashboard-controls { display:flex; align-items:center; gap:10px; }
.dashboard-date { display:flex; align-items:center; gap:10px; min-width:150px; padding:8px 12px; border:1px solid var(--tk-border); border-radius:12px; background:var(--tk-surface); }
.dashboard-date>i { color:var(--tk-primary); font-size:17px; }.dashboard-date span { font-size:11px; font-weight:700; line-height:1.25; }.dashboard-date small { display:block; color:var(--tk-muted); font-size:8px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.dashboard-sync { display:flex; align-items:center; gap:9px; min-width:128px; padding:7px 11px; border:1px solid var(--tk-border); border-radius:12px; background:var(--tk-surface); }.sync-indicator{width:8px;height:8px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 4px rgba(34,197,94,.12)}.dashboard-sync span:last-child{line-height:1.2}.dashboard-sync small,.dashboard-sync strong{display:block}.dashboard-sync small{color:var(--tk-muted);font-size:8px;font-weight:700;letter-spacing:.07em;text-transform:uppercase}.dashboard-sync strong{margin-top:2px;font-size:9px;font-weight:700}.dashboard-refresh { display:inline-flex; width:auto; height:40px; align-items:center; justify-content:center; gap:7px; border:1px solid var(--tk-primary); }.dashboard-refresh.is-refreshing .lucide{animation:dashboard-spin .8s linear infinite}@keyframes dashboard-spin{to{transform:rotate(360deg)}}
.dashboard-kpis>div { margin-bottom:24px; }
.dashboard-kpi { position:relative; display:flex; min-height:176px; padding:23px; flex-direction:column; overflow:hidden; border:1px solid var(--tk-border); border-radius:var(--tk-radius); color:var(--tk-text); background:var(--tk-surface); box-shadow:var(--tk-shadow); }
.dashboard-kpi:hover { color:var(--tk-text); text-decoration:none; transform:translateY(-3px); box-shadow:0 16px 36px rgba(20,63,59,.11); }.dashboard-kpi::after { position:absolute; top:-38px; right:-36px; width:120px; height:120px; content:''; border-radius:50%; background:currentColor; opacity:.045; }
.kpi-icon { position:absolute; z-index:1; top:20px; right:20px; display:grid; width:42px; height:42px; place-items:center; border-radius:12px; font-size:18px; }.kpi-amber .kpi-icon{color:#a16207;background:#fef3c7}.kpi-teal .kpi-icon{color:#0f766e;background:#dff5f1}.kpi-purple .kpi-icon{color:#6d5ac6;background:#eeeaff}.kpi-blue .kpi-icon{color:#2563a8;background:#e3efff}
.kpi-green .kpi-icon{color:#15803d;background:#dcfce7}
.kpi-label { color:var(--tk-muted); font-size:11px; font-weight:700; }.kpi-value { margin-top:10px; font-size:32px; font-weight:800; letter-spacing:-.05em; }.kpi-foot { margin-top:auto; color:var(--tk-muted); font-size:10px; font-weight:600; }.kpi-foot i { margin-left:3px; color:var(--tk-primary); }
.dashboard-panel { min-height:480px; }.dashboard-panel-header { display:flex; align-items:center; justify-content:space-between; }.dashboard-panel-header>div,.quick-actions-title { display:flex; align-items:center; gap:11px; }.dashboard-panel-header strong,.quick-actions-title strong { display:block; }.dashboard-panel-header small,.quick-actions-title small { display:block; margin-top:2px; color:var(--tk-muted); font-size:9px; }
.panel-icon { display:grid; flex:0 0 38px; width:38px; height:38px; place-items:center; border-radius:11px; font-size:16px; }.panel-icon-teal{color:#0f766e;background:#dff5f1}.panel-icon-purple{color:#6d5ac6;background:#eeeaff}.panel-icon-amber{color:#a16207;background:#fef3c7}.panel-link { color:var(--tk-primary); font-size:10px; font-weight:700; }
.report-highlight { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; padding:18px 20px; border-radius:14px; background:linear-gradient(135deg,var(--tk-primary-soft),rgba(15,118,110,.03)); }.report-highlight small,.report-highlight span { display:block; color:var(--tk-muted); font-size:9px; }.report-highlight strong { display:block; margin:3px 0; font-size:27px; font-weight:800; }.report-donut { display:grid; width:64px; height:64px; padding:7px; place-items:center; border-radius:50%; background:var(--tk-border); }.report-donut span { display:grid; width:50px; height:50px; place-items:center; border-radius:50%; color:var(--tk-text); background:var(--tk-surface); font-size:10px; font-weight:800; }
.status-row { display:grid; grid-template-columns:9px minmax(80px,1fr) minmax(90px,2fr) 35px 35px; align-items:center; gap:10px; min-height:47px; padding:5px 3px; border-bottom:1px solid var(--tk-border); color:var(--tk-text); }.status-row:last-child{border:0}.status-row:hover{color:var(--tk-primary);text-decoration:none}.status-dot{width:8px;height:8px;border-radius:50%}.dot-blue{background:#3b82f6}.dot-amber{background:#f59e0b}.dot-purple{background:#8b5cf6}.dot-green{background:#22c55e}.dot-red{background:#ef4444}.status-name{font-size:11px;font-weight:650}.status-track{height:6px;overflow:hidden;border-radius:99px;background:var(--tk-border)}.status-track i{display:block;width:0;height:100%;border-radius:99px;background:var(--tk-primary);transition:width .4s ease}.status-row strong,.status-row small{text-align:right;font-size:10px}.status-row strong{font-size:11px}
.article-ranking { padding-top:10px; padding-bottom:10px; }.article-rank-item { display:grid; grid-template-columns:24px 46px minmax(0,1fr) auto; align-items:center; gap:10px; min-height:76px; border-bottom:1px solid var(--tk-border); color:var(--tk-text); }.article-rank-item:last-child{border:0}.article-rank-item:hover{color:var(--tk-primary);text-decoration:none}.article-rank-number{color:#a1aeac;font-size:10px;font-weight:800}.article-rank-image{display:grid;width:44px;height:44px;place-items:center;overflow:hidden;border-radius:11px;color:var(--tk-muted);background:var(--tk-primary-soft)}.article-rank-image img{width:100%;height:100%;object-fit:cover}.article-rank-copy{min-width:0}.article-rank-copy strong,.article-rank-copy small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.article-rank-copy strong{font-size:11px}.article-rank-copy small{margin-top:4px;color:var(--tk-muted);font-size:9px}.article-bookmarks{color:var(--tk-muted);font-size:10px;font-weight:700}.dashboard-empty{display:flex;min-height:280px;align-items:center;justify-content:center;gap:8px;flex-direction:column;color:var(--tk-muted);font-size:11px}.dashboard-empty>i{font-size:24px}.dashboard-empty strong{color:var(--tk-text)}
.quick-actions .card-body { display:flex; align-items:center; gap:28px; }.quick-actions-title{min-width:180px}.quick-actions-list{display:grid;width:100%;grid-template-columns:repeat(4,1fr);gap:8px}.quick-actions-list>a{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid transparent;border-radius:11px;color:var(--tk-text);background:var(--tk-bg)}.quick-actions-list>a:hover{border-color:var(--tk-border);color:var(--tk-primary);text-decoration:none;transform:translateY(-1px)}.quick-actions-list>a>i{font-size:16px}.quick-actions-list span{font-size:10px;font-weight:700}.quick-actions-list small{display:block;margin-top:2px;color:var(--tk-muted);font-size:8px;font-weight:500}
.citizen-dashboard-hero { align-items:center; }.citizen-period { display:flex; align-items:center; flex-wrap:nowrap; gap:8px; padding:5px; border:1px solid var(--tk-border); border-radius:14px; background:var(--tk-surface); box-shadow:0 5px 16px rgba(20,63,59,.04); }.citizen-period #reportrange{display:flex;min-width:245px;height:38px;align-items:center;justify-content:space-between;gap:9px;padding:8px 11px!important;border:1px solid var(--tk-border);border-radius:9px;background:var(--tk-bg);text-align:center;cursor:pointer;white-space:nowrap}.citizen-period #reportrange>i:first-child{color:var(--tk-primary)}.citizen-period #reportrange>i:last-child{color:var(--tk-muted);font-size:12px}.citizen-period #reportrange span{flex:1;font-weight:650}.citizen-period .btn{display:flex;height:38px;align-items:center;gap:6px;white-space:nowrap}.citizen-period>input{display:none}.citizen-kpis .dashboard-kpi{min-height:166px}.analytics-card{min-height:430px}.analytics-wide{min-height:420px}.analytics-chart{min-height:330px}.analytics-summary{display:flex;align-items:center;gap:6px;padding:6px 9px;border-radius:999px;color:var(--tk-muted);background:var(--tk-bg);font-size:9px;font-weight:700}.chart-empty{display:flex;min-height:320px;align-items:center;justify-content:center;flex-direction:column;gap:7px;color:var(--tk-muted);font-size:10px}.chart-empty i{font-size:27px;color:#9bafac}.chart-empty strong{color:var(--tk-text);font-size:11px}
.citizen-dashboard-hero{align-items:stretch;flex-direction:column}.period-presets{display:flex;align-items:center;gap:16px;padding:12px 14px;border:1px solid var(--tk-border);border-radius:14px;background:var(--tk-surface);box-shadow:0 5px 16px rgba(20,63,59,.04)}.period-presets-copy{display:flex;min-width:170px;align-items:center;gap:10px}.period-presets-copy>span:last-child{line-height:1.25}.period-presets-copy strong,.period-presets-copy small{display:block}.period-presets-copy strong{font-size:10px}.period-presets-copy small{margin-top:3px;color:var(--tk-muted);font-size:8px}.period-preset-buttons{display:flex;min-width:0;align-items:center;gap:5px;overflow-x:auto;padding:2px}.period-btn{height:34px;padding:0 11px;border:1px solid transparent;border-radius:9px;color:var(--tk-muted);background:var(--tk-bg);font-family:inherit;font-size:9px;font-weight:700;white-space:nowrap;cursor:pointer;transition:.2s ease}.period-btn:hover{border-color:#a7cfca;color:var(--tk-primary);background:var(--tk-primary-soft)}.period-btn.active{border-color:var(--tk-primary);color:#fff;background:var(--tk-primary);box-shadow:0 5px 12px rgba(15,118,110,.18)}.period-custom{display:flex;align-items:center;gap:6px}.period-presets>input{display:none}
.vehicle-kpis .dashboard-kpi{min-height:164px;padding:20px}.vehicle-kpis .kpi-icon{top:18px;right:18px;width:39px;height:39px}.vehicle-kpis .kpi-value{font-size:28px}.kpi-value-time{letter-spacing:-.02em}.panel-icon-blue{color:#2563a8;background:#e3efff}.vehicle-legend{display:flex;align-items:center;gap:13px;color:var(--tk-muted);font-size:9px;font-weight:700}.vehicle-legend>span{display:flex;align-items:center;gap:6px}.legend-dot{display:block;width:8px;height:8px;border-radius:50%}.legend-dot.line-one{background:#0f766e}.legend-dot.line-two{background:#8b5cf6}
.stat-card { position: relative; min-height: 165px; color: var(--tk-text); transition: transform .2s ease, box-shadow .2s ease; }
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(20, 63, 59, .11) !important; }
.stat-card .card-body { position: relative; min-height: 165px; padding: 25px; }
.stat-card small { display: block; color: var(--tk-muted) !important; font-size: 12px; font-weight: 700; }
.stat-card h3 { margin-top: 7px; font-size: 32px; font-weight: 800; }
.stat-icon { position: absolute; top: 23px; right: 22px; display: grid; width: 44px; height: 44px; place-items: center; border-radius: 13px; font-size: 19px; }
.stat-banner .stat-icon { color: #8b5e00; background: #fff3cf; }
.stat-report .stat-icon { color: #0f766e; background: #dff5f1; }
.stat-article .stat-icon { color: #5b4bb7; background: #ece9ff; }
.stat-link { position: absolute; bottom: 22px; left: 25px; color: var(--tk-primary); font-size: 11px; font-weight: 700; }
.stat-link i { margin-left: 3px; }
.profile-security-card .card-header{padding:18px 22px}.profile-security-card .card-body{padding:24px}.profile-password-form{max-width:760px}.profile-password-form>.form-group{margin-bottom:20px}.profile-password-input{position:relative}.profile-password-input>.modern-icon,.profile-password-input>i,.profile-password-input>svg{position:absolute;z-index:2;top:50%;left:15px;width:17px;height:17px;color:var(--tk-muted);pointer-events:none;transform:translateY(-50%)}.profile-password-input .form-control{height:48px;padding-right:48px;padding-left:44px}.password-toggle{position:absolute;z-index:3;top:50%;right:7px;display:grid;width:34px;height:34px;padding:0;place-items:center;border:0;border-radius:8px;color:var(--tk-muted);background:transparent;cursor:pointer;transform:translateY(-50%)}.password-toggle:hover{color:var(--tk-primary);background:var(--tk-primary-soft)}.password-toggle svg{width:16px;height:16px}.profile-password-form .invalid-feedback{margin-top:6px;font-size:10px}.profile-password-actions{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:28px;padding-top:20px;border-top:1px solid var(--tk-border)}.profile-password-actions>span{display:flex;align-items:center;gap:7px;color:var(--tk-muted);font-size:10px}.profile-password-actions .btn{display:flex;align-items:center;gap:8px;white-space:nowrap}
.app-footer { display: flex; justify-content: space-between; padding: 20px 14px 24px; color: #8a9997; font-size: 11px; }
.app-footer-status { display: flex; align-items: center; gap: 6px; }
.app-footer-status i { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px #dcfce7; }

/* Authentication */
.auth-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(300px, 30%) minmax(0, 70%); background: #f7faf9; }
.auth-visual { position: relative; align-items: center; overflow: hidden; padding: clamp(36px, 3.5vw, 58px); color: #fff; background: linear-gradient(145deg, #052e2b, #0f766e); }
.auth-visual::before, .auth-visual::after { position: absolute; content: ''; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.auth-visual::before { width: 440px; height: 440px; top: -180px; right: -160px; }
.auth-visual::after { width: 260px; height: 260px; top: -90px; right: -70px; }
.auth-visual-content { position: relative; z-index: 1; width: 100%; max-width: 360px; }
.auth-kicker { display: inline-block; margin-bottom: 24px; padding: 7px 11px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: rgba(255,255,255,.08); font-size: 9px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.auth-visual h2 { max-width: 330px; margin: 0 0 18px; font-size: clamp(29px, 2.55vw, 39px); font-weight: 800; line-height: 1.16; letter-spacing: -.04em; }
.auth-visual p { max-width: 335px; margin: 0 0 32px; color: rgba(255,255,255,.72); font-size: 13px; line-height: 1.75; }
.auth-feature { display: flex; max-width: 330px; align-items: center; gap: 10px; margin-top: 13px; color: rgba(255,255,255,.88); font-size: 11px; font-weight: 600; line-height: 1.45; }
.auth-feature i { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 50%; background: rgba(255,255,255,.13); }
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: clamp(40px, 6vw, 88px); }
.auth-card { width: 100%; max-width: 500px; padding: clamp(32px, 3.5vw, 46px); border: 1px solid #e2eae9; border-radius: 22px; background: #fff; box-shadow: 0 24px 64px rgba(20,63,59,.09); }
.auth-card .navbar-brand { display: inline-flex; margin: 0 !important; padding: 0; }
.auth-brand { align-items: center; }
.auth-logo { width: 58px; height: 58px; object-fit: cover; border: 1px solid var(--tk-border); box-shadow: 0 10px 24px rgba(15, 118, 110, .12); }
.auth-heading { max-width: 440px; margin: 25px 0 31px; }
.auth-heading > span { color: var(--tk-primary); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.auth-heading h1 { margin: 8px 0 9px; color: var(--tk-text); font-size: 31px; font-weight: 800; line-height: 1.2; letter-spacing: -.04em; }
.auth-heading p { margin: 0; color: var(--tk-muted); font-size: 13px; line-height: 1.65; }
.auth-card .form-group { margin-bottom: 21px; }
.auth-card label { margin-bottom: 9px; color: #344744; font-size: 11px; letter-spacing: .01em; }
.auth-input { position: relative; }
.auth-input > i, .auth-input > svg, .auth-input > .modern-icon { position: absolute; z-index: 2; top: 50%; left: 17px; width: 17px; height: 17px; margin: 0; color: #849693; pointer-events: none; transform: translateY(-50%); }
.auth-input .form-control { height: 54px; padding: 0 17px 0 48px; border-color: #dce6e4; border-radius: 12px; background: #f8fbfa; font-size: 12px; }
.auth-input .form-control::placeholder { color: #9aa8a6; }
.auth-card .btn { display: flex; align-items: center; justify-content: center; gap: 9px; height: 54px; margin-top: 30px; border-radius: 12px; font-size: 12px; font-weight: 750; }
.auth-card .btn:disabled { cursor: wait; opacity: .72; transform: none; }
.auth-footer { margin: 28px 0 0; color: #9aa8a6; font-size: 11px; text-align: center; }

/* Dark mode */
body.dark { --tk-bg: #101918; --tk-surface: #162321; --tk-text: #edf5f4; --tk-muted: #8da09e; --tk-border: #263a37; --tk-primary-soft: #193c38; }
body.dark .sidebar-left { background: #13201f !important; }
body.dark .topnav { background: rgba(16, 25, 24, .88); }
body.dark .form-control, body.dark .custom-select, body.dark .table thead th { color: var(--tk-text); background: #192826; }
body.dark .table, body.dark .navbar-brand, body.dark .vertnav .navbar-nav .nav-link { color: #bdccca; }
body.dark .dropdown-menu, body.dark .modal-content { background: var(--tk-surface); }
body.dark .dropdown-item { color: #bdccca; }
body.dark .card, body.dark .card-header, body.dark .card-body { color: var(--tk-text); background-color: var(--tk-surface); }
body.dark .table td { border-top-color: var(--tk-border); }
body.dark .table-hover tbody tr:hover { color: var(--tk-text); background: #1a2b29; }
body.dark .text-muted { color: #8da09e !important; }
body.dark label { color: #b9c8c6; }
body.dark .form-control:focus, body.dark .custom-select:focus { color: var(--tk-text); background: #1c2d2b; }
body.dark .btn-outline-danger { color: #b8c8c6; border-color: var(--tk-border); background: var(--tk-surface); }
body.dark .btn-outline-warning { color: #eebc62; border-color: #5a4827; background: #292419; }
body.dark .btn-danger { color: #f39b9b; border-color: #593232; background: #2d2020; }
body.dark .image-area, body.dark .ql-toolbar.ql-snow { border-color: var(--tk-border); background: #192826; }
body.dark .ql-container.ql-snow { border-color: var(--tk-border); }
body.dark .topnav .avatar-presence { border-color: var(--tk-surface); }
body.dark .kpi-amber .kpi-icon,body.dark .panel-icon-amber{background:#392f18}body.dark .kpi-teal .kpi-icon,body.dark .panel-icon-teal{background:#193c38}body.dark .kpi-purple .kpi-icon,body.dark .panel-icon-purple{background:#2b2744}body.dark .kpi-blue .kpi-icon{background:#1d3047}
body.dark .panel-icon-blue{background:#1d3047}
body.dark .kpi-green .kpi-icon{background:#183825}body.dark .citizen-period #reportrange{background:var(--tk-bg)}
body.dark .period-btn{background:var(--tk-bg)}body.dark .period-btn.active{background:var(--tk-primary)}
body.dark .auth-card{border-color:var(--tk-border);background:var(--tk-surface)}body.dark .auth-card label{color:#c6d3d1}body.dark .auth-input .form-control{border-color:var(--tk-border);background:#192826}
body, .sidebar-left, .topnav, .card, .form-control, .dropdown-menu, .modal-content, .table thead th { transition: color .2s ease, background-color .2s ease, border-color .2s ease; }

@media (min-width: 992px) {
  .vertical.collapsed .sidebar-left { width: 80px; padding-right: 10px; padding-left: 10px; }
  .vertical.collapsed .main-content { margin-left: 80px; }
  .vertical.collapsed .topnav { margin-left: 80px; }
  .vertical.collapsed .sidebar-brand .navbar-brand { justify-content: center; padding-right: 0; padding-left: 0; }
  .vertical.collapsed .sidebar-brand .brand-copy { display: none; }
  .vertical.collapsed.hover .sidebar-left { width: 80px; padding-right: 10px; padding-left: 10px; }
  .vertical.collapsed.hover .main-content { margin-left: 80px; }
  .vertical.collapsed.hover .topnav { margin-left: 80px; }
  .vertical.collapsed.hover .sidebar-brand .navbar-brand { justify-content: center; padding-right: 0; padding-left: 0; }
  .vertical.collapsed.hover .sidebar-brand .brand-copy { display: none; }
}
@media (max-width: 991.98px) {
  .vertical .main-content, .vertical.collapsed .main-content { margin-left: 0; padding: 84px 16px 0; }
  .vertical .topnav, .vertical.collapsed .topnav { height: 66px; margin-left: 0; padding: 0 16px; }
  .vertical .sidebar-left { width: 0; padding-right: 0; padding-left: 0; }
  .vertical.collapsed .sidebar-left { width: 280px; padding-right: 12px; padding-left: 12px; }
  .vertical.collapsed .sidebar-brand { padding-right: 42px; }
  .auth-shell { display: block; }
  .auth-form-wrap { min-height: 100vh; }
  .dashboard-hero { align-items:flex-start; flex-direction:column; }.dashboard-controls{width:100%;justify-content:space-between}.quick-actions .card-body{align-items:flex-start;flex-direction:column}.quick-actions-list{grid-template-columns:repeat(2,1fr)}
  .period-presets{align-items:flex-start;flex-direction:column;gap:10px}.period-preset-buttons{width:100%}
}
/* Feature Config */
.feature-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.feature-toolbar .search-wrap { position: relative; flex: 1; min-width: 220px; max-width: 360px; }
.feature-toolbar .search-wrap > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--tk-muted); font-size: 14px; pointer-events: none; z-index: 2; }
.feature-toolbar .search-wrap .form-control { width: 100%; padding-left: 40px !important; }
.feature-type-pills { display: flex; gap: 6px; }
.feature-type-pill { padding: 8px 14px; border: 1px solid var(--tk-border); border-radius: 999px; color: var(--tk-muted); background: var(--tk-surface); font-size: 11px; font-weight: 700; cursor: pointer; transition: all .2s ease; }
.feature-type-pill:hover { border-color: var(--tk-primary); color: var(--tk-primary); }
.feature-type-pill.active { border-color: var(--tk-primary); background: var(--tk-primary-soft); color: var(--tk-primary); }

.feature-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }

.feature-type-section { animation: fadeIn .3s ease; }
.feature-type-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--tk-border); }
.feature-type-header .feature-badge { font-size: 10px; padding: 5px 12px; }
.feature-type-count { font-size: 12px; font-weight: 600; color: var(--tk-muted); }

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

.feature-card { position: relative; overflow: hidden; border: 1px solid var(--tk-border); border-radius: var(--tk-radius); background: var(--tk-surface); transition: transform .2s ease, box-shadow .2s ease; }
.feature-card:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(20, 63, 59, .1); }
.feature-card.is-inactive { opacity: .6; }
.feature-card.is-inactive:hover { transform: none; box-shadow: none; }

.drag-handle { position: absolute; left: 8px; top: 8px; z-index: 10; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--tk-muted); background: rgba(255,255,255,.85); backdrop-filter: blur(6px); cursor: grab; opacity: 0; transition: opacity .2s ease, background .2s ease, color .2s ease; }
.feature-card:hover .drag-handle { opacity: 1; }
.drag-handle:hover { background: var(--tk-primary-soft); color: var(--tk-primary); }
.drag-handle:active { cursor: grabbing; }
.drag-handle i { font-size: 14px; }

.feature-card-ghost { opacity: .4; background: var(--tk-primary-soft); border: 2px dashed var(--tk-primary); border-radius: var(--tk-radius); }
.feature-card-preview { position: relative; height: 160px; overflow: hidden; background: linear-gradient(135deg, #f0f7f6, #e6f5f2); }
.feature-card-preview img { width: 100%; height: 100%; object-fit: cover; }
.feature-card-preview .feature-card-icon { position: absolute; left: 14px; top: 14px; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.5); border-radius: 12px; background: rgba(255,255,255,.9); backdrop-filter: blur(8px); box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.feature-card-preview .feature-card-icon img { width: 28px; height: 28px; object-fit: contain; }
.feature-badge { padding: 4px 10px; border-radius: 999px; font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.feature-badge-type-layanan { background: rgba(15, 118, 110, .9); color: #fff; }
.feature-badge-type-informasi { background: rgba(245, 158, 11, .9); color: #fff; }
.feature-card-body { padding: 18px 20px; }
.feature-card-body h5 { margin: 0 0 4px; font-size: 15px; font-weight: 800; color: var(--tk-text); letter-spacing: -.02em; line-height: 1.3; }
.feature-card-body .feature-card-subtitle { margin: 0 0 8px; font-size: 12px; color: var(--tk-muted); font-weight: 500; }
.feature-card-meta { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--tk-border); }
.feature-card-meta .feature-order { font-size: 10px; font-weight: 700; color: var(--tk-muted); }
.feature-card-meta .feature-owner { flex: 1; font-size: 10px; color: var(--tk-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feature-card-actions { display: flex; align-items: center; gap: 8px; }

.modern-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.modern-switch input { opacity: 0; width: 0; height: 0; }
.modern-switch .slider { position: absolute; inset: 0; border-radius: 999px; background: #d5dedc; cursor: pointer; transition: background .25s ease; }
.modern-switch .slider::before { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.15); transition: transform .25s ease; }
.modern-switch input:checked + .slider { background: var(--tk-primary); }
.modern-switch input:checked + .slider::before { transform: translateX(18px); }

.feature-card-btn { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--tk-border); border-radius: 10px; color: var(--tk-muted); background: var(--tk-surface); transition: all .2s ease; }
.feature-card-btn:hover { border-color: var(--tk-primary); color: var(--tk-primary); background: var(--tk-primary-soft); }

.feature-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; text-align: center; }
.feature-empty i { font-size: 48px; color: #b9cfcc; margin-bottom: 16px; }
.feature-empty h4 { font-size: 16px; font-weight: 700; color: var(--tk-text); margin-bottom: 6px; }
.feature-empty p { font-size: 13px; color: var(--tk-muted); }

/* Feature Form */
.feature-form-wrap { display: grid; grid-template-columns: 1fr 380px; gap: 24px; }
.feature-form-main { display: flex; flex-direction: column; gap: 20px; }
.feature-form-section { padding: 22px; border: 1px solid var(--tk-border); border-radius: var(--tk-radius); background: var(--tk-surface); }
.feature-form-section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--tk-border); }
.feature-form-section-title i { font-size: 18px; color: var(--tk-primary); }
.feature-form-section-title h6 { margin: 0; font-size: 13px; font-weight: 800; color: var(--tk-text); letter-spacing: -.01em; }
.feature-form-section-title small { margin-left: auto; font-size: 10px; color: var(--tk-muted); font-weight: 500; }

.feature-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.feature-form-row .form-group { margin-bottom: 0; }
.feature-form-full .form-group { margin-bottom: 16px; }
.feature-form-full .form-group:last-child { margin-bottom: 0; }

.feature-form-sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 100px; align-self: start; }
.feature-upload-zone { position: relative; overflow: hidden; border: 2px dashed #c5d6d4; border-radius: 14px; background: #f8fbfa; transition: border-color .2s ease, background .2s ease; cursor: pointer; }
.feature-upload-zone:hover { border-color: var(--tk-primary); background: var(--tk-primary-soft); }
.feature-upload-zone.has-image { border-style: solid; border-color: var(--tk-border); }
.feature-upload-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2; }
.feature-upload-zone .upload-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 16px; text-align: center; }
.feature-upload-zone .upload-placeholder i { font-size: 28px; color: var(--tk-muted); margin-bottom: 10px; }
.feature-upload-zone .upload-placeholder span { font-size: 12px; font-weight: 600; color: var(--tk-text); }
.feature-upload-zone .upload-placeholder small { font-size: 10px; color: var(--tk-muted); margin-top: 4px; }
.feature-upload-zone .upload-preview { display: none; width: 100%; }
.feature-upload-zone.has-image .upload-placeholder { display: none; }
.feature-upload-zone.has-image .upload-preview { display: block; }
.feature-upload-zone .upload-preview img { width: 100%; max-height: 200px; object-fit: contain; }
.feature-upload-zone.icon-zone { min-height: 140px; }
.feature-upload-zone.icon-zone .upload-preview img { max-height: 100px; padding: 20px; }
.feature-upload-zone.image-zone { min-height: 200px; }

.feature-form-actions { display: flex; align-items: center; gap: 12px; padding-top: 16px; margin-top: 8px; border-top: 1px solid var(--tk-border); }
.feature-form-actions .btn { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 24px; font-size: 13px; }

@media (max-width: 991.98px) {
  .feature-form-wrap { grid-template-columns: 1fr; }
  .feature-form-sidebar { position: static; }
  .feature-form-row { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 575.98px) {
  .card-body { padding: 16px; }
  .toolbar .col, .toolbar .col.ml-auto { flex: 0 0 100%; max-width: 100%; }
  .toolbar .col.ml-auto { margin-top: 14px; }
  .toolbar .float-right { float: none !important; margin-left: 0 !important; }
  .table-responsive, .card-body { overflow-x: auto; }
  .table { min-width: 620px; }
  .auth-form-wrap { padding: 28px 22px; }
  .auth-card { padding: 28px 22px; border-radius: 18px; }
  .page-title { font-size: 21px; }
  .topnav-actions { gap: 0; padding: 3px; border-radius: 13px; }
  .topnav .topnav-icon-btn { width: 36px; height: 36px; min-height: 36px; }
  .topnav .nav-link { padding-right: 7px !important; padding-left: 7px !important; }
  .topnav-divider { margin-right: 3px; margin-left: 3px; }
  .app-footer { flex-direction: column; gap: 8px; }
  .dashboard-controls{width:100%}.dashboard-date{display:none}.dashboard-sync{flex:1}.dashboard-refresh span{display:none}.status-row{grid-template-columns:9px 70px minmax(55px,2fr) 28px 32px;gap:7px}.quick-actions-list{grid-template-columns:1fr}.dashboard-panel{min-height:0}
  .citizen-period #reportrange{width:calc(100% - 46px);min-width:0}.citizen-period .btn span{display:none}.analytics-summary{display:none}.analytics-card,.analytics-wide{min-height:0}
  .profile-password-actions{align-items:stretch;flex-direction:column}.profile-password-actions .btn{justify-content:center;width:100%}
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
