:root {
  --bg: #F2EADE;
  --surface: #FBF7EF;
  --surface-alt: #EDE4D3;
  --border: #E0D3BC;
  --border-strong: #C9B896;
  --text: #2A1F14;
  --text-muted: #7A6853;
  --text-faint: #A89680;
  --accent: #1F4A3A;
  --accent-hover: #163A2C;
  --accent-soft: #DFE9E1;
  --accent-border: #9FBCA8;
  --warn: #A67422;
  --warn-soft: #F6EBD4;
  --warn-border: #DFC88E;
  --danger: #A03A2A;
  --danger-soft: #F5DCD6;
  --danger-border: #D9A79A;
  --success: #4F7A52;
  --success-soft: #DFE9DC;
  --success-border: #A3C0A0;
  --shadow: 0 2px 8px rgba(42, 31, 20, 0.06);
  --shadow-lg: 0 12px 40px rgba(42, 31, 20, 0.15);
  --font-heading: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --rail-width: 60px;
  --rail-btn-size: 44px;
}
body.dark {
  --bg: #1A1511;
  --surface: #221C17;
  --surface-alt: #2B2420;
  --border: #3A322A;
  --border-strong: #4F4438;
  --text: #F0E6D6;
  --text-muted: #A89880;
  --text-faint: #7A6A55;
  --accent: #4A8C6D;
  --accent-hover: #5FA585;
  --accent-soft: #1B3028;
  --accent-border: #2F5F48;
  --warn: #D4A647;
  --warn-soft: #342914;
  --warn-border: #5E4C1F;
  --danger: #E07860;
  --danger-soft: #3A1E18;
  --danger-border: #6B3020;
  --success: #6FA870;
  --success-soft: #1E2F1E;
  --success-border: #3D5C3D;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body { padding: 24px 20px 60px; transition: background-color .25s, color .25s; }
.container { max-width: 1180px; margin: 0 auto; overflow-x: hidden; }

.page-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 40px;
  border-bottom: 1px solid var(--border);
  min-height: 62px;
  margin-bottom: 10px;
}
.page-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-align: center;
  margin: 0;
}
.header-status-dot {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.header-status-dot:hover { background: var(--surface-alt); }
.header-status-dot::after {
  content: '';
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-faint);
  transition: background .2s;
}
.header-status-dot.online::after { background: var(--success); }
.header-status-dot.offline::after { background: var(--danger); }
.header-status-dot.syncing::after { background: var(--warn); animation: pulse 1.2s infinite; }
.tanggal {
  text-align: center;
  color: var(--text-muted);
  font-size: 12.5px;
  margin-bottom: 22px;
}

.drawer-handle {
  position: fixed;
  top: 22px;
  left: 0;
  width: 26px;
  height: 60px;
  border-radius: 0 14px 14px 0;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-left: none;
  color: var(--accent);
  cursor: pointer;
  z-index: 201;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: inherit;
  transition: left .32s cubic-bezier(.22, 1, .36, 1), border-radius .32s cubic-bezier(.22, 1, .36, 1), background .18s ease, color .18s ease, box-shadow .18s ease;
  box-shadow: 2px 0 10px rgba(31, 74, 58, .10);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.drawer-handle:hover { background: var(--accent); color: #fff; box-shadow: 2px 0 14px rgba(31, 74, 58, .22); }
.drawer-handle:active { transform: scale(.94); }
.drawer-handle.open { left: calc(var(--rail-width) + 10px); border-radius: 14px; border-left: 1px solid var(--accent-border); box-shadow: 0 4px 14px rgba(31, 74, 58, .15); }
.drawer-handle-icon { width: 14px; height: 14px; transition: transform .32s cubic-bezier(.22, 1, .36, 1); }
.drawer-handle.open .drawer-handle-icon { transform: rotate(180deg); }

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 15, 10, 0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
  z-index: 199;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  transform: translateX(-100%);
  transition: transform .32s cubic-bezier(.22, 1, .36, 1);
  z-index: 200;
  will-change: transform;
}
.drawer.open { transform: translateX(0); }

.drawer-rail {
  width: var(--rail-width);
  height: 100vh;
  height: 100dvh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0;
  gap: 5px;
  overflow: visible;
}
.rail-divider { width: 26px; height: 1px; background: var(--border); margin: 6px 0; flex-shrink: 0; }
.rail-btn {
  position: relative;
  width: var(--rail-btn-size);
  height: var(--rail-btn-size);
  flex-shrink: 0;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), background .15s ease, color .15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.rail-btn:hover, .rail-btn:active { transform: scale(1.18); background: var(--accent-soft); color: var(--accent); z-index: 10; }
.rail-btn.active { background: var(--accent-soft); color: var(--accent); }
.rail-btn.active:hover, .rail-btn.active:active { background: var(--accent); color: #fff; }
.rail-icon { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; pointer-events: none; }
.rail-icon svg { width: 22px; height: 22px; }
.rail-btn::after {
  content: attr(data-label);
  position: absolute;
  left: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%) scale(.9);
  transform-origin: left center;
  padding: 7px 12px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(42, 31, 20, .16);
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  transition: opacity .15s ease, transform .2s cubic-bezier(.34, 1.56, .64, 1);
}
.rail-btn:hover::after, .rail-btn:active::after { opacity: 1; transform: translateY(-50%) scale(1); }
.drawer:not(.open) .rail-btn::after { opacity: 0 !important; transition: none !important; display: none !important; }
.rail-sync-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-faint);
  border: 2px solid var(--surface);
  transition: background .15s;
  pointer-events: none;
}
.rail-sync-dot.online { background: var(--success); }
.rail-sync-dot.offline { background: var(--danger); }
.rail-sync-dot.syncing { background: var(--warn); animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

.setup-result { padding: 12px 16px; border-radius: 8px; font-size: 12.5px; margin-top: 12px; line-height: 1.6; }
.setup-result.ok { background: var(--success-soft); color: var(--success); border: 1px solid var(--success-border); }
.setup-result.err { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger-border); }
.setup-result.info { background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-border); }

