/* ============================================================
   RME Rojo Sunat — dr. Ahmad Dimiati
   Design: Modern · Clean · Mobile-First
   Palette: Merah Gradient + Emas + Putih
   ============================================================ */

:root {
  --red-dark:   #7F1D1D;
  --red:        #991B1B;
  --red-mid:    #B91C1C;
  --red-light:  #DC2626;
  --gold:       #E8C97A;
  --gold-dk:    #C9AA5A;
  --white:      #FFFFFF;
  --bg:         #FFF5F5;
  --card:       #FFFFFF;
  --border:     #FECACA;
  --text:       #1A1A1A;
  --text-2:     #444444;
  --text-3:     #888888;
  --success:    #16A34A;
  --success-bg: #DCFCE7;
  --danger:     #DC2626;
  --danger-bg:  #FEE2E2;
  --warning:    #D97706;
  --warning-bg: #FEF3C7;
  --sidebar-w:  260px;
  --topbar-h:   60px;
  --radius:     10px;
  --shadow:     0 2px 12px rgba(185,28,28,.08), 0 1px 3px rgba(0,0,0,.04);
  --shadow-sm:  0 1px 4px rgba(185,28,28,.06);

  /* Alias --navy → dark red supaya semua var(--navy) di PHP jadi merah */
  --navy:       #7F1D1D;
  --gold:       #E8C97A;   /* tetap emas untuk sidebar text & brand */
  --gold-dk:    #C9AA5A;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--red-mid); text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

/* ============================================================
   LAYOUT
   ============================================================ */
.sidebar {
  position: fixed;
  left: 0; top: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: linear-gradient(170deg, #5C0A0A 0%, #7F1D1D 45%, #991B1B 100%);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}

.main-wrap { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.page-content { padding: 1.5rem; flex: 1; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar-brand {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.brand-logo { display: flex; align-items: center; gap: .75rem; }
.brand-logo img {
  width: 42px; height: 42px;
  border-radius: 10px;
  object-fit: contain;
  background: white;
  padding: 3px;
}
.brand-text { color: white; }
.brand-text strong { display: block; font-size: 13px; line-height: 1.2; }
.brand-text span { font-size: 10px; color: var(--gold); opacity: .9; letter-spacing: .04em; text-transform: uppercase; }

.sidebar-nav { padding: .75rem 0; flex: 1; }

.nav-section {
  padding: .75rem 1.25rem .25rem;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1.25rem;
  color: rgba(255,255,255,.75);
  font-size: 13.5px;
  transition: background .15s, color .15s;
  border-left: 3px solid transparent;
  margin: 1px 0;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: white; }
.nav-item.active {
  background: rgba(232,201,122,.15);
  color: var(--gold);
  border-left-color: var(--gold);
  font-weight: 500;
}
.nav-item svg, .nav-item i { width: 18px; font-size: 18px; flex-shrink: 0; }

.sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 12px;
  color: rgba(255,255,255,.45);
}

.btn-ham { display: none; background: none; border: none; padding: .4rem; color: var(--text-2); }
.overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 150; }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar-title { font-size: 15px; font-weight: 600; flex: 1; color: var(--text); }
.topbar-user { display: flex; align-items: center; gap: .6rem; font-size: 13px; color: var(--text-2); }
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red-mid), var(--red-light));
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title { font-size: 14px; font-weight: 600; color: var(--text); }
.card-body { padding: 1.25rem; }

/* STAT CARDS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.stat-card-1 { background: linear-gradient(135deg, #B91C1C 0%, #DC2626 100%); }
.stat-card-2 { background: linear-gradient(135deg, #7F1D1D 0%, #B91C1C 100%); }
.stat-card-3 { background: linear-gradient(135deg, #92400E 0%, #D97706 100%); }

.stat-card::after {
  content: '';
  position: absolute;
  right: -15px; top: -15px;
  width: 70px; height: 70px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
}

.stat-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: rgba(255,255,255,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: white;
  flex-shrink: 0;
}

.stat-val   { font-size: 28px; font-weight: 700; line-height: 1; color: white; }
.stat-label { font-size: 12px; color: rgba(255,255,255,.8); margin-top: 2px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem 1.1rem;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  border: 1.5px solid transparent;
  transition: all .15s;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--red-mid), var(--red-light));
  color: white;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(185,28,28,.3);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--red), var(--red-mid)); }

.btn-gold {
  background: linear-gradient(135deg, #C9AA5A, #E8C97A);
  color: #1A1A1A;
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(232,201,122,.3);
}
.btn-gold:hover { background: linear-gradient(135deg, #B89A4A, #C9AA5A); }

.btn-outline {
  background: transparent;
  color: var(--red-mid);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--red-mid); background: var(--bg); }

.btn-danger { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.btn-danger:hover { background: var(--danger); color: white; }

.btn-sm { padding: .35rem .8rem; font-size: 12.5px; }
.btn-lg { padding: .75rem 1.5rem; font-size: 15px; }
.btn-full { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: .35rem; }
.form-label .req { color: var(--danger); margin-left: 2px; }

.form-control {
  display: block;
  width: 100%;
  padding: .65rem .9rem;
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  transition: border .15s, box-shadow .15s;
  appearance: none;
  font-family: inherit;
}
.form-control:focus {
  outline: none;
  border-color: var(--red-mid);
  box-shadow: 0 0 0 3px rgba(185,28,28,.1);
}
.form-control::placeholder { color: var(--text-3); }
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23444' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2.2rem;
}

.form-hint  { font-size: 11.5px; color: var(--text-3); margin-top: .25rem; }
.form-error { font-size: 11.5px; color: var(--danger); margin-top: .25rem; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Section headers */
.form-section { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; margin-bottom: 1.25rem; }
.form-section-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1.25rem;
  background: linear-gradient(90deg, var(--red-dark), var(--red-mid));
  color: white;
}
.section-badge {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--gold);
  color: #1A1A1A;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.form-section-title { font-size: 13px; font-weight: 600; }
.form-section-body  { padding: 1.1rem 1.25rem; }

/* ============================================================
   ANAMNESA TOGGLES
   ============================================================ */
.anamnesa-list { display: flex; flex-direction: column; gap: .5rem; }
.anamnesa-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem .9rem;
  background: #FFFAFA;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: border .15s;
}
.anamnesa-item.has-ya { border-color: var(--danger); background: var(--danger-bg); }
.anamnesa-q { font-size: 13px; color: var(--text); line-height: 1.45; flex: 1; }
.anamnesa-q .num { font-weight: 700; color: var(--red-mid); margin-right: .35rem; }

