/* ===================================================================
   UKS DIGITAL MAN 2 GRESIK - MODERN RESPONSIVE UI STYLESHEET
   Kombinasi Modern Emerald & Medical Teal (Responsive PC & HP)
   =================================================================== */

:root {
  --primary-green: #047857;
  --primary-dark: #064e3b;
  --primary-light: #10b981;
  --primary-bg: #ecfdf5;

  --teal-accent: #0d9488;
  --teal-light: #f0fdfa;

  --warning-amber: #d97706;
  --danger-crimson: #dc2626;

  --text-dark: #0f172a;
  --text-muted: #64748b;
  --bg-light: #f8fafc;
  --card-border: rgba(226, 232, 240, 0.9);
  
  --shadow-card: 0 4px 15px -1px rgba(0, 0, 0, 0.06), 0 2px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 12px 24px -4px rgba(4, 120, 87, 0.15);
}

html, body {
  overflow-x: clip;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
}

/* ==========================================
   TICKER HIMBAUAN KESEHATAN
   ========================================== */
.ticker-wrap {
  background: linear-gradient(90deg, #991b1b, #dc2626);
  color: #ffffff;
  padding: 8px 0;
  font-size: 0.85rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.ticker-badge {
  background: #ffffff;
  color: #dc2626;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 2px 10px;
  border-radius: 50px;
  text-transform: uppercase;
  margin-right: 12px;
  white-space: nowrap;
}
.ticker-marquee {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================
   NAVBAR
   ========================================== */
.navbar-custom {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.navbar-brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary-green), var(--teal-accent));
  color: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 10px rgba(4, 120, 87, 0.2);
  flex-shrink: 0;
}
.navbar-custom .nav-link {
  font-weight: 600;
  color: #334155 !important;
  font-size: 0.88rem;
  padding: 7px 11px !important;
  white-space: nowrap !important;
  border-radius: 8px;
  transition: all 0.2s ease;
}
.navbar-custom .nav-link:hover {
  color: var(--primary-green) !important;
  background: rgba(4, 120, 87, 0.05);
}
.navbar-custom .nav-link.active {
  color: var(--primary-green) !important;
  font-weight: 700;
  background: rgba(4, 120, 87, 0.08);
}
.btn-nav-portal {
  background: linear-gradient(135deg, var(--primary-green), var(--teal-accent));
  color: #fff !important;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 18px !important;
  border-radius: 50px;
  border: none;
  box-shadow: 0 4px 12px rgba(4, 120, 87, 0.25);
  transition: all 0.25s ease;
  white-space: nowrap !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  line-height: 1.4;
}
.btn-nav-portal:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(4, 120, 87, 0.35);
  color: #fff !important;
}

@media (max-width: 1199.98px) {
  .navbar-collapse {
    background: #ffffff;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    border: 1px solid var(--card-border);
    margin-top: 12px;
  }
  .navbar-custom .nav-link {
    padding: 10px 14px !important;
  }
  .btn-nav-portal {
    width: 100%;
    margin-top: 8px;
    padding: 10px 18px !important;
  }
}

/* Penyesuaian Desktop (1200px - 1399.98px) agar menu tidak terpotong */
@media (min-width: 1200px) and (max-width: 1399.98px) {
  .navbar-custom {
    padding-top: 0.45rem !important;
    padding-bottom: 0.45rem !important;
  }
  .navbar-brand {
    gap: 8px !important;
  }
  .web-brand-logo-img {
    height: 30px !important;
    max-width: 32px !important;
  }
  .navbar-brand-icon {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    border-radius: 10px;
  }
  .navbar-brand .brand-title {
    font-size: 0.88rem !important;
  }
  .navbar-brand .brand-subtitle {
    font-size: 0.70rem !important;
  }
  .navbar-custom .nav-link {
    font-size: 0.79rem !important;
    padding: 5px 6.5px !important;
    letter-spacing: -0.15px;
  }
  .navbar-custom .nav-link i {
    font-size: 0.74rem;
    margin-right: 3px !important;
  }
  .btn-nav-portal {
    font-size: 0.78rem !important;
    padding: 6px 12px !important;
    gap: 5px;
    box-shadow: 0 2px 8px rgba(4, 120, 87, 0.2);
  }
  .btn-nav-portal i {
    font-size: 0.78rem;
  }
}