.panel { display: none; }
.panel.active { display: block; animation: fadeInUp .3s cubic-bezier(.22,1,.36,1); }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px; margin-bottom: 16px; overflow: hidden; transition: box-shadow .2s, border-color .2s; }
.card:hover { border-color: var(--border-strong); }
.card:last-child { margin-bottom: 0; }
.card-title { font-size: 11.5px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 16px; }
.layout { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .layout { grid-template-columns: minmax(0,1fr); } }

.warn-bar { background: var(--warn-soft); border: 1px solid var(--warn-border); color: var(--warn); padding: 13px 18px; border-radius: 10px; font-size: 13.5px; margin-bottom: 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.warn-bar button { background: var(--warn); color: #fff; border: none; padding: 7px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; flex-shrink: 0; }
.info-bar { background: var(--accent-soft); border: 1px solid var(--accent-border); color: var(--accent); padding: 13px 18px; border-radius: 10px; font-size: 13px; line-height: 1.6; margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
@media (max-width: 720px) { .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 480px) { .form-grid { grid-template-columns: minmax(0,1fr); } }
.field label { display: block; font-size: 11.5px; font-weight: 500; color: var(--text-muted); margin-bottom: 7px; }
.field input, .field select { width: 100%; padding: 10px 14px; font-size: 14px; font-family: var(--font-body); color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; transition: .18s; }
.field input:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field .hint { font-size: 11px; color: var(--text-faint); margin-top: 5px; font-style: italic; }
.btn-row { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.btn { padding: 11px 18px; font-size: 13.5px; font-weight: 500; font-family: var(--font-body); border: 1px solid transparent; border-radius: 8px; cursor: pointer; transition: .18s; }
.btn:active:not(:disabled) { transform: scale(.975); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 1px 3px rgba(31,74,58,.2); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }
.btn-ghost { background: var(--surface); color: var(--text-muted); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-alt); color: var(--text); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--border-strong); }
.btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 7px 13px; font-size: 12.5px; border-radius: 7px; }
.section-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 6px; flex-wrap: wrap; gap: 10px; }
.section-head h2 { font-family: var(--font-heading); font-size: 17px; font-weight: 600; }
.count-badge { font-size: 11.5px; color: var(--text-muted); background: var(--bg); padding: 4px 11px; border-radius: 20px; font-weight: 500; }
.table-wrap { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); text-align: left; padding: 13px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody td { padding: 14px 12px; border-bottom: 1px solid var(--border); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-alt); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 40px 20px; text-align: center; color: var(--text-faint); font-size: 13.5px; font-style: italic; }

.chip-bar { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.chip-bar::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; padding: 7px 14px; border-radius: 20px; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); font-family: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; transition: .15s; white-space: nowrap; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip:active { transform: scale(.95); }
.chip.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }

.templates { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
@media (max-width: 600px) { .templates { grid-template-columns: minmax(0,1fr); } }
.tmpl { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; padding: 18px; cursor: pointer; text-align: left; font-family: var(--font-body); font-size: 14px; transition: .2s; display: flex; flex-direction: column; gap: 8px; color: var(--text); -webkit-tap-highlight-color: transparent; touch-action: manipulation; -webkit-user-select: none; user-select: none; position: relative; overflow: hidden; }
.tmpl::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--accent); opacity: 0; pointer-events: none; transition: opacity .28s ease-out; }
.tmpl:hover:not(:disabled) { border-color: var(--accent); box-shadow: 0 4px 16px rgba(31,74,58,.08); transform: translateY(-1px); }
.tmpl:active:not(:disabled) { transform: scale(.95) translateY(2px); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), inset 0 2px 6px rgba(31,74,58,.12); transition: transform .08s ease-out, border-color .1s, box-shadow .1s; }
.tmpl:active:not(:disabled)::after { opacity: 0.09; transition: opacity 0s; }
.tmpl:active:not(:disabled) .tmpl-harga { color: var(--accent); }
.tmpl:disabled { opacity: .4; cursor: not-allowed; background: var(--surface-alt); }
.tmpl:disabled::after { display: none; }
.tmpl-harga { font-family: var(--font-heading); font-size: 24px; font-weight: 600; line-height: 1.1; }
.tmpl-nama { font-size: 13px; color: var(--text-muted); }
.tmpl-detail { font-size: 11.5px; color: var(--text-faint); padding-top: 10px; border-top: 1px solid var(--border); margin-top: 6px; }
.tmpl-tipis .tmpl-harga { color: var(--warn); }

