/* =====================================================
 * ROOT VARIABLES AND RESET
 * ===================================================== */
:root {
  --primary-color: #0369a1;
  --primary-light: #e0f2fe;
  --primary-gradient: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  --accent-color: #10b981;
  --accent-gradient: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  --bg-color: #f8fafc;
  --surface-color: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --soft-blue: #e0f2fe;
  --soft-orange: #ffedd5;
  --soft-green: #d1fae5;
  --soft-purple: #f3e8ff;
  --soft-teal: #ccfbf1;
  --soft-gray: #f1f5f9;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md:
    0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-premium:
    0 20px 25px -5px rgba(2, 132, 199, 0.1),
    0 10px 10px -5px rgba(2, 132, 199, 0.04);
}

body.dark-mode {
  --bg-color: #0f172a;
  --surface-color: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --soft-blue: rgba(2, 132, 199, 0.2);
  --soft-orange: rgba(234, 88, 12, 0.2);
  --soft-green: rgba(16, 185, 129, 0.2);
  --soft-purple: rgba(147, 51, 234, 0.2);
  --soft-teal: rgba(20, 184, 166, 0.2);
  --soft-gray: rgba(71, 85, 105, 0.2);
}

/* TIME-BASED THEMES */
body.theme-pagi {
  --bg-color: #ffffff;
  --surface-color: #f8fafc;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --primary-color: #0d9488;
  --primary-light: #ccfbf1;
  --primary-gradient: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}
body.theme-pagi .app-header {
  background-color: #ffffff;
}
body.theme-pagi .hero-map-card {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 40%, #14b8a6 100%);
}

body.theme-siang {
  --bg-color: #f0f9ff;
  --surface-color: #ffffff;
  --text-main: #0c4a6e;
  --text-muted: #0369a1;
  --border-color: #bae6fd;
  --primary-color: #0284c7;
  --primary-light: #e0f2fe;
  --primary-gradient: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
}
body.theme-siang .app-header {
  background-color: #f0f9ff;
}

body.theme-sore {
  --bg-color: #fff7ed;
  --surface-color: #ffffff;
  --text-main: #7c2d12;
  --text-muted: #9a3412;
  --border-color: #fed7aa;
  --primary-color: #ea580c;
  --primary-light: #ffedd5;
  --primary-gradient: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}
body.theme-sore .app-header {
  background-color: #fff7ed;
}
body.theme-sore .hero-map-card {
  background: linear-gradient(135deg, #9a3412 0%, #7c2d12 40%, #ea580c 100%);
}

body.theme-malam {
  --bg-color: #0f172a;
  --surface-color: #1e293b;
  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --primary-color: #818cf8;
  --primary-light: rgba(129, 140, 248, 0.15);
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
  --soft-blue: rgba(99, 102, 241, 0.2);
  --soft-orange: rgba(251, 146, 60, 0.2);
  --soft-green: rgba(52, 211, 153, 0.2);
  --soft-purple: rgba(192, 132, 252, 0.2);
  --soft-teal: rgba(94, 234, 212, 0.2);
  --soft-gray: rgba(71, 85, 105, 0.3);
}
body.theme-malam .app-header {
  background-color: #0f172a;
}
body.theme-malam .hero-map-card {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #6366f1 100%);
}
body.theme-malam .bottom-nav {
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: "Outfit", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.5;
  overflow-x: hidden;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}

.unstyled-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
}

/* =====================================================
 * APP CONTAINER
 * ===================================================== */
.app-container {
  max-width: 480px;
  margin: 0 auto;
  background-color: var(--bg-color);
  min-height: 100vh;
  position: relative;
}

/* =====================================================
 * HEADER
 * ===================================================== */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 20px 16px;
  background-color: var(--bg-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar-container {
  position: relative;
}
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
  border: 2px solid var(--surface-color);
  box-shadow: var(--shadow-md);
}

.status-indicator {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  background-color: #10b981;
  border: 2px solid var(--bg-color);
  border-radius: 50%;
}

