/* ================================================================
   LAYANAN DESA DIGITAL — PREMIUM MODERN STYLESHEET
   Tema: Navy Luxury, Emerald Accent & Sleek Glassmorphism
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

/* ── Root Variables ─────────────────────────────────────────── */
:root {
  --primary: #334155;
  --primary-dark: #1e293b;
  --primary-light: #f1f5f9;
  --accent: #475569;
  --accent-dark: #334155;
  --accent-light: #e2e8f0;
  --gold: #64748b;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --dark: #0f172a;
  --dark-navy: #1e293b;
  --text: #334155;
  --text-muted: #64748b;
  --border: #cbd5e1;
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --header-h: 72px;
  --transition: 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Reset & Base ───────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

@keyframes fadeInPage {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
  animation: fadeInPage 0.3s ease-in;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  font-family: inherit;
}

/* ── Global Top Loader ──────────────────────────────────────── */
#globalTopLoader {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3.5px;
  background: linear-gradient(90deg, #334155, #475569, #94a3b8);
  z-index: 99999;
  transition: width 0.35s ease, opacity 0.3s ease;
  pointer-events: none;
}

#globalTopLoader.loading {
  width: 70%;
  opacity: 1;
}

#globalTopLoader.done {
  width: 100%;
  opacity: 0;
}

