/* ==========================================================================
   DESAIN SISTEM PREMIUM - KASIR KLINIK PIJAT
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  /* Palet Warna Premium (Forest Emerald & Warm Gold) */
  --bg: #f2f6f4;
  --ink: #121e17;
  --muted: #4e6356;
  --line: #d3dfd7;
  
  --brand: #0f4c3a;
  --brand-grad: linear-gradient(135deg, #0b3d2e 0%, #15624b 100%);
  --brand-ink: #ffffff;
  
  --accent: #c48b3c;
  --accent-grad: linear-gradient(135deg, #c48b3c 0%, #a26c26 100%);
  --accent-ink: #ffffff;
  
  --ok: #1c7a4d;
  --ok-bg: #e6f6ee;
  
  --warn: #b23b3b;
  --warn-bg: #fdf0f0;
  
  --card: #ffffff;
  --focus: #185adb;
  
  /* Efek & Transisi */
  --shadow: 0 8px 24px rgba(11, 61, 46, 0.05);
  --shadow-hover: 0 16px 36px rgba(11, 61, 46, 0.09);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-card: 16px;
  --radius-btn: 12px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", "Segoe UI", Tahoma, sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

/* Container utama */
.wrap {
  max-width: 600px;
  margin: 0 auto;
  padding: 24px 20px 120px;
}

/* AppBar / Header */
header.appbar {
  background: var(--brand-grad);
  color: var(--brand-ink);
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border-bottom: 3px solid var(--accent);
}

.appbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 10px;
  padding: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}

.appbar-titles {
  display: flex;
  flex-direction: column;
}

header.appbar h1 {
  font-family: "Outfit", sans-serif;
  font-size: 1.25rem;
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

header.appbar p {
  margin: 2px 0 0;
  font-size: 0.85rem;
  opacity: 0.9;
  letter-spacing: 0.3px;
  font-weight: 500;
}

/* Judul Layar & Struktur Heading */
h2.screen-title {
  font-family: "Outfit", sans-serif;
  font-size: 1.65rem;
  margin: 8px 0 16px;
  font-weight: 800;
  color: var(--brand);
  outline: none;
}

h3 {
  font-family: "Outfit", sans-serif;
  font-size: 1.25rem;
  margin: 22px 0 10px;
  font-weight: 700;
  color: var(--brand);
}

p.help {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 20px;
  line-height: 1.5;
}

/* Form Input & Selector */
label {
  display: block;
  font-weight: 700;
  margin: 16px 0 8px;
  font-size: 0.95rem;
  color: var(--brand);
  font-family: "Outfit", sans-serif;
  letter-spacing: 0.2px;
}

input, select, textarea {
  width: 100%;
  font-size: 1.1rem;
  padding: 14px 16px;
  border: 2px solid var(--line);
  border-radius: var(--radius-btn);
  font-family: inherit;
  background: var(--card);
  color: var(--ink);
  transition: var(--transition);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.01);
}

input:hover, select:hover, textarea:hover {
  border-color: var(--brand);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* Tombol (Buttons) */
button {
  font-family: "Outfit", sans-serif;
  font-size: 1.05rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  text-align: left;
  background: var(--card);
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: var(--radius-card);
  padding: 18px 22px;
  margin: 0 0 14px;
  min-height: 68px;
  font-weight: 600;
  box-shadow: var(--shadow);
}

.btn:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn:active {
  transform: translateY(1px);
}

.btn .sub {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
  margin-top: 4px;
  line-height: 1.4;
}

/* Tombol varian khusus */
.btn.primary {
  background: var(--brand-grad);
  color: var(--brand-ink);
  border-color: var(--brand);
}

.btn.primary:hover {
  opacity: 0.95;
  border-color: var(--brand);
}

.btn.primary .sub {
  color: rgba(255, 255, 255, 0.8);
}

.btn.accent {
  background: var(--accent-grad);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.btn.accent:hover {
  opacity: 0.95;
  border-color: var(--accent);
}

.btn.accent .sub {
  color: rgba(255, 255, 255, 0.85);
}

.btn.big {
  font-size: 1.25rem;
  min-height: 84px;
  font-weight: 700;
}

.btn.ghost {
  background: transparent;
  border-style: dashed;
}

.btn.danger {
  color: var(--warn);
  border-color: rgba(178, 59, 59, 0.3);
  background: var(--warn-bg);
}

.btn.danger:hover {
  border-color: var(--warn);
}

.btn[aria-pressed="true"] {
  outline: 4px solid var(--focus);
  outline-offset: 2px;
}

/* Baris Tombol */
.row {
  display: flex;
  gap: 12px;
}

.row .btn {
  margin-bottom: 0;
  flex: 1;
}

/* Desain Kartu (Cards) */
.card {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: var(--radius-card);
  padding: 20px;
  margin: 0 0 18px;
  box-shadow: var(--shadow);
}

/* Kontrol Quantity (+ dan -) */
.qty {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
  margin: 24px 0;
}

.qty button {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  border: 2px solid var(--brand);
  background: #ffffff;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--brand);
  box-shadow: var(--shadow);
}

.qty button:hover {
  background: var(--brand);
  color: #ffffff;
  transform: translateY(-2px);
}

.qty button:active {
  transform: translateY(1px);
}

.qty .num {
  font-family: "Outfit", sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  min-width: 90px;
  text-align: center;
}

/* Total & Statistik */
.total {
  font-family: "Outfit", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--brand);
  margin: 12px 0;
}

.stat {
  font-family: "Outfit", sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  margin: 4px 0;
}

.stat span {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  display: block;
  margin-bottom: 2px;
}

/* Tautan Kembali */
.backlink {
  display: inline-block;
  background: none;
  border: none;
  color: var(--brand);
  font-weight: 700;
  padding: 12px 0;
  text-decoration: none;
  font-size: 1.05rem;
  transition: var(--transition);
  border-bottom: 2px dashed var(--brand);
}

.backlink:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  transform: translateX(-4px);
}

/* Elemen Pembatas & Lain-lain */
.divider {
  height: 2px;
  background: var(--line);
  margin: 24px 0;
}

.muted {
  color: var(--muted);
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}

.list-item:last-child {
  border-bottom: none;
}

/* Buku Kas */
.ledger {
  font-size: 0.98rem;
}

.ledger .ln {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px dotted var(--line);
}

.ledger .ln.totline {
  font-weight: 800;
  border-bottom: 2px solid var(--ink);
  font-size: 1.05rem;
  margin-top: 6px;
}

/* Pengumuman Aksesibilitas (Sembunyi dari visual) */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Transisi Fade-In Screen */
#app {
  opacity: 1;
  transition: opacity 0.15s ease-in-out;
}

/* Fokus Ring Global */
:focus-visible {
  outline: 3px solid var(--focus) !important;
  outline-offset: 3px !important;
}
