/* =========================================================
   Portal Desa — Stylesheet Utama
   Tema warna dikendalikan lewat CSS variables (--primary, dst)
   yang di-inject inline oleh PHP berdasarkan tabel settings.
   ========================================================= */

* {
  box-sizing: border-box;
}

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --secondary: #1e293b;
  --accent: #f59e0b;

  --bg: #f6f7fb;
  --surface: #ffffff;
  --border: #e5e7eb;
  --text: #1f2937;
  --text-muted: #6b7280;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.12);

  --font: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   LOGIN — Split kiri / kanan
   ========================================================= */

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}

.login-visual {
  position: relative;
  background: linear-gradient(155deg, var(--secondary) 0%, var(--primary-dark) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px 56px;
  overflow: hidden;
}

.login-visual::before {
  content: '';
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0) 70%);
  top: -160px;
  right: -160px;
}

.login-visual::after {
  content: '';
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, rgba(245,158,11,0) 72%);
  opacity: 0.35;
  bottom: -140px;
  left: -100px;
}

.login-visual-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.login-visual-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  overflow: hidden;
}
.login-visual-logo img { width: 100%; height: 100%; object-fit: cover; }

.login-visual-brand {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.2px;
}

.login-visual-mid {
  position: relative;
  z-index: 1;
  max-width: 420px;
}

.login-visual-mid h1 {
  font-size: 34px;
  line-height: 1.25;
  margin: 0 0 16px;
  font-weight: 700;
}

.login-visual-mid p {
  font-size: 15.5px;
  color: rgba(255,255,255,0.82);
  margin: 0;
}

.login-visual-roles {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
}

.login-visual-roles span {
  font-size: 12.5px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
}

.login-visual-bottom {
  position: relative;
  z-index: 1;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}

.login-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  background: var(--surface);
}

.login-form-wrap {
  width: 100%;
  max-width: 380px;
}

.login-form-wrap h2 {
  font-size: 24px;
  margin: 0 0 6px;
  font-weight: 700;
}

.login-form-wrap .login-sub {
  color: var(--text-muted);
  font-size: 14.5px;
  margin: 0 0 32px;
}

.field-group {
  margin-bottom: 18px;
}

.field-group label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--text);
}

.field-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  transition: border-color .15s ease, box-shadow .15s ease;
  background: #fff;
}

.field-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.password-wrap { position: relative; }
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: none;
  font-weight: 600;
  font-size: 14.5px;
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
}

