@font-face { font-family: V; src: url(ar-400.woff2); font-weight: 400; unicode-range: U+0600-06FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: V; src: url(ar-700.woff2); font-weight: 700; unicode-range: U+0600-06FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: V; src: url(la-400.woff2); font-weight: 400; }
@font-face { font-family: V; src: url(la-700.woff2); font-weight: 700; }
:root { --brand: #0b6cf0; --sky: #00a4fb; --navy: #03172e; --bg: #f2f5fa; --card: #fff; --line: #e3e9f2; --muted: #6b7a90; --ink: #0b1626; --ok: #12a150; --bad: #e5484d; --warn: #e8a317; --crimson: #9b1b30; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: V, Tahoma, sans-serif; background: var(--bg); color: var(--ink); font-size: 14px; }
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; }
.ltr { direction: ltr; unicode-bidi: plaintext; }
.muted { color: var(--muted); }
.tech-mark { font-weight: 700; color: #111; -webkit-text-stroke: 0.09em var(--crimson); paint-order: stroke fill; letter-spacing: 0.06em; direction: ltr; }
.on-dark { filter: drop-shadow(0 0 1.5px #fff); }
/* layout */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100%; }
.side { background: var(--navy); color: #fff; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand img { width: 40px; height: 40px; background: #fff; border-radius: 10px; padding: 3px; }
.brand b { font-size: 17px; display: block; }
.brand small { font-size: 10px; letter-spacing: 0.18em; color: #9fc6ff; direction: ltr; display: block; text-align: end; }
.nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #cfe0f5; padding: 10px 12px; border-radius: 10px; margin-bottom: 2px; }
.nav a:hover { background: rgba(255,255,255,.07); }
.nav a.on { background: var(--brand); color: #fff; }
.badge { background: var(--bad); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; min-width: 20px; text-align: center; }
.main { padding: 22px 26px 60px; min-width: 0; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.top h1 { font-size: 21px; margin: 0; }
.btn.menu-btn { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 0 0 auto; width: 250px; z-index: 30; transform: translateX(100%); transition: transform .2s; }
  .side.open { transform: none; }
  .btn.menu-btn { display: inline-flex; }
  .main { padding: 16px 14px 60px; }
}
/* blocks */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.card h3 { margin: 0 0 12px; font-size: 15px; }
.grid { display: grid; gap: 14px; }
.g4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.g2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.stat b { display: block; font-size: 26px; margin-top: 4px; }
.stat span { color: var(--muted); font-size: 12.5px; }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 10px; padding: 8px 14px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #c6d3e6; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn:disabled { opacity: .55; cursor: default; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.field { display: grid; gap: 5px; margin-bottom: 12px; }
.field label { font-size: 12.5px; color: var(--muted); }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: #fff; }
.input:focus { outline: 2px solid #bcd6ff; border-color: var(--brand); }
textarea.input { min-height: 110px; resize: vertical; }
table { width: 100%; border-collapse: collapse; }
th { text-align: start; font-weight: 700; font-size: 12.5px; color: var(--muted); padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #f7faff; }
.tablewrap { overflow-x: auto; }
.pill { display: inline-block; border-radius: 999px; padding: 2px 10px; font-size: 12px; background: #eef3fb; color: #2b4a73; white-space: nowrap; }
.pill.ok { background: #e6f7ee; color: var(--ok); } .pill.bad { background: #fdecec; color: var(--bad); } .pill.warn { background: #fdf5e3; color: #9a6a00; }
.pill.clinic { background: #e9f6ff; color: #0a6aa8; } .pill.restaurant { background: #fff1e8; color: #b04c0b; } .pill.local { background: #f1ecff; color: #5b3cc4; } .pill.erp { background: #e8f0ff; color: #1a4fbf; } .pill.crm { background: #e9fbf6; color: #0c7c64; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: #c2ccd9; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px #d6f3e2; } .dot.bad { background: var(--bad); box-shadow: 0 0 0 3px #fbdada; }
.spark { display: flex; gap: 2px; align-items: flex-end; height: 26px; }
.spark i { width: 4px; border-radius: 2px; background: var(--ok); display: block; }
.spark i.bad { background: var(--bad); }
.msgs { display: grid; gap: 10px; margin: 12px 0; }
.msg { border-radius: 14px; padding: 10px 14px; max-width: 85%; white-space: pre-wrap; line-height: 1.8; }
.msg.customer { background: #fff; border: 1px solid var(--line); justify-self: start; }
.msg.support { background: #e8f1ff; justify-self: end; }
.msg small { display: block; color: var(--muted); font-size: 11.5px; margin-bottom: 3px; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tabs button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.tabs button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.empty { text-align: center; color: var(--muted); padding: 30px 0; }
.err { background: #fdecec; color: #a32428; border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; font-size: 13px; }
/* modal & toast */
.modal-bg { position: fixed; inset: 0; background: rgba(3,23,46,.45); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.modal { background: #fff; border-radius: 18px; padding: 20px; width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; }
.modal h3 { margin: 0 0 14px; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; }
#toast div { background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
#toast div.e { background: var(--bad); }
/* login */
.login { min-height: 100%; display: grid; place-items: center; background: linear-gradient(150deg, #03172e, #0b47a0 60%, #0b6cf0); padding: 20px; }
.login .card { width: 100%; max-width: 380px; padding: 26px; }
.login .logo { display: block; width: 210px; margin: 0 auto 6px; }
.login h2 { text-align: center; margin: 4px 0 20px; font-size: 17px; }
.codes { direction: ltr; font-family: monospace; background: #f6f8fc; border-radius: 10px; padding: 10px; white-space: pre-wrap; user-select: all; }