.toggle-group { display: flex; gap: .35rem; flex-shrink: 0; }
.toggle-btn {
  padding: .35rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: var(--white);
  color: var(--text-2);
  transition: all .15s;
}
.toggle-btn.ya:hover, .toggle-btn.ya.active { background: var(--danger); color: white; border-color: var(--danger); }
.toggle-btn.tdk:hover, .toggle-btn.tdk.active { background: var(--success); color: white; border-color: var(--success); }

/* ============================================================
   RADIO PILLS
   ============================================================ */
.radio-group { display: flex; flex-wrap: wrap; gap: .4rem; }
.radio-pill {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all .15s;
  color: var(--text-2);
}
.radio-pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-pill:hover { border-color: var(--red-mid); color: var(--red-mid); }
.radio-pill.checked { background: var(--red-mid); color: white; border-color: var(--red-mid); }

/* ============================================================
   SIGNATURE CANVAS
   ============================================================ */
.sig-wrap { border: 2px dashed var(--border); border-radius: 8px; position: relative; background: #fafafa; overflow: hidden; }
.sig-canvas { display: block; width: 100%; height: 160px; cursor: crosshair; touch-action: none; }
.sig-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem .75rem;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-3);
}
.sig-preview { display: none; width: 100%; height: 80px; object-fit: contain; border: 1px solid var(--border); border-radius: 6px; margin-top: .5rem; background: white; }

/* ============================================================
   PHOTO UPLOAD
   ============================================================ */