.greeting-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}
.user-name {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-main);
}
.header-right {
  display: flex;
  gap: 12px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--surface-color);
  border-radius: 12px;
  font-size: 1.4rem;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform 0.2s;
}
.icon-btn:active {
  transform: scale(0.95);
}

.icon-btn-sm {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-light);
  border-radius: 10px;
  font-size: 1.1rem;
  color: var(--primary-color);
  transition: transform 0.2s;
}
.icon-btn-sm:active {
  transform: scale(0.9);
}

.badge {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 8px;
  height: 8px;
  background-color: #ef4444;
  border-radius: 50%;
}

/* =====================================================
 * NOTIFICATION DROPDOWN
 * ===================================================== */
.notification-wrapper {
  position: relative;
}

.notif-dropdown {
  position: absolute;
  top: 54px;
  right: 0;
  width: 320px;
  background-color: var(--surface-color);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  z-index: 200;
  opacity: 0;
  transform: translateY(-10px) scale(0.96);
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
  display: flex;
  flex-direction: column;
  max-height: 420px;
}
.notif-dropdown.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
}
.notif-header h4 {
  font-size: 1rem;
  font-weight: 700;
}
.notif-mark-read {
  font-size: 0.75rem;
  color: var(--primary-color);
  font-weight: 600;
}

.notif-list-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.notif-list {
  padding: 0;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s;
  cursor: pointer;
  position: relative;
}
.notif-item:last-child {
  border-bottom: none;
}
.notif-item:hover {
  background-color: var(--soft-blue);
}

.notif-item.unread {
  background-color: rgba(2, 132, 199, 0.04);
}
.notif-item.unread::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background-color: var(--primary-color);
  border-radius: 50%;
}

.notif-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.notif-body {
  flex: 1;
}
.notif-text {
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--text-main);
  margin-bottom: 2px;
}
.notif-time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.notif-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 150;
  display: none;
}
.notif-overlay.active {
  display: block;
}

/* =====================================================
 * MAIN CONTENT
 * ===================================================== */
.main-content {
  padding: 0 20px;
}

/* =====================================================
 * HERO MAP CARD (unique design, not like article)
 * ===================================================== */
.hero-section {
  margin-top: 10px;
  margin-bottom: 24px;
}

.hero-map-card {
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0c4a6e 0%, #075985 40%, #0369a1 100%);
  padding: 28px 24px;
  color: white;
  box-shadow: 0 12px 30px rgba(3, 105, 161, 0.3);
}

.hero-map-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(
      circle at 20% 80%,
      rgba(255, 255, 255, 0.03) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(255, 255, 255, 0.05) 0%,
      transparent 40%
    );
  pointer-events: none;
}

.hero-map-card::after {
  content: "";
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.hero-map-content {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.hero-map-left {
  flex: 1;
}

.live-pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  margin-bottom: 14px;
  backdrop-filter: blur(10px);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.hero-map-left h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 6px;
  line-height: 1.2;
}
.hero-map-left p {
  font-size: 0.85rem;
  opacity: 0.85;
  margin-bottom: 18px;
}

.btn-hero-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  color: #0369a1;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.85rem;
  font-family: "Outfit";
  transition: transform 0.2s;
}
.btn-hero-action:active {
  transform: scale(0.96);
}

.hero-map-right {
  position: relative;
  width: 80px;
  height: 100px;
}

.floating-pin {
  position: absolute;
  font-size: 1.6rem;
  color: #ef4444;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  animation: float 3s ease-in-out infinite;
}
.pin-1 {
  top: 0;
  left: 10px;
  animation-delay: 0s;
}
.pin-2 {
  top: 30px;
  left: 40px;
  animation-delay: 1s;
  font-size: 1.2rem;
  opacity: 0.7;
}
.pin-3 {
  top: 60px;
  left: 5px;
  animation-delay: 2s;
  font-size: 1rem;
  opacity: 0.5;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* =====================================================
 * ARTICLE SLIDER WITH IMAGES
 * ===================================================== */
.article-section {
  margin-bottom: 28px;
}

.article-slider {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
}

.article-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform;
}

.article-slide {
  min-width: 100%;
}

