@import url('/assets/fonts/cairo.css');

/* ============================================================
   Reservations SaaS — UI
   Dense, border-defined, flat. Structure over decoration.
   Same palette: petrol teal / green-charcoal chrome / warm paper.
   RTL-first: logical properties throughout.
   ============================================================ */

:root {
  /* ground */
  --bg: #f4f4f1;
  --surface: #ffffff;
  --surface-2: #fafaf8;
  --ink: #1b2024;
  --ink-2: #3c464c;
  --muted: #6d757c;
  --line: #e3e3de;
  --line-2: #cfd2cc;

  /* brand */
  --brand: #0c7d6f;
  --brand-ink: #095e54;
  --brand-soft: #e3f1ee;
  --brand-ring: rgba(12, 125, 111, .25);

  /* chrome (sidebar) */
  --chrome: #141f1d;
  --chrome-ink: #93a5a0;
  --chrome-line: rgba(255, 255, 255, .07);

  /* semantic */
  --success: #1a7f46;
  --success-soft: #e5f3ea;
  --warn: #9c6410;
  --warn-soft: #f9f0dd;
  --danger: #b23434;
  --danger-soft: #f9e9e9;
  --info: #26697e;
  --info-soft: #e5f1f5;

  /* shape */
  --r: 6px;
  --r-md: 8px;
  --shadow-pop: 0 8px 24px rgba(27, 32, 36, .13);

  --sidebar-w: 232px;
  --topbar-h: 52px;
  --ctrl-h: 32px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}
h1, h2, h3, h4 { margin: 0; line-height: 1.3; }
a { color: var(--brand-ink); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: 2px solid var(--brand-ring); outline-offset: 1px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ============================== shell ============================== */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--chrome);
  color: var(--chrome-ink);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 40;
  scrollbar-width: thin;
  scrollbar-color: #2c3b38 transparent;
}