.foto-upload-area {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 1.5rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border .15s, background .15s;
  position: relative;
  background: var(--bg);
}
.foto-upload-area:hover, .foto-upload-area.drag-over { border-color: var(--red-mid); background: rgba(185,28,28,.03); }
.foto-upload-area input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.foto-icon { font-size: 28px; color: var(--text-3); margin-bottom: .4rem; }
.foto-text  { font-size: 12.5px; color: var(--text-2); }
.foto-hint  { font-size: 11px; color: var(--text-3); margin-top: .2rem; }
.foto-preview { display: none; width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.foto-preview[src]:not([src=""]) { display: block !important; }
.foto-upload-area.has-photo { border-color: #16a34a; background: rgba(22,163,74,.04); }
.foto-upload-area.has-photo .foto-icon { color: #16a34a; }
.foto-upload-area.drag-over { border-style: solid; }

/* ============================================================
   TABLE
   ============================================================ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

thead th {
  padding: .7rem 1rem;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-2);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody tr { border-bottom: 1px solid var(--border); transition: background .12s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:nth-child(even) { background: #FFFAFA; }
tbody tr:hover { background: rgba(185,28,28,.03); }
tbody td { padding: .8rem 1rem; vertical-align: middle; color: var(--text); }

/* No. RM — bold & accent */
.no-rm-badge {
  font-family: monospace;
  font-size: 12px;
  font-weight: 700;
  background: rgba(185,28,28,.08);
  color: #1A1A1A;
  padding: .2rem .55rem;
  border-radius: 5px;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .65rem;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  color: #1A1A1A;
}
.badge-navy    { background: #7F1D1D; color: white; }
.badge-gold    { background: rgba(232,201,122,.3); color: #1A1A1A; }
.badge-success { background: var(--success-bg); color: #166534; }
.badge-danger  { background: var(--danger-bg); color: #991b1b; }
.badge-warning { background: var(--warning-bg); color: #92400e; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  padding: .8rem 1.1rem;
  border-radius: 8px;
  font-size: 13.5px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 500;
  color: #1A1A1A;
}
.alert-success { background: var(--success-bg); border-left: 4px solid var(--success); }
.alert-danger  { background: var(--danger-bg);  border-left: 4px solid var(--danger); }
.alert-warning { background: var(--warning-bg); border-left: 4px solid var(--warning); }

/* ============================================================
   DETAIL VIEW
   ============================================================ */
.detail-row {
  display: flex;
  align-items: flex-start;
  padding: .65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.detail-row:last-child { border-bottom: none; }
.detail-key { width: 160px; color: var(--text-2); font-size: 12.5px; flex-shrink: 0; }
.detail-val { color: #1A1A1A; font-weight: 500; flex: 1; }

.foto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.foto-item label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: .4rem; }
.foto-item img { width: 100%; height: 180px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #7F1D1D 0%, #991B1B 40%, #B91C1C 70%, #C2410C 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.login-card {
  background: white;
  border-radius: 20px;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 25px 60px rgba(0,0,0,.25);
}
.login-logo { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.login-logo img { width: 56px; height: 56px; border-radius: 12px; object-fit: contain; }
.login-logo-text h1 { font-size: 16px; color: #1A1A1A; font-weight: 700; line-height: 1.2; }
.login-logo-text p  { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.login-title { font-size: 20px; font-weight: 700; color: #1A1A1A; margin-bottom: .3rem; }
.login-sub   { font-size: 13px; color: var(--text-2); margin-bottom: 1.5rem; }

/* ============================================================
   SEARCH
   ============================================================ */
.search-wrap { position: relative; }
.search-wrap input { padding-left: 2.4rem; }
.search-icon { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 15px; pointer-events: none; }

/* ============================================================
   METODE TINDAKAN
   ============================================================ */
.metode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.metode-card {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: .7rem .9rem;
  cursor: pointer;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-2);
  font-weight: 500;
  transition: all .15s;
}
.metode-card input { position: absolute; opacity: 0; }
.metode-card:hover { border-color: var(--red-mid); color: #1A1A1A; }
.metode-card.selected { background: var(--red-mid); color: white; border-color: var(--red-mid); font-weight: 600; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,.3); }
  .overlay.show { display: block; }
  .btn-ham { display: flex; align-items: center; justify-content: center; }
  .main-wrap { margin-left: 0; }
  .page-content { padding: 1rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .metode-grid { grid-template-columns: repeat(2, 1fr); }
  .foto-grid { grid-template-columns: 1fr; }
  .detail-key { width: 130px; }
  .topbar-user span { display: none; }
}

@media (max-width: 480px) {
  .login-card { padding: 1.75rem; }
  .metode-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  /* ===== RESET & LAYOUT ===== */
  @page { size: A4 portrait; margin: 8mm 10mm; }

  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

  .sidebar, .topbar, .no-print,
  .btn, button, a.btn { display: none !important; }

  body { font-size: 9px !important; line-height: 1.3 !important; color: #000 !important; background: white !important; }

  .main-wrap { margin: 0 !important; }
  .page-content { padding: 0 !important; }

  /* ===== CARD ===== */
  .card { box-shadow: none !important; border: 1px solid #ccc !important;
          margin-bottom: 5px !important; page-break-inside: avoid; }
  .card-header { padding: 5px 8px !important; }
  .card-body { padding: 5px 8px !important; }
  .card-title { font-size: 9px !important; font-weight: 700 !important; }

  /* ===== DETAIL ROWS ===== */
  .detail-row { padding: 2px 0 !important; border-bottom: 0.5px solid #eee !important;
                display: flex !important; }
  .detail-key { font-size: 8.5px !important; color: #666 !important;
                min-width: 110px !important; flex-shrink: 0 !important; }
  .detail-val { font-size: 8.5px !important; font-weight: 500 !important; }

  /* ===== HEADER RM (navy background) ===== */
  .card [style*="background:var(--navy)"],
  .card [style*="background: var(--navy)"] {
    background: #7F1D1D !important; color: white !important;
    padding: 6px 8px !important; border-radius: 5px 5px 0 0 !important;
  }

  /* ===== ANAMNESA — 2 KOLOM ===== */
  .anamnesa-list, div.anamnesa-list { columns: 2 !important; column-gap: 8px !important; }
  .anamnesa-item { break-inside: avoid !important; padding: 2px 0 !important;
                   font-size: 8px !important; display: flex !important;
                   justify-content: space-between !important; border-bottom: none !important; }
  .anamnesa-q { font-size: 8px !important; }
  .toggle-group { display: none !important; }

  /* ===== BADGE ===== */
  .badge { font-size: 7.5px !important; padding: 1px 5px !important;
           border-radius: 3px !important; border: 0.5px solid #ccc !important; }
  .badge-danger  { background: #fee2e2 !important; color: #991b1b !important; }
  .badge-success { background: #dcfce7 !important; color: #166534 !important; }
  .badge-navy    { background: #7F1D1D !important; color: white !important; }

  /* ===== TTD — SIDE BY SIDE ===== */
  .form-row { display: flex !important; gap: 8px !important; }
  .form-row > div { flex: 1 !important; }

  /* ===== TTD IMAGE ===== */
  img[src*="/ttd/"] { max-height: 40px !important; width: auto !important; }

  /* ===== FOTO GRID — 5 KOLOM KECIL ===== */
  [style*="grid-template-columns:repeat(5"] { 
    display: grid !important; grid-template-columns: repeat(5, 1fr) !important; gap: 3px !important;
  }
  [style*="grid-template-columns:repeat(5"] img {
    width: 100% !important; aspect-ratio: 1/1 !important; 
    object-fit: cover !important; border-radius: 3px !important;
  }

  /* ===== RADIO PILL (pemeriksaan fisik) ===== */
  .radio-group { display: flex !important; flex-wrap: wrap !important; gap: 3px !important; }
  .radio-pill  { font-size: 7.5px !important; padding: 1px 5px !important;
                 border: 0.5px solid #ccc !important; border-radius: 3px !important; }
  .radio-pill.checked { background: #7F1D1D !important; color: white !important; }
  .radio-pill input { display: none !important; }

  /* ===== FORM SECTION ===== */
  .form-section { margin-bottom: 5px !important; page-break-inside: avoid; }
  .form-section-header { padding: 4px 8px !important; }
  .form-section-title  { font-size: 9px !important; font-weight: 700 !important; }
  .section-badge { width: 16px !important; height: 16px !important; font-size: 8px !important; }
  .form-section-body { padding: 4px 8px !important; }

  /* ===== CATATAN ===== */
  .form-label { font-size: 8px !important; }
  textarea, input { display: none !important; }
}

/* ============================================================
   TAMBAHAN — FITUR BARU (Paket Tarif, Kalender, dll)
   ============================================================ */

/* Kalender Booking */
.cal-day {
  text-align: center;
  padding: 6px 2px;
  border-radius: 8px;
  display: block;
  transition: background .12s;
  text-decoration: none;
}
.cal-day:hover { background: rgba(185,28,28,.08); }
.cal-day.selected { background: var(--red-mid); }
.cal-day.selected .cal-num { color: white; }
.cal-day.selected .cal-count { color: rgba(255,255,255,.85); }
.cal-num { font-size: 12px; color: var(--text); }
.cal-count { font-size: 9px; font-weight: 700; color: var(--red-mid); margin-top: 1px; }

/* Booking status */
.status-menunggu   { background: #FEF3C7; color: #D97706; border: 1px solid #FDE68A; }
.status-konfirmasi { background: #DCFCE7; color: #16A34A; border: 1px solid #BBF7D0; }
.status-selesai    { background: #F3F4F6; color: #6B7280; border: 1px solid #E5E7EB; }
.status-batal      { background: #FEE2E2; color: #DC2626; border: 1px solid #FECACA; }

/* Tarif display */
.tarif-box {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: .9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tarif-total {
  font-size: 20px;
  font-weight: 800;
  color: var(--red-mid);
}
.tarif-coret {
  text-decoration: line-through;
  color: var(--text-3);
  font-size: 13px;
}

/* Paket card selected state */
.metode-card.selected {
  background: var(--red-mid) !important;
  color: white !important;
  border-color: var(--red-mid) !important;
}

/* Sidebar FORCE merah — override segala cache */
.sidebar {
  background: linear-gradient(180deg, #450a0a 0%, #7F1D1D 30%, #991B1B 60%, #B91C1C 100%) !important;
}
.nav-item.active {
  background: rgba(232,201,122,.15) !important;
  color: #E8C97A !important;
  border-left-color: #E8C97A !important;
}
.form-section-header {
  background: linear-gradient(90deg, #7F1D1D, #B91C1C) !important;
}
.stat-card-1 { background: linear-gradient(135deg, #B91C1C 0%, #DC2626 100%) !important; }
.stat-card-2 { background: linear-gradient(135deg, #7F1D1D 0%, #B91C1C 100%) !important; }
.stat-card-3 { background: linear-gradient(135deg, #92400E 0%, #D97706 100%) !important; }
.btn-primary {
  background: linear-gradient(135deg, #B91C1C, #DC2626) !important;
  color: white !important;
}
.btn-gold {
  background: linear-gradient(135deg, #C9AA5A, #E8C97A) !important;
  color: #1A1A1A !important;
}
.form-control:focus {
  border-color: #B91C1C !important;
  box-shadow: 0 0 0 3px rgba(185,28,28,.1) !important;
}
.avatar {
  background: linear-gradient(135deg, #B91C1C, #DC2626) !important;
  color: #E8C97A !important;
}

/* ============================================================
   MODERN RED REBRAND — UI improvements
   ============================================================ */

/* Sidebar nav - lebih modern */
.nav-item {
  border-radius: 8px !important;
  margin: 1px 8px !important;
  padding: .55rem .9rem !important;
  transition: background .15s, color .15s !important;
}
.nav-item.active {
  background: rgba(255,255,255,.18) !important;
  color: white !important;
  font-weight: 600 !important;
}
.nav-item:hover:not(.active) {
  background: rgba(255,255,255,.10) !important;
}

/* Card - lebih rounded dan clean */
.card {
  border-radius: 14px !important;
  border: 1px solid #FECACA !important;
  box-shadow: 0 1px 6px rgba(185,28,28,.07) !important;
}

/* Stats card - tambah gradient */
.stat-card {
  border-radius: 14px !important;
  border: none !important;
}

/* Form section header - merah bukan navy */
.form-section-header {
  background: linear-gradient(135deg, #7F1D1D, #B91C1C) !important;
  border-radius: 10px 10px 0 0 !important;
}

/* Section badge - merah */
.section-badge {
  background: rgba(255,255,255,.2) !important;
  color: white !important;
}

/* Button gold → red */
.btn-gold {
  background: linear-gradient(135deg, #B91C1C, #DC2626) !important;
  color: white !important;
  border: none !important;
}
.btn-gold:hover {
  background: linear-gradient(135deg, #991B1B, #B91C1C) !important;
  transform: translateY(-1px);
}

/* Badge navy → dark red */
.badge-navy {
  background: #7F1D1D !important;
  color: white !important;
}

/* Metode card selected */
.metode-card.selected {
  background: linear-gradient(135deg, #7F1D1D, #B91C1C) !important;
  color: white !important;
  border-color: #7F1D1D !important;
}
.metode-card.selected * { color: white !important; }

/* Toggle button active */
.toggle-btn.ya.active {
  background: #DC2626 !important;
  color: white !important;
}

/* Input focus */
.form-control:focus {
  border-color: #B91C1C !important;
  box-shadow: 0 0 0 3px rgba(185,28,28,.15) !important;
}

/* Alert */
.alert-success { border-left: 4px solid #16A34A; }
.alert-danger  { border-left: 4px solid #DC2626; }