.article-card-img {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  height: 220px;
  box-shadow: var(--shadow-lg);
}

.article-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.2) 60%,
    transparent 100%
  );
  padding: 20px;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
}

.article-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 8px;
  backdrop-filter: blur(10px);
  width: fit-content;
}

.article-card-overlay h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.3;
}
.article-card-overlay p {
  font-size: 0.78rem;
  opacity: 0.9;
  line-height: 1.4;
  margin-bottom: 10px;
}

.article-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  opacity: 0.85;
}
.article-card-footer span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.article-read {
  color: white;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
}
.article-read:hover {
  gap: 8px;
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--border-color);
  transition: all 0.3s;
  cursor: pointer;
}
.dot.active {
  width: 24px;
  border-radius: 4px;
  background-color: var(--primary-color);
}

/* =====================================================
 * SECTION STATS
 * ===================================================== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.section-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
}
.view-all {
  font-size: 0.85rem;
  color: var(--primary-color);
  font-weight: 600;
}

.stats-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 15px;
  margin-left: -20px;
  margin-right: -20px;
  padding-left: 20px;
  padding-right: 20px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.stats-scroll::-webkit-scrollbar {
  display: none;
}

.stat-card {
  min-width: 140px;
  background-color: var(--surface-color);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  scroll-snap-align: start;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s;
}
.stat-card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
}
.stat-card.blue::after {
  background-color: #3b82f6;
}
.stat-card.green::after {
  background-color: #10b981;
}
.stat-card.orange::after {
  background-color: #f59e0b;
}

.stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 12px;
}
.stat-card.blue .stat-icon {
  background-color: var(--soft-blue);
  color: #3b82f6;
}
.stat-card.green .stat-icon {
  background-color: var(--soft-green);
  color: #10b981;
}
.stat-card.orange .stat-icon {
  background-color: var(--soft-orange);
  color: #f59e0b;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* =====================================================
 * DASHBOARD GRID (redesigned, distinct from menu)
 * ===================================================== */
.dashboard-section {
  margin-bottom: 28px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dash-card {
  border-radius: 16px;
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.dash-blue {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}
.dash-green {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}
.dash-orange {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
}
.dash-red {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

body.dark-mode .dash-blue {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.15) 0%,
    rgba(59, 130, 246, 0.08) 100%
  );
}
body.dark-mode .dash-green {
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.15) 0%,
    rgba(16, 185, 129, 0.08) 100%
  );
}
body.dark-mode .dash-orange {
  background: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.15) 0%,
    rgba(245, 158, 11, 0.08) 100%
  );
}
body.dark-mode .dash-red {
  background: linear-gradient(
    135deg,
    rgba(239, 68, 68, 0.15) 0%,
    rgba(239, 68, 68, 0.08) 100%
  );
}

.dash-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.dash-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.dash-blue .dash-icon {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}
.dash-green .dash-icon {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}
.dash-orange .dash-icon {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}
.dash-red .dash-icon {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.dash-trend {
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  border-radius: 6px;
}
.dash-trend.up {
  color: #059669;
  background: rgba(16, 185, 129, 0.12);
}
.dash-trend.down {
  color: #ea580c;
  background: rgba(245, 158, 11, 0.12);
}

.dash-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: 2px;
}

.dash-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 10px;
}

.dash-bar {
  height: 4px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 2px;
  overflow: hidden;
}
body.dark-mode .dash-bar {
  background: rgba(255, 255, 255, 0.1);
}

.dash-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 1s ease;
}
.dash-blue .dash-bar-fill {
  background: #3b82f6;
}
.dash-green .dash-bar-fill {
  background: #10b981;
}
.dash-orange .dash-bar-fill {
  background: #f59e0b;
}
.dash-red .dash-bar-fill {
  background: #ef4444;
}

/* =====================================================
 * MENU GRID
 * ===================================================== */
.menu-section {
  margin-top: 24px;
}
.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 12px;
}

.menu-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}
.menu-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.pulse-hover:active .menu-icon-wrap {
  transform: scale(0.9);
}
.menu-item span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-main);
}

