/* ============================================================
   Mâm POS — App CSS (imports prototype styles + extensions)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700&display=swap');
@import 'prototype.css';

/* ---- Additional app-specific styles ---- */

/* Login page */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 48px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
}
.login-brand-mark {
  width: 44px; height: 44px;
  background: var(--primary);
  border-radius: 12px;
  display: grid; place-items: center;
  color: white;
  font-weight: 700;
  font-size: 22px;
}
.login-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 6px 0; }
.login-sub { color: var(--text-2); font-size: 13.5px; margin: 0 0 32px 0; }
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 7px;
}
.form-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}
.form-input.error { border-color: var(--red-500); }
.form-error { color: var(--red-600); font-size: 12px; margin-top: 6px; }
.btn-block { width: 100%; justify-content: center; padding: 12px; font-size: 14px; }

/* Main layout */
.main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-y: auto;
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 8px 12px;
  min-width: 280px;
}
.search input {
  border: 0;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--text);
  width: 100%;
}
.search .icon { width: 16px; height: 16px; color: var(--text-3); flex-shrink: 0; }
.search kbd {
  font-size: 10px;
  color: var(--text-3);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: inherit;
  white-space: nowrap;
}
.branch-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  background: var(--surface);
  cursor: pointer;
  white-space: nowrap;
}
.branch-pill:hover { background: var(--surface-hover); }
.dot-green {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green-600);
  flex-shrink: 0;
}
.dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--surface);
}
.icon-btn {
  position: relative;
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  display: grid; place-items: center;
  color: var(--text-2);
  border: 1px solid transparent;
}
.icon-btn:hover { background: var(--surface-hover); border-color: var(--border); color: var(--text); }
.icon-btn .icon { width: 18px; height: 18px; }

/* Sidebar user card */
.sidebar-footer { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); }
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  cursor: pointer;
}
.user-card:hover { background: var(--surface-hover); }
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-text);
  display: grid; place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 11px; color: var(--text-3); }

/* Nav badge */
.nav-item .badge {
  margin-left: auto;
  background: var(--primary);
  color: white;
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--r-full);
  min-width: 20px;
  text-align: center;
}

/* Lang switcher */
.lang-switch {
  display: flex;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 3px;
  gap: 2px;
}
.lang-switch button {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
}
.lang-switch button.active {
  background: var(--primary-soft);
  color: var(--primary-text);
}
.lang-flag {
  display: inline-flex;
  width: 18px; height: 12px;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.06) inset;
}

/* POS page specific */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  height: calc(100vh - 65px);
  overflow: hidden;
}
.pos-dishes {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}
.pos-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.pos-categories {
  display: flex;
  gap: 6px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  overflow-x: auto;
  flex-shrink: 0;
}
.pos-categories::-webkit-scrollbar { display: none; }
.cat-btn {
  padding: 7px 14px;
  border-radius: var(--r-full);
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--border);
  white-space: nowrap;
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
}
.cat-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}
.cat-btn:hover:not(.active) { background: var(--surface-hover); color: var(--text); }

.pos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  padding: 20px 24px;
  overflow-y: auto;
  align-content: start;
}
.dish-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px;
  cursor: pointer;
  transition: border-color .12s, transform .1s, box-shadow .12s;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dish-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}
.dish-card:active { transform: translateY(0); }
.dish-emoji { font-size: 32px; line-height: 1; }
.dish-card-name { font-size: 13px; font-weight: 600; line-height: 1.3; }
.dish-card-price { font-size: 13px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.dish-card-cat { font-size: 11px; color: var(--text-3); }

/* Cart panel */
.cart-panel {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--border);
  height: 100%;
  overflow: hidden;
}
.cart-header {
  padding: 18px 20px 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.cart-title { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.cart-count { font-size: 11px; color: var(--text-3); margin-top: 2px; }

.cart-options {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}
.cart-option-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
}
.cart-option-label { color: var(--text-2); font-weight: 500; min-width: 50px; }
.cart-option-select {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--text);
  font-size: 12.5px;
  outline: none;
}
.cart-option-select:focus { border-color: var(--primary); }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 10px;
  color: var(--text-3);
  text-align: center;
  padding: 24px;
}
.cart-empty-icon { font-size: 40px; }
.cart-empty-title { font-size: 14px; font-weight: 600; color: var(--text-2); }
.cart-empty-sub { font-size: 12px; }
.cart-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
}
.cart-item-emoji { font-size: 20px; flex-shrink: 0; margin-top: 2px; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 13px; font-weight: 600; }
.cart-item-price { font-size: 12px; color: var(--text-3); margin-top: 2px; font-variant-numeric: tabular-nums; }
.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.qty-btn {
  width: 24px; height: 24px;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: grid; place-items: center;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  background: var(--surface);
  color: var(--text);
}
.qty-btn:hover { background: var(--primary); border-color: var(--primary); color: white; }
.qty-num { font-size: 13px; font-weight: 700; min-width: 24px; text-align: center; }
.cart-item-subtotal { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cart-item-remove {
  width: 22px; height: 22px;
  border-radius: 5px;
  display: grid; place-items: center;
  color: var(--text-3);
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}
.cart-item-remove:hover { background: var(--red-50); color: var(--red-600); }

.cart-promo {
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.cart-promo input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface-2);
  font-size: 12.5px;
  color: var(--text);
  outline: none;
}
.cart-promo input:focus { border-color: var(--primary); }

