@font-face { font-family: Vazirmatn; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/vazirmatn-arabic-400-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: Vazirmatn; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/vazirmatn-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Vazirmatn; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/vazirmatn-arabic-500-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: Vazirmatn; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/vazirmatn-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Vazirmatn; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/vazirmatn-arabic-700-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: Vazirmatn; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/vazirmatn-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Vazirmatn; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/vazirmatn-arabic-800-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: Vazirmatn; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/vazirmatn-latin-800-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root { color-scheme: light; --bg: #f4f6fb; --card: #fff; --ink: #172033; --muted: #64748b; --line: #e7edf6; --navy: #10182d; --blue: #2563eb; --ok: #047857; --wait: #b45309; --off: #64748b; }
* { box-sizing: border-box; }
body { margin: 0; font-family: Vazirmatn, Tahoma, sans-serif; background: var(--bg); color: var(--ink); }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
.pi { width: 18px; height: 18px; flex: none; }
.shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 0 0 auto; width: 268px; background: linear-gradient(180deg, #16203a, #0d1426); color: #d7e2f2; padding: 18px 14px; display: flex; flex-direction: column; gap: 16px; z-index: 5; }
.who, .brand-block, .page-user { display: flex; align-items: center; gap: 10px; }
.who { justify-content: space-between; }
.who > div, .brand-block > div, .page-user > div { min-width: 0; }
.who strong, .brand-block strong, .page-user strong { display: block; font-size: 14px; }
.who small, .brand-block small, .page-user small { display: block; color: #93a4bd; font-size: 12px; }
.avatar, .logo-mark, .promo-mark { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: #243356; color: white; font-weight: 700; flex: none; }
.logo-mark { background: linear-gradient(180deg, #3b82f6, #1d4ed8); }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { text-decoration: none; padding: 11px 12px; border-radius: 14px; color: #d5def0; display: flex; align-items: center; gap: 10px; }
.nav a.active, .nav a:hover { background: linear-gradient(90deg, #1d4ed8, #3b82f6); color: white; }
.nav a .badge { margin-inline-start: auto; }
.badge { background: #ef4444; color: white; border-radius: 99px; min-width: 22px; text-align: center; font-size: 12px; padding: 2px 6px; }
.promo { margin-top: auto; text-decoration: none; color: white; border-radius: 18px; padding: 16px; background: radial-gradient(circle at 20% 0%, #38bdf8, #1d4ed8 55%, #0f172a); display: flex; flex-direction: column; gap: 6px; }
.promo small { color: #dbeafe; }
.main { margin-right: 268px; padding: 22px 26px 40px; }
.main-bar { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.page-user { width: fit-content; background: white; border-radius: 16px; padding: 8px 12px; box-shadow: 0 8px 24px rgba(15, 23, 42, .05); }
.page-user small { color: var(--muted); }
.page-head, .top, .card-head, .page-actions, .token-row { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.page-head { margin-bottom: 16px; }
.page-actions { flex-wrap: wrap; }
h1 { margin: 0 0 6px; font-size: 28px; }
h2 { margin: 0 0 12px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.muted { color: var(--muted); line-height: 1.8; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.stat, .mini-card { border-radius: 18px; padding: 16px 18px; background: white; box-shadow: 0 10px 30px rgba(15, 23, 42, .04); }
.stat b, .mini-card strong { display: block; font-size: 28px; margin-top: 8px; }
.mini-card strong { font-size: 16px; }
.stat.green, .qa.green { background: #e7f8ef; } .stat.peach, .qa.peach { background: #fff1e6; } .stat.blue, .qa.blue { background: #e7f0ff; } .stat.lilac, .qa.lilac { background: #f3e9ff; }
.card { background: var(--card); border-radius: 22px; padding: 18px; box-shadow: 0 10px 30px rgba(15, 23, 42, .04); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; margin-bottom: 16px; }
.bottom-split { grid-template-columns: minmax(0, 1.4fr) minmax(260px, .8fr); }
.bot-split { grid-template-columns: minmax(0, 1fr) 330px; }
.even { grid-template-columns: 1.1fr .9fr; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr); gap: 16px; align-items: start; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
th { color: var(--muted); font-weight: 500; }
.name-cell { display: flex; align-items: center; gap: 8px; }
.pill { border-radius: 99px; padding: 3px 8px; font-size: 12px; background: #eef2ff; }
.pill.ok { background: #d1fae5; color: var(--ok); }
.pill.wait { background: #ffedd5; color: var(--wait); }
.pill.off { background: #e2e8f0; color: var(--off); }
.pos { color: var(--ok); } .neg { color: #b91c1c; }
.btn, button, .btn-link { border: 0; border-radius: 12px; padding: 9px 12px; background: #e8eefc; color: #1e3a8a; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn.primary, button.primary { background: linear-gradient(90deg, #1d4ed8, #3b82f6); color: white; }
.btn.danger, .icon-btn.danger { background: #fee2e2; color: #b91c1c; }
.btn.ghost, button.ghost { background: white; border: 1px solid #d7dfef; color: #1e3a8a; }
.btn.google { width: 100%; background: white; color: #172033; border: 1px solid #d7dfef; margin-top: 8px; }
.icon-btn { width: 34px; height: 34px; padding: 0; border-radius: 10px; background: #f8fafc; border: 1px solid var(--line); color: #334155; }
.icon-btn.light { background: transparent; border-color: #334155; color: #d7e2f2; }
.ops { display: flex; gap: 6px; align-items: center; }
.ops form { display: inline; }
.actions, .quick { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions input, .actions select { border: 1px solid #d7dfef; border-radius: 12px; padding: 10px 12px; background: white; }
.quick { flex-direction: column; }
.qa { border: 0; width: 100%; border-radius: 14px; padding: 12px; display: flex; align-items: center; gap: 8px; cursor: pointer; text-decoration: none; text-align: right; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: 6px; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 0 10px; }
.search input, .filters select, .sort { border: 0; background: transparent; padding: 8px 0; min-width: 0; }
.filters select, td input, td select, .field input, .field select, .field textarea, .device-send input { border: 1px solid #d7dfef; border-radius: 12px; padding: 10px 12px; background: white; }
td input { width: 140px; } .sort { width: 70px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.flash { background: #d1fae5; color: #065f46; padding: 12px 14px; border-radius: 14px; margin-bottom: 12px; }
.error { background: #fee2e2; color: #991b1b; padding: 12px 14px; border-radius: 14px; margin-bottom: 12px; }
.rules { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.rules li::before { content: "✓ "; color: var(--ok); }
.chart { display: flex; align-items: flex-end; gap: 10px; height: 180px; }
.chart div { flex: 1; text-align: center; font-size: 12px; color: var(--muted); }
.chart b { display: block; color: var(--ink); }
.bar { background: linear-gradient(#93c5fd, #2563eb); border-radius: 10px 10px 4px 4px; margin-bottom: 6px; }
.best-name { font-size: 18px; font-weight: 700; }
.status-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.switch { border-radius: 99px; background: #d1fae5; color: var(--ok); }
.switch.is-off { background: #e2e8f0; color: var(--off); }
.tile-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tile { border-radius: 18px; padding: 14px; text-decoration: none; display: flex; flex-direction: column; gap: 6px; min-height: 118px; }
.tile b { font-size: 14px; }
.tile span { color: #475569; font-size: 12px; line-height: 1.7; }
.tile.blue { background: #e7f0ff; } .tile.lilac { background: #f3e8ff; } .tile.peach { background: #fff1e6; } .tile.rose { background: #ffe4e6; }
.tile.mint { background: #e7f8ef; } .tile.sky { background: #e0f2fe; } .tile.violet { background: #ede9fe; } .tile.ice { background: #f1f5f9; }
.msg { border-bottom: 1px solid var(--line); padding: 8px 0; }
.msg summary { cursor: pointer; display: flex; align-items: center; gap: 8px; }
.msg textarea { width: 100%; min-height: 110px; margin-top: 8px; }
.token-row { align-items: end; }
.token-row .field { flex: 1; margin: 0; }
.device { background: #0f172a; color: white; border-radius: 32px; padding: 14px; box-shadow: 0 20px 40px rgba(15, 23, 42, .2); }
.device-top, .device-keys form, .device-send { display: flex; justify-content: space-between; gap: 8px; }
.device-hero { margin: 10px 0; border-radius: 18px; padding: 16px; background: linear-gradient(180deg, #4f46e5, #7c3aed); }
.device-hero p { margin: 6px 0 0; font-size: 12px; line-height: 1.7; }
.device-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.device-keys form { display: block; }
.device-keys button, .keys button, .keys .mini { width: 100%; background: white; color: #172033; border-radius: 12px; }
.device-log { max-height: 220px; overflow: auto; margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }
.device-send input { flex: 1; }
.bubble { border-radius: 14px; padding: 8px 10px; white-space: pre-wrap; font-size: 12px; line-height: 1.7; }
.bubble.in { background: #1d4ed8; }
.bubble.out { background: #1f2937; }
.keys { display: flex; flex-direction: column; gap: 6px; }
.key-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.qr { width: 160px; height: 160px; background: white; border-radius: 12px; }
.login-or { text-align: center; color: var(--muted); margin: 14px 0 4px; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.codes code, p code { font-family: ui-monospace, monospace; }
.simple { max-width: 880px; margin: 0 auto; padding: 32px 16px; }
.packages { display: grid; gap: 12px; }
.package { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.check { display: flex; gap: 8px; align-items: center; }
@media (max-width: 1100px) {
  .sidebar { position: relative; width: auto; inset: auto; }
  .main { margin-right: 0; padding: 16px; }
  .stats, .status-row, .tile-grid, .split, .bottom-split, .bot-split, .even, .grid-2, .form-grid { grid-template-columns: 1fr; }
  .page-head, .token-row { flex-direction: column; }
}
