:root {
  --primary: #1a1a2e;
  --accent:  #c9a227;   /* emas barber */
  --bg:      #f6f6f9;
  --card:    #ffffff;
  --text:    #222;
  --muted:   #777;
  --radius:  14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); }
h1,h2,h3 { font-weight: 700; }

/* Layout app */
.app { max-width: 720px; margin: 0 auto; padding: 16px 16px 90px; }
header.app-header {
  display: flex; align-items: center; gap: 10px; padding: 14px 0;
  min-height: 56px;
}
header.app-header img.logo { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
header.app-header .name { font-size: 1.1rem; font-weight: 700; }
header.app-header .tag  { font-size: .75rem; color: var(--muted); }

/* Bottom nav (mobile) */
nav.bottom {
  position: fixed; bottom: 0; left: 0; right: 0; height: 64px;
  background: #fff; border-top: 1px solid #e5e5ea;
  display: flex; justify-content: space-around; align-items: center;
  z-index: 50;
}
nav.bottom a {
  display: flex; flex-direction: column; align-items: center;
  font-size: .72rem; color: var(--muted); text-decoration: none; padding: 6px 14px;
}
nav.bottom a.active { color: var(--accent); font-weight: 700; }
nav.bottom a span.icon { font-size: 1.3rem; }

/* Cards & stats */
.card { background: var(--card); border-radius: var(--radius); padding: 16px; margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.stat .label { font-size: .72rem; color: var(--muted); }
.stat .value { font-size: 1.05rem; font-weight: 800; margin-top: 2px; }

/* Buttons */
.btn { display: block; width: 100%; padding: 14px; border: 0; border-radius: var(--radius);
  font-size: 1rem; font-weight: 700; cursor: pointer; text-align: center; text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:active { opacity: .85; }
.btn-outline { background: transparent; border: 1.5px solid var(--primary); color: var(--primary); }
.btn-danger  { background: #fee2e2; color: #b91c1c; }
.btn-gold    { background: var(--accent); color: #1a1a2e; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* Forms */
label { font-size: .8rem; font-weight: 600; display: block; margin: 12px 0 4px; }
input, select, textarea {
  width: 100%; padding: 13px; border: 1.5px solid #ddd; border-radius: 10px;
  font-size: 1rem; background: #fff; font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }

/* List items */
.item { display: flex; justify-content: space-between; align-items: center;
  background: #fff; border-radius: var(--radius); padding: 14px; margin-bottom: 10px; cursor: pointer; }
.item .title { font-weight: 600; }
.item .meta  { font-size: .78rem; color: var(--muted); margin-top: 2px; }
.badge { font-size: .68rem; padding: 3px 8px; border-radius: 999px; display: inline-block; margin-top: 4px; }
.badge.on  { background: #dcfce7; color: #166534; }
.badge.off { background: #f1f1f4; color: #888; }
.item .actions { display: flex; gap: 6px; }
.item .actions button { padding: 6px 10px; border-radius: 8px; border: 1px solid #ddd;
  background: #fff; font-size: .78rem; cursor: pointer; }

/* Empty state */
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .big { font-size: 2.5rem; margin-bottom: 10px; }

/* Page title + filter */
.page-title { font-size: 1.25rem; margin: 8px 0 14px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters button { padding: 8px 12px; border-radius: 999px; border: 1.5px solid #ddd;
  background: #fff; font-size: .8rem; cursor: pointer; }
.filters button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.filters.trx select, .filters.trx input { flex: 1; min-width: 100px; }

/* FAB transaksi */
.fab { position: fixed; right: 18px; bottom: 80px; width: 60px; height: 60px;
  border-radius: 50%; background: var(--accent); color: var(--primary);
  font-size: 1.8rem; border: 0; box-shadow: 0 4px 12px rgba(0,0,0,.2); cursor: pointer; z-index: 60; }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: none; align-items: flex-end; justify-content: center; z-index: 100; }
.modal-bg.open { display: flex; }
.modal { background: #fff; width: 100%; max-width: 520px;
  border-radius: 20px 20px 0 0; padding: 20px; max-height: 92vh; overflow-y: auto; }
.modal h3 { margin-bottom: 4px; }

/* POS-style quick transaction */
.pos-header { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.pos-header .back { background: none; border: 0; font-size: 1.3rem; cursor: pointer; padding: 4px 8px; }
.pos-header h3 { flex: 1; margin: 0; }
.pos-header .x { background: none; border: 0; font-size: 1.4rem; cursor: pointer; color: var(--muted); }
.pos-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pos-btn { background: #f6f6f9; border: 2px solid transparent; border-radius: 16px;
  padding: 18px 10px; text-align: center; cursor: pointer; font: inherit; color: var(--text); }
.pos-btn:active { transform: scale(.97); border-color: var(--accent); background: #fff8e6; }
.pos-btn .ic { font-size: 1.8rem; display: block; margin-bottom: 6px; }
.pos-btn .n { font-weight: 700; font-size: .95rem; display: block; }
.pos-btn .p { font-size: .8rem; color: var(--muted); margin-top: 3px; display: block; }
.pos-step-label { font-size: .8rem; color: var(--muted); margin-bottom: 10px; }
.pos-time-toggle { text-align: center; margin-top: 16px; font-size: .8rem; color: var(--muted);
  text-decoration: underline; cursor: pointer; }
.pos-time-box { display: none; gap: 8px; margin-top: 10px; }
.pos-time-box.open { display: flex; }
.pos-time-box input { flex: 1; }
.pos-done { text-align: center; padding: 20px 0; }
.pos-done .check { font-size: 3.5rem; }
.pos-done .amt { font-size: 1.6rem; font-weight: 800; margin: 8px 0 2px; }
.pos-done .desc { color: var(--muted); font-size: .9rem; margin-bottom: 20px; }
.pos-done .actions { display: flex; gap: 8px; }

/* Onboarding */
.onb-step { display: none; } .onb-step.active { display: block; }
.onb-progress { text-align: center; font-size: .75rem; color: var(--muted); margin-bottom: 10px; }

.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%);
  background: var(--primary); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: .85rem; z-index: 200; box-shadow: 0 4px 14px rgba(0,0,0,.25); }

@media (min-width: 768px) {
  nav.bottom { display: none; }
  .fab { display: none; }
  .app { padding-bottom: 30px; display: grid; grid-template-columns: 200px 1fr; gap: 28px; max-width: 980px; align-items: start; }
  header.app-header { grid-column: 1 / -1; }
  .desktop-nav { display: flex !important; }
  .app-content { grid-column: 2; }
  .modal-bg { align-items: center; }
  .modal { border-radius: 20px; }
}
.desktop-nav { display: none; flex-direction: column; gap: 4px; }
.desktop-nav a { padding: 10px 14px; border-radius: 10px; text-decoration: none; color: var(--text); font-weight: 600; }
.desktop-nav a.active { background: var(--primary); color: #fff; }