/* Penyesuaian Layar Lebar (>= 1400px) */
@media (min-width: 1400px) {
  .navbar-custom .nav-link {
    font-size: 0.85rem !important;
    padding: 6px 9px !important;
  }
  .btn-nav-portal {
    font-size: 0.82rem !important;
    padding: 7px 15px !important;
  }
}

/* ==========================================
   HERO BANNER
   ========================================== */
.hero-wrapper {
  background: radial-gradient(circle at top right, #e6fffa 0%, #f0fdf4 45%, #ffffff 100%);
  padding: 60px 0 50px;
  border-bottom: 1px solid var(--card-border);
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-bg);
  color: var(--primary-green);
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 18px;
}
.hero-title-text {
  font-size: 2.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.2;
  margin-bottom: 16px;
}
.hero-title-text span {
  background: linear-gradient(135deg, var(--primary-green), var(--teal-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-desc {
  font-size: 1.05rem;
  color: #475569;
  margin-bottom: 28px;
}
.btn-hero-primary {
  background: linear-gradient(135deg, var(--primary-green), var(--teal-accent));
  color: #fff;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 13px 26px;
  border-radius: 12px;
  border: none;
  box-shadow: 0 6px 16px rgba(4, 120, 87, 0.28);
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.btn-hero-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(4, 120, 87, 0.38);
}
.btn-hero-secondary {
  background: #fff;
  color: #334155;
  border: 1px solid #cbd5e1;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 13px 22px;
  border-radius: 12px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.btn-hero-secondary:hover {
  background: #f1f5f9;
  color: #0f172a;
}

/* KARTU STATUS HERO */
.status-card-box {
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  border: 1px solid var(--card-border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  position: relative;
}
.status-card-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary-green), var(--teal-accent), #f59e0b);
  border-radius: 20px 20px 0 0;
}
.stat-pill-active {
  background: #d1fae5;
  color: #065f46;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.stat-pill-active::before {
  content: '';
  width: 7px; height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 6px #10b981;
}

/* ==========================================
   TRIAS UKS CARDS
   ========================================== */
.card-trias {
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--card-border);
  padding: 30px 24px;
  box-shadow: var(--shadow-card);
  transition: all 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.card-trias:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}
.card-trias::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}
.card-trias-1::after { background: #10b981; }
.card-trias-2::after { background: #06b6d4; }
.card-trias-3::after { background: #f59e0b; }

.trias-icon-circle {
  width: 58px; height: 58px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  margin-bottom: 20px;
}
.card-trias-1 .trias-icon-circle { background: #d1fae5; color: #047857; }
.card-trias-2 .trias-icon-circle { background: #cffafe; color: #0891b2; }
.card-trias-3 .trias-icon-circle { background: #fef3c7; color: #b45309; }

/* ==========================================
   KALKULATOR IMT
   ========================================== */
.imt-section-box {
  background: #ffffff;
  border-radius: 20px;
  padding: 36px;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-card);
}
.imt-display-val {
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--primary-green);
  line-height: 1;
  margin: 10px 0;
}
.imt-badge-cat {
  font-size: 0.9rem;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 50px;
  display: inline-block;
  margin-bottom: 14px;
}

/* ==========================================
   ARTIKEL & BERITA CARDS
   ========================================== */
.card-article {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.card-article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.article-header-banner {
  height: 130px;
  background: linear-gradient(135deg, var(--primary-dark), var(--teal-accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  position: relative;
}
.badge-article-pos {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(255,255,255,0.92);
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
}

/* ==========================================
   ADMIN LAYOUT
   ========================================== */
.admin-sidebar-menu {
  background: #064e3b;
  color: #fff;
  min-height: 100vh;
}
.admin-sidebar-link {
  color: #d1fae5;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 10px 14px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-bottom: 4px;
}
.admin-sidebar-link:hover, .admin-sidebar-link.active {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}
.admin-content-area {
  background: #f8fafc;
  min-height: 100vh;
  padding: 24px;
}

/* ==========================================
   RESPONSIVE OPTIMIZATIONS (HP / MOBILE)
   ========================================== */
@media (max-width: 768px) {
  .hero-title-text {
    font-size: 1.95rem;
  }
  .hero-desc {
    font-size: 0.95rem;
  }
  .hero-wrapper {
    padding: 36px 0 30px;
  }
  .imt-section-box {
    padding: 24px 18px;
  }
  .card-trias {
    padding: 22px 18px;
  }
  .btn-hero-primary, .btn-hero-secondary {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================
   FLOATING WHATSAPP BUTTON (HOTLINE UKS)
   ========================================== */
.floating-whatsapp-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #ffffff !important;
  border-radius: 50px;
  padding: 12px 20px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  z-index: 1050;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 0.92rem;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.floating-whatsapp-btn:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 12px 28px rgba(37, 211, 102, 0.55);
  color: #ffffff !important;
}
.floating-whatsapp-btn i {
  font-size: 1.5rem;
}
@media (max-width: 576px) {
  .floating-whatsapp-btn {
    bottom: 18px;
    right: 18px;
    padding: 12px;
    border-radius: 50%;
    width: 54px;
    height: 54px;
    justify-content: center;
  }
  .floating-whatsapp-btn .floating-whatsapp-text {
    display: none;
  }
}

/* ==========================================
   TOMBOL AKSI ADMIN & PERBAIKAN HOVER
   ========================================== */
.btn-action-outline {
  background-color: #ffffff !important;
  border-width: 1.5px;
  transition: all 0.2s ease-in-out;
}
.btn-action-outline.btn-outline-success {
  color: #15803d !important;
  border-color: #86efac !important;
}
.btn-action-outline.btn-outline-success:hover {
  background-color: #15803d !important;
  color: #ffffff !important;
  border-color: #15803d !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(21, 128, 61, 0.25) !important;
}

.btn-action-outline.btn-outline-secondary {
  color: #334155 !important;
  border-color: #cbd5e1 !important;
}
.btn-action-outline.btn-outline-secondary:hover {
  background-color: #334155 !important;
  color: #ffffff !important;
  border-color: #334155 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(51, 65, 85, 0.25) !important;
}

.btn-action-outline.btn-outline-primary {
  color: #1d4ed8 !important;
  border-color: #93c5fd !important;
}
.btn-action-outline.btn-outline-primary:hover {
  background-color: #1d4ed8 !important;
  color: #ffffff !important;
  border-color: #1d4ed8 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.25) !important;
}

.btn-outline-secondary.bg-white:hover,
.btn-outline-secondary:hover {
  background-color: #64748b !important;
  color: #ffffff !important;
  border-color: #64748b !important;
}
.btn-outline-success.bg-white:hover,
.btn-outline-success:hover {
  background-color: #16a34a !important;
  color: #ffffff !important;
  border-color: #16a34a !important;
}
.btn-outline-primary.bg-white:hover,
.btn-outline-primary:hover {
  background-color: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
}

/* ===================================================================
   RESPONSIVE TABLE & USER-FRIENDLY MOBILE CARDS (PC & HP OPTIMIZED)
   =================================================================== */
.table-responsive {
  border-radius: 10px;
  -webkit-overflow-scrolling: touch;
}

/* Custom Sleek Scrollbar for Desktop Tables */
.table-responsive::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}
.table-responsive::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}
.table-responsive::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.table-responsive::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Polished Table Headers & Rows */
.table thead th {
  font-weight: 700;
  color: #475569;
  font-size: 0.76rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  border-bottom: 1.5px solid #e2e8f0;
  background-color: #f8fafc;
  padding: 10px 14px;
  white-space: nowrap;
}
.table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.table-hover tbody tr {
  transition: background-color 0.15s ease-in-out;
}
.table-hover tbody tr:hover {
  background-color: rgba(240, 253, 244, 0.65) !important;
}

/* Mobile Data Cards (Rendered on < 768px via d-block d-md-none) */
.mobile-data-card {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 14px 16px;
  transition: background-color 0.15s ease;
}
.mobile-data-card:last-child {
  border-bottom: none;
}
.mobile-data-card:hover {
  background-color: #f8fafc;
}
.mobile-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.mobile-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}
.mobile-card-subtitle {
  font-size: 0.74rem;
  color: #64748b;
  margin-top: 2px;
}
.mobile-card-body {
  font-size: 0.82rem;
  color: #334155;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mobile-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.8rem;
}
.mobile-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
}

/* ========================================================
   MODERN CLINIC MOBILE CARDS & FILTER PILLS
   ======================================================== */
@media (max-width: 767.98px) {
  .visit-card-mobile-container {
    padding: 12px 10px 24px 10px;
    background: #f1f5f9;
    border-radius: 0 0 16px 16px;
  }
  .mobile-visit-card {
    background: #ffffff !important;
    border-radius: 14px !important;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06) !important;
    border: 1px solid #e2e8f0 !important;
    margin-bottom: 12px !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
    overflow: hidden !important;
    position: relative;
  }
  .mobile-visit-card.card-status-berlangsung {
    border-left: 5px solid #f59e0b !important;
  }
  .mobile-visit-card.card-status-selesai {
    border-left: 5px solid #10b981 !important;
  }
  .mobile-visit-card.card-status-safe {
    border-left: 5px solid #10b981 !important;
  }
  .mobile-visit-card.card-status-warning {
    border-left: 5px solid #f59e0b !important;
  }
  .mobile-visit-card.card-status-danger {
    border-left: 5px solid #ef4444 !important;
  }
  .mobile-visit-card.card-status-primary {
    border-left: 5px solid #2563eb !important;
  }
  .mobile-visit-card.card-status-draft {
    border-left: 5px solid #94a3b8 !important;
  }
  .mobile-avatar-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
  }
  .mobile-avatar-circle.avatar-male {
    background: #eff6ff;
    color: #2563eb;
    border: 1.5px solid #dbeafe;
  }
  .mobile-avatar-circle.avatar-female {
    background: #fdf2f8;
    color: #db2777;
    border: 1.5px solid #fce7f3;
  }
  .mobile-avatar-circle.avatar-primary {
    background: #eff6ff;
    color: #2563eb;
    border: 1.5px solid #dbeafe;
  }
  .mobile-avatar-circle.avatar-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1.5px solid #bbf7d0;
  }
  .mobile-avatar-circle.avatar-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1.5px solid #fecaca;
  }
  .mobile-avatar-circle.avatar-warning {
    background: #fffbeb;
    color: #d97706;
    border: 1.5px solid #fde68a;
  }
  .mobile-avatar-circle.avatar-secondary {
    background: #f8fafc;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
  }
  .mobile-avatar-circle.avatar-purple {
    background: #faf5ff;
    color: #9333ea;
    border: 1.5px solid #f3e8ff;
  }
  .mobile-filter-pills-bar {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
  .mobile-filter-pills-bar::-webkit-scrollbar {
    display: none;
  }
  .mobile-filter-pill {
    border-radius: 50px;
    font-size: 0.74rem;
    padding: 5px 12px;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    font-weight: 500;
    transition: all 0.15s ease;
  }
  .mobile-filter-pill:hover, .mobile-filter-pill:active {
    color: #0f172a;
    background: #f8fafc;
  }
  .mobile-filter-pill.active {
    background: #0f172a !important;
    color: #ffffff !important;
    border-color: #0f172a !important;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
  }
  .mobile-filter-pill.active-warning {
    background: #d97706 !important;
    color: #ffffff !important;
    border-color: #d97706 !important;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.2);
  }
  .mobile-medical-box {
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: 10px;
    padding: 10px 12px;
  }
}

@media print {
  .print-table-wrapper {
    display: block !important;
  }
  .print-hide {
    display: none !important;
  }
}