.cart-totals {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}
.total-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}
.total-row.final {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.total-label { color: var(--text-2); }
.total-val { font-variant-numeric: tabular-nums; font-weight: 600; }

.cart-actions {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  animation: fadeIn .15s;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp .2s;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 0 24px;
}
.modal-title { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--text-3);
  font-size: 20px;
  cursor: pointer;
}
.modal-close:hover { background: var(--surface-hover); color: var(--text); }
.modal-body { padding: 20px 24px 24px 24px; }
.modal-steps {
  display: flex;
  gap: 4px;
  padding: 16px 24px;
}
.step-dot {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: var(--border);
  transition: background .2s;
}
.step-dot.active { background: var(--primary); }

/* Payment methods grid */
.payment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 16px 0;
}
.pay-option {
  border: 2px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  transition: border-color .12s, background .12s;
  background: var(--surface);
}
.pay-option:hover { border-color: var(--primary); background: var(--primary-soft); }
.pay-option.selected { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-text); }
.pay-icon { font-size: 28px; }

/* QR payment box */
.qr-box {
  text-align: center;
  padding: 20px;
  background: var(--surface-2);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  margin: 16px 0;
}
.qr-box img { max-width: 200px; border-radius: 8px; margin-bottom: 12px; }
.qr-detail { font-size: 12.5px; color: var(--text-2); line-height: 1.8; }
.qr-detail strong { color: var(--text); }

/* Cash payment box */
.cash-box { padding: 8px 0; }
.cash-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.cash-label { font-size: 13px; color: var(--text-2); font-weight: 500; min-width: 120px; }
.cash-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  outline: none;
  font-variant-numeric: tabular-nums;
}
.cash-input:focus { border-color: var(--primary); }
.cash-change {
  font-size: 20px;
  font-weight: 700;
  color: var(--green-600);
  font-variant-numeric: tabular-nums;
}

/* Success step */
.success-step {
  text-align: center;
  padding: 24px 0;
}
.success-icon {
  font-size: 56px;
  margin-bottom: 16px;
  animation: pop .3s;
}
@keyframes pop {
  0% { transform: scale(0.5); }
  80% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
.success-title { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.success-code {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 28px;
}
.success-code strong { font-variant-numeric: tabular-nums; color: var(--primary); }
.success-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: var(--gray-900);
  color: white;
  padding: 12px 18px;
  border-radius: var(--r-lg);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn .2s;
  max-width: 320px;
}
[data-theme=dark] .toast { background: #FAFAFA; color: var(--gray-900); }
@keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast.success { border-left: 4px solid var(--green-600); }
.toast.error { border-left: 4px solid var(--red-500); }

/* Orders page */
.page-filters {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  outline: none;
  cursor: pointer;
}
.filter-select:focus { border-color: var(--primary); }
.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 7px 12px;
}
.search-input-wrap input {
  border: 0;
  background: transparent;
  outline: none;
  font-size: 13px;
  color: var(--text);
  min-width: 200px;
}
.search-input-wrap .icon { width: 14px; height: 14px; color: var(--text-3); }

/* Invoice */
.invoice-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 24px;
  font-size: 14px;
}
.invoice-header { text-align: center; margin-bottom: 28px; }
.invoice-logo {
  width: 56px; height: 56px;
  background: var(--primary);
  border-radius: 14px;
  display: inline-grid; place-items: center;
  color: white; font-size: 28px; font-weight: 800;
  margin-bottom: 12px;
}
.invoice-company { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.invoice-address { color: var(--text-2); font-size: 12.5px; margin-top: 4px; }
.invoice-meta {
  display: flex;
  justify-content: space-between;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 20px 0;
}
.invoice-meta-item { font-size: 12.5px; }
.invoice-meta-label { color: var(--text-3); margin-bottom: 3px; }
.invoice-meta-val { font-weight: 600; }
.invoice-table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.invoice-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  padding: 0 0 10px 0;
  border-bottom: 1px solid var(--border);
}
.invoice-table td { padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.invoice-table tr:last-child td { border-bottom: 0; }
.invoice-totals { margin: 16px 0; }
.invoice-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  padding: 6px 0;
  color: var(--text-2);
}
.invoice-total-row.final {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  padding-top: 12px;
  border-top: 2px solid var(--border);
  margin-top: 8px;
}
.invoice-footer {
  text-align: center;
  padding-top: 24px;
  border-top: 1px dashed var(--border);
  color: var(--text-2);
  font-size: 13px;
  font-style: italic;
}
.invoice-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
@media print {
  .invoice-actions, .topbar, .sidebar { display: none !important; }
  .invoice-page { padding: 0; }
  body { background: white; color: black; }
  .card { border: 0; box-shadow: none; }
}
@page { margin: 15mm; }