.tmpl-add { border-style: dashed !important; background: transparent !important; color: var(--text-muted) !important; min-height: 90px; justify-content: center; align-items: center; text-align: center; }
.tmpl-add:hover:not(:disabled) { border-color: var(--accent) !important; background: var(--accent-soft) !important; transform: none; box-shadow: none; }
.tmpl-add:active:not(:disabled) { transform: scale(.97); }
.tmpl-add::after { display: none; }
.tmpl-add .tmpl-add-plus { font-family: var(--font-heading); font-size: 28px; font-weight: 600; line-height: 1; color: var(--accent); }
.tmpl-add .tmpl-add-label { font-size: 12.5px; font-weight: 500; color: var(--text-muted); }

.tmpl-kelola { cursor: default; }
.tmpl-kelola:hover { transform: none; box-shadow: none; border-color: var(--border-strong); }
.tmpl-kelola::after { display: none; }
.tmpl-kelola .tmpl-detail { padding-top: 8px; margin-top: 4px; }
.tmpl-actions { display: flex; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.tmpl-actions button { flex: 1; padding: 7px 10px; font-family: inherit; font-size: 12px; font-weight: 500; border-radius: 6px; cursor: pointer; background: var(--surface); border: 1px solid var(--border-strong); color: var(--text-muted); transition: .15s; -webkit-tap-highlight-color: transparent; }
.tmpl-actions button:hover { background: var(--surface-alt); color: var(--text); }
.tmpl-actions button:active { transform: scale(.97); }
.tmpl-actions button.danger { color: var(--danger); }
.tmpl-actions button.danger:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }

