﻿/* =========================================
   1. GLOBAL & VARIABLES
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --primary-color: #0745A8;
  /* Biru Utama RS */
  --primary-dark: #053380;
  /* Biru Gelap */
  --secondary-color: #42C91C;
  /* Hijau/BPJS */
  --bg-color: #f4f7f6;
  /* Background Abu Muda */
  --card-bg: #ffffff;
  --text-dark: #333333;
  --text-muted: #888888;
  --danger-color: #e74c3c;
  --warning-bg: #fff3cd;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-dark);
  padding-bottom: 80px;
  /* Space untuk footer jika ada */
}

a {
  text-decoration: none;
}

/* =========================================
   2. HEADERS
   ========================================= */
/* Header Utama (Index) */
.app-header {
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Header Lokal (Halaman Internal) */
.local-header {
  background: white;
  padding: 15px 0;
  margin-bottom: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  border-radius: 0 0 15px 15px;
}

.header-logos {
  height: 40px;
  object-fit: contain;
}

/* Banner Image di Home */
.hero-banner {
  margin-top: 10px;
  margin-bottom: 20px;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* =========================================
   3. BUTTONS
   ========================================= */
/* Tombol Back Merah */
.btn-back-custom {
  background-color: var(--danger-color);
  color: white;
  border-radius: 50px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 4px 6px rgba(231, 76, 60, 0.3);
  border: none;
  margin-bottom: 15px;
  transition: background 0.2s;
}

.btn-back-custom:hover {
  background-color: #c0392b;
  color: white;
}

/* Tombol Pilihan Besar (List Menu) */
.btn-custom-lg {
  padding: 15px 20px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid rgba(0, 0, 0, 0.05);
  background-color: #fff;
}

.btn-custom-lg:active {
  transform: scale(0.98);
}

.btn-custom-lg:hover {
  transform: translateY(-2px);
  background-color: #f8f9fa;
}

/* Varian Tombol Besar */
.btn-umum {
  color: var(--primary-color);
}

.btn-relasi {
  color: #e67e22;
}

.btn-success-custom {
  background-color: var(--secondary-color);
  color: white;
  border: none;
  box-shadow: 0 4px 6px rgba(66, 201, 28, 0.3);
}

.btn-success-custom:hover {
  color: white;
  background-color: #36a815;
}

.btn-primary-outline {
  background-color: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

/* =========================================
   4. CARDS & CONTAINERS
   ========================================= */
/* Kartu Utama (Wrapper Putih Besar) */
.main-card,
.form-card {
  border: none;
  border-radius: 20px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  background-color: white;
  overflow: hidden;
}

/* Kartu Menu Dashboard (Home) */
.menu-card {
  background: #fff;
  border-radius: 15px;
  padding: 20px 10px;
  height: 100%;
  text-align: center;
  text-decoration: none;
  color: var(--text-dark);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02), 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.menu-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
  color: var(--primary-color);
}

.menu-icon {
  width: 50px;
  height: 50px;
  object-fit: contain;
  margin-bottom: 12px;
}

.menu-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.2;
}

.menu-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =========================================
   5. PROFILE SECTION
   ========================================= */
.profile-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 20px;
  border-radius: 15px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  /* Jika ingin centered (opsional tambahkan class text-center di HTML) */
}

.profile-section.text-center {
  flex-direction: column;
  justify-content: center;
}

.profile-avatar {
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-right: 15px;
  color: white;
}

.profile-section.text-center .profile-avatar {
  margin-right: 0;
  margin-bottom: 15px;
  width: 80px;
  height: 80px;
  font-size: 40px;
}

/* =========================================
   6. FORMS & INPUTS
   ========================================= */
.form-control-lg {
  font-size: 16px;
  border-radius: 10px;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
}

.form-control-lg:focus {
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(7, 69, 168, 0.1);
  border-color: var(--primary-color);
}