.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--chrome-line);
  color: #e9efed; font-weight: 700; font-size: 14px; line-height: 1.3;
}
.brand .logo-badge {
  width: 32px; height: 32px; border-radius: var(--r); flex-shrink: 0;
  background: var(--brand);
  display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 700;
}
/* subscriber's own logo — larger presence */
.brand > img { width: 52px; height: 52px; border-radius: var(--r-md); object-fit: cover; background: #fff; flex-shrink: 0; }
.brand .logo-badge img.app-logo {
  width: 22px; height: 22px; object-fit: contain;
  background: transparent; border-radius: 0;
}
.brand .brand-sub {
  display: block; font-size: 11px; font-weight: 500; color: var(--chrome-ink); margin-top: 0;
}

.nav { padding: 8px; flex: 1; }
.nav-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
  color: #5c6e69; font-weight: 600; padding: 14px 10px 4px;
}
.navlink {
  display: flex; align-items: center; gap: 9px;
  height: 32px; padding: 0 10px; margin: 1px 0;
  border-radius: var(--r); color: var(--chrome-ink);
  font-weight: 600; font-size: 13px;
}
.navlink:hover { background: rgba(255, 255, 255, .05); color: #dde6e3; text-decoration: none; }
.navlink.active { background: rgba(255, 255, 255, .1); color: #fff; }
.navlink .ico { width: 16px; height: 16px; flex-shrink: 0; opacity: .85; }
.navlink.active .ico { opacity: 1; color: #7fd1c3; }

.sidebar-foot {
  padding: 12px 16px; border-top: 1px solid var(--chrome-line);
  font-size: 11px; line-height: 1.5; color: #56655f;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ============================== topbar ============================== */
.topbar {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0 20px; height: var(--topbar-h);
  position: sticky; top: 0; z-index: 30;
}
.topbar .page-title { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.topbar .spacer { flex: 1; }

.userchip {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 8px; border-radius: var(--r);
  border: 1px solid transparent;
}
.userchip:hover { background: var(--surface-2); border-color: var(--line); text-decoration: none; }
.avatar {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  background: var(--brand-soft); color: var(--brand-ink);
  display: grid; place-items: center; font-weight: 700; font-size: 12px;
}
.userchip .uname { font-weight: 600; font-size: 12.5px; line-height: 1.2; color: var(--ink); }
.userchip .urole { font-size: 10.5px; color: var(--muted); }

.content { padding: 24px; max-width: 1200px; width: 100%; margin: 0 auto; }

/* ============================== buttons ============================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 600; font-size: 13px;
  height: var(--ctrl-h); padding: 0 12px; border-radius: var(--r);
  border: 1px solid transparent; cursor: pointer;
  background: var(--brand); color: #fff;
  transition: background .1s, border-color .1s, color .1s;
  white-space: nowrap;
}
.btn:hover { background: var(--brand-ink); text-decoration: none; }
.btn:active { background: #07463f; }
.btn.ghost { background: var(--surface); color: var(--ink-2); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--surface-2); border-color: #b8bcb5; color: var(--ink); }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #932a2a; }
.btn.danger-ghost { background: var(--surface); color: var(--danger); border-color: var(--line-2); }
.btn.danger-ghost:hover { background: var(--danger-soft); border-color: #d8a5a5; }
.btn.success { background: var(--success); }
.btn.success:hover { background: #14683a; }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12px; }
.btn.lg { height: 38px; padding: 0 18px; font-size: 13.5px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn .ico { width: 14px; height: 14px; }
.btn.sm .ico { width: 13px; height: 13px; }

/* ============================== cards ============================== */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
/* for cards hosting absolutely-positioned dropdowns (e.g. client search) */
.card.allow-overflow { overflow: visible; }
.card.allow-overflow .card-head {
  border-start-start-radius: 7px;
  border-start-end-radius: 7px;
}
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  min-height: 44px;
}
.card-head h2 { font-size: 13px; font-weight: 700; }
.card-head .spacer { flex: 1; }
.card-body { padding: 16px; }
.card-body.tight { padding: 0; }

/* ============================== stats ============================== */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px; margin-bottom: 20px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.stat {
  background: var(--surface);
  padding: 12px 16px;
  position: relative;
  display: block;
}
.stat > div { display: flex; flex-direction: column-reverse; }
.stat b {
  font-size: 19px; font-weight: 700; line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.stat span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.stat .stat-ico {
  position: absolute; top: 12px; inset-inline-end: 12px;
  width: auto; height: auto; background: none; color: var(--line-2);
  display: block;
}
.stat .stat-ico.green { color: var(--success); opacity: .45; }
.stat .stat-ico.amber { color: var(--warn); opacity: .45; }
.stat .stat-ico.red { color: var(--danger); opacity: .45; }
.stat .stat-ico.cyan { color: var(--info); opacity: .45; }
.stat .stat-ico svg { width: 16px; height: 16px; }

/* ============================== tables ============================== */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: start; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); font-weight: 600;
  padding: 8px 14px; border-bottom: 1px solid var(--line);
  background: var(--surface-2); white-space: nowrap;
}
.tbl td { padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl .num { font-variant-numeric: tabular-nums; }
.tbl .actions-cell { display: flex; gap: 6px; justify-content: flex-end; }

.empty { text-align: center; padding: 36px 16px; color: var(--muted); font-size: 13px; }
.empty svg { width: 28px; height: 28px; opacity: .35; margin-bottom: 6px; }

/* ============================== badges ============================== */
.badge {
  display: inline-flex; align-items: center;
  font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 4px;
  white-space: nowrap; line-height: 1.6;
  border: 1px solid transparent;
}
.badge.gray { background: #f0f1ee; color: var(--ink-2); border-color: var(--line); }
.badge.green { background: var(--success-soft); color: var(--success); border-color: #cbe6d5; }
.badge.amber { background: var(--warn-soft); color: var(--warn); border-color: #ecdcb8; }
.badge.red { background: var(--danger-soft); color: var(--danger); border-color: #edcbcb; }
.badge.blue { background: var(--brand-soft); color: var(--brand-ink); border-color: #c4e0da; }
.badge.cyan { background: var(--info-soft); color: var(--info); border-color: #c7dfe7; }

/* ============================== forms ============================== */
.field { margin-bottom: 14px; }
.field > label {
  display: block; font-weight: 600; font-size: 12.5px;
  margin-bottom: 4px; color: var(--ink-2);
}
.field .hint { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.input, .select, textarea.input {
  width: 100%; font: inherit; font-size: 13px; color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--r);
  height: var(--ctrl-h); padding: 0 10px;
  transition: border-color .1s, box-shadow .1s;
}
textarea.input { height: auto; padding: 7px 10px; }
input[type="file"].input { padding: 4px 8px; }
.input:focus, .select:focus, textarea.input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
.input::placeholder { color: #a2aab0; }
.select {
  appearance: none; padding-inline-end: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236d757c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
}
[dir="rtl"] .select { background-position: left 9px center; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .span2 { grid-column: span 2; }
.checkrow {
  display: flex; align-items: center; gap: 8px;
  font-weight: 500; font-size: 13px; padding: 5px 0; cursor: pointer;
  color: var(--ink);
}
.checkrow input {
  width: 15px; height: 15px; accent-color: var(--brand); cursor: pointer; flex-shrink: 0;
}
.form-actions { display: flex; gap: 8px; margin-top: 10px; }

/* ============================== toolbar / page head ============================== */
.toolbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-bottom: 16px;
}
.toolbar .spacer { flex: 1; }
.toolbar .input, .toolbar .select { width: auto; }
.toolbar label { font-weight: 500; font-size: 12.5px; }

.page-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.page-head h1 { font-size: 19px; font-weight: 700; }
.page-head .sub { color: var(--muted); font-size: 12.5px; }
.page-head .spacer { flex: 1; }

/* ============================== flash / alerts ============================== */
.flash {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: var(--r); margin-bottom: 16px;
  font-weight: 600; font-size: 13px;
  border: 1px solid;
}
.flash .ico { width: 15px; height: 15px; flex-shrink: 0; }
.flash.success { background: var(--success-soft); color: var(--success); border-color: #c4e4cf; }
.flash.error { background: var(--danger-soft); color: var(--danger); border-color: #eccaca; }
.alert-inline {
  padding: 8px 12px; border-radius: var(--r); font-size: 12.5px; font-weight: 500;
  background: var(--warn-soft); color: var(--warn); border: 1px solid #ecd9b4;
}
.flash-error { animation: shake .25s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ============================== modal ============================== */
dialog.modal {
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 0;
  width: min(480px, calc(100vw - 32px));
  box-shadow: var(--shadow-pop);
  color: var(--ink);
}
dialog.modal.wide { width: min(640px, calc(100vw - 32px)); }
dialog.modal::backdrop { background: rgba(16, 24, 22, .45); }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.modal-head h3 { font-size: 13.5px; font-weight: 700; }
.modal-body { padding: 16px; }
.modal-x {
  background: none; border: none; cursor: pointer; color: var(--muted);
  font-size: 18px; line-height: 1; padding: 2px 7px; border-radius: 4px;
}
.modal-x:hover { background: var(--line); color: var(--ink); }

/* ============================== notifications ============================== */
.bell-wrap { position: relative; }
.bell {
  position: relative; background: none; border: 1px solid transparent; cursor: pointer;
  width: 30px; height: 30px; border-radius: var(--r); display: grid; place-items: center;
  color: var(--ink-2);
}
.bell:hover { background: var(--surface-2); border-color: var(--line); text-decoration: none; }
.bell svg { width: 16px; height: 16px; }
.bell .dot {
  position: absolute; top: 1px; inset-inline-end: 1px;
  min-width: 14px; height: 14px; padding: 0 3px; border-radius: 99px;
  background: var(--danger); color: #fff; font-size: 9px; font-weight: 700;
  display: grid; place-items: center; border: 1.5px solid var(--surface);
}
.dropdown {
  position: absolute; top: calc(100% + 6px); inset-inline-end: 0;
  width: 320px; max-height: 400px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-pop); z-index: 60; display: none;
}
.dropdown.open { display: block; }
.dropdown .dd-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; border-bottom: 1px solid var(--line);
  font-weight: 700; font-size: 12.5px;
  position: sticky; top: 0; background: var(--surface-2);
}
.dd-head button {
  background: none; border: none; color: var(--brand-ink);
  font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer;
}
.dd-head button:hover { text-decoration: underline; }
.notif-item {
  display: block; padding: 9px 12px; border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.notif-item:hover { background: var(--surface-2); text-decoration: none; }
.notif-item:last-child { border-bottom: 0; }
.notif-item.unread { background: var(--brand-soft); }
.notif-item.unread:hover { background: #d8ebe6; }
.notif-item b { display: block; font-size: 12.5px; }
.notif-item span { font-size: 12px; color: var(--ink-2); }
.notif-item time { display: block; font-size: 10.5px; color: var(--muted); margin-top: 1px; font-variant-numeric: tabular-nums; }

/* ============================== toasts ============================== */
.toast-wrap {
  position: fixed; bottom: 18px; inset-inline-end: 18px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 100; width: min(320px, calc(100vw - 36px));
}
.toast {
  position: relative; display: block;
  background: var(--chrome); color: #b7c4bf;
  border-inline-start: 3px solid var(--brand);
  border-radius: var(--r-md); padding: 11px 30px 11px 14px;
  box-shadow: var(--shadow-pop);
  animation: toast-in .25s ease;
}
[dir="rtl"] .toast { padding: 11px 14px 11px 30px; }
.toast:hover { text-decoration: none; }
.toast b { display: block; font-size: 13px; color: #fff; margin-bottom: 1px; }
.toast span { font-size: 12.5px; }
.toast-x {
  position: absolute; top: 7px; inset-inline-end: 8px;
  background: none; border: none; color: #7d8d88; cursor: pointer;
  font-size: 16px; line-height: 1; padding: 2px 5px; border-radius: 4px;
}
.toast-x:hover { color: #fff; background: rgba(255,255,255,.08); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ============================== pagination ============================== */
.pagination {
  display: flex; align-items: center; gap: 4px;
  padding: 10px 14px; border-top: 1px solid var(--line);
}
.pagination a, .pagination span.cur {
  min-width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 7px; border-radius: 4px; font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--line-2); color: var(--ink-2); background: var(--surface);
  font-variant-numeric: tabular-nums;
}
.pagination a:hover { background: var(--surface-2); text-decoration: none; }
.pagination span.cur { background: var(--brand); border-color: var(--brand); color: #fff; }
.pagination .total { font-size: 11.5px; color: var(--muted); margin-inline-start: auto; }

/* ============================== auth ============================== */
.auth-wrap {
  min-height: 100vh; display: grid; place-items: center;
  background: var(--bg);
  padding: 24px;
}
.auth-card {
  width: min(360px, 100%);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 28px 26px 24px;
}
.auth-card .auth-logo {
  width: 44px; height: 44px; border-radius: var(--r-md); margin: 0 auto 14px;
  background: var(--brand);
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 20px;
}
.auth-card .auth-logo img { width: 30px; height: 30px; object-fit: contain; }
.auth-card h1 { font-size: 17px; margin-bottom: 3px; text-align: center; }
.auth-card .sub { color: var(--muted); font-size: 12.5px; margin: 0 0 20px; text-align: center; }
.auth-admin-tag {
  display: block; width: fit-content; margin: 0 auto 10px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  background: var(--warn-soft); color: var(--warn); padding: 2px 9px; border-radius: 4px;
  border: 1px solid #ecd9b4;
}
.auth-contact {
  margin-top: 14px; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  text-align: center;
}
.auth-contact-title { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.auth-contact a {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 2px 8px; font-size: 13px; font-weight: 600; color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.auth-contact a:hover { color: var(--brand-ink); text-decoration: none; }
.auth-contact a svg { width: 14px; height: 14px; color: var(--brand); }

.auth-lang { text-align: center; margin-top: 16px; }
.auth-lang button {
  background: none; border: none; color: var(--muted);
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
}
.auth-lang button:hover { color: var(--ink); text-decoration: underline; }

/* ============================== detail lists / price ============================== */
.dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; font-size: 13px; }
.dl dt { color: var(--muted); font-weight: 500; }
.dl dd { margin: 0; font-weight: 600; }

.two-col { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .two-col { grid-template-columns: 1fr; } }

.price-line {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 6px 0; font-size: 13px; border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.price-line:last-child { border-bottom: 0; }
.price-line.total {
  font-weight: 700; font-size: 14.5px;
  border-top: 1px solid var(--ink-2); border-bottom: 0;
  margin-top: 2px; padding-top: 8px;
}
.price-line .lab { color: var(--ink-2); font-weight: 500; }

/* ============================== booking items ============================== */
.item-row {
  display: grid;
  grid-template-columns: 1fr 1fr 168px 168px auto;
  gap: 10px; align-items: end;
  padding: 10px 0; border-bottom: 1px dashed var(--line-2);
}
.item-row:last-child { border-bottom: 0; }
.item-side { display: flex; align-items: center; gap: 8px; padding-bottom: 5px; }
.item-side .it-amount { font-size: 13px; font-weight: 700; min-width: 64px; text-align: end; color: var(--brand-ink); }
.item-side .it-remove { width: 26px; padding: 0; font-size: 14px; }
@media (max-width: 1100px) {
  .item-row { grid-template-columns: 1fr 1fr; }
  .item-side { justify-content: flex-end; }
}

/* ============================== check-in ============================== */
.scan-box { max-width: 480px; margin: 32px auto 0; text-align: center; }
.scan-box .scan-ico {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: var(--r-md);
  background: var(--brand-soft); color: var(--brand-ink);
  display: grid; place-items: center;
}
.scan-box .scan-ico svg { width: 26px; height: 26px; }
.scan-box h1 { font-size: 19px; }
.scan-box p { font-size: 12.5px; }
.scan-box input {
  text-align: center; font-size: 16px; font-weight: 600; letter-spacing: .06em;
  height: 42px; margin-top: 8px;
  font-variant-numeric: tabular-nums;
}
.scan-result { max-width: 480px; margin: 18px auto; }

/* ============================== POS ============================== */
.pos-grid { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .pos-grid { grid-template-columns: 1fr; } }
.pos-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.pos-card {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 10px 11px; cursor: pointer; text-align: start;
  font: inherit; color: var(--ink);
}
.pos-card:hover { border-color: var(--brand); background: var(--surface-2); }
.pos-card b { display: block; font-size: 12.5px; margin-bottom: 2px; line-height: 1.35; }
.pos-card .p { color: var(--brand-ink); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.pos-card .s { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cart-line { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.cart-line b { flex: 1; font-size: 12.5px; line-height: 1.35; }
.cart-line input { width: 54px; height: 28px; text-align: center; padding: 0 4px; }
.cart-line .x {
  background: none; border: none; color: var(--danger); cursor: pointer;
  font-size: 15px; width: 24px; height: 24px; border-radius: 4px; flex-shrink: 0;
}
.cart-line .x:hover { background: var(--danger-soft); }

/* ============================== utilities ============================== */
.muted { color: var(--muted); }
.small { font-size: 12px; }
.bold { font-weight: 700; }
.mt { margin-top: 14px; }
.mb0 { margin-bottom: 0; }
.text-end { text-align: end; }
.nowrap { white-space: nowrap; }
.w100 { width: 100%; }
.num { font-variant-numeric: tabular-nums; }
.logo-thumb {
  width: 32px; height: 32px; border-radius: var(--r); object-fit: cover;
  border: 1px solid var(--line); background: #fff;
}
code.code-tag {
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px;
  padding: 1px 6px; font-size: 11.5px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ============================== responsive ============================== */
.menu-btn {
  display: none; background: none; border: 1px solid var(--line-2); border-radius: var(--r);
  width: 32px; height: 32px; cursor: pointer; color: var(--ink-2); place-items: center;
}
.menu-btn .ico { width: 16px; height: 16px; }
@media (max-width: 900px) {
  .menu-btn { display: grid; }
  .sidebar {
    position: fixed; inset-inline-start: 0;
    transform: translateX(calc(var(--slide, -1) * 100%));
    transition: transform .18s ease;
  }
  [dir="rtl"] .sidebar { --slide: 1; }
  [dir="ltr"] .sidebar { --slide: -1; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-pop); }
  .content { padding: 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span2 { grid-column: span 1; }
  .topbar { padding: 0 12px; }
  .page-head h1 { font-size: 17px; }
  .userchip .urole { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  body { background: #fff; }
  .content { padding: 0; max-width: none; }
  .card { border: none; }
}