.tiket-list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.tiket-list-header .card-title { margin-bottom: 0; }
.tiket-card { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; background: var(--surface); transition: .2s; overflow: hidden; animation: slideDown .28s cubic-bezier(.22,1,.36,1); cursor: pointer; }
.tiket-card.active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tiket-card.draft { border-style: dashed; background: var(--surface-alt); border-color: var(--accent); }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.tiket-card-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; background: var(--surface-alt); border-bottom: 1px solid var(--border); gap: 10px; flex-wrap: wrap; user-select: none; }
.tiket-card.active .tiket-card-head { background: var(--accent-soft); }
.tiket-head-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.tiket-nomor-txt { font-family: var(--font-heading); font-size: 15px; font-weight: 600; }
.tiket-waktu-txt { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.tiket-nama { font-size: 12.5px; color: var(--text-muted); cursor: pointer; padding: 3px 8px; border-radius: 6px; transition: .15s; }
.tiket-nama:hover { background: var(--surface); color: var(--text); }
.tiket-nama.empty { font-style: italic; color: var(--text-faint); }
.tiket-badge { font-size: 10.5px; font-weight: 600; padding: 4px 10px; border-radius: 20px; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.tiket-badge.belum { background: var(--danger-soft); color: var(--danger); }
.tiket-badge.sudah { background: var(--success-soft); color: var(--success); }
.tiket-badge.qris { background: var(--accent-soft); color: var(--accent); }
.tiket-body { padding: 4px 18px 18px; }
.tiket-item { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--border); gap: 10px; flex-wrap: wrap; }
.tiket-item:last-of-type { border-bottom: none; }
.tiket-item-info { flex: 1; min-width: 120px; }
.tiket-item-nama { font-size: 13.5px; }
.tiket-item-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }
.tiket-item-qty { font-variant-numeric: tabular-nums; color: var(--text-muted); font-size: 13px; flex-shrink: 0; display: none; }
.tiket-item-harga { font-variant-numeric: tabular-nums; font-size: 13.5px; font-weight: 500; min-width: 80px; text-align: right; flex-shrink: 0; }
.tiket-item-right { display: flex; align-items: center; gap: 8px; }
.qty-control { display: flex; align-items: center; gap: 4px; background: var(--surface-alt); border-radius: 6px; padding: 2px; }
.qty-control button { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 4px; width: 24px; height: 24px; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; font-family: inherit; color: var(--text); transition: .15s; }
.qty-control button:hover:not(:disabled) { background: var(--accent); color: #fff; }
.qty-control button:disabled { opacity: 0.3; cursor: not-allowed; background: var(--surface-alt); color: var(--text-faint); }
.qty-control .qty-val { font-size: 13px; font-weight: 600; min-width: 20px; text-align: center; }
.btn-edit-item { background: none; border: 1px solid var(--border-strong); color: var(--text-muted); border-radius: 6px; width: 28px; height: 28px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: .15s; }
.btn-edit-item:hover { background: var(--surface-alt); color: var(--text); }

.tiket-addons { display: flex; gap: 6px; padding: 10px 0 4px; border-top: 1px dashed var(--border); margin-top: 6px; flex-wrap: wrap; }
.btn-addon { background: var(--surface); color: var(--text-muted); border: 1px dashed var(--border-strong); padding: 6px 12px; border-radius: 6px; font-size: 12px; font-weight: 500; cursor: pointer; font-family: inherit; transition: .15s; }
.btn-addon:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-border); border-style: solid; }
.tiket-total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0 4px; border-top: 1px solid var(--border); margin-top: 6px; }
.tiket-total-label { font-size: 12.5px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.tiket-total-value { font-family: var(--font-heading); font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tiket-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.tiket-actions .btn { flex: 1; min-width: 80px; }

.btn-add-ticket {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: .15s;
  margin-bottom: 12px;
}
.btn-add-ticket:hover {
  background: var(--surface-alt);
  color: var(--accent);
  border-color: var(--accent);
}

.bayar-info { font-size: 12px; color: var(--success); margin-top: 8px; font-variant-numeric: tabular-nums; }
.bayar-info .qris-tag { color: var(--accent); font-weight: 600; }
.foto-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; padding: 3px 9px; background: var(--accent-soft); color: var(--accent); border-radius: 20px; cursor: pointer; border: 1px solid var(--accent-border); transition: .15s; letter-spacing: .06em; text-transform: uppercase; }
.foto-badge:hover { background: var(--accent); color: #fff; }
.foto-thumb-mini { width: 42px; height: 42px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); cursor: pointer; transition: .15s; flex-shrink: 0; }
.foto-thumb-mini:hover { border-color: var(--accent); transform: scale(1.05); }
.storage-warn { background: var(--warn-soft); border: 1px solid var(--warn-border); color: var(--warn); padding: 14px 18px; border-radius: 10px; font-size: 13px; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.storage-warn button { background: var(--warn); color: #fff; border: none; padding: 8px 15px; border-radius: 8px; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; }
.stok-row { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--border); gap: 10px; }
.stok-row:last-child { border-bottom: none; }
.stok-label { font-size: 13.5px; }
.stok-value { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; font-family: var(--font-heading); }
.stok-value.warn { color: var(--warn); }
.stok-value.danger { color: var(--danger); }
.stok-note { font-size: 11.5px; color: var(--text-faint); margin-top: 12px; font-style: italic; }
.btn-keluar { background: var(--surface); color: var(--warn); border: 1px dashed var(--warn-border); padding: 5px 11px; border-radius: 7px; font-size: 11.5px; font-weight: 600; cursor: pointer; font-family: inherit; transition: .15s; flex-shrink: 0; }
.btn-keluar:hover { background: var(--warn-soft); border-style: solid; }
.keluar-list { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.keluar-list-head { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: baseline; }
.keluar-list-head strong { color: var(--warn); font-weight: 700; }
.keluar-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 12px; gap: 8px; border-bottom: 1px dashed var(--border); }
.keluar-row:last-child { border-bottom: none; }
.keluar-row-info { flex: 1; min-width: 0; }
.keluar-row-jam { font-size: 11px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.keluar-row-alasan { color: var(--text); margin-left: 6px; }
.keluar-row-jumlah { font-weight: 600; color: var(--warn); flex-shrink: 0; font-variant-numeric: tabular-nums; }
.keluar-row-del { background: none; border: none; color: var(--text-faint); cursor: pointer; padding: 2px 6px; font-size: 14px; font-weight: 600; border-radius: 4px; line-height: 1; font-family: inherit; transition: .15s; }
.keluar-row-del:hover { background: var(--danger-soft); color: var(--danger); }
.tag-qris { font-size: 9.5px; font-weight: 700; background: var(--accent-soft); color: var(--accent); padding: 2px 7px; border-radius: 20px; text-transform: uppercase; letter-spacing: .06em; flex-shrink: 0; }
.stats-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; min-width: 0; transition: .2s; }
.stat:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.stat-label { font-size: 11.5px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-family: var(--font-heading); font-size: 24px; font-weight: 600; margin-top: 6px; word-break: break-word; }
.day-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 14px; overflow: hidden; }
.day-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); gap: 12px; flex-wrap: wrap; }
.day-date { font-family: var(--font-heading); font-size: 16px; font-weight: 600; }
.day-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; }
.day-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.day-table thead th { font-size: 11px; padding: 11px 22px; background: var(--surface-alt); border-bottom: 1px solid var(--border); }
.day-table tbody td { padding: 13px 22px; border-bottom: 1px solid var(--border); }
.day-table tbody tr:last-child td { border-bottom: none; }
.sisa-warn { color: var(--warn); font-weight: 600; }
.sisa-danger { color: var(--danger); font-weight: 600; }
.filter-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 18px; }
.filter-row .field { flex: 1; min-width: 140px; }
.harian-controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.harian-controls .field { flex: 1; min-width: 150px; margin-bottom: 0; }
.harian-controls .btn { flex-shrink: 0; }
.stok-summary { display: grid; grid-template-columns: repeat(auto-fit,minmax(100px,1fr)); gap: 12px; }
.stok-summary-item { padding: 12px 14px; background: var(--surface-alt); border: 1px solid var(--border); border-radius: 10px; min-width: 0; }
.stok-summary-label { font-size: 10px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 5px; }
.stok-summary-value { font-family: var(--font-heading); font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.report-content { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 36px; overflow-x: hidden; word-break: break-word; }
.report-header { text-align: center; padding-bottom: 24px; border-bottom: 2px solid var(--text); margin-bottom: 28px; }
.report-header-title { font-family: var(--font-heading); font-size: 30px; font-weight: 600; line-height: 1.1; }
.report-header-sub { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .22em; margin-top: 8px; font-weight: 600; }
.report-header-date { font-family: var(--font-heading); font-size: 15px; margin-top: 12px; font-weight: 500; }
.report-money { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 10px; padding: 22px 26px; margin-bottom: 28px; }
.report-money-title { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .16em; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.money-row { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 0; font-size: 14px; gap: 16px; }
.money-label { color: var(--text); flex: 1; min-width: 0; }
.money-value { font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; text-align: right; }
.money-row.minus .money-label { color: var(--text-muted); }
.money-row.minus .money-value { color: var(--danger); }
.money-row.total { padding-top: 16px; margin-top: 10px; border-top: 2px solid var(--text); }
.money-row.total .money-label { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.money-row.total .money-value { font-family: var(--font-heading); font-size: 24px; font-weight: 600; color: var(--accent); }
.report-money-foot { font-size: 11.5px; color: var(--text-faint); margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); text-align: center; font-style: italic; }
.report-section { margin-bottom: 28px; }
.report-section-title-row { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--text); margin-bottom: 14px; gap: 10px; flex-wrap: wrap; }
.report-section-title { font-size: 11.5px; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: .14em; }
.report-charts { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); gap: 22px; margin-bottom: 28px; }
.report-chart-box { padding: 18px; border: 1px solid var(--border); border-radius: 10px; min-width: 0; }
.report-chart-title { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.bar-chart { display: flex; align-items: flex-end; gap: 3px; height: 150px; }
.bar-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.bar-value-spacer { height: 14px; font-size: 9.5px; font-weight: 700; color: var(--accent); line-height: 14px; }
.bar-fill { width: 100%; background: var(--accent); border-radius: 4px 4px 0 0; min-height: 2px; transition: height .35s; }
.bar-fill.empty { background: var(--border-strong); height: 2px !important; }
.bar-label { font-size: 9px; color: var(--text-faint); margin-top: 5px; }
.donut-wrap { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; padding: 8px 0; }
.donut-svg { width: 110px; height: 110px; flex-shrink: 0; }
.donut-track { stroke: var(--border); }
.donut-fill { stroke: var(--accent); }
.donut-legend { flex: 1 1 120px; min-width: 0; }
.donut-legend-item { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 12.5px; }
.donut-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.donut-legend-dot.cash { background: var(--border-strong); }
.donut-legend-dot.qris { background: var(--accent); }
.donut-legend-label { color: var(--text-muted); flex: 1; min-width: 0; }
.donut-legend-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.report-table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.report-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.report-table th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); font-weight: 700; padding: 11px 14px; border-bottom: 1px solid var(--text); background: var(--surface-alt); white-space: nowrap; }
.report-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); word-break: break-word; vertical-align: middle; }
.report-table tr:last-child td { border-bottom: none; }
.report-table td.num, .report-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.report-table td.strong { font-weight: 600; }
.report-table td.warn { color: var(--warn); font-weight: 600; }
.report-table td.danger { color: var(--danger); font-weight: 600; }
.report-foot { text-align: center; font-size: 11px; color: var(--text-faint); margin-top: 28px; padding-top: 18px; border-top: 1px dashed var(--border-strong); font-style: italic; }
.collapsible-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--text); cursor: pointer; gap: 10px; user-select: none; }
.collapsible-head:hover { opacity: .75; }
.collapsible-head .report-section-title { margin: 0; }
.collapsible-icon { color: var(--text-muted); transition: transform .25s; flex-shrink: 0; display: flex; align-items: center; }
.collapsible-icon svg { width: 12px; height: 12px; }
.collapsible-head.open .collapsible-icon { transform: rotate(180deg); }
.collapsible-body { display: none; padding-top: 14px; }
.collapsible-body.open { display: block; animation: fadeInUp .25s ease; }
.trx-row { display: flex; justify-content: space-between; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); gap: 10px; }
.trx-row:last-child { border-bottom: none; }
.trx-left { flex: 1; min-width: 0; }
.trx-nomor { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.trx-nama { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.trx-detail { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.trx-total { font-variant-numeric: tabular-nums; font-size: 13.5px; font-weight: 600; white-space: nowrap; flex-shrink: 0; font-family: var(--font-heading); }
.peng-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--border); gap: 8px; font-size: 13px; }
.peng-row:last-child { border-bottom: none; }
.peng-ket { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; overflow: hidden; }
.peng-ket .ket-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.peng-waktu { font-size: 11.5px; color: var(--text-faint); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.peng-nominal { font-variant-numeric: tabular-nums; font-weight: 600; flex-shrink: 0; }
.peng-actions { display: flex; gap: 2px; flex-shrink: 0; }
.peng-actions button { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px 8px; font-size: 12px; border-radius: 5px; font-family: inherit; transition: .15s; }
.peng-actions button:hover { background: var(--surface-alt); color: var(--text); }
.peng-actions button.danger:hover { background: var(--danger-soft); color: var(--danger); }
.peng-empty { padding: 18px 0; text-align: center; color: var(--text-faint); font-size: 12.5px; font-style: italic; }
.btn-del-inline { background: none; border: none; color: var(--text-faint); cursor: pointer; padding: 4px 8px; font-size: 16px; font-weight: 600; border-radius: 5px; font-family: inherit; line-height: 1; transition: .15s; flex-shrink: 0; }
.btn-del-inline:hover { background: var(--danger-soft); color: var(--danger); }
.peng-row .peng-actions button.danger { color: var(--danger); font-size: 16px; font-weight: 600; padding: 4px 8px; line-height: 1; }
.peng-row .peng-actions button.danger:hover { background: var(--danger-soft); }

.modal-overlay { position: fixed; inset: 0; background: rgba(20,15,10,.55); backdrop-filter: blur(2px); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 300; opacity: 0; transition: opacity .2s; overflow-y: auto; }
.modal-overlay.show { display: flex; opacity: 1; }
.modal { background: var(--surface); border-radius: 14px; padding: 26px; width: 100%; max-width: 400px; box-shadow: var(--shadow-lg); animation: scaleIn .22s cubic-bezier(.22,1,.36,1); margin: auto; }
@keyframes scaleIn { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }
.modal-title { font-family: var(--font-heading); font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.modal-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 22px; }
.modal-total { background: var(--surface-alt); padding: 16px 18px; border-radius: 10px; display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.modal-total-label { font-size: 12.5px; color: var(--text-muted); font-weight: 500; }
.modal-total-value { font-family: var(--font-heading); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.modal-field { margin-bottom: 16px; }
.modal-field label { display: block; font-size: 11.5px; font-weight: 500; color: var(--text-muted); margin-bottom: 7px; }

.input-bayar-wrap { position: relative; display: flex; align-items: center; }
.input-bayar-wrap input { width: 100%; padding: 12px 40px 12px 15px; font-size: 16px; font-family: var(--font-body); color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; font-variant-numeric: tabular-nums; transition: .18s; }
.input-bayar-wrap input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.btn-clear-bayar { position: absolute; right: 10px; background: none; border: none; color: var(--text-faint); cursor: pointer; font-size: 20px; font-weight: bold; padding: 4px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: .15s; }
.btn-clear-bayar:hover { color: var(--danger); background: var(--danger-soft); }

.quick-btns { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; margin-bottom: 16px; }
.quick-btns button { padding: 9px 4px; font-size: 12px; font-family: inherit; font-weight: 500; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 7px; cursor: pointer; color: var(--text); transition: .15s; }
.quick-btns button:hover { background: var(--surface-alt); }
.quick-btns button.qris-btn { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-border); font-weight: 600; }
.quick-btns button.qris-btn:hover { background: var(--accent); color: #fff; }
.kembalian-box { background: var(--success-soft); color: var(--success); padding: 14px 18px; border-radius: 10px; display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; }
.kembalian-box.kurang { background: var(--danger-soft); color: var(--danger); }
.kembalian-box.qris { background: var(--accent-soft); color: var(--accent); }
.kembalian-label { font-size: 12.5px; font-weight: 500; }
.kembalian-value { font-family: var(--font-heading); font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; padding: 12px 16px; }
.foto-section { padding: 14px 16px; background: var(--accent-soft); border: 1px dashed var(--accent-border); border-radius: 10px; margin-bottom: 16px; transition: .2s; }
.foto-section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.foto-section-title { font-size: 12px; font-weight: 600; color: var(--accent); }
.foto-section-desc { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; line-height: 1.5; }
.foto-uploaded { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--accent-border); }
.foto-uploaded img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--accent-border); flex-shrink: 0; }
.foto-uploaded-info { flex: 1; min-width: 0; }
.foto-uploaded-name { font-size: 12px; font-weight: 500; }
.foto-uploaded-size { font-size: 11px; color: var(--text-faint); margin-top: 2px; font-variant-numeric: tabular-nums; }
.foto-uploaded-actions { display: flex; gap: 6px; flex-shrink: 0; }
.foto-uploaded-actions button { background: none; border: 1px solid var(--border-strong); color: var(--text-muted); padding: 5px 10px; border-radius: 6px; font-size: 11.5px; font-weight: 500; cursor: pointer; font-family: inherit; transition: .15s; }
.foto-uploaded-actions button:hover { background: var(--surface); color: var(--text); }
.foto-uploaded-actions button.danger { color: var(--danger); }
.foto-uploaded-actions button.danger:hover { background: var(--danger-soft); }
.foto-preview-img { width: 100%; max-height: 60vh; object-fit: contain; border-radius: 10px; background: #0a0a0a; display: block; margin-bottom: 16px; }
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--text); color: var(--surface); padding: 12px 22px; border-radius: 10px; font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-lg); opacity: 0; transition: .25s; pointer-events: none; z-index: 999; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--danger); color: #fff; }
.share-step { padding: 18px 0; border-bottom: 1px solid var(--border); }
.share-step:last-child { border-bottom: none; }
.share-step-title { font-family: var(--font-heading); font-size: 15px; font-weight: 600; margin-bottom: 5px; }
.share-step-desc { font-size: 12.5px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.55; }
.file-input-wrap { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.file-input-wrap input[type="file"] { display: none; }
.file-label { display: inline-block; padding: 11px 18px; background: var(--accent); color: #fff; font-size: 13.5px; font-weight: 500; border-radius: 8px; cursor: pointer; transition: .18s; }
.file-label:hover { background: var(--accent-hover); }
.file-name { font-size: 12.5px; color: var(--text-muted); font-family: ui-monospace, monospace; word-break: break-all; }
.import-preview { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 10px; padding: 20px; margin-top: 18px; }
.import-preview-title { font-size: 11.5px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 14px; }
.import-preview-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: 13px; gap: 10px; }
.import-preview-row .label { color: var(--text-muted); }
.import-preview-row .value { font-weight: 500; text-align: right; }
.import-preview-section { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.conflict-list { list-style: none; font-size: 12.5px; line-height: 1.75; }
.conflict-list li { padding: 5px 0; color: var(--warn); }
.conflict-list li::before { content: "! "; font-weight: 700; }
.ok-list { list-style: none; font-size: 12.5px; line-height: 1.75; }
.ok-list li { padding: 5px 0; color: var(--success); }
.ok-list li::before { content: "v "; font-weight: 700; }
.undo-bar { background: var(--warn-soft); border: 1px solid var(--warn-border); padding: 14px 18px; border-radius: 10px; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.undo-bar-text { font-size: 13px; color: var(--warn); flex: 1; min-width: 200px; }
.mode-toggle { display: inline-flex; gap: 0; background: var(--surface-alt); padding: 3px; border-radius: 8px; border: 1px solid var(--border); }
.mode-btn { background: none; border: none; padding: 7px 16px; font-size: 13px; font-weight: 500; font-family: inherit; color: var(--text-muted); cursor: pointer; border-radius: 6px; transition: .15s; }
.mode-btn.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.05); font-weight: 600; }
.statistik-highlight { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.statistik-highlight-item { background: var(--accent-soft); border: 1px solid var(--accent-border); border-radius: 12px; padding: 16px 20px; }
.statistik-highlight-label { font-size: 11px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.statistik-highlight-value { font-family: var(--font-heading); font-size: 22px; font-weight: 600; color: var(--text); line-height: 1.2; }
.statistik-highlight-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.statistik-highlight-item.keluar { background: var(--warn-soft); border-color: var(--warn-border); }
.statistik-highlight-item.keluar .statistik-highlight-label { color: var(--warn); }
.row-highlight { background: var(--warn-soft) !important; }
.tag-top { display: inline-block; font-size: 9.5px; font-weight: 700; background: var(--warn); color: #fff; padding: 2px 7px; border-radius: 20px; text-transform: uppercase; letter-spacing: .06em; margin-left: 6px; vertical-align: middle; }

/* Bottom Sheet Modal */
.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(.22,1,.36,1);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
.modal-overlay.show .bottom-sheet { transform: translateY(0); }
.bottom-sheet-handle { width: 40px; height: 5px; background: var(--border-strong); border-radius: 5px; margin: 12px auto 8px; flex-shrink: 0; }
.bottom-sheet-header { display: flex; justify-content: space-between; align-items: center; padding: 0 20px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.btn-close-sheet { background: none; border: none; font-size: 24px; color: var(--text-muted); cursor: pointer; padding: 0 5px; line-height: 1; }
.bottom-sheet-body { padding: 16px 20px 30px; overflow-y: auto; }
.menu-grid-popup { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.menu-item-popup { background: var(--surface-alt); border: 1px solid var(--border); border-radius: 10px; padding: 14px; text-align: left; cursor: pointer; transition: .15s; }
.menu-item-popup:active { transform: scale(0.97); }
.menu-item-popup .p-nama { font-weight: 600; font-size: 13.5px; margin-bottom: 4px; }
.menu-item-popup .p-harga { font-family: var(--font-heading); font-size: 16px; color: var(--accent); }
.sambal-popup-btn { background: var(--warn-soft); border-color: var(--warn-border); width: 100%; grid-column: 1 / -1; text-align: center; font-weight: 600; color: var(--warn); padding: 12px; margin-top: 8px; }

@media (max-width: 640px) {
  body { padding: 16px 14px 44px; }
  .page-header { padding: 10px 30px; min-height: 56px; margin-bottom: 8px; }
  .page-title { font-size: 22px; }
  .header-status-dot { right: -8px; }
  .tanggal { font-size: 12px; margin-bottom: 16px; }
  .drawer-handle { width: 24px; height: 54px; top: 18px; }
  .drawer-handle.open { left: calc(var(--rail-width) + 8px); }
  .drawer-handle-icon { width: 13px; height: 13px; }
  .card { padding: 18px; border-radius: 10px; margin-bottom: 14px; }
  .btn { padding: 10px 15px; font-size: 13px; }
  .btn-sm { padding: 6px 11px; font-size: 12px; }
  .templates { gap: 12px; }
  .tmpl { padding: 16px; }
  .tmpl-harga { font-size: 22px; }
  .tiket-card-head { padding: 12px 15px; }
  .tiket-body { padding: 4px 15px 16px; }
  .tiket-actions .btn { min-width: 0; flex: 1; padding: 11px 13px; font-size: 13px; }
  .stats-row { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .stat { padding: 16px 18px; }
  .stat-value { font-size: 22px; }
  .filter-row { flex-direction: column; align-items: stretch; }
  .filter-row .field { flex: none; min-width: 0; }
  .harian-controls { flex-direction: column; align-items: stretch; }
  .harian-controls .btn { width: 100%; }
  .report-content { padding: 20px 16px; }
  .report-header-title { font-size: 24px; }
  .report-money { padding: 18px; }
  .report-charts { grid-template-columns: minmax(0,1fr); gap: 14px; }
  .modal { padding: 22px 20px; border-radius: 12px; }
  .quick-btns { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .stok-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .foto-uploaded img { width: 56px; height: 56px; }
  .mode-btn { padding: 6px 12px; font-size: 12px; }
  .statistik-highlight { grid-template-columns: minmax(0,1fr); }
  .statistik-highlight-value { font-size: 20px; }
  .table-wrap { margin: 0 -18px; padding: 0 18px; }
  thead th { font-size: 10px; padding: 10px 8px; }
  tbody td { padding: 11px 8px; }
}
@media (max-width: 380px) {
  body { padding: 14px 12px 36px; }
  .page-title { font-size: 20px; }
  .card { padding: 16px; }
  .tmpl-harga { font-size: 20px; }
  .stat-value { font-size: 20px; }
  .report-header-title { font-size: 22px; }
  .bar-chart { height: 90px; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media print {
  @page { size: A4; margin: 12mm; }
  body { padding: 0; background: #fff !important; color: #000 !important; font-size: 11px; }
  body.dark { background: #fff !important; color: #000 !important; }
  body.dark * { background: #fff !important; color: #000 !important; border-color: #ccc !important; }
  .container { max-width: none; padding: 0; }
  .page-header, .drawer, .drawer-handle, .drawer-backdrop, .header-status-dot { display: none !important; }
  .panel { display: none !important; }
  #panelHarian { display: block !important; }
  .harian-controls-card, .stok-awal-card, .stok-akhir-card { display: none !important; }
  .no-print { display: none !important; }
  .collapsible-body { display: block !important; }
  .collapsible-icon { display: none !important; }
  .report-content { border: none; padding: 0; }
  .report-content * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .report-money { background: #f8f8f8 !important; border-color: #ccc !important; page-break-inside: avoid; }
  .report-section { margin-bottom: 16px; page-break-inside: avoid; }
  .report-charts { page-break-inside: avoid; }
  .report-table tr { page-break-inside: avoid; }
  .foto-badge { display: none !important; }
  .btn-addon { display: none !important; }
  .btn-keluar { display: none !important; }
  .keluar-row-del { display: none !important; }
  .chip-bar, .tmpl-add, .tmpl-actions, .btn-add-ticket, .bottom-sheet { display: none !important; }
}