/* Responsive fixes */
.table-responsive { overflow-x: auto; }
.pill { cursor: default; }

/* Inventory alerts */
.alert-low { color: var(--red-600); font-weight: 600; }
.stock-bar {
  height: 6px;
  border-radius: 99px;
  background: var(--surface-2);
  overflow: hidden;
  width: 80px;
}
.stock-bar-fill { height: 100%; border-radius: 99px; transition: width .3s; }
.stock-ok { background: var(--green-600); }
.stock-warn { background: var(--amber-600); }
.stock-low { background: var(--red-500); }

/* Reports */
.report-period-tabs { display: flex; gap: 4px; margin-bottom: 24px; }
.period-tab {
  padding: 7px 16px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
}
.period-tab.active { background: var(--primary); border-color: var(--primary); color: white; }

/* Settings */
.settings-section { margin-bottom: 32px; }
.settings-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 16px;
}
.settings-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  color: var(--text);
  font-size: 14px;
  resize: vertical;
  min-height: 80px;
  outline: none;
}
.form-textarea:focus { border-color: var(--primary); }
.form-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13.5px;
}
.form-checkbox input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); }

/* ============================================================
   Additional view styles
   ============================================================ */

/* Filter bar */
.filter-form .filter-row { display:flex;gap:.75rem;flex-wrap:wrap;align-items:center; }

/* Data table */
.table-card { overflow:hidden; }
.table-responsive { overflow-x:auto; }
.data-table { width:100%;border-collapse:collapse;font-size:.9rem; }
.data-table th { padding:.75rem 1rem;text-align:left;font-weight:600;font-size:.8rem;text-transform:uppercase;letter-spacing:.04em;color:var(--text-muted);border-bottom:2px solid var(--border);background:var(--bg-secondary); }
.data-table td { padding:.8rem 1rem;border-bottom:1px solid var(--border);vertical-align:middle; }
.data-table tbody tr:last-child td { border-bottom:none; }
.data-table tbody tr:hover { background:var(--bg-secondary); }
.empty-state { text-align:center;padding:3rem;color:var(--text-muted); }

