:root {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --sidebar-bg: #111111;
  --sidebar-text: #9b9b9b;
  --sidebar-active: #ffffff;
  --primary: #111111;
  --primary-hover: #000000;
  --primary-soft: #f0f0f0;
  --success: #111111;
  --danger: #b00000;
  --warning: #6b5b00;
  --text: #111111;
  --text-muted: #777777;
  --border: #e4e4e4;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.07);
  --sidebar-width: 230px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

svg.ico {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
  vertical-align: middle;
}

/* ===== LOGIN ===== */
.login-screen {
  position: fixed; inset: 0;
  background: #111111;
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
}
.login-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 40px 36px 32px;
  width: 340px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
}
.login-logo {
  width: 60px; height: 60px;
  margin: 0 auto 14px;
  background: #111111;
  color: #fff; font-size: 28px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border-radius: 16px;
}
.login-card h1 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.login-sub { color: var(--text-muted); margin-top: 4px; font-size: 13px; }
.login-form { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.login-form .form-group { text-align: left; }
.login-form label { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; display: block; }
.remember-row { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-muted); cursor: pointer; margin: 0; }
.remember-row input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.login-error { color: var(--danger); font-size: 13px; margin-top: 14px; min-height: 18px; }

/* ===== APP LAYOUT ===== */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 20;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px; }
.brand-logo {
  width: 38px; height: 38px;
  background: #fff;
  color: #111; font-weight: 800; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
}
.brand-name { color: #fff; font-weight: 700; font-size: 16px; letter-spacing: -.01em; }

.sidebar-nav { flex: 1; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-radius: 8px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-weight: 500;
  transition: all .12s;
  font-size: 13px;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: #fff; color: #111; font-weight: 600; }
.nav-item.active svg.ico { stroke: #111; }

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: space-between;
}
.cashier-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cashier-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: #333; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
}
.cashier-name { color: #fff; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cashier-role { font-size: 11px; color: var(--sidebar-text); }
.logout-btn {
  width: 34px; height: 34px;
  background: transparent; border: none; border-radius: 8px;
  color: var(--sidebar-text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.logout-btn:hover { background: rgba(255,255,255,.08); color: #fff; }

.main { flex: 1; margin-left: var(--sidebar-width); padding: 28px 32px; }

.page { max-width: 1400px; margin: 0 auto; animation: fadeIn .15s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px);} to { opacity:1; transform: none;} }

.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }
.page-header h2 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.page-sub { color: var(--text-muted); font-size: 13px; margin-top: 2px; }
.header-actions { display: flex; gap: 10px; align-items: center; }

/* ===== CARDS & STATS ===== */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  border: 1px solid var(--border);
}
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.card-header h3 { font-size: 15px; font-weight: 700; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 18px 20px;
  display: flex; gap: 14px; align-items: center;
}
.stat-icon { width: 46px; height: 46px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: #f0f0f0; color: #111; }
.stat-value { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.stat-label { color: var(--text-muted); font-size: 12px; margin-top: 2px; }

.dash-row { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.chart-wrap { position: relative; height: 260px; }

.top-list { list-style: none; }
.top-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.top-list li:last-child { border-bottom: none; }
.top-rank {
  width: 26px; height: 26px; border-radius: 6px;
  background: #f0f0f0; color: #111;
  font-weight: 700; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.top-name { flex: 1; font-weight: 600; font-size: 13px; }
.top-count { color: var(--text-muted); font-size: 12px; }
.top-price { font-weight: 700; font-size: 13px; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  border: none;
  font-weight: 600; font-size: 13px;
  cursor: pointer;
  transition: all .12s;
}
.btn svg.ico { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #f7f7f7; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #8a0000; }
.btn-lg { padding: 14px 24px; font-size: 15px; flex: 1; justify-content: center; }
.btn-block { width: 100%; justify-content: center; }
.icon-btn {
  width: 38px; height: 38px;
  border: 1px solid var(--border); border-radius: 8px;
  background: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: all .12s;
}
.icon-btn:hover { background: #f7f7f7; color: var(--text); }
.icon-btn.danger-soft { color: var(--danger); }
.icon-btn.danger-soft:hover { background: #faf3f3; }

/* ===== INPUTS ===== */
.input, .select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color .12s;
}
.input:focus, .select:focus, textarea:focus { border-color: #111; }
.select { cursor: pointer; }

/* ===== HOME MENU ===== */
.home-hero {
  background: #111111;
  border-radius: var(--radius);
  padding: 28px 30px;
  margin-bottom: 22px;
  color: #fff;
}
.home-hero h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.home-hero .page-sub { color: rgba(255,255,255,.6); }

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}
.home-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 18px;
  cursor: pointer;
  transition: all .15s;
  position: relative;
  overflow: hidden;
}
.home-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.08); border-color: #111; }
.home-tile:active { transform: scale(.98); }
.home-tile-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 12px;
  background: #f0f0f0;
}
.home-tile-title { font-weight: 700; font-size: 14px; }
.home-tile-desc { color: var(--text-muted); font-size: 12px; margin-top: 3px; }
.home-dash { margin-top: 6px; }

.pos-customer-row { display: flex; gap: 8px; align-items: center; }
.badge-cart-customer { background: #f0f0f0; color: #111; font-weight: 600; }

/* Stock status bar */
.stock-bar-bg { height: 8px; background: #ececec; border-radius: 999px; overflow: hidden; min-width: 120px; }
.stock-bar { height: 100%; border-radius: 999px; }
.stock-count { font-weight: 700; margin-right: 8px; min-width: 46px; text-align: right; }
.text-muted-cell { color: var(--text-muted); }
.customer-pick-box { display: flex; gap: 8px; flex: 1; max-width: 520px; }
.customer-pick-box .input { flex: 1; }

/* ===== POS ===== */
.pos-layout { display: grid; grid-template-columns: 1fr 400px; gap: 20px; height: calc(100vh - 56px); }
.pos-menu { display: flex; flex-direction: column; gap: 14px; overflow: hidden; }
.pos-topbar { display: flex; gap: 12px; }
.search-box { flex: 1; position: relative; display: flex; align-items: center; }
.search-box svg.ico { position: absolute; left: 14px; color: var(--text-muted); }
.search-box input {
  width: 100%; padding: 12px 14px 12px 42px;
  border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; outline: none; background: #fff;
}
.search-box input:focus { border-color: #111; }

.category-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.cat-tab {
  padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: #fff;
  font-weight: 600; font-size: 12px; cursor: pointer;
  white-space: nowrap; transition: all .12s; color: var(--text-muted);
}
.cat-tab:hover { border-color: #111; color: #111; }
.cat-tab.active { background: #111; border-color: #111; color: #fff; }

.menu-grid {
  flex: 1; overflow-y: auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px; align-content: start; padding: 2px 2px 20px;
}
.menu-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all .15s;
  display: flex; flex-direction: column;
}
.menu-item:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(0,0,0,.08); border-color: #111; }
.menu-item:active { transform: scale(.98); }
.menu-thumb { height: 90px; display: flex; align-items: center; justify-content: center; font-size: 34px; overflow: hidden; background: #f7f7f7; }
.menu-thumb img { width: 100%; height: 100%; object-fit: cover; }
.menu-thumb .menu-emoji { font-size: 34px; }
.menu-info { padding: 12px; }
.prod-thumb { width: 42px; height: 42px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 20px; overflow: hidden; background: #f0f0f0; }
.prod-thumb img.prod-img { width: 100%; height: 100%; object-fit: cover; }

/* Upload gambar produk */
.img-upload { display: flex; gap: 14px; align-items: center; }
.img-preview {
  width: 96px; height: 96px; border-radius: 10px;
  border: 2px dashed var(--border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
  background: #fafafa;
}
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.img-preview .img-placeholder { font-size: 36px; }
.img-upload-actions { display: flex; flex-direction: column; gap: 8px; }
.menu-name { font-weight: 600; font-size: 13px; line-height: 1.3; min-height: 34px; }
.menu-price { color: #111; font-weight: 700; font-size: 14px; margin-top: 4px; }
.menu-stock { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.menu-stock.out { color: var(--danger); font-weight: 600; }
.menu-item.disabled { opacity: .45; cursor: not-allowed; }
.menu-item.disabled:hover { transform: none; box-shadow: none; }

.pos-cart {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  height: 100%;
  overflow: hidden;
}
.cart-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.cart-header h3 { font-size: 16px; font-weight: 700; }
.cart-items { flex: 1; overflow-y: auto; padding: 14px 20px; }
.cart-empty { text-align: center; color: var(--text-muted); padding: 50px 20px; }
.cart-empty-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: #f0f0f0; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  color: #a0a0a0;
}
.cart-empty-icon svg.ico { width: 26px; height: 26px; }

.cart-line { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.cart-line:last-child { border-bottom: none; }
.cl-thumb { width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; background: #f0f0f0; }
.cl-info { flex: 1; min-width: 0; }
.cl-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-price { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.cl-controls { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.qty-btn {
  width: 26px; height: 26px; border-radius: 6px;
  border: 1px solid var(--border); background: #fff;
  font-size: 15px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text); transition: all .12s;
}
.qty-btn:hover { background: #f0f0f0; border-color: #111; color: #111; }
.qty-num { font-weight: 700; font-size: 13px; min-width: 20px; text-align: center; }
.cl-total { font-weight: 700; font-size: 13px; min-width: 64px; text-align: right; }
.cl-remove { width: 24px; height: 24px; border: none; background: transparent; color: #bdbdbd; cursor: pointer; border-radius: 6px; display: flex; align-items: center; justify-content: center; }
.cl-remove:hover { color: var(--danger); background: #faf3f3; }
.cl-remove svg.ico { width: 15px; height: 15px; }

.cart-summary { padding: 14px 20px; border-top: 1px solid var(--border); }
.summary-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; color: var(--text-muted); }
.summary-row.total { font-size: 18px; font-weight: 800; color: var(--text); border-top: 1px dashed var(--border); margin-top: 6px; padding-top: 12px; }
.text-green { color: #111; font-weight: 600; }
.cart-actions { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); }
.cart-actions .btn { flex: 1; }
#holdOrderBtn { flex: 0 0 auto; }

/* ===== TABLE ===== */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; padding: 12px 14px;
  color: var(--text-muted); font-weight: 600; font-size: 11px;
  border-bottom: 1px solid var(--border); text-transform: uppercase; letter-spacing: .04em;
}
.table td { padding: 13px 14px; border-bottom: 1px solid var(--border); }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fafafa; }

.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-completed { background: #111; color: #fff; }
.badge-held { background: #e8e8e8; color: #444; }
.badge-cancelled { background: #f0e2e2; color: #7a1f1f; }

.orders-filter { display: flex; gap: 8px; margin-bottom: 16px; }

.orders-summary {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; margin-top: 16px; padding-top: 16px;
  border-top: 2px solid #111;
}
.os-item {
  background: #f5f5f5; border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 16px;
  display: flex; flex-direction: column; gap: 2px;
}
.os-item span { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.os-item strong { font-size: 18px; font-weight: 800; }

@media (max-width: 860px) {
  .orders-summary { grid-template-columns: repeat(2, 1fr); }
}.chip {
  padding: 7px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: #fff;
  font-weight: 600; font-size: 12px; cursor: pointer; color: var(--text-muted);
  transition: all .12s;
}
.chip.active { background: #111; color: #fff; border-color: #111; }

.prod-cell { display: flex; align-items: center; gap: 12px; }
.prod-name { font-weight: 600; }
.stock-warn { color: var(--danger); font-weight: 600; }

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 50; padding: 20px;
  backdrop-filter: blur(2px);
}
.modal {
  background: var(--surface);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px;
  box-shadow: 0 24px 60px rgba(0,0,0,.3);
  animation: popIn .15s ease;
}
@keyframes popIn { from { transform: scale(.97); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.modal-sub { color: var(--text-muted); font-size: 13px; margin-bottom: 18px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.color-options { display: flex; gap: 8px; flex-wrap: wrap; }
.color-dot { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: all .12s; }
.color-dot.selected { border-color: #111; transform: scale(1.15); }

.pay-total-box { background: #111; border-radius: 10px; padding: 18px; text-align: center; margin-bottom: 18px; color: #fff; }
.pay-total-label { font-size: 12px; color: rgba(255,255,255,.6); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.pay-total-value { font-size: 30px; font-weight: 800; }
.pay-options { display: flex; gap: 10px; margin-bottom: 16px; }
.pay-option {
  flex: 1; padding: 14px 8px; border-radius: 10px;
  border: 1.5px solid var(--border); background: #fff;
  cursor: pointer; text-align: center; transition: all .12s;
}
.pay-option:hover { border-color: #111; }
.pay-option.active { border-color: #111; background: #f5f5f5; }
.pay-option .pay-emoji { font-size: 22px; }
.pay-option .pay-name { font-size: 12px; font-weight: 600; margin-top: 4px; }
.pay-received-row { display: flex; gap: 8px; margin-bottom: 8px; }
.quick-amount {
  flex: 1; padding: 8px; border-radius: 6px;
  border: 1px solid var(--border); background: #fff;
  font-weight: 600; cursor: pointer; font-size: 12px;
}
.quick-amount:hover { background: #f0f0f0; border-color: #111; }
.change-box { text-align: right; margin-top: 10px; font-size: 14px; }
.change-box .change-val { font-weight: 800; color: #111; font-size: 18px; }

.discount-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.disc-preset {
  padding: 10px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; font-weight: 600; cursor: pointer; transition: all .12s;
}
.disc-preset:hover { background: #f0f0f0; border-color: #111; }

.disc-type-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.disc-type-tab {
  flex: 1; padding: 10px; border-radius: 8px;
  border: 1px solid var(--border); background: #fff;
  font-weight: 600; cursor: pointer; transition: all .12s; color: var(--text-muted);
}
.disc-type-tab:hover { border-color: #111; color: #111; }
.disc-type-tab.active { background: #111; color: #fff; border-color: #111; }

.disc-row { cursor: pointer; }
.disc-row:hover { color: #111; }
.disc-row:hover #sumDiscount { text-decoration: underline; }

.disc-display {
  background: #f5f5f5; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 16px; font-size: 24px; font-weight: 800; text-align: right;
  margin-bottom: 8px; font-variant-numeric: tabular-nums;
}
.disc-preview { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; text-align: right; }

.numpad {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin-bottom: 14px;
}
.numpad-key {
  padding: 12px 0; border-radius: 8px;
  border: 1px solid var(--border); background: #fff;
  font-size: 17px; font-weight: 700; cursor: pointer; transition: all .1s;
  color: var(--text);
}
.numpad-key:hover { background: #f0f0f0; border-color: #111; }
.numpad-key:active { transform: scale(.95); }

.receipt-modal { max-width: 380px; background: #fff; padding: 0; overflow: hidden; }
.receipt { padding: 26px 28px; font-size: 13px; }
.receipt h3 { text-align: center; margin-bottom: 2px; }
.receipt .receipt-sub { text-align: center; color: var(--text-muted); font-size: 12px; margin-bottom: 14px; }
.receipt-row { display: flex; justify-content: space-between; padding: 3px 0; }
.receipt-item { padding: 6px 0; border-bottom: 1px dashed #e4e4e4; }
.receipt-item .r-item-name { font-weight: 600; }
.receipt-item .r-item-line { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.receipt-total-row { display: flex; justify-content: space-between; font-weight: 800; font-size: 16px; margin-top: 12px; padding-top: 10px; border-top: 2px solid #111; }
.receipt-dashed { border-top: 2px dashed #c0c0c0; margin: 14px 0; }
.receipt-actions { display: flex; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--border); }
.receipt-actions .btn { flex: 1; justify-content: center; }

.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%);
  background: #111; color: #fff;
  padding: 12px 22px; border-radius: 10px;
  font-weight: 600; font-size: 13px;
  box-shadow: 0 12px 30px rgba(0,0,0,.3);
  z-index: 200;
  animation: toastIn .15s ease;
  display: flex; align-items: center; gap: 8px;
}
.toast.success { background: #111; }
.toast.error { background: #b00000; }
@keyframes toastIn { from { transform: translateX(-50%) translateY(20px); opacity: 0;} to { transform: translateX(-50%) translateY(0); opacity: 1;} }

.category-revenue { display: flex; flex-direction: column; gap: 14px; }
.cat-rev-row { display: flex; align-items: center; gap: 12px; }
.cat-rev-name { width: 120px; font-weight: 600; font-size: 13px; flex-shrink: 0; }
.cat-rev-bar-bg { flex: 1; height: 12px; background: #ececec; border-radius: 999px; overflow: hidden; }
.cat-rev-bar { height: 100%; border-radius: 999px; background: #111; transition: width .5s ease; }
.cat-rev-value { width: 100px; text-align: right; font-weight: 700; font-size: 13px; }

.settings-card { max-width: 640px; }
.settings-card h3 { margin-bottom: 18px; }
.form-actions { display: flex; gap: 10px; margin-top: 22px; }

.hold-item { display: flex; justify-content: space-between; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; }
.hold-info .hold-name { font-weight: 600; font-size: 13px; }
.hold-info .hold-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.hold-actions { display: flex; gap: 8px; }

/* ===== LAPORAN ===== */
.report-layout { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: start; }
.report-menu { padding: 14px; }
.report-group { margin-bottom: 16px; }
.report-group-title { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px 4px; }
.report-link {
  display: block; width: 100%; text-align: left;
  padding: 8px 10px; margin-bottom: 2px;
  border: none; background: transparent; border-radius: 6px;
  font-size: 13px; font-weight: 500; color: var(--text);
  cursor: pointer; transition: all .12s;
}
.report-link:hover { background: #f0f0f0; }
.report-link.active { background: #111; color: #fff; font-weight: 600; }
.report-content { min-height: 400px; }
.report-toolbar { margin-bottom: 16px; }

.struk-item { border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.struk-head { display: flex; justify-content: space-between; font-size: 13px; }
.struk-meta { color: var(--text-muted); font-size: 12px; margin: 6px 0; }
.struk-items { border-top: 1px dashed var(--border); border-bottom: 1px dashed var(--border); padding: 6px 0; }
.struk-total { display: flex; justify-content: space-between; font-weight: 800; padding-top: 8px; font-size: 14px; }

@media (max-width: 860px) {
  .report-layout { grid-template-columns: 1fr; }
}

@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .pos-layout { grid-template-columns: 1fr 340px; }
}
@media (max-width: 860px) {
  .sidebar { width: 64px; }
  .sidebar .brand-name, .sidebar .nav-item span, .sidebar .cashier-info { display: none; }
  .main { margin-left: 64px; padding: 20px; }
  .nav-item { justify-content: center; }
  .pos-layout { grid-template-columns: 1fr; }
  .pos-cart { height: auto; min-height: 400px; }
  .dash-row { grid-template-columns: 1fr; }
  .home-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .pos-topbar { flex-wrap: wrap; }
}

#receiptPrint { display: none; }
@media print {
  body * { visibility: hidden; }
  #receiptPrint, #receiptPrint * { visibility: visible; }
  #receiptPrint {
    display: block !important;
    position: absolute; left: 0; top: 0;
    width: 80mm;
    font-size: 12px;
  }
}
