@font-face { font-family: Rubik; src: url(/fonts/rubik-latin.woff2) format("woff2"); font-weight: 300 900; unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: Rubik; src: url(/fonts/rubik-arabic.woff2) format("woff2"); font-weight: 300 900; unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
:root { --bg: #F1F5F9; --card: #FFFFFF; --text: #0F172A; --muted: #475569; --primary: #047857; --promo: #EA580C; --danger: #DC2626; --line: #E2E8F0; --radius: 16px; }
* { box-sizing: border-box; }
[x-cloak], [hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { font-family: Rubik, system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.4; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; border-radius: 12px; min-height: 56px; padding: 0 16px; background: var(--card); transition: transform .1s; touch-action: manipulation; }
button:active { transform: scale(.97); }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
input { font: inherit; min-height: 56px; padding: 0 16px; border: 2px solid var(--line); border-radius: 12px; width: 100%; background: var(--card); }
.btn-primary { background: var(--primary); color: #fff; font-weight: 700; }
.btn-danger { background: var(--danger); color: #fff; }
.num { font-variant-numeric: tabular-nums; }
.error { color: var(--danger); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.login { display: grid; place-items: center; height: 100%; }
.login form { background: var(--card); padding: 32px; border-radius: var(--radius); width: min(420px, 92vw); display: grid; gap: 16px; }
.login h1 { margin: 0; color: var(--primary); }
.login .remember { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.login .admin-link { justify-self: center; display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
.login .remember input { width: 24px; min-height: 24px; height: 24px; accent-color: var(--primary); }
/* ---------- POS layout (≥1024px, full screen) */
.pos { display: grid; grid-template: "bar bar bar" auto "cats grid cart" 1fr / 180px 1fr 380px; height: 100vh; overflow: hidden; gap: 8px; padding: 8px; }
.bar { grid-area: bar; display: flex; align-items: center; gap: 8px; background: var(--card); border-radius: var(--radius); padding: 8px 12px; }
.brand { color: var(--primary); font-size: 22px; padding: 0 8px; }
.customer { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.customer button, .bar > button, .lang { background: var(--bg); display: inline-flex; align-items: center; gap: 6px; }
.lang { min-height: 56px; min-width: 56px; justify-content: center; border-radius: 12px; text-decoration: none; color: var(--text); font-weight: 700; }
.barbers { display: flex; gap: 8px; overflow-x: auto; flex: 1; }
.barber { display: flex; align-items: center; gap: 6px; background: var(--bg); white-space: nowrap; }
.barber img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.barber.on { background: var(--primary); color: #fff; }
.barber.off, .tile.off { opacity: .55; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #94A3B8; flex: none; }
.dot.duty { background: #22C55E; }
.search { display: flex; align-items: center; gap: 6px; width: 280px; }
.cats { grid-area: cats; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.cats button { text-align: start; font-weight: 600; font-size: 18px; min-height: 64px; display: flex; align-items: center; gap: 8px; }
.cats button img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }
.cats button.on { background: var(--primary); color: #fff; }
.cats .promo { color: var(--promo); }
.cats .promo.on { background: var(--promo); color: #fff; }
.grid { grid-area: grid; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); grid-auto-rows: max-content; gap: 12px; overflow-y: auto; align-content: start; }
.card { position: relative; display: flex; flex-direction: column; align-items: stretch; text-align: start; padding: 0 0 12px; overflow: hidden; border-radius: var(--radius); box-shadow: 0 1px 2px rgb(15 23 42 / .08); }
.card img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--bg); }
.card .name { font-weight: 700; font-size: 17px; padding: 8px 12px 0; }
.card .alt { color: var(--muted); font-size: 14px; padding: 0 12px; min-height: 1.2em; }
.card .price { padding: 4px 12px 0; display: flex; gap: 8px; align-items: baseline; }
.card .price b { font-size: 19px; color: var(--primary); }
.card .price s { color: var(--muted); font-size: 14px; }
.card .save { color: var(--promo); font-weight: 700; padding: 0 12px; }
.card .badge { position: absolute; top: 8px; inset-inline-start: 8px; background: var(--promo); color: #fff; font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 999px; }
.card.bundle { outline: 3px solid var(--promo); outline-offset: -3px; }
.card.soldout { opacity: .5; }
.soldout-tag { position: absolute; top: 40%; inset-inline: 0; text-align: center; background: rgb(15 23 42 / .75); color: #fff; font-weight: 700; padding: 6px; }
.cart { grid-area: cart; display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius); padding: 12px; min-height: 0; }
.cart h2 { margin: 0 0 8px; font-size: 16px; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }
.lines { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.lines li { border-bottom: 1px solid var(--line); padding: 8px 0; display: grid; gap: 6px; }
.line-head { display: flex; justify-content: space-between; gap: 8px; font-weight: 600; }
.chip { min-height: 40px; background: var(--bg); justify-self: start; font-size: 14px; }
.promo-line { display: flex; justify-content: space-between; color: var(--promo); font-size: 14px; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button { background: var(--bg); min-width: 56px; padding: 0; display: grid; place-items: center; }
.qty span { min-width: 32px; text-align: center; font-weight: 700; font-size: 18px; }
.qty .remove { margin-inline-start: auto; color: var(--danger); }
.totals { border-top: 2px solid var(--line); padding-top: 8px; display: grid; gap: 4px; }
.totals > div { display: flex; justify-content: space-between; }
.totals .grand { font-size: 22px; font-weight: 800; margin-top: 4px; }
.coupon { background: var(--bg); color: var(--promo); display: flex; align-items: center; gap: 6px; min-height: 48px; }
.actions { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; margin-top: 8px; }
.checkout { min-height: 72px; font-size: 20px; }
/* ---------- modals */
.scrim { position: fixed; inset: 0; background: rgb(15 23 42 / .5); display: grid; place-items: center; z-index: 10; }
.modal { position: relative; background: var(--card); border-radius: var(--radius); padding: 24px; width: min(560px, 94vw); max-height: 92vh; overflow-y: auto; display: grid; gap: 12px; }
.modal h2 { margin: 0; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tile { background: var(--bg); min-height: 72px; font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 8px; justify-content: center; }
.rows { display: grid; gap: 8px; }
.row { background: var(--bg); display: flex; justify-content: space-between; gap: 12px; text-align: start; min-height: 64px; }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 4px; font-weight: 600; }
.pay { width: min(860px, 96vw); }
.close { position: absolute; top: 12px; inset-inline-end: 12px; background: var(--bg); min-width: 56px; }
.due-label { margin: 0; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.due { margin: 0; font-size: 44px; font-weight: 800; }
.methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.methods button { min-height: 80px; font-size: 20px; font-weight: 700; background: var(--bg); }
.pay-body { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.payrow { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; background: var(--bg); border-radius: 12px; padding: 8px; border: 2px solid transparent; }
.payrow.on { border-color: var(--primary); }
.payrow input { grid-column: 1 / -1; min-height: 48px; }
.payrow .remove { background: var(--card); color: var(--danger); min-width: 48px; min-height: 48px; padding: 0; }
.sum { display: flex; justify-content: space-between; font-size: 20px; }
.change { color: var(--primary); }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.quick button { background: #ECFDF5; font-weight: 700; }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keys button { background: var(--bg); font-size: 22px; font-weight: 700; min-height: 64px; }
.complete { min-height: 80px; font-size: 22px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.done { text-align: center; justify-items: center; }
.done .tick { width: 80px; height: 80px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; }
.done .tick svg { width: 44px; height: 44px; }
.done .actions { width: 100%; grid-template-columns: 1fr 1fr; }
.done .actions button { min-height: 72px; font-size: 18px; }
@media (max-width: 1279px) { .pos { grid-template-columns: 140px 1fr 340px; } .search { width: 200px; } .customer span { display: none; } }
/* ---------- polish from the Task 6 browser check */
.bar { flex-wrap: wrap; }
.barbers { order: 9; flex-basis: 100%; }
.card img[src$="placeholder.svg"] { object-fit: contain; padding: 22%; }
.pay-body .rows { align-content: start; }
.actions button:not(.btn-primary), .done .actions button:not(.btn-primary) { background: var(--bg); }
/* ---------- payment method icons */
.methods button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px; }
.methods button svg { width: 34px; height: 34px; color: var(--primary); }
.pm-logo { height: 34px; max-width: 90%; object-fit: contain; }
