/* Vazirmatn, OFL. Arabic and Latin subsets are served from this origin. */
@font-face {
  font-family: Vazirmatn;
  src: url("/panel/vazirmatn-arabic-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C, U+200D;
}
@font-face {
  font-family: Vazirmatn;
  src: url("/panel/vazirmatn-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Vazirmatn;
  src: url("/panel/vazirmatn-arabic-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C, U+200D;
}
@font-face {
  font-family: Vazirmatn;
  src: url("/panel/vazirmatn-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #1c2430;
  --muted: #5c6770;
  --line: #e2e6ea;
  --paper: #f6f7f8;
  --card: #fff;
  --band: #fff;
  --accent: #1f4d45;
  --bad: #8d3030;
  --ok: #1d6b45;
  --wait: #8a5a12;
  --control: 30px;
  --text: 13px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { font-size: var(--text); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: Vazirmatn, Tahoma, sans-serif;
  font-weight: 400;
  line-height: 1.45;
}
h1, h2, p, label, button, input, code, th, td { font: inherit; }
h1 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; }
h2 { margin: 0 0 6px; font-size: 13px; font-weight: 600; }
p { margin: 0 0 8px; }
.brand { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0; }
.brand img { width: 16px; height: 16px; display: block; flex: none; }
.muted { color: var(--muted); font-size: 12px; }
.hint { color: var(--wait); font-size: 12px; }
.error { min-height: 16px; margin: 4px 0; color: var(--bad); font-size: 12px; }
label { display: block; margin: 8px 0 4px; font-size: 12px; font-weight: 600; }
input, button, .pair button {
  height: var(--control);
  border-radius: 6px;
  font-size: 13px;
}
input, code {
  width: 100%;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  padding: 0 8px;
}
button {
  border: 0;
  background: var(--accent);
  color: #fff;
  padding: 0 10px;
  cursor: pointer;
}
button.quiet {
  background: #fff;
  color: var(--accent);
  border: 1px solid var(--line);
}
button:disabled { opacity: 0.6; cursor: progress; }
input:focus, button:focus-visible { outline: 2px solid #9bb8b2; outline-offset: 1px; }
.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}
.card {
  width: min(100%, 320px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}
.card h1 { margin-bottom: 2px; }
.card .brand { margin-bottom: 8px; }
.card button[type="submit"] { width: 100%; margin-top: 8px; }
.pair { display: flex; gap: 6px; align-items: center; }
.pair input { flex: 1; min-width: 0; }
.pair button { width: 64px; flex: none; background: #fff; color: var(--accent); border: 1px solid var(--line); }
.methods { display: flex; gap: 12px; margin: 4px 0 8px; font-size: 12px; }
.methods label { display: flex; align-items: center; gap: 4px; margin: 0; font-weight: 400; }
.shell { min-height: 100vh; }
.band {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 12px;
  background: var(--band);
  border-bottom: 1px solid var(--line);
}
.band .brand { margin-inline-end: 4px; }
nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  background: transparent;
  color: var(--ink);
  border: 0;
  padding: 0 8px;
  font-size: 12px;
}
.nav img { width: 14px; height: 14px; display: block; flex: none; }
.nav.on { background: #e7f2ef; color: var(--accent); font-weight: 600; }
.who {
  margin: 0 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
#logout { height: 28px; }
main { width: min(960px, 100%); margin: 0 auto; padding: 16px 12px 28px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.metrics { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.metric {
  width: 168px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  min-height: 52px;
}
.metric span { display: block; color: var(--muted); font-size: 11px; }
.metric strong { display: block; margin-top: 2px; font-size: 13px; font-weight: 600; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: start; height: 32px; padding: 0 8px; border-bottom: 1px solid var(--line); font-size: 12px; vertical-align: middle; }
th { color: var(--muted); font-weight: 600; background: #fbfbfc; }
tr:last-child td { border-bottom: 0; }
.ok { color: var(--ok); font-weight: 600; }
.wait { color: var(--wait); font-weight: 600; }
.row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 12px; }
code { display: block; direction: ltr; text-align: left; font-family: ui-monospace, monospace; font-size: 11px; line-height: 28px; margin: 4px 0; overflow-wrap: anywhere; }
#totp-qr { width: 112px; height: 112px; margin: 4px 0; background: #fff; }
.ltr { direction: ltr; unicode-bidi: isolate; text-align: left; }
@media (max-width: 720px) {
  .cols { grid-template-columns: 1fr; }
  .who { display: none; }
  .band { align-items: flex-start; flex-wrap: wrap; }
  nav { order: 3; width: 100%; }
}
