/* SAYA LUXURY BEAUTY — design layer on top of Bootstrap 5.3.
   Logical properties (inline-start/end) are used throughout so RTL mirrors automatically. */

:root {
  --saya-ink: #1c1819;
  --saya-ink-2: #2a2426;
  --saya-gold: #b8935a;
  --saya-gold-dark: #94733c;
  --saya-gold-soft: #f3e9d8;
  --saya-cream: #faf6f0;
  --saya-line: #ebe3d7;
  --saya-muted: #7b7168;
  --saya-radius: 16px;
  --sidebar-w: 256px;

  --bs-primary: #94733c;
  --bs-primary-rgb: 148, 115, 60;
  --bs-body-bg: var(--saya-cream);
  --bs-body-color: #2b2526;
  --bs-border-color: var(--saya-line);
  --bs-link-color: #7d5f2c;
  --bs-link-color-rgb: 125, 95, 44;
  --bs-link-hover-color: #5e4720;
  --bs-border-radius: 10px;
  --bs-font-sans-serif: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html[dir="rtl"] {
  --bs-font-sans-serif: "Noto Sans Arabic", "Segoe UI", Tahoma, "Geeza Pro", system-ui, sans-serif;
}
html[dir="rtl"] body { font-size: 1.03rem; line-height: 1.7; }

body { min-height: 100vh; -webkit-tap-highlight-color: transparent; }
.brand-title { font-family: "Playfair Display", Georgia, "Times New Roman", serif; letter-spacing: .08em; }
html[dir="rtl"] .brand-title { letter-spacing: 0; }
/* Numbers, amounts, phone numbers, dates and document numbers.
   "plaintext" lets each value pick its own direction from what it contains: digits, "+964 750 …" and
   "INV-000012" stay left-to-right, while an amount followed by an Arabic / Kurdish currency word
   ("1,910,000 د.ع") reads right-to-left, with the currency after the number as a native reader expects.
   Forcing direction: ltr here (as before) put the currency on the wrong side and pinned numbers to the
   left edge in RTL, where they slid under the icon of the dashboard tiles. */
.num, .ltr { unicode-bidi: plaintext; font-variant-numeric: tabular-nums; }
.ltr { direction: ltr; }
/* A block that holds only digits resolves to left-to-right and would hug the left edge; in an RTL page it
   belongs on the right like the text around it. (.text-end / .text-center still win: they are !important.) */
html[dir="rtl"] .num { text-align: right; }

/* ---------- Buttons / forms ---------- */
.btn { --bs-btn-border-radius: 10px; font-weight: 500; }
.btn-primary {
  --bs-btn-bg: var(--saya-gold-dark); --bs-btn-border-color: var(--saya-gold-dark);
  --bs-btn-hover-bg: #7d6030; --bs-btn-hover-border-color: #7d6030;
  --bs-btn-active-bg: #6b5229; --bs-btn-active-border-color: #6b5229;
  --bs-btn-disabled-bg: #c2ad87; --bs-btn-disabled-border-color: #c2ad87;
}
.btn-outline-primary {
  --bs-btn-color: var(--saya-gold-dark); --bs-btn-border-color: var(--saya-gold);
  --bs-btn-hover-bg: var(--saya-gold-dark); --bs-btn-hover-border-color: var(--saya-gold-dark);
  --bs-btn-active-bg: var(--saya-gold-dark); --bs-btn-active-border-color: var(--saya-gold-dark);
}
.btn-dark { --bs-btn-bg: var(--saya-ink); --bs-btn-border-color: var(--saya-ink); }
.btn-wa { background: #1faa59; border-color: #1faa59; color: #fff; }
.btn-wa:hover, .btn-wa:focus { background: #178a47; border-color: #178a47; color: #fff; }
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: var(--saya-gold); box-shadow: 0 0 0 .2rem rgba(184, 147, 90, .22);
}
.form-check-input:checked { background-color: var(--saya-gold-dark); border-color: var(--saya-gold-dark); }
.form-label { font-weight: 500; font-size: .875rem; color: #4d4540; margin-bottom: .3rem; }
.req::after { content: " *"; color: #c0392b; }

/* ---------- Cards / tables ---------- */
.card { border: 1px solid var(--saya-line); border-radius: var(--saya-radius); box-shadow: 0 1px 2px rgba(28, 24, 25, .04); }
.card-header { background: transparent; border-bottom: 1px solid var(--saya-line); font-weight: 600; padding: .9rem 1.1rem; }
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > thead th {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--saya-muted);
  font-weight: 600; white-space: nowrap; border-bottom-width: 1px; background: #fbf8f3;
}
html[dir="rtl"] .table > thead th { letter-spacing: 0; font-size: .8rem; }
.table > tbody td { vertical-align: middle; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: #fbf6ec; }
.table tfoot td { font-weight: 700; background: #fbf8f3; }
.badge { font-weight: 600; }
.page-link { color: var(--saya-gold-dark); }
.active > .page-link { background: var(--saya-gold-dark); border-color: var(--saya-gold-dark); }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--saya-muted); }
.empty i { font-size: 2rem; display: block; margin-bottom: .5rem; color: var(--saya-gold); }

/* ---------- App shell ---------- */
.sidebar {
  position: fixed; inset-block: 0; inset-inline-start: 0; width: var(--sidebar-w); z-index: 1040;
  background: linear-gradient(180deg, var(--saya-ink) 0%, #231d1f 100%); color: #d9cfc3;
  display: flex; flex-direction: column; transition: transform .22s ease;
}
.sidebar-brand { padding: 1.2rem 1.1rem 1rem; display: flex; align-items: center; gap: .7rem; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.sidebar-brand img { width: 42px; height: 42px; object-fit: contain; border-radius: 10px; background: #fff; }
.sidebar-brand .mark {
  width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, #d4b47c, #94733c); color: #1c1819; font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-size: 1.3rem;
}
.sidebar-brand .name { color: #f1e3c6; font-size: .92rem; line-height: 1.25; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: .7rem .6rem; scrollbar-width: thin; }
.sidebar-nav a {
  display: flex; align-items: center; gap: .75rem; padding: .62rem .8rem; margin-bottom: 2px; border-radius: 10px;
  color: #cfc4b7; text-decoration: none; font-size: .94rem; min-height: 44px;
}
.sidebar-nav a i { font-size: 1.1rem; width: 1.3rem; text-align: center; color: var(--saya-gold); }
.sidebar-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar-nav a.active { background: linear-gradient(90deg, rgba(184, 147, 90, .28), rgba(184, 147, 90, .1)); color: #fff; font-weight: 600; }
.sidebar-nav .nav-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: #7d7268; padding: .9rem .8rem .3rem; }
html[dir="rtl"] .sidebar-nav .nav-label { letter-spacing: 0; font-size: .75rem; }
.sidebar-user { padding: .8rem 1rem; border-top: 1px solid rgba(255, 255, 255, .07); font-size: .85rem; }
.sidebar-user .role { color: var(--saya-gold); font-size: .72rem; text-transform: uppercase; }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 1035; }

.main { margin-inline-start: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; transition: margin .22s ease; }
.topbar {
  position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: .6rem;
  padding: .6rem 1.1rem; background: rgba(250, 246, 240, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--saya-line);
}
.topbar h1 { font-size: 1.15rem; margin: 0; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn {
  width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--saya-line);
  background: #fff; color: var(--saya-ink); font-size: 1.15rem; flex: none; text-decoration: none;
}
.icon-btn:hover { background: var(--saya-gold-soft); color: var(--saya-ink); }
.content { padding: 1.1rem; flex: 1; }

body.sidebar-collapsed .sidebar { transform: translateX(-100%); }
html[dir="rtl"] body.sidebar-collapsed .sidebar { transform: translateX(100%); }
body.sidebar-collapsed .main { margin-inline-start: 0; }

@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); box-shadow: 0 0 40px rgba(0, 0, 0, .3); }
  html[dir="rtl"] .sidebar { transform: translateX(100%); }
  .main { margin-inline-start: 0; }
  body.sidebar-open .sidebar { transform: none !important; }
  body.sidebar-open .sidebar-backdrop { display: block; }
  .content { padding: .8rem; }
  .topbar { padding: .5rem .8rem; }
}

/* ---------- Dashboard ---------- */
.kpi { padding: 1rem 1.1rem; height: 100%; position: relative; overflow: hidden; }
.kpi .label { font-size: .78rem; color: var(--saya-muted); text-transform: uppercase; letter-spacing: .06em; }
html[dir="rtl"] .kpi .label { letter-spacing: 0; font-size: .85rem; }
.kpi .value { font-size: 1.45rem; font-weight: 700; margin-top: .15rem; color: var(--saya-ink); }
.kpi .sub { font-size: .8rem; color: var(--saya-muted); }
.kpi .ico {
  position: absolute; inset-block-start: .9rem; inset-inline-end: .9rem; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; background: var(--saya-gold-soft); color: var(--saya-gold-dark); font-size: 1.15rem;
}
.kpi.dark { background: linear-gradient(135deg, var(--saya-ink), #3a2f2a); color: #fff; border: 0; }
.kpi.dark .label, .kpi.dark .sub { color: #cdbf9f; }
.kpi.dark .value { color: #f6e7c8; }
.kpi.dark .ico { background: rgba(255, 255, 255, .1); color: #e7cf9c; }
.rank { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; border-bottom: 1px dashed var(--saya-line); }
.rank:last-child { border-bottom: 0; }
.rank .n { width: 26px; height: 26px; border-radius: 50%; background: var(--saya-gold-soft); color: var(--saya-gold-dark); display: grid; place-items: center; font-size: .78rem; font-weight: 700; flex: none; }
.rank .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Chart.js needs a positioned box that holds only the canvas. The canvas always fills it, so the chart can
   never be left narrower than its card (seen in RTL after the page width changed). */
.chart-box { position: relative; width: 100%; height: 300px; }
.chart-box > canvas { display: block; width: 100% !important; height: 100% !important; }

/* Staff home page: one large tile per section the user may open. */
.home-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.home-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; min-height: 132px; padding: 1.1rem;
  border-radius: 18px; background: #fff; border: 1px solid var(--bs-border-color); color: inherit; text-decoration: none; font-weight: 600; text-align: center;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.home-tile i { font-size: 2rem; color: var(--saya-gold-dark); }
.home-tile:hover, .home-tile:focus-visible { transform: translateY(-2px); border-color: var(--saya-gold); box-shadow: 0 10px 26px rgba(0, 0, 0, .1); color: inherit; }
.home-tile.primary { background: var(--saya-gold); border-color: var(--saya-gold); color: #fff; }
.home-tile.primary i { color: #fff; }

/* Renewal reminder: a small card in the bottom corner (left in LTR, right in RTL), above everything else. */
.renew-pop { position: fixed; inset-block-end: 1rem; inset-inline-start: 1rem; z-index: 1080; width: min(340px, calc(100vw - 2rem));
  padding: .9rem 1rem; border-radius: 14px; background: #fff; border: 1px solid var(--saya-gold); border-inline-start-width: 5px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .22); font-size: .9rem; }
.renew-pop .btn-close { position: absolute; inset-block-start: .6rem; inset-inline-end: .6rem; font-size: .7rem; }
.renew-pop .renew-title { font-weight: 700; color: var(--saya-gold-dark); padding-inline-end: 1.6rem; margin-bottom: .3rem; }
.renew-pop .renew-contact { margin-top: .35rem; }
.renew-pop .renew-contact a { color: inherit; white-space: nowrap; }

/* Copyright line under every page and on the sign-in card. */
.app-footer { padding: .75rem 1rem 1rem; text-align: center; font-size: .78rem; color: var(--bs-secondary-color); }
.auth-card .app-footer { padding: 0; }
.app-footer a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.app-footer a:hover { color: var(--saya-gold-dark); }

/* ---------- Filters ---------- */
.period .btn-group .btn { --bs-btn-padding-x: .7rem; }
.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--saya-gold-soft); color: var(--saya-gold-dark); display: inline-grid; place-items: center; font-weight: 700; flex: none; }
.avatar.lg { width: 64px; height: 64px; font-size: 1.5rem; }
.thumb { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--saya-gold-soft); display: inline-grid; place-items: center; color: var(--saya-gold); flex: none; }
.customer-results { position: absolute; inset-inline: 0; top: 100%; z-index: 1050; background: #fff; border: 1px solid var(--saya-line); border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, .12); max-height: 300px; overflow-y: auto; margin-top: 4px; }
.customer-results button { display: flex; width: 100%; justify-content: space-between; gap: .6rem; padding: .6rem .8rem; background: none; border: 0; border-bottom: 1px solid var(--saya-line); text-align: start; min-height: 46px; align-items: center; }
.customer-results button:hover, .customer-results button:focus { background: var(--saya-gold-soft); }
.customer-chip { display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem; border: 1px solid var(--saya-gold); border-radius: 12px; background: #fffdf8; }

/* ---------- Appointments ---------- */
/* Status colours, shared by calendar blocks, legend dots and badges. */
.st-booked { --st: #b8935a; --st-bg: #fbf4e6; }
.st-confirmed { --st: #2f7fbf; --st-bg: #edf5fc; }
.st-arrived { --st: #7b5cc4; --st-bg: #f3effb; }
.st-done { --st: #2e9e6b; --st-bg: #ebf7f1; }
.st-cancelled { --st: #8b8580; --st-bg: #f1efed; }
.st-no_show { --st: #c0392b; --st-bg: #fbeceb; }
.cal-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; background: var(--st); flex: none; }
.appt-badge { background: var(--st-bg); color: var(--st); border: 1px solid var(--st); }

.cal-wrap { overflow-x: auto; border-radius: var(--saya-radius) var(--saya-radius) 0 0; }
.cal {
  --cal-slot: 30px; --cal-gutter: 58px; --cal-col-min: 150px;
  display: grid; grid-template-columns: var(--cal-gutter) repeat(var(--cal-cols), minmax(var(--cal-col-min), 1fr));
  min-width: calc(var(--cal-gutter) + var(--cal-cols) * var(--cal-col-min));
}
.cal-corner, .cal-head { background: #fbf8f3; border-bottom: 1px solid var(--saya-line); padding: .55rem .6rem; min-height: 44px; }
.cal-corner { position: sticky; inset-inline-start: 0; z-index: 3; display: grid; place-items: center; color: var(--saya-muted); }
.cal-head { display: flex; align-items: center; justify-content: center; gap: .4rem; font-weight: 600; border-inline-start: 1px solid var(--saya-line); min-width: 0; }
.cal-times, .cal-col { position: relative; height: calc(var(--cal-slots) * var(--cal-slot)); }
.cal-times { position: sticky; inset-inline-start: 0; z-index: 3; background: #fff; }
.cal-hour { position: absolute; inset-inline: 0; text-align: center; font-size: .74rem; color: var(--saya-muted); padding-top: 2px; border-top: 1px solid var(--saya-line); }
.cal-col {
  border-inline-start: 1px solid var(--saya-line);
  /* A solid line on the hour, a faint one on the half hour. */
  background-image: linear-gradient(to bottom, var(--saya-line) 1px, transparent 1px), linear-gradient(to bottom, #f6f1e8 1px, transparent 1px);
  background-size: 100% calc(var(--cal-slot) * 2), 100% var(--cal-slot);
}
.cal-slot { position: absolute; inset-inline: 0; height: var(--cal-slot); }
.cal-slot:hover, .cal-slot:focus-visible { background: rgba(184, 147, 90, .16); outline: 0; }
.cal-ev {
  position: absolute; z-index: 1; display: flex; flex-direction: column; overflow: hidden;
  padding: .2rem .45rem; border-radius: 10px; font-size: .8rem; line-height: 1.3; text-decoration: none; color: var(--saya-ink);
  background: var(--st-bg); border: 1px solid var(--st); border-inline-start-width: 4px; box-shadow: 0 1px 3px rgba(28, 24, 25, .08);
}
a.cal-ev:hover, a.cal-ev:focus-visible { color: var(--saya-ink); box-shadow: 0 6px 16px rgba(28, 24, 25, .16); z-index: 2; }
.cal-ev-time { font-size: .72rem; color: var(--st); font-weight: 600; text-align: start; }
html[dir="rtl"] .cal-ev-time { text-align: end; }
.cal-ev-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev-svc { color: var(--saya-muted); overflow: hidden; }
/* Bookings under 45 minutes have room for one line only: time and name side by side. */
.cal-ev-short { flex-direction: row; align-items: center; gap: .4rem; padding-block: 0; }
.cal-ev-short .cal-ev-time { flex: none; }
.cal-ev-short .cal-ev-name { min-width: 0; }
.cal-ev-short .cal-ev-svc { display: none; }
.cal-now { position: absolute; inset-inline: 0; height: 2px; background: #c0392b; z-index: 2; pointer-events: none; }
.svc-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--saya-line); border-radius: 12px; background: #fff; }
.svc { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; min-height: 44px; border-bottom: 1px solid var(--saya-line); cursor: pointer; margin: 0; }
.svc:last-child { border-bottom: 0; }
.svc:hover { background: #fbf6ec; }
.svc .form-check-input { margin: 0; flex: none; }

/* ---------- Auth ---------- */
.auth-body { background: radial-gradient(1200px 600px at 80% -10%, #3a2f2a 0%, var(--saya-ink) 55%); min-height: 100vh; }
.auth-card { border: 0; border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.auth-logo { width: 84px; height: 84px; object-fit: contain; border-radius: 20px; }

/* ---------- POS ---------- */
.pos { position: fixed; inset: 0; display: flex; flex-direction: column; background: #f4efe7; }
.pos-top { display: flex; align-items: center; gap: .5rem; padding: .5rem .7rem; background: var(--saya-ink); color: #fff; flex: none; }
.pos-top .icon-btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .12); color: #f1e3c6; }
.pos-top .icon-btn:hover { background: rgba(255, 255, 255, .18); }
.pos-top .brand-title { color: #f1e3c6; font-size: 1rem; white-space: nowrap; }
.pos-search { flex: 1; max-width: 460px; }
.pos-search input { background: rgba(255, 255, 255, .1); border-color: transparent; color: #fff; height: 42px; border-radius: 12px; }
.pos-search input::placeholder { color: #b8ada0; }
.pos-search input:focus { background: #fff; color: var(--saya-ink); }
.pos-body { flex: 1; display: flex; min-height: 0; }
.pos-items { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pos-cats { display: flex; gap: .45rem; padding: .6rem .7rem; overflow-x: auto; flex: none; scrollbar-width: none; }
.pos-cats::-webkit-scrollbar { display: none; }
.pos-cats button { flex: none; border: 1px solid var(--saya-line); background: #fff; border-radius: 999px; padding: .5rem 1.05rem; font-weight: 500; min-height: 42px; color: var(--saya-ink); }
.pos-cats button.active { background: var(--saya-ink); color: #f1e3c6; border-color: var(--saya-ink); }
.pos-grid { flex: 1; overflow-y: auto; padding: .2rem .7rem 5rem; display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: max-content; align-content: start; }
.pos-item { background: #fff; border: 1px solid var(--saya-line); border-radius: 16px; overflow: hidden; text-align: start; padding: 0; display: flex; flex-direction: column; transition: transform .08s ease, box-shadow .15s ease; color: var(--saya-ink); }
.pos-item:active { transform: scale(.97); }
.pos-item:hover { box-shadow: 0 8px 22px rgba(28, 24, 25, .1); border-color: var(--saya-gold); }
.pos-item .ph { aspect-ratio: 4 / 3; width: 100%; flex: none; object-fit: cover; background: linear-gradient(135deg, #f3e9d8, #ead9bd); display: grid; place-items: center; color: var(--saya-gold-dark); font-family: "Playfair Display", Georgia, serif; font-size: 2rem; }
.pos-item .meta { padding: .55rem .7rem .65rem; flex: none; }
.pos-item .nm { font-weight: 600; font-size: .93rem; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.pos-item .pr { color: var(--saya-gold-dark); font-weight: 700; font-size: .92rem; margin-top: .15rem; }
.pos-item .stk { font-size: .76rem; color: var(--saya-muted); margin-top: .1rem; }
.pos-item.out .ph { opacity: .45; }
.pos-item.flash { animation: posflash .35s ease; }
@keyframes posflash { 0% { box-shadow: 0 0 0 0 rgba(184, 147, 90, .7); } 100% { box-shadow: 0 0 0 14px rgba(184, 147, 90, 0); } }

.pos-cart { width: 400px; max-width: 100%; background: #fff; border-inline-start: 1px solid var(--saya-line); display: flex; flex-direction: column; flex: none; }
.pos-cart-head { padding: .7rem; border-bottom: 1px solid var(--saya-line); flex: none; }
.pos-lines { flex: 1; overflow-y: auto; padding: .4rem .7rem; }
.pos-line { padding: .6rem 0; border-bottom: 1px dashed var(--saya-line); }
.pos-line .top { display: flex; gap: .5rem; align-items: flex-start; }
.pos-line .nm { flex: 1; font-weight: 600; font-size: .92rem; }
.pos-line .rm { border: 0; background: none; color: #b34a3c; font-size: 1.1rem; width: 36px; height: 36px; flex: none; }
.pos-line .ctl { display: flex; gap: .4rem; align-items: center; margin-top: .35rem; }
.pos-line .qty { display: flex; align-items: center; border: 1px solid var(--saya-line); border-radius: 10px; overflow: hidden; flex: none; direction: ltr; }
.pos-line .qty button { width: 36px; height: 36px; border: 0; background: #faf6f0; font-size: 1.1rem; }
.pos-line .qty span { min-width: 30px; text-align: center; font-weight: 600; }
.pos-line .price { width: 104px; text-align: center; height: 36px; padding: .2rem .4rem; }
.pos-line .staff { flex: 1; min-width: 0; height: 36px; padding-block: .2rem; font-size: .85rem; }
.pos-line .lt { font-weight: 700; white-space: nowrap; margin-inline-start: auto; }
.pos-foot { border-top: 1px solid var(--saya-line); padding: .7rem; background: #fdfbf7; flex: none; }
.pos-foot .row-line { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .4rem; font-size: .93rem; }
.pos-foot .grand { font-size: 1.3rem; font-weight: 800; color: var(--saya-ink); }
.pos-foot .form-control, .pos-foot .form-select { height: 40px; }
.pos-pay { height: 56px; font-size: 1.1rem; font-weight: 700; }
.pos-mobile-bar { display: none; }
.pos-cart-close { display: none; }

@media (max-width: 899.98px) {
  .pos-top .brand-title { display: none; }
  .pos-cart { position: fixed; inset: 0; z-index: 1060; width: 100%; transform: translateY(100%); transition: transform .22s ease; border: 0; }
  .pos.cart-open .pos-cart { transform: none; }
  .pos-cart-close { display: inline-grid; }
  .pos-mobile-bar {
    display: flex; position: fixed; inset-inline: .7rem; bottom: calc(.7rem + env(safe-area-inset-bottom)); z-index: 1050;
    background: var(--saya-ink); color: #fff; border-radius: 16px; padding: .8rem 1rem; align-items: center; justify-content: space-between;
    border: 0; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); font-weight: 600; min-height: 56px;
  }
  .pos-mobile-bar .cnt { background: var(--saya-gold); color: var(--saya-ink); border-radius: 999px; min-width: 28px; height: 28px; display: inline-grid; place-items: center; margin-inline-end: .5rem; padding: 0 .4rem; }
  .pos-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: .55rem; }
}

/* ---------- Documents (invoice / voucher) ---------- */
.doc { background: #fff; border: 1px solid var(--saya-line); border-radius: var(--saya-radius); padding: 2rem; max-width: 860px; margin-inline: auto; }
.doc-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; border-bottom: 2px solid var(--saya-ink); padding-bottom: 1rem; margin-bottom: 1.2rem; }
.doc-head img { max-height: 76px; max-width: 160px; object-fit: contain; }
.doc-title { font-size: 1.5rem; font-weight: 700; color: var(--saya-gold-dark); text-transform: uppercase; letter-spacing: .08em; }
html[dir="rtl"] .doc-title { letter-spacing: 0; }
.doc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.2rem; }
.doc-meta .k { font-size: .74rem; text-transform: uppercase; color: var(--saya-muted); letter-spacing: .05em; }
.doc-totals { margin-inline-start: auto; width: min(320px, 100%); }
.doc-totals div { display: flex; justify-content: space-between; padding: .3rem 0; }
.doc-totals .grand { border-top: 2px solid var(--saya-ink); font-weight: 800; font-size: 1.15rem; margin-top: .3rem; padding-top: .5rem; }
.doc-foot { margin-top: 1.6rem; padding-top: .9rem; border-top: 1px solid var(--saya-line); display: flex; justify-content: space-between; gap: 1rem; font-size: .85rem; color: var(--saya-muted); flex-wrap: wrap; }
.void-stamp { border: 3px solid #c0392b; color: #c0392b; display: inline-block; padding: .2rem 1rem; border-radius: 8px; font-weight: 800; transform: rotate(-6deg); }
@media (max-width: 575.98px) { .doc { padding: 1.1rem; } .doc-meta { grid-template-columns: 1fr; } }

@media print {
  @page { margin: 12mm; }
  body { background: #fff !important; }
  .sidebar, .topbar, .no-print, .sidebar-backdrop, .alert { display: none !important; }
  .main { margin: 0 !important; }
  .content { padding: 0 !important; }
  .doc, .card { border: 0 !important; box-shadow: none !important; padding: 0 !important; max-width: none; }
  .table > thead th { background: #f2f2f2 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { text-decoration: none; color: inherit; }
}