.btn-primary {
  width: 100%;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 20px -6px var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:active { transform: translateY(1px); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

.btn-danger {
  background: #fee2e2;
  color: #b91c1c;
}
.btn-danger:hover { background: #fecaca; }

.btn-sm { padding: 8px 14px; font-size: 13px; }

.login-demo-hint {
  margin-top: 24px;
  padding: 14px 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--text-muted);
  border: 1px dashed var(--border);
}

.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 18px;
  border: 1px solid transparent;
}
.alert-error { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.alert-success { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.alert-info { background: var(--primary-light); color: var(--primary-dark); border-color: #bfdbfe; }

@media (max-width: 900px) {
  .login-page { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-form-side { padding: 32px 20px; }
}

/* =========================================================
   DESKTOP SHELL — ala macOS (menubar, dock, jendela)
   + Start menu ala Windows di pojok kiri bawah
   ========================================================= */

body.desktop-body {
  min-height: 100vh;
  background: #0f172a;
  overflow-x: hidden;
}
body.desktop-body.is-home { overflow: hidden; height: 100vh; }

.wallpaper {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.wallpaper-shade {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,.28) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 70%, rgba(0,0,0,.28) 100%);
  pointer-events: none;
}

/* ---- Menubar atas ---- */
.menubar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 32px;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: rgba(20, 24, 36, .45);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  color: #fff;
  font-size: 12.5px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.menubar-left, .menubar-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.menubar-logo {
  width: 18px; height: 18px; border-radius: 5px;
  background: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; overflow: hidden; flex-shrink: 0;
}
.menubar-logo img { width: 100%; height: 100%; object-fit: cover; }
.menubar-app { font-weight: 700; white-space: nowrap; }
.menubar-title { opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menubar-user { opacity: .85; white-space: nowrap; }
.menubar-clock { font-weight: 600; white-space: nowrap; }

/* ---- Area desktop ---- */
.desktop-area {
  position: relative;
  z-index: 2;
  padding: 52px 24px 120px;
  min-height: 100vh;
}
body.is-home .desktop-area { height: 100vh; overflow-y: auto; }

.desktop-alert {
  position: fixed;
  top: 44px; left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  min-width: 260px; max-width: 90vw;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
}

/* ---- Ikon desktop ---- */
.desktop-icons {
  display: grid;
  grid-template-columns: repeat(auto-fill, 104px);
  grid-auto-rows: 118px;
  gap: 10px 8px;
  justify-content: start;
  align-content: start;
  max-width: calc(100% - 240px);
}
.desktop-icon {
  display: flex; flex-direction: column; align-items: center;
  gap: 7px; padding: 8px 4px;
  border-radius: 10px;
  color: #fff;
  border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease;
}
.desktop-icon:hover, .desktop-icon:focus-visible {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.28);
  outline: none;
}
.desktop-icon-img {
  width: 64px; height: 64px;
  border-radius: 15px;
  overflow: hidden;
  background: rgba(255,255,255,.92);
  box-shadow: 0 6px 16px rgba(0,0,0,.35);
  display: flex; align-items: center; justify-content: center;
}
.desktop-icon-img img { width: 100%; height: 100%; object-fit: cover; }
.icon-letter {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 26px; color: #fff;
  background: linear-gradient(145deg, var(--primary) 0%, var(--primary-dark) 100%);
}
.desktop-icon-label {
  font-size: 12px; font-weight: 600; line-height: 1.25; text-align: center;
  text-shadow: 0 1px 3px rgba(0,0,0,.75);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  word-break: break-word;
}

/* ---- Widget jam di kanan atas ---- */
.desktop-widget {
  position: fixed;
  top: 52px; right: 22px;
  width: 200px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(20, 24, 36, .38);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255,255,255,.14);
  color: #fff;
  z-index: 3;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.widget-time { font-size: 34px; font-weight: 800; letter-spacing: -1px; line-height: 1.1; }
.widget-date { font-size: 12px; opacity: .8; margin-bottom: 10px; }
.widget-hello { font-size: 13px; font-weight: 700; }
.widget-role { font-size: 11.5px; opacity: .7; }

.desktop-empty {
  max-width: 360px; margin: 12vh auto 0; text-align: center; color: #fff;
  padding: 32px; border-radius: 18px;
  background: rgba(20,24,36,.4); backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.14);
}
.desktop-empty .icon { font-size: 38px; margin-bottom: 8px; }

/* ---- Jendela (halaman admin) ---- */
.window {
  max-width: 1100px;
  margin: 8px auto 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg);
  box-shadow: 0 30px 70px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.18);
  animation: windowIn .22s ease;
}
.window.is-zoomed { max-width: none; margin-top: 0; }
@keyframes windowIn { from { opacity: 0; transform: scale(.97) translateY(8px); } to { opacity: 1; transform: none; } }

.window-titlebar {
  display: flex; align-items: center; justify-content: space-between;
  height: 40px; padding: 0 14px;
  background: linear-gradient(180deg, #f4f5f8 0%, #e6e8ee 100%);
  border-bottom: 1px solid var(--border);
  user-select: none;
}
.traffic { display: flex; gap: 8px; width: 70px; }
.tl {
  width: 13px; height: 13px; border-radius: 50%; border: 0; padding: 0; display: block;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.14);
}
.tl-red { background: #ff5f57; }
.tl-yellow { background: #febc2e; }
.tl-green { background: #28c840; }
.tl:hover { filter: brightness(.9); }
.window-title { font-size: 13px; font-weight: 700; color: var(--text); }
.window-spacer { width: 70px; }
.window-body { padding: 24px; max-height: calc(100vh - 52px - 120px); overflow: auto; }
.window.is-zoomed .window-body { max-height: calc(100vh - 52px - 106px); }

/* ---- Dock (navbar bawah) ---- */
.dock-wrap {
  position: fixed;
  left: 0; right: 0; bottom: 10px;
  z-index: 70;
  display: flex; justify-content: center;
  padding: 0 76px;           /* sisakan ruang untuk tombol Start di kiri */
  pointer-events: none;
}
.dock {
  pointer-events: auto;
  display: flex; align-items: flex-end; gap: 8px;
  padding: 8px 12px;
  max-width: 100%;
  scrollbar-width: none;
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 22px;
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
}
.dock::-webkit-scrollbar { display: none; }
.dock-item { position: relative; flex-shrink: 0; display: block; }
.dock-icon {
  width: 52px; height: 52px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: rgba(255,255,255,.95);
  box-shadow: 0 4px 10px rgba(0,0,0,.28);
  font-size: 24px; color: #fff;
  transform-origin: bottom center;
  transition: transform .16s cubic-bezier(.3,1.5,.5,1);
}
.dock-icon img { width: 100%; height: 100%; object-fit: cover; }
.dock-icon-home { background: linear-gradient(145deg, #4ea1ff, #1d4ed8); }
.dock-icon-admin { background: linear-gradient(145deg, #94a3b8, #475569); }
.dock-item:hover .dock-icon, .dock-item:focus-visible .dock-icon { transform: scale(1.45) translateY(-6px); }
.dock-item:hover + .dock-item .dock-icon,
.dock-item:has(+ .dock-item:hover) .dock-icon { transform: scale(1.18) translateY(-2px); }
.dock-item.is-active::after {
  content: ''; position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 6px rgba(255,255,255,.8);
}
.dock-tip {
  position: absolute; bottom: calc(100% + 16px); left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: rgba(20,24,36,.9); color: #fff;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  padding: 5px 10px; border-radius: 8px;
  opacity: 0; pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
}
.dock-item:hover .dock-tip { opacity: 1; transform: translateX(-50%) translateY(0); }
.dock-sep { width: 1px; align-self: stretch; margin: 4px 4px; background: rgba(255,255,255,.4); flex-shrink: 0; }
/* Jika ikon terlalu banyak untuk lebar layar, dock bisa digeser (scroll).
   Efek zoom & tooltip dimatikan karena overflow akan memotongnya. */
.dock.is-scrollable { overflow-x: auto; }
.dock.is-scrollable .dock-tip { display: none; }
.dock.is-scrollable .dock-item:hover .dock-icon { transform: none; }

/* ---- Tombol Start (pojok kiri bawah) ---- */
.start-btn {
  position: fixed;
  left: 14px; bottom: 14px;
  width: 52px; height: 52px;
  border-radius: 15px;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
  z-index: 90;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 0;
  transition: transform .15s ease, background .15s ease;
}
.start-btn:hover { transform: scale(1.07); background: rgba(255,255,255,.34); }
.start-btn.is-open { background: var(--primary); }
.start-btn img { width: 100%; height: 100%; object-fit: cover; }
.start-btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; width: 24px; height: 24px; }
.start-btn-grid i { background: #fff; border-radius: 3px; display: block; }

/* ---- Start menu (muncul di atas tombol Start) ---- */
.start-backdrop { display: none; position: fixed; inset: 0; z-index: 80; }
.start-backdrop.open { display: block; }
.start-menu {
  position: fixed;
  left: 14px; bottom: 76px;
  width: 420px; max-width: calc(100vw - 28px);
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  z-index: 85;
  padding: 18px;
  border-radius: 18px;
  background: rgba(248, 249, 252, .86);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
  opacity: 0; visibility: hidden;
  transform: translateY(14px) scale(.98);
  transform-origin: bottom left;
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.start-menu.open { opacity: 1; visibility: visible; transform: none; }

.start-search input {
  width: 100%; padding: 11px 14px; border-radius: 999px;
  border: 1.5px solid var(--border); background: #fff; font-size: 14px;
}
.start-search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }
.start-section-title {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  color: var(--text-muted); margin: 18px 4px 8px;
}
.start-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.start-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 10px 4px; border-radius: 12px; text-align: center;
  transition: background .12s ease;
}
.start-item:hover { background: rgba(0,0,0,.07); }
.start-item.is-hidden { display: none; }
.start-icon {
  width: 46px; height: 46px; border-radius: 12px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.start-icon img { width: 100%; height: 100%; object-fit: cover; }
.start-icon .icon-letter { font-size: 20px; }
.start-icon-home { background: linear-gradient(145deg, #4ea1ff, #1d4ed8); color: #fff; font-size: 22px; }
.start-label {
  font-size: 11.5px; font-weight: 600; line-height: 1.25; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  word-break: break-word;
}
.start-empty { display: none; text-align: center; font-size: 13px; color: var(--text-muted); padding: 14px 0; }
.start-empty.show { display: block; }

.start-list { display: flex; flex-direction: column; gap: 2px; }
.start-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
}
.start-row:hover { background: rgba(0,0,0,.07); }
.start-row.active { background: var(--primary); color: #fff; }
.start-row-icon { width: 24px; text-align: center; }

.start-footer {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(0,0,0,.08);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.start-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.start-user-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0;
}
.start-user-name { display: block; font-size: 13px; font-weight: 700; }
.start-user-role { display: block; font-size: 11.5px; color: var(--text-muted); }
.start-power {
  font-size: 12.5px; font-weight: 700; padding: 8px 14px; border-radius: 999px;
  background: #fee2e2; color: #b91c1c; white-space: nowrap;
}
.start-power:hover { background: #fecaca; }

.wallpaper-preview { max-width: 320px; }

/* ---- Responsif ---- */
@media (max-width: 900px) {
  .desktop-widget { display: none; }
  .desktop-icons { max-width: 100%; }
  .menubar-user, .menubar-title { display: none; }
}
@media (max-width: 640px) {
  .desktop-area { padding: 44px 12px 110px; }
  .window-body { padding: 16px; }
  .dock-wrap { padding: 0 72px 0 12px; }
  .dock-icon { width: 46px; height: 46px; }
  .dock-item:hover .dock-icon { transform: none; }
  .dock-tip { display: none; }
  .start-menu { width: calc(100vw - 28px); }
  .start-grid { grid-template-columns: repeat(3, 1fr); }
  .desktop-icons { grid-template-columns: repeat(auto-fill, 92px); }
}

/* =========================================================
   DASHBOARD — Menu interaktif (grid kartu)
   ========================================================= */

.welcome-banner {
  background: linear-gradient(120deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}
.welcome-banner::after {
  content: '';
  position: absolute;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: 0.35;
  top: -100px;
  right: -60px;
}
.welcome-banner h2 { margin: 0 0 6px; font-size: 21px; position: relative; }
.welcome-banner p { margin: 0; color: rgba(255,255,255,0.85); font-size: 14px; position: relative; }

.section-title {
  font-size: 15.5px;
  font-weight: 700;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.menu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.menu-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.menu-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--primary);
  font-size: 30px;
}
.menu-card-image img { width: 100%; height: 100%; object-fit: cover; }

.menu-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.menu-card-body h3 {
  font-size: 15.5px;
  margin: 0 0 8px;
  font-weight: 700;
}

.menu-card-body p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 0 0 16px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.menu-card-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.empty-state {
  text-align: center;
  padding: 64px 20px;
  color: var(--text-muted);
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1.5px dashed var(--border);
}
.empty-state .icon { font-size: 40px; margin-bottom: 12px; }

/* =========================================================
   ADMIN — Tabel, form, card pengaturan
   ========================================================= */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin-bottom: 22px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.card-header h3 { margin: 0; font-size: 16px; font-weight: 700; }
.card-header p { margin: 4px 0 0; font-size: 13px; color: var(--text-muted); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  background: var(--primary-light);
  color: var(--primary);
}

.stat-card .value { font-size: 22px; font-weight: 700; line-height: 1.2; }
.stat-card .label { font-size: 12.5px; color: var(--text-muted); }

.table-wrap { overflow-x: auto; }

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table th {
  text-align: left;
  padding: 11px 14px;
  background: var(--bg);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }

.table-thumb {
  width: 56px;
  height: 40px;
  border-radius: 6px;
  object-fit: cover;
  background: var(--bg);
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}
.badge-admin { background: #ede9fe; color: #6d28d9; }
.badge-petugas { background: #dbeafe; color: #1d4ed8; }
.badge-sekdes { background: #fef3c7; color: #b45309; }
.badge-kades { background: #dcfce7; color: #15803d; }

.badge-active { background: #dcfce7; color: #15803d; }
.badge-inactive { background: #f3f4f6; color: #6b7280; }

.action-btns { display: flex; gap: 8px; }
.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  color: var(--text-muted);
}
.icon-btn:hover { color: var(--primary); border-color: var(--primary); }
.icon-btn.danger:hover { color: #dc2626; border-color: #dc2626; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.form-actions {
  margin-top: 22px;
  display: flex;
  gap: 10px;
}

.color-field {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
}
.color-field input[type="color"] {
  width: 38px;
  height: 38px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}
.color-field input[type="text"] {
  border: none;
  outline: none;
  font-size: 14px;
  width: 100%;
}

.theme-preview {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 8px;
}

.image-preview-box {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 16/10;
  border-radius: var(--radius-sm);
  border: 1.5px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 10px;
  background: var(--bg);
}
.image-preview-box img { width: 100%; height: 100%; object-fit: cover; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}
.modal-overlay.open { display: flex; }

.modal-box {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 24px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.modal-box h3 { margin: 0 0 10px; font-size: 16px; }
.modal-box p { margin: 0 0 20px; font-size: 13.5px; color: var(--text-muted); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

.helper-text { font-size: 12.5px; color: var(--text-muted); margin-top: 6px; }