/* ── HEADER / NAVBAR (Clean White Glassmorphism) ─────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(241, 245, 249, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1.5px solid rgba(203, 213, 225, 0.8);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.3px;
  cursor: pointer;
  flex-shrink: 0;
  text-decoration: none;
}

.brand .brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #475569 0%, #334155 60%, #1e293b 100%);
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 20px;
  color: #fff;
  box-shadow: 0 6px 20px rgba(51, 65, 85, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.brand .brand-sub {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.04em;
  display: block;
  margin-top: -2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-header {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  border: none;
  transition: all var(--transition);
}

.btn-header.primary {
  background: linear-gradient(135deg, #64748b, #475569);
  color: #fff;
  box-shadow: 0 4px 14px rgba(51, 65, 85, 0.3);
}

.btn-header.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(51, 65, 85, 0.4);
}

.btn-header.ghost {
  background: #ffffff;
  color: #334155;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.btn-header.ghost:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.btn-header.back {
  background: #ffffff;
  color: #334155;
  border: 1.5px solid #cbd5e1;
  font-size: 13px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.btn-header.back:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* ── HERO BANNER (Sleek Dark Navy & Slate Luxury) ─────────────── */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  padding: 80px 20px 105px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 25%, rgba(148, 163, 184, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 85% 65%, rgba(71, 85, 105, 0.22) 0%, transparent 45%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(241, 245, 249, 0.12);
  border: 1px solid rgba(226, 232, 240, 0.28);
  color: #cbd5e1;
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 900;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.hero h1 span {
  background: linear-gradient(135deg, #cbd5e1 0%, #94a3b8 40%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 10px rgba(255, 255, 255, 0.2));
}

.hero p {
  font-size: 16.5px;
  color: #cbd5e1;
  max-width: 620px;
  margin: 0 auto 40px;
  line-height: 1.8;
  font-weight: 400;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: var(--radius-sm);
  font-size: 15.5px;
  font-weight: 800;
  border: none;
  transition: all var(--transition);
}

.btn-hero.primary {
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(51, 65, 85, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.btn-hero.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(51, 65, 85, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.btn-hero.outline {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn-hero.outline:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.45);
}

/* ── STAT STRIP (Floating Glassmorphic Card Strip) ────────────── */
.stats-strip {
  max-width: 1140px;
  margin: -44px auto 44px;
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  border-radius: 22px;
  padding: 8px;
  border: 1.5px solid #e2e8f0;
  border-top-color: #ffffff;
  border-bottom-color: #cbd5e1;
  box-shadow:
    0 16px 40px rgba(15, 23, 42, 0.08),
    0 2px 6px rgba(15, 23, 42, 0.04),
    inset 0 1px 0 #ffffff;
}

.stat-item {
  flex: 1 1 160px;
  min-width: 130px;
  padding: 22px 18px;
  text-align: center;
  border-right: 1px solid #f1f5f9;
}

.stat-item:last-child {
  border-right: none;
}

.stat-item .stat-num {
  font-size: 34px;
  font-weight: 900;
  background: linear-gradient(135deg, #334155 0%, #475569 50%, #1e293b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.stat-item .stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.stat-item .stat-label i {
  color: #475569;
}

/* ── MAIN LAYOUT ────────────────────────────────────────────── */
.main-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 20px 20px 80px;
}

.section-header {
  margin-bottom: 32px;
}

.section-header h2 {
  font-size: 25px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid #334155;
  padding-left: 16px;
  letter-spacing: -0.01em;
}

.section-header p {
  font-size: 14.5px;
  color: var(--text-muted);
  margin-top: 6px;
  padding-left: 20px;
}

/* ── TWO-COLUMN GRID ────────────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 840px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

/* ── CARD / PANEL (Luxury White Panel) ────────────────────────── */
.card {
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
  border: 1.5px solid #e2e8f0;
  border-top-color: #ffffff;
  border-bottom-color: #cbd5e1;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow:
    0 14px 36px rgba(15, 23, 42, 0.06),
    0 2px 6px rgba(15, 23, 42, 0.03),
    inset 0 1px 0 #ffffff;
}

.card-title {
  font-size: 19px;
  font-weight: 900;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #f1f5f9;
  letter-spacing: -0.015em;
}

.card-title .card-title-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 18px;
  box-shadow: 0 6px 18px rgba(51, 65, 85, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

/* ── FORM ELEMENTS ──────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-grid .field-full {
  grid-column: 1 / -1;
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .field-full {
    grid-column: 1;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.field label i {
  color: #475569;
  font-size: 13px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  color: #0f172a;
  background: #ffffff;
  transition: all var(--transition);
  outline: none;
  box-sizing: border-box;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #334155;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(51, 65, 85, 0.14), 0 2px 8px rgba(51, 65, 85, 0.08);
}

.field textarea {
  resize: vertical;
  min-height: 105px;
  line-height: 1.6;
}

/* ── CUSTOM SELECT DROPDOWN SYSTEM ───────────────────────────── */
.custom-select-wrap {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  color: #0f172a;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all var(--transition);
  box-sizing: border-box;
  user-select: none;
}

.custom-select-trigger:hover,
.custom-select-wrap.open .custom-select-trigger {
  border-color: #334155;
  box-shadow: 0 0 0 4px rgba(51, 65, 85, 0.14);
}

.custom-select-trigger .select-arrow {
  color: #64748b;
  font-size: 13px;
  transition: transform 0.22s ease;
}

.custom-select-wrap.open .select-arrow {
  transform: rotate(180deg);
  color: #334155;
}

.custom-select-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.15), 0 2px 6px rgba(15, 23, 42, 0.05);
  z-index: 1000;
  display: none;
  overflow: hidden;
  padding: 6px;
  animation: selectMenuFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-select-wrap.open .custom-select-options {
  display: block;
}

@keyframes selectMenuFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-select-option {
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.custom-select-option i {
  color: #475569;
  font-size: 15px;
}

.custom-select-option:hover,
.custom-select-option.selected {
  background: #f1f5f9;
  color: #334155;
}

/* Drag & Drop area */
.drag-drop {
  border: 2px dashed #cbd5e1;
  border-radius: 18px;
  padding: 34px 20px;
  text-align: center;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.drag-drop:hover,
.drag-drop.active {
  border-color: #334155;
  background: #e2e8f0;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.drag-drop .upload-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 24px;
  margin: 0 auto 12px;
  box-shadow: 0 6px 20px rgba(51, 65, 85, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.22s ease;
}

.drag-drop:hover .upload-circle {
  transform: scale(1.08);
}

.drag-drop p {
  font-weight: 800;
  color: #0f172a;
  font-size: 14.5px;
  margin-bottom: 2px;
}

.drag-drop small {
  font-size: 12.5px;
  color: #64748b;
  font-weight: 500;
}

/* ── SEARCH WRAP (Luxury Input Group) ────────────────────────── */
.search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 16px;
  padding: 4px 4px 4px 16px;
  transition: all var(--transition);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  box-sizing: border-box;
}

.btn-search-action {
  flex-shrink: 0;
  padding: 10px 20px;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 13.5px;
  font-weight: 800;
  border: none;
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(51, 65, 85, 0.35);
  cursor: pointer;
  transition: all 0.2s ease;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  line-height: 1;
}

.btn-search-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(51, 65, 85, 0.45);
}

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn.primary {
  background: linear-gradient(135deg, #475569 0%, #334155 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(51, 65, 85, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  width: 100%;
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(51, 65, 85, 0.52);
}

.btn.primary:active {
  transform: translateY(0);
}

.btn.secondary {
  background: #f1f5f9;
  color: #0f172a;
  border: 1.5px solid #cbd5e1;
}

.btn.secondary:hover {
  background: #e2e8f0;
}

.btn.danger {
  background: #fee2e2;
  color: #dc2626;
  border: 1.5px solid #fca5a5;
}

.btn.danger:hover {
  background: #fecaca;
}

.btn.is-loading {
  opacity: 0.8;
  pointer-events: none;
}

/* spinner inside button */
.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.65s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── NOTICE / ALERT ─────────────────────────────────────────── */
.notice {
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 600;
  display: none;
  margin-top: 14px;
  border-left: 4px solid var(--primary);
}

.notice.show {
  display: block;
}

.notice.success {
  background: #f1f5f9;
  color: #1e293b;
  border-color: #334155;
}

.notice.error {
  background: #fef2f2;
  color: #991b1b;
  border-color: var(--danger);
}

.notice.info {
  background: #eff6ff;
  color: #1e40af;
  border-color: #3b82f6;
}

.notice.warning {
  background: #fffbeb;
  color: #92400e;
  border-color: var(--gold);
}

/* ── STATUS BADGE / PILL ────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.pill.pending {
  background: #fef3c7;
  color: #92400e;
}

.pill.approved {
  background: #f1f5f9;
  color: #1e293b;
  border: 1px solid #cbd5e1;
}

.pill.rejected {
  background: #fee2e2;
  color: #991b1b;
}

.pill.done {
  background: #ede9fe;
  color: #5b21b6;
}

/* ── HISTORY CARDS ──────────────────────────────────────────── */
.history-item {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 18px;
  margin-bottom: 14px;
  transition: all var(--transition);
}

.history-item:hover {
  border-color: #334155;
  box-shadow: var(--shadow);
}

.history-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.history-item-code {
  font-size: 12px;
  font-weight: 800;
  color: #334155;
}

.history-item-type {
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
}

.history-item-date {
  font-size: 12px;
  color: var(--text-muted);
}

.history-item-notes {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 8px;
}

.history-admin-note {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-xs);
  padding: 10px 14px;
  font-size: 13px;
  color: #1e293b;
  margin-top: 10px;
}

/* ── SEARCH BAR ─────────────────────────────────────────────── */
.search-wrap {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.search-wrap input {
  flex: 1;
  padding: 12px 16px;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  outline: none;
  transition: all var(--transition);
  background: #ffffff;
}

.search-wrap input:focus {
  border-color: #334155;
  box-shadow: 0 0 0 3.5px rgba(51, 65, 85, 0.12);
}

.search-wrap .btn {
  flex-shrink: 0;
  width: auto;
  padding: 12px 22px;
}

/* ── SERVICE TYPES GRID ─────────────────────────────────────── */
.service-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.service-type-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.service-type-card:hover {
  background: #f1f5f9;
  border-color: #334155;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.service-type-card.selected {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  border-color: #1e293b;
  color: #fff;
  box-shadow: 0 6px 20px rgba(51, 65, 85, 0.35);
}

.service-type-card i {
  font-size: 26px;
  color: #475569;
  margin-bottom: 10px;
}

.service-type-card.selected i {
  color: #fff;
}

.service-type-card span {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  display: block;
  line-height: 1.35;
}

.service-type-card.selected span {
  color: #fff;
}

/* ── FOOTER ─────────────────────────────────────────────────── */
.footer {
  background: #0f172a;
  color: #94a3b8;
  text-align: center;
  padding: 28px 20px;
  font-size: 13.5px;
  border-top: 1px solid #1e293b;
}

.footer a {
  color: #cbd5e1;
  font-weight: 700;
}

.footer a:hover {
  color: #ffffff;
}

/* ── EMPTY STATE ────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 48px;
  opacity: 0.3;
  margin-bottom: 16px;
  color: #334155;
}

.empty-state h4 {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}

.empty-state p {
  font-size: 13.5px;
}

/* ── KOS-KOSAN DIRECTORY STYLING ────────────────────────────── */
.kos-filter-pills .kos-pill {
  padding: 8px 16px;
  border-radius: 999px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all var(--transition);
}

.kos-filter-pills .kos-pill:hover {
  border-color: #334155;
  color: #334155;
  background: #f1f5f9;
}

.kos-filter-pills .kos-pill.active {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  color: #ffffff;
  border-color: #1e293b;
  box-shadow: 0 4px 14px rgba(51, 65, 85, 0.35);
}

.kos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.kos-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
}

.kos-card:hover {
  transform: translateY(-4px);
  border-color: #334155;
  box-shadow: 0 12px 32px rgba(51, 65, 85, 0.18), 0 2px 6px rgba(15, 23, 42, 0.05);
}

.kos-card-thumb {
  height: 120px;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  padding: 14px;
}

.kos-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.kos-card-badge.putri {
  background: #fce7f3;
  color: #be185d;
}

.kos-card-badge.putra {
  background: #e0f2fe;
  color: #0369a1;
}

.kos-card-badge.campur {
  background: #fef3c7;
  color: #b45309;
}

.kos-card-price {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.85);
  color: #cbd5e1;
  backdrop-filter: blur(8px);
  padding: 5px 12px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.kos-card-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kos-card-name {
  font-size: 15.5px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
  line-height: 1.35;
}

.kos-card-info {
  font-size: 13px;
  color: #475569;
  margin-bottom: 6px;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  line-height: 1.5;
}

.kos-card-info i {
  color: #475569;
  margin-top: 3px;
  flex-shrink: 0;
}

.kos-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.btn-wa-kos {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  color: #ffffff;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12.5px;
  font-weight: 800;
  text-decoration: none;
  border: none;
  box-shadow: 0 4px 12px rgba(71, 85, 105, 0.3);
  transition: all 0.2s ease;
}

.btn-wa-kos:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(71, 85, 105, 0.4);
}

.btn-map-kos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #f1f5f9;
  color: #334155;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-map-kos:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* ── FILE FEEDBACK ──────────────────────────────────────────── */
.file-feedback {
  display: none;
  padding: 10px 14px;
  border-radius: var(--radius-xs);
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-top: 10px;
  align-items: center;
  gap: 8px;
}

.file-feedback.show {
  display: flex;
}

/* ── MODAL & OVERLAY SYSTEM ─────────────────────────────────── */
html.modal-open,
body.modal-open {
  overflow: hidden !important;
  height: 100vh !important;
  touch-action: none;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  opacity: 0;
  touch-action: none;
  overscroll-behavior: contain;
  transition: opacity 0.2s ease;
}

.overlay.show {
  display: flex !important;
  opacity: 1;
}

.modal,
.modal-box {
  background: #ffffff;
  border-radius: 20px;
  max-width: 560px;
  width: 92%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  padding: 22px 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.4);
  position: relative;
  animation: modalSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  box-sizing: border-box;
  overscroll-behavior: contain;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
  flex-shrink: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  overflow-y: auto;
  padding-right: 4px;
  max-height: 52vh;
  box-sizing: border-box;
}

.form-grid::-webkit-scrollbar,
.modal::-webkit-scrollbar,
.modal-box::-webkit-scrollbar {
  width: 6px;
}

.form-grid::-webkit-scrollbar-thumb,
.modal::-webkit-scrollbar-thumb,
.modal-box::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.form-grid::-webkit-scrollbar-thumb:hover,
.modal::-webkit-scrollbar-thumb:hover,
.modal-box::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close,
.btn-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  border: none;
  color: #64748b;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close:hover,
.btn-close:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: scale(1.08);
}

/* ── TOGGLE SWITCH SLIDER ───────────────────────────────────── */
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .25s ease;
  border-radius: 34px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .25s ease;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

input:checked+.toggle-slider {
  background-color: #475569;
}

input:checked+.toggle-slider:before {
  transform: translateX(20px);
}

/* ── UNIVERSAL CUSTOM ELEGANT DROPDOWN COMPONENT ─────────────── */
.custom-select-wrapper,
.custom-select-wrap {
  position: relative;
  width: 100%;
  user-select: none;
}

.custom-select-trigger {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  box-sizing: border-box;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.custom-select-trigger:hover {
  border-color: #475569;
  background: #f8fafc;
}

.custom-select-wrapper.open .custom-select-trigger,
.custom-select-wrap.open .custom-select-trigger {
  border-color: #475569;
  box-shadow: 0 0 0 4px rgba(71, 85, 105, 0.15);
  background: #ffffff;
}

.custom-select-trigger .arrow-icon,
.custom-select-trigger .select-arrow {
  font-size: 13px;
  color: #475569;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-select-wrapper.open .custom-select-trigger .arrow-icon,
.custom-select-wrapper.open .custom-select-trigger .select-arrow,
.custom-select-wrap.open .custom-select-trigger .arrow-icon,
.custom-select-wrap.open .custom-select-trigger .select-arrow {
  transform: rotate(180deg);
}

.custom-select-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 14px;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(0, 0, 0, 0.04);
  padding: 6px;
  z-index: 99999;
  display: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 260px;
  overflow-y: auto;
}

.custom-select-wrapper.open .custom-select-options,
.custom-select-wrap.open .custom-select-options {
  display: block !important;
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.custom-select-option {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: all 0.15s ease;
  margin-bottom: 2px;
  white-space: normal;
}

.custom-select-option span {
  display: inline-flex;
  align-items: center;
  white-space: normal;
  line-height: 1.35;
}

.custom-select-option:last-child {
  margin-bottom: 0;
}

.custom-select-option:hover {
  background: #f1f5f9;
  color: #334155;
}

.custom-select-option.selected {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  color: #ffffff;
  font-weight: 800;
}

.custom-select-option.selected i {
  color: #ffffff !important;
}

.custom-select-option.selected .check-icon {
  display: inline-block;
}

.custom-select-option .check-icon {
  display: none;
  font-size: 13px;
}

/* ── ADMIN DASHBOARD SPECIFIC ───────────────────────────────── */
.admin-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

.admin-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-header-bar h2 {
  font-size: 22px;
  font-weight: 900;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-header-bar h2 i {
  color: #475569;
}

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

.stat-card {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
}

.stat-card .s-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-card .s-val {
  font-size: 30px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1;
}

.stat-card .s-lbl {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 700;
  margin-top: 3px;
}

/* Admin Table */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
}

table.desa-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 900px;
}

table.desa-table thead tr {
  background: #f8fafc;
}

table.desa-table th {
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
}

table.desa-table td {
  padding: 15px 16px;
  font-size: 13.5px;
  color: var(--text);
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}

table.desa-table tbody tr:hover {
  background: #f8fafc;
}

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

/* Admin Login */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #334155 100%);
  padding: 20px;
}

.login-box {
  background: #fff;
  border-radius: 20px;
  padding: 40px 36px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo .logo-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #64748b, #475569);
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 28px;
  color: #fff;
  margin: 0 auto 12px;
  box-shadow: 0 8px 24px rgba(71, 85, 105, 0.4);
}

.login-logo h2 {
  font-size: 22px;
  font-weight: 900;
  color: #0f172a;
}

.login-logo p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── PKBM DIGITAL EXACT ADMIN NAVBAR & TABS (ALIGNMENT & SMOOTH ANIMATIONS) ── */
.header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-nav {
  background: #ffffff;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: 1200px;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
  border-top: 1px solid #f1f5f9;
}

.admin-nav::-webkit-scrollbar {
  display: none;
}

.nav-admin-btn {
  padding: 13px 0;
  border: none;
  background: transparent;
  border-radius: 0;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
  transition: color 0.25s ease, font-weight 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  position: relative;
  outline: none;
}

.nav-admin-btn i {
  font-size: 15px;
  color: #64748b;
  transition: color 0.25s ease, transform 0.25s ease;
}

.nav-admin-btn:hover {
  color: #334155;
  background: transparent;
}

.nav-admin-btn:hover i {
  color: #334155;
  transform: translateY(-1px);
}

.nav-admin-btn.active {
  color: #334155;
  font-weight: 800;
  background: transparent;
}

.nav-admin-btn.active i {
  color: #334155;
}

/* Smooth expanding underline indicator */
.nav-admin-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #475569 0%, #64748b 100%);
  border-radius: 3px 3px 0 0;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-admin-btn.active::after {
  width: 100%;
}

/* Tab content smooth butter-fade transition (NO JEGLEK / ZERO LAYOUT JUMP) */
#tabSurat,
#tabKos,
#tabStats {
  min-height: 460px;
  will-change: opacity;
}

.tab-content-anim {
  animation: tabButterFade 0.22s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes tabButterFade {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

/* ── ULTRA ELEGANT TABLE STYLING (.desa-table) ──────────────── */
/* ── ULTRA ELEGANT TABLE STYLING (.desa-table - NO HORIZONTAL SCROLLBAR) ── */
.table-wrap {
  width: 100%;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
  background: #ffffff;
  margin-top: 12px;
  box-sizing: border-box;
  overflow-x: hidden;
}

@media (max-width: 992px) {
  .table-wrap {
    overflow-x: auto;
  }
}

.desa-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: 'Outfit', sans-serif;
  table-layout: auto;
}

.desa-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 10px;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
  text-align: left;
}

.desa-table td {
  padding: 12px 10px;
  font-size: 12.5px;
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  transition: background 0.15s ease;
}

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

.desa-table tbody tr:hover td {
  background: #f8fafc;
}

/* Date Badge */
.date-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 3px 8px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

/* User Avatar & Email */
.user-avatar-img {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #cbd5e1;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.user-avatar-sm {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  color: #ffffff;
  display: inline-grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 800;
  flex-shrink: 0;
}

/* Surat Type Pill */
.surat-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f1f5f9;
  color: #334155;
  border: 1.5px solid #cbd5e1;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
}

/* Responsive */
@media (max-width: 640px) {
  .card {
    padding: 20px;
  }

  .stat-cards {
    grid-template-columns: 1fr 1fr;
  }

  .btn.primary {
    font-size: 13.5px;
    padding: 11px 18px;
  }
}