/* Badges */
.badge { display:inline-flex;align-items:center;padding:.2rem .65rem;border-radius:20px;font-size:.78rem;font-weight:600; }
.badge-success { background:#d4edda;color:#155724; }
.badge-warning { background:#fff3cd;color:#856404; }
.badge-danger  { background:#f8d7da;color:#721c24; }
.badge-info    { background:#d1ecf1;color:#0c5460; }
.badge-secondary { background:var(--bg-secondary);color:var(--text-muted);border:1px solid var(--border); }

/* Pagination */
.pagination { display:flex;gap:.35rem;justify-content:center;padding:1rem; }
.page-btn { padding:.4rem .85rem;border-radius:6px;border:1px solid var(--border);background:var(--bg-card);color:var(--text);text-decoration:none;font-size:.88rem;transition:.15s; }
.page-btn.active { background:var(--primary);color:#fff;border-color:var(--primary); }
.page-btn:hover:not(.active) { background:var(--bg-secondary); }

/* Action buttons */
.action-btns { display:flex;gap:.5rem;align-items:center; }
.btn-icon { display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:6px;background:var(--bg-secondary);border:1px solid var(--border);text-decoration:none;font-size:.9rem;transition:.15s;cursor:pointer; }
.btn-icon:hover { background:var(--primary);border-color:var(--primary); }
.btn-icon.text-danger:hover { background:#e74c3c;border-color:#e74c3c; }

/* Menu grid */
.menu-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:1rem; }
.menu-card { overflow:hidden;transition:box-shadow .2s; }
.menu-card:hover { box-shadow:0 4px 16px rgba(0,0,0,.12); }
.menu-card-img { position:relative;height:140px;background:var(--bg-secondary);display:flex;align-items:center;justify-content:center; }
.menu-card-img img { width:100%;height:100%;object-fit:cover; }
.menu-emoji { font-size:3.5rem; }
.menu-badge { position:absolute;top:.5rem;right:.5rem;font-size:.7rem; }
.menu-card-body { padding:.85rem; }
.menu-cat { margin-bottom:.15rem; }
.menu-name { margin-bottom:.2rem; }
.menu-price { font-size:1.05rem;margin-top:.4rem; }
.menu-card-actions { padding:.75rem .85rem;border-top:1px solid var(--border);display:flex;gap:.5rem; }

/* Detail rows */
.detail-row { display:flex;justify-content:space-between;align-items:center;padding:.5rem 0;border-bottom:1px solid var(--border); }
.detail-row:last-child { border-bottom:none; }
.total-row { padding-top:.75rem;font-size:1.05rem; }

/* Stock bar */
.stock-bar-bg { height:6px;background:var(--border);border-radius:3px;margin-top:.35rem;overflow:hidden; }
.stock-bar-fill { height:100%;border-radius:3px;transition:width .5s; }
.stock-bar-wrap { display:flex;flex-direction:column; }

/* Avatar */
.avatar-sm { width:34px;height:34px;border-radius:50%;background:var(--primary);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:.9rem;flex-shrink:0; }
.avatar-lg { width:72px;height:72px;border-radius:50%;background:var(--primary);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:2rem; }

/* KPI mini (customer profile) */
.kpi-mini { padding:.6rem 0; }
.kpi-mini .kpi-val { font-size:1.3rem;font-weight:700;color:var(--primary); }
.kpi-mini .kpi-lbl { font-size:.8rem;color:var(--text-muted); }

/* Tables tile */
.table-tile--busy { border:2px solid var(--warning,#f39c12); }

/* Settings tabs */
.settings-tab-btn { display:block;width:100%;text-align:left;padding:.75rem 1rem;border:none;border-radius:6px;background:none;cursor:pointer;font-size:.9rem;color:var(--text);margin-bottom:.25rem;transition:.15s; }
.settings-tab-btn:hover { background:var(--bg-secondary); }
.settings-tab-btn.active { background:var(--primary);color:#fff;font-weight:600; }

/* Alert */
.alert { padding:1rem 1.25rem;border-radius:8px;font-size:.9rem; }
.alert-success { background:#d4edda;color:#155724;border:1px solid #c3e6cb; }
.alert-danger { background:#f8d7da;color:#721c24;border:1px solid #f5c6cb; }

/* Btn group */
.btn-group { display:flex;gap:.5rem; }
.btn-sm { padding:.35rem .8rem;font-size:.82rem; }

/* Link */
.link-primary { color:var(--primary);text-decoration:none;font-weight:500; }
.link-primary:hover { text-decoration:underline; }

/* Text utils */
.font-mono { font-family:'Courier New',monospace; }
.text-sm { font-size:.85rem; }
.text-xs { font-size:.78rem; }
.text-lg { font-size:1.15rem; }
.text-left { text-align:left; }
.text-right { text-align:right; }
.text-center { text-align:center; }
.text-success { color:#27ae60; }
.text-danger { color:#e74c3c; }
.text-warning { color:#f39c12; }
.text-info { color:#2980b9; }
.text-primary { color:var(--primary); }
.text-muted { color:var(--text-muted); }
.font-bold { font-weight:600; }

/* Required asterisk */
.required { color:#e74c3c; }

/* Form helpers */
.form-label { display:block;margin-bottom:.4rem;font-weight:500;font-size:.88rem; }
.form-group { margin-bottom:1.25rem; }
.form-control { width:100%;padding:.55rem .85rem;border:1px solid var(--border);border-radius:7px;background:var(--bg-card);color:var(--text);font-size:.9rem;transition:border-color .2s; }
.form-control:focus { outline:none;border-color:var(--primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 15%,transparent); }

/* KPI card */
.kpi-card .kpi-val { font-size:1.6rem;font-weight:700;margin-bottom:.2rem; }
.kpi-card .kpi-lbl { font-size:.82rem;color:var(--text-muted); }

/* Revenue SVG chart (reports) */
.revenue-chart-wrap { padding:.5rem 0; }

/* ============================================================
   FIX: Batasi ukuran semua SVG icon (cegah ikon raksasa)
   ============================================================ */
svg.icon { width: 18px; height: 18px; flex-shrink: 0; }
.user-card .icon { width: 18px; height: 18px; flex-shrink: 0; color: var(--text-3, #888); }
.user-card { display: flex; align-items: center; gap: .6rem; }