/* Custom Radio Button menjadi Toggle */
.btn-check:checked+.btn-outline-primary {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Search Box (Poli) */
.search-container {
  position: relative;
  margin-bottom: 20px;
}

.search-input {
  border-radius: 50px;
  padding: 12px 20px 12px 45px;
  border: 1px solid #ddd;
  width: 100%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
  transition: all 0.3s;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(7, 69, 168, 0.1);
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
}

/* =========================================
   7. POLI LIST (GRID)
   ========================================= */
.poli-card {
  display: block;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  text-decoration: none;
  color: var(--text-dark);
  transition: all 0.2s;
  height: 100%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.poli-card:hover,
.poli-card:active {
  background-color: #f0f7ff;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(7, 69, 168, 0.1);
}

.poli-icon {
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 8px;
}

.poli-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  text-transform: uppercase;
}

/* =========================================
   8. FOOTER & UTILS
   ========================================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #fff;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  padding: 10px;
  z-index: 1000;
}

.btn-satisfaction {
  background: var(--primary-color);
  color: white;
  width: 100%;
  border-radius: 12px;
  padding: 12px;
  font-weight: 500;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.btn-satisfaction:hover {
  color: white;
  background: var(--primary-dark);
}

@media print {

  .no-print,
  .no-print * {
    display: none !important;
  }
}

/* =========================================
   9. REGISTRATION FORM SPECIFIC
   ========================================= */

/* Action Links (Menu WhatsApp & Batal) */
.action-links .btn {
  border-radius: 12px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 12px 15px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.action-links .btn i {
  width: 30px;
  text-align: center;
  margin-right: 12px;
}

.action-links .btn:hover {
  background-color: #fff !important;
  transform: translateX(5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

/* Input Group Styles */
.input-group-text {
  border-radius: 12px 0 0 12px !important;
  background-color: #f8f9fa;
}

#tglLahir {
  border-radius: 0 12px 12px 0 !important;
}

/* Badge atau Info Text */
.form-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 5px;
}

/* Alert Spacing */
.alert {
  border-radius: 15px;
  border: none;
}

/* =========================================
   STYLE TOMBOL KEMBALI MODERN
   ========================================= */

/* Gaya Utama: Tombol Melayang (Floating Feel) */
.btn-back-modern {
  background-color: var(--danger-color);
  /* Merah sesuai permintaan sebelumnya */
  color: white !important;
  border-radius: 50px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  /* Jarak antara ikon dan teks */
  border: none;
  box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

.btn-back-modern:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(231, 76, 60, 0.4);
}

.btn-back-modern:active {
  transform: scale(0.95);
}

/* Gaya Minimalis: Hanya Outline (Jika ingin tampilan lebih bersih) */
.btn-back-outline {
  background-color: transparent;
  color: var(--text-muted) !important;
  border: 1px solid #ddd;
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}

.btn-back-outline:hover {
  background-color: #eee;
  color: var(--text-dark) !important;
}

/* Tambahkan ini di custom.css jika belum ada */
.btn-back-custom {
  background-color: var(--danger-color);
  color: white !important;
  border-radius: 50px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  border: none;
  box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

.btn-back-custom:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
}

.doctor-card {
  background: #fff;
  border-radius: 15px;
  padding: 15px;
  margin-bottom: 12px;
  border: 1px solid #edf2f7;
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.doctor-card:active {
  background-color: #f0f7ff;
  transform: scale(0.98);
}

.doctor-avatar {
  width: 55px;
  height: 55px;
  background: #eef4ff;
  color: #0745A8;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-right: 15px;
}

.doctor-info h6 {
  margin: 0;
  font-weight: 600;
  color: #2d3748;
  font-size: 0.95rem;
}

.doctor-info span {
  font-size: 0.8rem;
  color: #718096;
}

.schedule-card {
  background: #fff;
  border-radius: 15px;
  padding: 15px;
  margin-bottom: 12px;
  border: 1px solid #edf2f7;
  display: flex;
  align-items: center;
  text-decoration: none !important;
  color: inherit;
  transition: all 0.2s;
}

.schedule-card.disabled {
  background-color: #f8f9fa;
  opacity: 0.7;
  pointer-events: none;
  /*border-left: 5px solid #cbd5e0;*/
}

.schedule-card.available {
  /*border-left: 5px solid #42C91C;*/
}

.date-box {
  min-width: 65px;
  text-align: center;
  padding-right: 15px;
  border-right: 1px solid #eee;
  margin-right: 15px;
}

.date-box .day {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #718096;
}

.date-box .date {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1;
}

.date-box .month {
  font-size: 0.7rem;
  color: #718096;
}

.status-tag {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 50px;
  font-weight: 600;
}

.bg-tutup {
  background: #fed7d7;
  color: #c53030;
}

.bg-penuh {
  background: #feebc8;
  color: #c05621;
}

.ticket-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  margin: 0 auto;
}

.ticket-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 25px;
  text-align: center;
}

.ticket-body {
  padding: 30px;
  position: relative;
}

/* Garis Putus-putus Tiket */
.ticket-divider {
  height: 2px;
  border-top: 2px dashed #e2e8f0;
  margin: 20px 0;
  position: relative;
}

.ticket-divider::before,
.ticket-divider::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: #f0f2f5;
  border-radius: 50%;
  top: -11px;
}

.ticket-divider::before {
  left: -40px;
}

.ticket-divider::after {
  right: -40px;
}

.antrian-number {
  font-size: 4rem;
  font-weight: 800;
  color: var(--primary-color);
  line-height: 1;
  margin: 10px 0;
}

.label-ticket {
  font-size: 0.75rem;
  color: #718096;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.value-ticket {
  font-size: 1rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 15px;
}

.info-note {
  background: #fff5f5;
  color: #c53030;
  padding: 10px;
  border-radius: 10px;
  font-size: 0.8rem;
  border: 1px solid #feb2b2;
}

.booking-card {
  background: #fff;
  border-radius: 15px;
  border: 1px solid #e2e8f0;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.booking-header {
  background: #f8fafc;
  padding: 10px 15px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status-badge {
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 50px;
  font-weight: 700;
  text-transform: uppercase;
}

.bg-pending {
  background: #e2e8f0;
  color: #475569;
}

.bg-valid {
  background: #dcfce7;
  color: #166534;
}

.bg-invalid {
  background: #fee2e2;
  color: #991b1b;
}

#heroCarousel {
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

#heroCarousel .carousel-item img {
  height: auto;
  max-height: 250px;
  /* Batasi tinggi banner di mobile agar tidak terlalu besar */
  object-fit: cover;
}

.carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  /* Membuat indikator jadi bulat */
  background-color: var(--primary-color);
}

.text-shadow {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

@media (max-width: 576px) {
  #heroCarousel .carousel-item img {
    max-height: 180px;
    /* Ukuran lebih kecil untuk layar HP */
  }
}