:root {
  color-scheme: dark;
  --surface: #111211;
  --sidebar: #161714;
  --card: #1a1b18;
  --raised: #242520;
  --border: #32312b;
  --fine: #2e3028;
  --gold: #eac784;
  --gold-dark: #a77a37;
  --ink: #f7f3ea;
  --muted: #b0aba1;
  --quiet: #908c82;
  --green: #a5d3ab;
  --red: #ffb0a1;
  --radius: 12px;
  --shadow: 0 24px 70px #0007;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--surface);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 0; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button[disabled] { cursor: wait; opacity: .6; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.9rem, 3vw, 2.55rem); font-weight: 730; letter-spacing: -.055em; line-height: 1.12; }
h2 { font-size: 1.12rem; font-weight: 690; letter-spacing: -.015em; }
h3 { font-size: 1rem; font-weight: 670; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] .brand-title, [dir="rtl"] .hero h1 { letter-spacing: normal; line-height: 1.35; }
small, .small { font-size: .82rem; }
.muted { color: var(--muted); }
.secondary-text { color: var(--muted); line-height: 1.5; }
.quiet { color: var(--quiet); }
.gold { color: var(--gold); }
.num, .money { font-variant-numeric: tabular-nums; }
.icon { display: block; width: 1.18rem; height: 1.18rem; flex: 0 0 auto; }
.icon.small-icon { width: .95rem; height: .95rem; }
.btn { display: inline-flex; gap: .55rem; align-items: center; justify-content: center; min-height: 2.65rem; padding: .63rem .94rem; border-radius: .65rem; border: 1px solid var(--border); color: var(--ink); background: var(--raised); font-size: .89rem; font-weight: 650; white-space: nowrap; line-height: 1.2; transition: border-color .18s, background .18s, color .18s; }
.btn:hover { background: #2d2a23; border-color: #61523b; }
.btn.primary { background: #e9c484; color: #1a160f; border-color: #edcc93; box-shadow: 0 2px 0 #8f6d38; }
.btn.primary:hover { background: #f5d49d; border-color: #f8dfb5; }
.btn.flat { background: transparent; border-color: transparent; color: var(--muted); }
.btn.flat:hover { background: #28261f; color: var(--ink); }
.btn.danger { background: #382220; border-color: #714235; color: var(--red); }
.btn.compact { min-height: 2.2rem; padding: .44rem .7rem; font-size: .85rem; }
.btn.icon-only { width: 2.55rem; padding: .55rem; }
.row { display: flex; gap: .65rem; align-items: center; }
.wrap { flex-wrap: wrap; }
.spread { justify-content: space-between; }
.end { justify-content: flex-end; }
.stack { display: grid; gap: 1.1rem; min-width: 0; }
.align-top { align-items: start; }
.field, .field label { display: grid; gap: .5rem; align-content: start; min-width: 0; }
.field label, label.field { color: #ded8cb; font-size: .88rem; font-weight: 600; }
.field .hint { color: var(--quiet); font-size: .79rem; line-height: 1.4; font-weight: 400; }
.field input, .field select, .field textarea { display: block; color: var(--ink); background: #151514; border: 1px solid #3e3a31; border-radius: .58rem; padding: .6rem .72rem; width: 100%; min-width: 0; min-height: 2.7rem; font-size: 1rem; }
.field input::placeholder, .field textarea::placeholder { color: #8b877d; }
.field input[readonly] { color: var(--gold); border-color: #3b3426; }
.field textarea { min-height: 5.45rem; resize: vertical; }
.field input[type="file"] { font-size: .88rem; padding: .4rem; }
.field input::file-selector-button { border: 1px solid #5f5037; background: #29251e; color: var(--ink); padding: .34rem .58rem; border-radius: .35rem; margin-inline-end: .5rem; }
.field select { appearance: none; padding-inline-end: 2.2rem; background-image: linear-gradient(45deg,transparent 50%,var(--gold) 50%), linear-gradient(135deg,var(--gold) 50%,transparent 50%); background-position: calc(100% - 17px) center, calc(100% - 12px) center; background-size: 5px 5px; background-repeat: no-repeat; }
[dir="rtl"] .field select { background-position: 12px center, 17px center; }
.form-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2,minmax(0,1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.form-message { color: var(--red); font-size: .9rem; line-height: 1.45; margin-top: .4rem; }
.form-message:empty { display: none; }
.help { color: var(--muted); line-height: 1.55; font-size: .89rem; }
.brand { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.brand-mark { direction: ltr; display: inline-grid; place-items: center; flex: 0 0 auto; width: 3.13rem; height: 2.36rem; padding-inline-end: .22rem; clip-path: polygon(0 0,100% 0,88% 100%,0 100%); background: #eac784; color: #191611; font: italic 900 .98rem/1 "Arial Black", "Segoe UI", sans-serif; letter-spacing: -.065em; }
.brand-title { font-size: 1.02rem; font-weight: 750; letter-spacing: -.025em; white-space: nowrap; }
.brand-subtitle { color: var(--quiet); font-size: .74rem; margin-top: .18rem; }
.layout { min-height: 100vh; display: grid; grid-template-columns: 14.6rem minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100dvh; width: 100%; display: flex; flex-direction: column; align-self: start; padding: 1.45rem 1rem .95rem; background: var(--sidebar); border-inline-end: 1px solid var(--fine); z-index: 4; }
.sidebar .brand { padding-inline: .32rem; padding-bottom: 1.35rem; border-bottom: 1px solid var(--fine); }
.sidebar nav { margin-top: 1.18rem; display: flex; flex-direction: column; gap: .25rem; overflow: auto; }
.nav-label { color: var(--quiet); font-size: .75rem; margin: .2rem .65rem .38rem; }
.nav-label.split { padding-top: .8rem; margin-top: .45rem; border-top: 1px solid var(--fine); }
.nav-btn { width: 100%; display: flex; gap: .68rem; align-items: center; text-align: start; padding: .65rem .74rem; min-height: 2.72rem; border-radius: .57rem; border: 1px solid transparent; background: transparent; font-size: .91rem; color: var(--muted); font-weight: 610; }
.nav-btn .icon { color: #a39b8d; }
.nav-btn:hover { background: #25231f; color: var(--ink); }
.nav-btn[aria-current="page"] { color: #f5d69f; border: 1px solid #3d392c; border-inline-start: 3px solid var(--gold); background: #29271e; }
.nav-btn[aria-current="page"] .icon { color: var(--gold); }
.user-row { margin-top: auto; padding: .8rem .34rem .2rem; border-top: 1px solid var(--fine); display: flex; gap: .62rem; align-items: center; }
.avatar { width: 2.18rem; height: 2.18rem; display: grid; place-items: center; border-radius: 50%; border: 1px solid #52452f; background: #35291c; color: #efcf97; font-size: .82rem; font-weight: 750; flex: none; }
.user-text { flex: 1; display: grid; gap: .1rem; min-width: 0; }
.user-text strong, .user-text small { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.user-text strong { font-size: .82rem; }
.user-text small { color: var(--quiet); font-size: .76rem; }
.topbar { height: 4.2rem; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-inline: clamp(1rem,3vw,2.5rem); border-bottom: 1px solid var(--fine); background: #151613; }
.workspace { min-width: 0; }
.branch-city { display: none; }
.topbar .location { font-size: .87rem; color: var(--muted); }
.topbar .location .icon { color: var(--gold); }
.topbar .lang-btn { color: var(--ink); }
.main { width: 100%; max-width: 1500px; margin-inline: auto; padding: clamp(1.05rem,3vw,2.3rem) clamp(1rem,3vw,2.5rem) 3rem; }
.main-title { display: flex; align-items: end; justify-content: space-between; gap: .9rem; margin-bottom: 1.3rem; }
.main-title p { margin-top: .5rem; color: var(--muted); font-size: .89rem; line-height: 1.4; }
.hero {
  min-height: clamp(15.2rem, 24vw, 17.8rem); position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; border: 1px solid #4e4738; border-radius: var(--radius); background: #1b1c18;
}
.cover-media { position: absolute; overflow: hidden; z-index: -2; }
.cover-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media { inset-block: 0; inset-inline-end: 0; width: 68%; clip-path: polygon(13% 0,100% 0,100% 100%,0 100%); }
[dir="rtl"] .hero-media { clip-path: polygon(0 0,87% 0,100% 100%,0 100%); }
.hero-media img { object-position: center 41%; }
.hero::after {
  content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background: linear-gradient(90deg,#1b1c18 25%,#1b1c18d6 37%,#1b1c1838 54%,#15150f14 81%),
              linear-gradient(0deg,#151510ac,transparent 60%);
}
[dir="rtl"] .hero::after { transform: scaleX(-1); }
.hero-copy { display: grid; justify-items: start; gap: .7rem; padding: 1.4rem clamp(1.25rem, 3vw, 2.6rem); }
.hero h1 { font-size: clamp(2.25rem, 4.8vw, 4.3rem); font-weight: 760; letter-spacing: -.07em; }
.hero-date { display: flex; align-items: center; gap: .5rem; color: #c6beae; font-size: .875rem; }
.hero-date .icon { color: var(--gold); }
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; padding-top: .3rem; }
.hero-actions .status { font-size: .79rem; }
.staff-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.staff-action { display: grid; justify-items: start; gap: .75rem; padding: 1.35rem; }
.staff-action .btn { margin-top: .24rem; }
.staff-glyph { display: grid; place-items: center; width: 2.65rem; height: 2.65rem; background: #30291e; color: var(--gold); border: 1px solid #5b492e; border-radius: .6rem; }
@media (max-width: 550px) { .staff-actions { grid-template-columns: minmax(0,1fr); } }
.dashboard-panels { --gap: 1.05rem; gap: var(--gap); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .9rem; }
.metric { border: 1px solid var(--fine); border-radius: var(--radius); padding: 1rem; min-width: 0; background: linear-gradient(140deg,#201e19,#1b1b19 73%); }
.metric-label { color: #c6bfb1; font-size: .86rem; display: flex; align-items: center; gap: .45rem; min-height: 1.5rem; }
.metric-label .icon { color: var(--gold); }
.metric-value { margin-top: .6rem; font-size: clamp(1.28rem,2.1vw,1.95rem); font-weight: 730; letter-spacing: -.03em; min-width: 0; overflow-wrap: anywhere; }
.money { white-space: nowrap; display: inline-flex; align-items: baseline; gap: .29rem; }
.currency { font-size: .66em; color: var(--gold); font-weight: 660; letter-spacing: 0; }
.metric-value .currency { font-size: .49em; }
.dashboard-metrics {
  gap: 0; overflow: hidden; border: 1px solid #38392f; border-radius: var(--radius); background: #1b1c18;
}
.dashboard-metrics .metric {
  border: 0; border-inline-end: 1px solid #38392f; border-radius: 0; background: transparent;
  padding: .93rem 1.1rem 1.05rem;
}
.dashboard-metrics .metric:last-child { border-inline-end: 0; }
.dashboard-metrics .metric-value { font-size: clamp(1.4rem, 2.65vw, 2.25rem); }

.card { min-width: 0; background: var(--card); border: 1px solid var(--fine); border-radius: var(--radius); padding: 1.1rem; }
.card-head { margin-bottom: 1rem; }
.card-head .muted { margin-top: .33rem; }
.two-panel { display: grid; gap: 1rem; grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); }
.chart { --chart-height: 8.9rem; display: grid; grid-auto-columns: minmax(0,1fr); grid-auto-flow: column; gap: .45rem; padding: .1rem .12rem 0; }
.chart .chart-point { display: grid; gap: .5rem; min-width: 0; grid-template-rows: var(--chart-height) auto; justify-items: center; }
.chart-band { width: 100%; height: 100%; display: grid; place-items: end center; border-bottom: 1px solid #474031; background-image: repeating-linear-gradient(to top,transparent 0,transparent calc(25% - 1px),#343028 calc(25% - 1px),#343028 25%); border-radius: .35rem .35rem 0 0; overflow: hidden; }
.chart-bar { width: min(60%,2.8rem); height: var(--value); min-height: 0; background: linear-gradient(0deg,#927044,#ddb574); border-radius: .25rem .25rem 0 0; position: relative; }
.chart-point:last-child .chart-bar { background: linear-gradient(0deg,#ab7838,#f0cb86); }
.chart-label { color: #a5a092; font-size: .76rem; white-space: nowrap; }
.chart-empty { margin-top: .65rem; color: var(--quiet); font-size: .85rem; }
.payments { display: grid; gap: 1rem; }
.payment-line { display: grid; gap: .42rem; font-size: .89rem; }
.progress { height: .35rem; border-radius: 12px; background: #32302a; overflow: hidden; }
.progress i { display: block; width: var(--value); height: 100%; border-radius: inherit; background: var(--gold); }
.payment-line:nth-child(2) i { background: #9cbda4; }
.payment-line:nth-child(3) i { background: #9eacc3; }
.status { display: inline-flex; align-items: center; gap: .35rem; width: fit-content; max-width: 100%; border: 1px solid #484136; background: #2a271f; color: #d8c6a5; padding: .28rem .48rem; border-radius: .4rem; font-size: .76rem; line-height: 1.2; font-weight: 620; white-space: nowrap; }
.status.active, .status.issued, .status.open, .status.recorded { background: #262e25; color: var(--green); border-color: #465742; }
.status.inactive, .status.void { background: #32221f; color: var(--red); border-color: #5b3b35; }
.status.closed { background: #2e2719; color: #f1cc86; border-color: #5a482e; }
.status.dot::before { content: ""; width: .39rem; height: .39rem; background: currentColor; border-radius: 50%; }
.table-box { overflow-x: auto; margin: 0 -1.1rem -1.1rem; border-radius: 0 0 var(--radius) var(--radius); }
table { width: 100%; border-collapse: collapse; text-align: start; font-size: .88rem; }
th { text-align: start; color: #aaa395; font-size: .81rem; font-weight: 600; background: #22211e; white-space: nowrap; }
th, td { padding: .79rem .83rem; border-top: 1px solid var(--fine); vertical-align: middle; }
th:first-child, td:first-child { padding-inline-start: 1.12rem; }
th:last-child, td:last-child { padding-inline-end: 1.12rem; }
td { color: #e7e0d4; }
td .muted { display: block; margin-top: .2rem; }
td.nowrap, th.nowrap { white-space: nowrap; }
td strong { font-weight: 680; }
.no-data { text-align: center; padding: 2.45rem .85rem; color: var(--muted); background: #181816; line-height: 1.45; }
.no-data .icon { margin: 0 auto .5rem; color: var(--gold); width: 1.5rem; height: 1.5rem; }
.more { margin-top: 1.9rem; }
.filters { display: flex; gap: .7rem; flex-wrap: wrap; align-items: end; }
.filters > .field { flex: 1 1 8rem; }
.filters > .search-field { flex: 2 1 12rem; }
.filters > .btn { min-height: 2.7rem; }
.presets { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.presets button[aria-pressed="true"] { color: var(--gold); background: #332a1b; border-color: #5d4a2e; }
.ledger { display: grid; gap: 0; }
.ledger > div { display: flex; gap: .5rem; align-items: center; justify-content: space-between; padding: .73rem 0; border-bottom: 1px solid var(--fine); }
.ledger > div:last-child { border-bottom: 0; }
.ledger dt { color: var(--muted); }
.ledger dd { margin: 0; text-align: end; font-weight: 650; }
.ledger .total { padding-top: .95rem; color: var(--gold); font-size: 1.03rem; }
.ledger .delta-negative, .delta-negative { color: var(--red); }
.ledger .delta-positive, .delta-positive { color: var(--green); }
.form-block { display: grid; gap: .75rem; align-content: start; }
.service-list { display: grid; }
.service-row, .activity-row { display: flex; align-items: center; gap: .65rem; justify-content: space-between; padding: .76rem 0; border-bottom: 1px solid var(--fine); }
.service-row:last-child, .activity-row:last-child { border-bottom: none; }
.service-row .muted, .activity-row .muted { margin-top: .2rem; }
.activity-row { align-items: start; }
.grid-headers { display: grid; gap: .28rem; }
.receipt { border: 1px solid var(--border); background: #171715; border-radius: .8rem; overflow: hidden; }
.receipt-head { display: grid; gap: .35rem; background: #211e17; padding: 1rem 1.2rem; border-bottom: 1px solid #4b3e28; }
.receipt-head h3 { font-size: 1.27rem; margin-top: .1rem; }
.receipt-edit { padding: 0 1.2rem .75rem; }
.receipt-edit dl { margin: 0; }
.receipt-image { max-width: 100%; max-height: 13rem; display: block; margin: .8rem auto; border-radius: .5rem; }
.photo-preview { width: 8rem; height: 4.6rem; border-radius: .45rem; object-fit: cover; margin-top: .2rem; }
.receipt-total { color: var(--gold); }
dialog { color: var(--ink); background: #1c1c1a; border: 1px solid #544737; border-radius: 1rem; width: min(41rem,calc(100vw - 1.5rem)); max-width: 100%; max-height: calc(100dvh - 1.6rem); padding: 0; box-shadow: var(--shadow); }
dialog::backdrop { background: #000a; backdrop-filter: blur(3px); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: .65rem; padding: .9rem 1.2rem; background: #22211e; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 2; }
.dialog-body { display: grid; gap: 1rem; padding: 1.1rem 1.2rem 1.2rem; }
.form-section { display: grid; gap: .75rem; }
.form-section h3 { color: #e6c992; font-size: .95rem; margin-top: .1rem; }
.dialog-foot { border-top: 1px solid var(--border); padding-top: 1rem; }
.due { display: grid; gap: .2rem; }
.due strong { font-size: 1.2rem; }
#notice { position: fixed; z-index: 9; bottom: 1rem; inset-inline-end: 1rem; max-width: min(29rem, calc(100% - 2rem)); }
#notice:not(:empty) { padding: .8rem .95rem; color: #ebd1a0; background: #2c251a; border: 1px solid #6b5331; border-radius: .65rem; box-shadow: var(--shadow); line-height: 1.45; }
#notice.error { color: var(--red); background: #362320; border-color: #754839; }
.startup { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 1rem; }
.spinner { width: 1.15rem; height: 1.15rem; border: 2px solid #514330; border-block-start-color: var(--gold); border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.loading-card { display: flex; gap: .65rem; align-items: center; color: var(--muted); min-height: 8rem; }
.auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
  background: radial-gradient(ellipse at 32% -16%, #342a1b, transparent 57%), #111211;
}
.auth-header, .auth-grid {
  width: min(100%,87rem);
  margin-inline: auto;
  padding-inline: clamp(1rem,3.5vw,3.4rem);
}
.auth-header { display: flex; align-items: center; justify-content: space-between; gap: .7rem; padding-block: 1.5rem; }
.auth-grid {
  direction: ltr;
  display: grid;
  grid-template-areas: "photo access";
  grid-template-columns: minmax(0,1.24fr) minmax(21rem,.76fr);
  align-items: center;
  gap: clamp(1.25rem,4vw,3.75rem);
  margin-block: auto;
  padding-block: .55rem 2.3rem;
}
[dir="rtl"] .auth-grid > * { direction: rtl; }
.auth-visual { grid-area: photo; margin: 0; min-width: 0; }
.auth-visual img {
  width: 100%;
  height: auto;
  max-height: calc(100dvh - 10rem);
  min-height: 18rem;
  display: block;
  object-fit: contain;
  background: #171716;
  border: 1px solid #806340;
  border-radius: .85rem;
}
.auth-visual figcaption {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem;
  padding-block: .85rem .7rem;
  border-bottom: 1px solid #383329;
  color: #dcd3c4;
  font-size: .86rem;
}
.auth-visual figcaption span { color: #c5a975; }
.auth-body {
  grid-area: access;
  min-width: 0;
  padding: clamp(1rem,4vw,2.4rem) 0 clamp(1rem,4vw,2.4rem) clamp(1rem,3vw,2.35rem);
  border-left: 1px solid #544936;
}
.auth-body h1 { font-size: clamp(2.05rem,4.1vw,3.4rem); margin-bottom: .55rem; }
.auth-roles { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; margin: 1.35rem 0 1rem; }
.auth-role {
  min-width: 0; display: grid; justify-items: start; gap: .35rem;
  background: #20211d; color: var(--ink); border: 1px solid #424038;
  border-radius: .68rem; padding: .8rem .75rem; text-align: start;
}
.auth-role:hover, .auth-role[aria-pressed="true"] { border-color: #a88248; background: #31291d; }
.auth-role[aria-pressed="true"], .auth-role .icon { color: var(--gold); }
.auth-role strong { font-size: .87rem; }
.auth-role small { color: #c4bcae; font-size: .77rem; }
.auth-form { width: 100%; gap: .72rem; }
.auth-form .btn, .auth-form input { width: 100%; min-height: 3rem; }
.auth-account summary { width: fit-content; font-size: .85rem; color: var(--muted); cursor: pointer; }
.auth-account[open] .field { margin-top: .55rem; }
@media (max-width: 760px) {
  .auth { display: block; }
  .auth-header { padding-block: .95rem; }
  .auth-grid {
    width: min(100%,35rem); grid-template-columns: minmax(0,1fr); grid-template-areas: "access" "photo";
    gap: 1rem; padding-block-start: 0;
  }
  .auth-body { padding: 1.05rem; border: 1px solid #424034; border-radius: .85rem; background: #1b1c18; }
  .auth-visual img { max-height: none; min-height: 0; }
  .auth-role { min-height: 5.1rem; }
  .auth-form input { font-size: 1rem; }
}
.mobile-only, .menu-backdrop { display: none; }
.print-only, #print-sheet { display: none; }
@media (max-width: 1100px) {
  .layout { grid-template-columns: 12.1rem minmax(0,1fr); }
  .sidebar { padding-inline: .75rem; }
  .brand-title { font-size: .91rem; }
  .metrics { gap: .65rem; }
  .metric { padding: .78rem; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0,1fr); }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: min(17.5rem,85vw); box-shadow: var(--shadow); visibility: hidden; }
  body.menu-open .sidebar { visibility: visible; }
  .mobile-only { display: inline-flex; }
  body.menu-open .menu-backdrop { display: block; position: fixed; inset: 0; z-index: 3; border: 0; background: #0008; }
  .main { padding-inline: 1.1rem; }
  .topbar { padding-inline: 1.05rem; height: 3.9rem; }
}
@media (max-width: 640px) {
  .topbar .full-location { display: none; }
  .topbar .branch-city { display: inline; white-space: nowrap; }
  h1 { font-size: 1.78rem; }
  .main-title { align-items: center; gap: .55rem; }
  .main-title p { font-size: .79rem; }
  .main-title .btn { font-size: .81rem; min-height: 2.45rem; padding-inline: .63rem; }
  .metrics, .two-panel { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .two-panel { grid-template-columns: minmax(0,1fr); }
  .hero { --cover-height: clamp(10.25rem, 43vw, 13.25rem); display: grid; min-height: 0; }
  .hero-media { position: relative; z-index: 0; min-height: var(--cover-height); width: 100%; clip-path: none; }
  [dir="rtl"] .hero-media { clip-path: none; }
  .hero-media img { object-position: center 44%; }
  .hero::after { inset-block: 0 auto; height: var(--cover-height); z-index: 0; background: linear-gradient(0deg,#151510a0,transparent 50%); }
  .hero-copy { gap: .45rem; padding: 1rem; }
  .hero h1 { font-size: 2.25rem; }
  .hero-date { font-size: .8rem; }
  .hero-actions { padding-block-start: .25rem; }
  .dashboard-metrics .metric { padding: .82rem .83rem; }
  .dashboard-metrics .metric:nth-child(2n) { border-inline-end: 0; }
  .dashboard-metrics .metric:nth-child(n+3) { border-top: 1px solid #38392f; }
  .card { padding: .94rem; }
  .table-box { margin: 0 -.94rem -.94rem; }
  th:first-child, td:first-child { padding-inline-start: .94rem; }
  th:last-child, td:last-child { padding-inline-end: .94rem; }
  .form-grid { gap: .75rem; }
  .dialog-head, .dialog-body { padding-inline: .85rem; }
  .nowrap-wide { white-space: normal; }
}
@media (max-width: 375px) {
  .main { padding-inline: .75rem; }
  .main-title { align-items: start; }
  .main-title .btn .icon { display: none; }
  .form-grid { grid-template-columns: minmax(0,1fr); }
  .metric-label { font-size: .78rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
#print-sheet {
  inline-size: 80mm;
  padding: 3mm 5mm 4mm;
}
#print-sheet.measure-receipt {
  display: block;
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  visibility: hidden;
  pointer-events: none;
}
.pos-receipt {
  color-scheme: light;
  color: #000;
  background: #fff;
  font: 9pt/1.27 Arial, "Noto Sans Arabic", Tahoma, sans-serif;
  overflow-wrap: anywhere;
}
.pos-frame {
  border: .9pt solid #000;
  padding: 2.7mm 2.6mm 3mm;
}
.pos-brand {
  display: grid;
  gap: 1.35mm;
  padding-block-end: 2.8mm;
  font-size: 8pt;
  text-align: center;
}
.pos-brand h1 {
  font-size: 14pt;
  font-weight: 750;
  line-height: 1.19;
  letter-spacing: 0;
}
.pos-brand-ar {
  font-weight: 700;
  font-size: 9pt;
}
.pos-mark {
  display: grid;
  place-items: center;
  inline-size: 14mm;
  block-size: 8mm;
  margin: 0 auto 1mm;
  border: .9pt solid #000;
  font-size: 11.5pt;
  font-weight: 800;
  font-style: italic;
  transform: skew(-6deg);
  direction: ltr;
}
.pos-mark span { transform: skew(6deg); }
.pos-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2mm;
  padding-block: 2mm 1.1mm;
  border-block-start: .75pt solid #000;
  font-size: 12pt;
  letter-spacing: 0;
  line-height: 1.2;
}
.pos-rows { margin: 0; }
.pos-rows > div {
  display: grid;
  grid-template-columns: minmax(0, 39%) minmax(0, 1fr);
  align-items: start;
  gap: 2mm;
  padding-block: 1.45mm;
  border-block-end: .55pt solid #000;
  break-inside: avoid;
}
.pos-meta > div { border-block-end: 0; }
.pos-meta > div:last-child { border-block-end: .75pt solid #000; }
.pos-rows dt { font-weight: 700; font-size: 8.35pt; }
.pos-rows dd {
  margin: 0;
  text-align: end;
  white-space: pre-wrap;
  font-size: 8.85pt;
}
.pos-rows span[lang], .pos-brand p span[lang], .pos-total-label span[lang], .pos-footer span[lang] {
  display: block;
  unicode-bidi: isolate;
}
.pos-receipt[dir="ltr"] dt span[lang], .pos-receipt[dir="rtl"] dd span[lang] { text-align: left; }
.pos-receipt[dir="rtl"] dt span[lang], .pos-receipt[dir="ltr"] dd span[lang] { text-align: right; }
.pos-rows span[lang] + span[lang], .pos-footer span[lang] + span[lang] { margin-block-start: .35mm; }
.pos-receipt .receipt-image {
  inline-size: auto;
  max-inline-size: 100%;
  max-block-size: 40mm;
  margin: 2.4mm auto 0;
  border-radius: 0;
  object-fit: contain;
  filter: grayscale(1);
}
.pos-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2mm;
  margin-block-start: 3mm;
  padding: 2.15mm 2.4mm;
  border: 1pt solid #000;
  break-inside: avoid;
}
.pos-total-label { font-size: 9pt; font-weight: 700; }
.pos-total .money {
  font-size: 17pt;
  font-weight: 750;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.pos-total .currency {
  color: inherit;
  font-size: 9pt;
}
.pos-footer {
  margin-block-start: 2.7mm;
  text-align: center;
  font-size: 8.2pt;
}
@media print {
  @page { size: 80mm 200mm; margin: 0; }
  :root, body { color-scheme: light; color: #000; background: #fff; }
  body > :not(#print-sheet) { display: none !important; }
  body > #print-sheet, body > #print-sheet.measure-receipt {
    display: block;
    position: static;
    visibility: visible;
    margin: 0;
  }
}
