@font-face {
  font-family: Vazirmatn;
  font-style: normal;
  font-weight: 400;
  src: url("/static/fonts/vazirmatn-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF;
}
@font-face {
  font-family: Vazirmatn;
  font-style: normal;
  font-weight: 400;
  src: url("/static/fonts/vazirmatn-arabic-400-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE80-FEFC;
}
@font-face {
  font-family: Vazirmatn;
  font-style: normal;
  font-weight: 500;
  src: url("/static/fonts/vazirmatn-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF;
}
@font-face {
  font-family: Vazirmatn;
  font-style: normal;
  font-weight: 500;
  src: url("/static/fonts/vazirmatn-arabic-500-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE80-FEFC;
}
@font-face {
  font-family: Vazirmatn;
  font-style: normal;
  font-weight: 700;
  src: url("/static/fonts/vazirmatn-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF;
}
@font-face {
  font-family: Vazirmatn;
  font-style: normal;
  font-weight: 700;
  src: url("/static/fonts/vazirmatn-arabic-700-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE80-FEFC;
}

:root {
  --ink: #17202a;
  --muted: #6b7280;
  --line: #e7e1d4;
  --paper: #f4f0e6;
  --card: #fffcf7;
  --side: #121a22;
  --accent: #1f6f5b;
  --accent-2: #c4a574;
  --bad: #b42318;
  --warn: #b45309;
  --ok: #0f766e;
  --shadow: 0 10px 30px rgba(23, 32, 42, 0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Vazirmatn, Tahoma, sans-serif;
  color: var(--ink);
  background: var(--paper);
  display: flex;
}
a { color: var(--accent); text-decoration: none; }
.muted { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.7; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: 0.02em; direction: ltr; text-align: right; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; direction: ltr; unicode-bidi: isolate; text-align: left; }
.clip { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }
.small { font-size: 18px !important; }

.side {
  width: 250px;
  background: var(--side);
  color: #d7dde3;
  min-height: 100vh;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; gap: 10px; align-items: center; margin-bottom: 28px; }
.logo {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, #1f6f5b, #c4a574);
  color: #fff; display: grid; place-items: center; font-weight: 700;
}
.brand strong { display: block; color: #fff; }
.brand span { font-size: 11px; color: #8b98a5; }
.nav-label { font-size: 10px; color: #6d7b88; margin: 16px 8px 6px; }
.side nav a {
  display: flex; align-items: center; justify-content: space-between;
  color: #c5ced6; padding: 9px 12px; border-radius: 10px; margin-bottom: 2px;
}
.side nav a:hover, .side nav a.on { background: #1d2a35; color: #fff; }
.side nav em {
  background: #b42318; color: #fff; font-style: normal; font-size: 11px;
  min-width: 20px; text-align: center; border-radius: 999px; padding: 1px 6px;
}
.side-sync { margin-top: auto; }
.side-sync button, button, .ghost, .primary {
  font-family: inherit; cursor: pointer; border: 0;
}
.side-sync button {
  width: 100%; background: #1f6f5b; color: #fff; border-radius: 10px; padding: 10px;
}

.main { flex: 1; min-width: 0; }
.top {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 22px 28px 8px; gap: 16px;
}
.top h1 { margin: 0; font-size: 22px; }
.top-actions { display: flex; gap: 8px; align-items: center; }
.content { padding: 8px 28px 40px; display: flex; flex-direction: column; gap: 18px; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 18px; box-shadow: var(--shadow);
}
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.card-h h2 { margin: 0; font-size: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-2 { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 14px; }
.kpi { text-align: center; }
.kpi-center { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 168px; }
.kpi span { color: var(--muted); font-size: 12px; }
.kpi strong { display: block; font-size: 24px; margin: 10px 0 4px; letter-spacing: -0.02em; direction: ltr; unicode-bidi: isolate; text-align: center; }
.kpi-unit { font-size: 11px; color: var(--muted); margin: 0; }
.kpi-sub { font-size: 10px; color: #8a8478; margin: 4px 0 0; }
.kpi-extra { font-size: 10px; color: #6b7280; margin: 6px 0 0; line-height: 1.7; white-space: pre-line; text-align: center; }
.kpi-updated { font-size: 10px; color: #9a9488; margin: 10px 0 0; }
.kpi-block { display: flex; flex-direction: column; gap: 10px; }
.kpi-row-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 0 4px; }
.kpi-row-h h2 { margin: 0; font-size: 15px; font-weight: 600; }
.kpi-row-h a { font-size: 12px; color: var(--muted); }
.ok { color: var(--ok); }
.bad, .bad-text { color: var(--bad); }
.warn { color: var(--warn); }
.amt-in { color: #15803d; font-weight: 600; }
.amt-out { color: var(--bad); font-weight: 600; }
.kpi .ok { color: #15803d; }
.kpi .bad { color: var(--bad); }
.kpi .warn { color: var(--warn); }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: right; color: var(--muted); font-weight: 500; padding: 8px 6px; border-bottom: 1px solid var(--line); }
td { padding: 9px 6px; border-bottom: 1px solid #f0eadf; vertical-align: top; }
tr.withdraw { background: #fff5f3; }
tr.deposit { background: #f3faf7; }
.tag {
  display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: #eee8dc; color: #444;
}
.tag.ok { background: #e6f4f1; color: var(--ok); }
.tag.bad { background: #fde8e6; color: var(--bad); }
.tag.warn { background: #fff4e5; color: var(--warn); }
.pill { font-size: 12px; padding: 6px 10px; border-radius: 999px; background: #eee8dc; color: var(--ink); }
.pill.ok { background: #e6f4f1; color: var(--ok); }
.pill.danger { background: #fde8e6; color: var(--bad); }
.ghost { background: transparent; color: var(--muted); padding: 6px 8px; border-radius: 8px; }
button, .tabs a, .tabs button {
  background: #efe8d8; color: var(--ink); border-radius: 10px; padding: 8px 12px; font-size: 13px;
}
.primary { background: var(--accent); color: #fff; padding: 10px 14px; border-radius: 12px; }
.tabs { display: flex; gap: 6px; }
.tabs .on, .tabs a.on, .tabs button.on { background: var(--accent); color: #fff; }
.stack { display: flex; flex-direction: column; gap: 10px; }
label { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
input, select {
  font-family: inherit; font-size: 14px; padding: 9px 10px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
}
.check { flex-direction: row; align-items: center; gap: 8px; }
.inline { display: flex; gap: 8px; align-items: center; }
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.feed li { display: flex; flex-direction: column; gap: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.feed em { color: var(--muted); font-size: 11px; font-style: normal; }
.empty { color: var(--muted); text-align: center; padding: 18px; }
.alert { padding: 10px 12px; border-radius: 12px; font-size: 13px; }
.alert.ok { background: #e6f4f1; color: var(--ok); }
.alert.bad { background: #fde8e6; color: var(--bad); }
.facts { display: grid; gap: 10px; margin: 0; }
.facts div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; }
.card > .grid-3 { margin-bottom: 8px; }
.card > .grid-2 { margin-top: 14px; }
.jobs { list-style: none; padding: 0; margin: 0; }
.jobs li { display: flex; gap: 10px; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.day-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 14px; }
.day-strip div { background: #f7f3ea; border-radius: 12px; padding: 8px; }
.day-strip span { font-size: 11px; color: var(--muted); }
.day-strip strong { display: block; }
.pager { display: flex; justify-content: space-between; margin-top: 12px; font-size: 13px; }
.intro p { margin: 0; line-height: 1.9; color: #3c4650; }
.grid-4.mini { margin: 12px 0; }
.grid-4.mini div { background: #f7f3ea; border-radius: 12px; padding: 10px; }
.grid-4.mini span { font-size: 11px; color: var(--muted); }
.grid-4.mini strong { display: block; font-size: 18px; margin: 4px 0; }
.ok-border { border-color: #b7ddd6; }
.warn-border { border-color: #f0c7c2; }
.shaparak-explain { margin-top: 12px; margin-bottom: 8px; }
.shaparak-explain table { margin-top: 8px; }
.shaparak-settle { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.fold {
  background: #f7f3ea;
  border: 1px solid #cfc6b4;
  border-radius: 12px;
  padding: 0 14px 10px;
  margin: 10px 0 0;
}
.fold summary {
  cursor: pointer;
  font-weight: 600;
  padding: 12px 0;
  list-style: none;
}
.fold summary::-webkit-details-marker { display: none; }
.fold summary::before { content: "◀ "; font-size: 11px; color: var(--muted); }
.fold[open] summary::before { content: "▼ "; }

.table-scroll { overflow-x: auto; }
.grid-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #cfc6b4;
}
.grid-table th,
.grid-table td {
  border: 1px solid #cfc6b4;
  text-align: center;
  vertical-align: middle;
  padding: 10px 8px;
}
.grid-table th {
  background: #f3eee3;
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}
.grid-table td {
  background: #fffcf7;
}
.grid-table .mono { text-align: center; direction: ltr; }
.grid-table .empty { text-align: center; }
.grid-table tr.withdraw td { background: #fff7f5; }
.grid-table tr.deposit td { background: #f3faf7; }
.grid-table tr.inactive-acc td { background: #f7f4ee; color: #6b7280; }
.stmt-table { min-width: 1680px; font-size: 12px; }
.btn-row {
  background: #efe8d8;
  color: var(--ink);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  white-space: nowrap;
}
.cell-note { font-size: 11px; margin-top: 6px; }
.bank-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}
.bank-tabs a,
.bank-tabs button {
  background: #efe8d8;
  color: var(--ink);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  direction: ltr;
  border: 0;
  cursor: pointer;
}
.bank-tabs a.on,
.bank-tabs button.on { background: var(--accent); color: #fff; }
.acc-tabs { margin-top: 10px; }
.acc-tabs button { font-size: 12px; padding: 6px 12px; }
.stmt-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin: 0 0 14px;
}
.stmt-filters label { margin: 0; }
.stmt-filters input, .stmt-filters select { min-width: 140px; }
#stmt-excel { display: inline-flex; align-items: center; height: 38px; text-decoration: none; color: var(--ink); }

.login-wrap { min-height: 100vh; width: 100%; display: grid; place-items: center; background:
  radial-gradient(900px 400px at 80% 0%, #dbe8e3, transparent), var(--paper); }
.login-card { width: min(420px, 92vw); background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px; box-shadow: var(--shadow); }
.login-card h1 { margin: 8px 0 4px; }
.login-brand { margin-bottom: 8px; }
.otp-input {
  letter-spacing: 0.35em;
  text-align: center;
  font-size: 20px;
  direction: ltr;
  font-variant-numeric: tabular-nums;
}
.qr-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  width: fit-content;
  margin: 8px 0 12px;
}
.qr-box svg { width: 180px; height: 180px; display: block; }
.secret-key {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  direction: ltr;
  text-align: center;
  letter-spacing: 0.14em;
  font-size: 15px;
  background: #f7f3ea;
  border-radius: 10px;
  padding: 10px 12px;
  word-break: break-all;
}
.btn-danger {
  background: #fde8e6;
  color: var(--bad);
  border-radius: 10px;
  padding: 8px 12px;
}

.menu-btn { display: none; background: #efe8d8; border-radius: 10px; padding: 6px 10px; margin-left: 8px; }
@media (max-width: 1100px) {
  .grid-4, .grid-5, .day-strip { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .menu-btn { display: inline-block; }
  .side { display: none; }
  .side.open { display: flex; position: fixed; z-index: 40; right: 0; top: 0; }
  body { display: block; }
}
