
@font-face { font-family: "Vazirmatn"; src: url("/assets/vazirmatn.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --bg: #f5f6f4; --surface: #fff; --ink: #1d2321; --muted: #66706c; --line: #e1e5e2;
  --accent: #0b7f7b; --accent-soft: #e0f1ef; --ok: #237a4b; --ok-soft: #e2f2e8;
  --warn: #9a5b00; --warn-soft: #faefdc; --crit: #b23a30; --crit-soft: #f8e3e0;
  --radius: 12px; --font: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121614; --surface: #1a201d; --ink: #e6ebe8; --muted: #9aa5a0; --line: #2b332f;
    --accent: #4cc7bf; --accent-soft: #143331; --ok: #69c792; --ok-soft: #15301f; --warn: #e6ab55; --warn-soft: #36290f;
    --crit: #ef8a80; --crit-soft: #3b1d1a; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.7 var(--font); font-feature-settings: "ss01"; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
main { max-width: 1180px; margin: 0 auto; padding: 16px 16px 64px; }
h1 { font-size: 22px; margin: 8px 0 16px; }
h2 { font-size: 17px; margin: 0 0 10px; }
.top { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px;
  padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; }
.top nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.top nav a { padding: 6px 12px; border-radius: 999px; color: var(--ink); white-space: nowrap; }
.top nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.top .me { color: var(--muted); font-size: 13px; display: flex; gap: 8px; align-items: center; }
.top .me > a { color: var(--ink); }
@media (max-width: 640px) {
  .top { padding: 8px 12px 0; }
  .top .brand { flex: 1; }
  .top nav { order: 3; flex-basis: 100%; margin: 0 -12px; padding: 0 8px 8px; scrollbar-width: none; }
  .stat .v { font-size: 17px; }
  main { padding: 12px 12px 48px; }
}
.badge { display: inline-block; min-width: 20px; padding: 0 6px; margin-inline-start: 4px; border-radius: 999px; background: var(--crit); color: #fff;
  font-size: 12px; text-align: center; line-height: 20px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.card + .card { margin-top: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.stat .k { color: var(--muted); font-size: 13px; }
.stat .v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.rows > li:first-child { border-top: 0; }
.rows .main { flex: 1; min-width: 180px; }
.rows .sub, .muted { color: var(--muted); font-size: 13px; }
.chip { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 12.5px; white-space: nowrap; }
.chip.ok { background: var(--ok-soft); color: var(--ok); } .chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.crit { background: var(--crit-soft); color: var(--crit); } .chip.muted { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
button, .button { font: inherit; cursor: pointer; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 6px 14px; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
button.danger { color: var(--crit); }
button.link { border: 0; background: none; color: var(--accent); padding: 0; }
form.inline { display: inline; }
textarea, select, input[type=date], input[type=text], input[type=tel], input[type=password] { font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
textarea { width: 100%; min-height: 80px; resize: vertical; }
.flash { padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; }
.flash.ok { background: var(--ok-soft); color: var(--ok); } .flash.crit { background: var(--crit-soft); color: var(--crit); }
.flash.warn { background: var(--warn-soft); color: var(--warn); }
.empty { color: var(--muted); padding: 8px 0; margin: 0; }
.num { font-variant-numeric: tabular-nums; }
/* Deposits */
.deposit { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; }
.deposit img { width: 100%; max-height: 260px; object-fit: cover; object-position: top; border-radius: 10px; border: 1px solid var(--line); }
.deposit .noimg { aspect-ratio: 3/4; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); font-size: 13px; }
.checks { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 14px; margin: 8px 0; font-size: 14px; }
.checks dt { color: var(--muted); } .checks dd { margin: 0; font-variant-numeric: tabular-nums; }
.checks .fail { color: var(--crit); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
details.reject > summary { list-style: none; display: inline-block; cursor: pointer; color: var(--crit); border: 1px solid var(--line); border-radius: 10px; padding: 6px 14px; }
details.reject[open] > summary { margin-bottom: 8px; }
.actions details.reject[open] { flex-basis: 100%; }
details.reject > form.stack { padding: 12px; border: 1px solid var(--line); border-radius: 10px; max-width: 420px; }
details.reject .reasons { display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 560px) { .deposit { grid-template-columns: 1fr; } .deposit img { max-height: 200px; } }
/* Calendar */
.cal-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.cal-head .date { font-weight: 700; font-size: 18px; margin-inline-end: auto; }
.calendar { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.cal { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(150px, 1fr)); min-width: calc(56px + var(--cols) * 150px); }
.cal .colhead { position: sticky; top: 0; padding: 8px; text-align: center; font-weight: 600; border-bottom: 1px solid var(--line); background: var(--surface); }
.cal .times, .cal .col { position: relative; height: calc(var(--minutes) * 1.1px); }
.cal .col { border-inline-start: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(66px - 1px), var(--line) calc(66px - 1px), var(--line) 66px); }
.cal .off { position: absolute; inset-inline: 0; background: repeating-linear-gradient(135deg, var(--bg) 0 6px, transparent 6px 12px); }
.cal .tick { position: absolute; inset-inline-end: 6px; font-size: 12px; color: var(--muted); transform: translateY(-50%); }
.cal .booking { position: absolute; inset-inline: 4px; border-radius: 8px; padding: 2px 8px; font-size: 12.5px; line-height: 1.5; overflow: hidden;
  border-inline-start: 4px solid; color: var(--ink); text-decoration: none; }
.cal .booking:hover { text-decoration: none; filter: brightness(0.97); }
.cal .booking.confirmed { background: var(--ok-soft); border-color: var(--ok); }
.cal .booking.held, .cal .booking.pending_payment { background: var(--warn-soft); border-color: var(--warn); }
.cal .booking.needs_attention { background: var(--crit-soft); border-color: var(--crit); }
.cal .booking.completed, .cal .booking.no_show { background: var(--bg); border-color: var(--muted); }
/* Conversations */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.thread { display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 80%; padding: 8px 12px; border-radius: 14px; overflow-wrap: anywhere; }
.msg .text { white-space: pre-wrap; }
.msg .meta { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.msg.customer { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); }
.msg.agent { align-self: flex-end; background: var(--accent-soft); }
.msg.staff { align-self: flex-end; background: var(--warn-soft); }
.msg.system { align-self: center; max-width: 92%; background: none; color: var(--muted); font-size: 13px; text-align: center; }
.filters { display: flex; gap: 6px; margin-bottom: 12px; }
.filters a { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); }
.filters a.active { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 600; }
.login { max-width: 420px; margin: 12vh auto; text-align: center; }
/* Forms laid out one field per line */
.stack { display: flex; flex-direction: column; gap: 10px; text-align: start; }
.stack label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.stack label.check, label.check { display: flex; flex-direction: row; align-items: center; gap: 8px; }
.stack button { align-self: flex-start; }
.login .stack button, button.wide { align-self: stretch; width: 100%; }
.card.highlight { border-color: var(--accent); margin-bottom: 16px; }
/* Alerts while the page is open */
#notices { position: fixed; inset-inline-start: 16px; bottom: 16px; z-index: 20; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px); }
#notices .notice { background: var(--ink); color: var(--surface); padding: 10px 14px; border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.18); text-decoration: none; }
/* Settings */
a.card.tile { display: block; color: var(--ink); text-decoration: none; }
a.card.tile:hover { border-color: var(--accent); text-decoration: none; }
a.card.tile p { margin: 0; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row2 > label { min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.row2 input { width: 100%; }
input.short { width: 7.5em; }
table.week, table.providers { border-collapse: collapse; width: 100%; }
table.week td, table.providers td, table.providers th { padding: 4px 6px 4px 0; text-align: start; vertical-align: middle; }
table.providers th { font-weight: 500; color: var(--muted); font-size: 13px; }
input.time { width: 4.6em; text-align: center; font-variant-numeric: tabular-nums; padding: 4px 6px; }
.nowrap { white-space: nowrap; }
@media (max-width: 560px) { table.week td { display: block; padding: 2px 0; } table.week tr { display: block; padding: 6px 0; border-top: 1px solid var(--line); } }
.row2 input.time { width: 100%; }
/* Booking forms */
.filters-form { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.filters-form label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
fieldset.slots { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 6px; }
fieldset.slots legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
label.slot { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 4px 10px; cursor: pointer;
  font-variant-numeric: tabular-nums; }
label.slot:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); }
a.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
/* Messages to send by hand, connect links */
/* Latin text (Telegram's labels, usernames): Latin digits, not the font's Persian ones (ss01), kept on one line. */
.ui { white-space: nowrap; unicode-bidi: isolate; font-feature-settings: normal; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.copytext { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-size: 14px; }
.msg .meta .fail { color: var(--crit); }
ol.steps { padding-inline-start: 22px; margin: 12px 0; } ol.steps > li { margin-bottom: 12px; }
.settings { max-width: 760px; }
dl.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 16px; margin: 0; }
dl.facts dt { color: var(--muted); } dl.facts dd { margin: 0; }