.bg-soft-blue {
  background-color: var(--soft-blue);
  color: #0284c7;
}
.bg-soft-orange {
  background-color: var(--soft-orange);
  color: #ea580c;
}
.bg-soft-green {
  background-color: var(--soft-green);
  color: #059669;
}
.bg-soft-purple {
  background-color: var(--soft-purple);
  color: #7e22ce;
}
.bg-soft-teal {
  background-color: var(--soft-teal);
  color: #0f766e;
}
.bg-soft-gray {
  background-color: var(--border-color);
  color: #475569;
}

/* =====================================================
 * BOTTOM NAV
 * ===================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background-color: var(--surface-color);
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding: 8px 6px 14px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  z-index: 99;
}
body.dark-mode .bottom-nav {
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  transition: color 0.3s;
  flex: 1;
}
.nav-item i {
  font-size: 1.5rem;
}
.nav-item span {
  font-size: 0.65rem;
  font-weight: 500;
}
.nav-item.active {
  color: var(--primary-color);
}

.nav-fab-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  top: -16px;
}

.fab-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border: 3px solid var(--bg-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35);
  cursor: pointer;
  transition: transform 0.2s;
  font-size: 1.4rem;
}
.fab-btn:active {
  transform: scale(0.9);
}

.fab-label {
  font-size: 0.6rem;
  font-weight: 600;
  color: #ef4444;
  margin-top: 4px;
  white-space: nowrap;
}

/* =====================================================
 * GLASSMORPHISM MODAL
 * ===================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-glass {
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  border-top-left-radius: 28px;
  border-top-right-radius: 28px;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
body.dark-mode .modal-glass {
  background: rgba(30, 41, 59, 0.95);
}

.modal-overlay.active .modal-glass {
  transform: translateY(0);
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--border-color);
  border-radius: 4px;
  margin: 10px auto 0;
}

.modal-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 12px;
}
.modal-header-bar h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}
.modal-close {
  font-size: 1.2rem;
  color: var(--text-muted);
}

.modal-body-scroll {
  overflow-y: auto;
  padding: 0 20px 30px;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

.chart-card {
  background: var(--surface-color);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.chart-card h4 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.chart-card h4 i {
  color: var(--primary-color);
}

.table-responsive {
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.data-table th {
  background: var(--primary-light);
  color: var(--primary-color);
  padding: 10px 8px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}
.data-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}
.data-table tr:hover td {
  background: var(--soft-blue);
}

/* =====================================================
 * SIDEBAR / OFFCANVAS
 * ===================================================== */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  position: fixed;
  top: 0;
  left: -300px;
  width: 280px;
  height: 100vh;
  background-color: var(--surface-color);
  z-index: 1001;
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.sidebar.active {
  left: 0;
}

.sidebar-header {
  padding: 30px 20px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}
.sidebar-logo {
  width: 140px;
  object-fit: contain;
}
.close-sidebar {
  font-size: 1.25rem;
  color: var(--text-muted);
}

.sidebar-content {
  flex: 1;
  padding: 20px 0;
  overflow-y: auto;
}

.sidebar-menu li a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-main);
  transition: background-color 0.2s;
}
.sidebar-menu li a i {
  font-size: 1.4rem;
  color: var(--primary-color);
}
.sidebar-menu li a:hover,
.sidebar-menu li a:active {
  background-color: var(--soft-blue);
}

.badge-new {
  background-color: #ef4444;
  color: white;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: auto;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
}
.theme-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
}

.mt-4 {
  margin-top: 24px;
}
.mt-3 {
  margin-top: 12px;
}
.mt-2 {
  margin-top: 8px;
}
.mb-3 {
  margin-bottom: 16px;
}

.btn-logout {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #ef4444;
  background: transparent;
  color: #ef4444;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.copyright {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* =====================================================
 * TOGGLE SWITCH
 * ===================================================== */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.4s;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
}
input:checked + .slider {
  background-color: var(--primary-color);
}
input:checked + .slider:before {
  transform: translateX(20px);
}
.slider.round {
  border-radius: 34px;
}
.slider.round:before {
  border-radius: 50%;
}

/* =====================================================
 * PAGE HEADER (sub-pages)
 * ===================================================== */
.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
  background: var(--bg-color);
  position: sticky;
  top: 0;
  z-index: 100;
}
.page-header .back-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-color);
  border-radius: 12px;
  font-size: 1.2rem;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}
.page-header .back-btn:active {
  transform: scale(0.9);
}
.page-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
}

/* =====================================================
 * FORM STYLES (skrining page)
 * ===================================================== */
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  font-size: 0.95rem;
  font-family: "Outfit";
  background: var(--surface-color);
  color: var(--text-main);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.1);
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-submit {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background: var(--primary-gradient);
  color: white;
  font-size: 1rem;
  font-weight: 700;
  font-family: "Outfit";
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-submit:active {
  transform: scale(0.98);
}

.form-card {
  background: var(--surface-color);
  border-radius: 20px;
  padding: 24px 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.form-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.radio-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.radio-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
}
.radio-pill input {
  display: none;
}
.radio-pill.selected,
.radio-pill:has(input:checked) {
  border-color: var(--primary-color);
  background: var(--primary-light);
  color: var(--primary-color);
}

/* =====================================================
 * MAP PAGE
 * ===================================================== */
.map-container {
  width: 100%;
  height: calc(100vh - 140px);
  border-radius: 0;
}

.map-filter-bar {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.map-filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1.5px solid var(--border-color);
  background: var(--surface-color);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.filter-chip.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* =====================================================
 * ARTICLE LIST PAGE
 * ===================================================== */
.article-list-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}
.article-list-item:last-child {
  border-bottom: none;
}

.article-thumb {
  width: 90px;
  height: 70px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}
.article-list-body {
  flex: 1;
}
.article-list-body h4 {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
}
.article-list-body p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 6px;
}
.article-list-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.search-box {
  position: relative;
  margin-bottom: 16px;
}
.search-box input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  font-size: 0.9rem;
  font-family: "Outfit";
  background: var(--surface-color);
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s;
}
.search-box input:focus {
  border-color: var(--primary-color);
}
.search-box i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* =====================================================
 * KONSULTASI PAGE
 * ===================================================== */
.contact-card {
  background: var(--surface-color);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
  display: flex;
  gap: 14px;
  align-items: center;
  transition: transform 0.2s;
}
.contact-card:active {
  transform: scale(0.98);
}

.contact-avatar {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--soft-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--primary-color);
  font-weight: 700;
  flex-shrink: 0;
}

.contact-info {
  flex: 1;
}
.contact-info h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 2px;
}
.contact-info p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.contact-action {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #25d366;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* =====================================================
 * PASIEN TABLE
 * ===================================================== */
.patient-card {
  background: var(--surface-color);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}
.patient-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.patient-name {
  font-size: 0.95rem;
  font-weight: 700;
}
.patient-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
}
.badge-aktif {
  background: var(--soft-green);
  color: #059669;
}
.badge-selesai {
  background: var(--soft-blue);
  color: #0284c7;
}
.badge-putus {
  background: var(--soft-orange);
  color: #ea580c;
}

.patient-detail-row {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.8rem;
}
.patient-detail-label {
  color: var(--text-muted);
  min-width: 90px;
}
.patient-detail-value {
  color: var(--text-main);
  font-weight: 500;
}

.tab-bar {
  display: flex;
  gap: 4px;
  background: var(--soft-gray);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 16px;
}
.tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: transparent;
  font-family: "Outfit";
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.tab-btn.active {
  background: var(--surface-color);
  color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
}
.empty-state i {
  font-size: 3rem;
  color: var(--border-color);
  margin-bottom: 12px;
}
.empty-state p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* =====================================================
 * WATERMARK EFFECT
 * ===================================================== */
.watermark-bondowoso {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  font-size: 3rem;
  font-weight: 900;
  color: rgba(0, 0, 0, 0.03);
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
  letter-spacing: 5px;
  text-transform: uppercase;
}
