/* ================================================================
   BK Ledger — спокойный финансовый интерфейс:
   светлый фон, белые карточки без рамок, Manrope, оранжевый акцент
   ================================================================ */
:root {
  --bg: #F3F4F6;
  --card: #FFFFFF;
  --inset: #F5F6F8;
  --line: #EDEEF2;
  --line-2: #E3E5EA;
  --text: #15161A;
  --text-2: #5D6270;
  --muted: #737980;
  --accent: #FF6B4A;
  --accent-2: #FF8F6B;
  --accent-deep: #F04E23;
  --up: #0EB582;
  --up-bg: #E3F7EF;
  --down: #F04452;
  --down-bg: #FEE9EB;
  --warn: #E79A0A;
  --warn-bg: #FFF4DD;
  --t-orange: #FFEDE7;
  --t-blue: #E9F1FF;
  --t-green: #E3F7EF;
  --t-purple: #F1EBFF;
  --t-yellow: #FFF4DD;
  --t-gray: #EFF0F4;
  --sh-card: none;
  --sh-pop: 0 6px 16px rgba(16,17,22,.08), 0 24px 64px rgba(16,17,22,.16);
  --r-card: 20px;
  --r: 16px;
  --r-sm: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
.t-field { border: 0; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; padding: 4px; border-radius: 4px; }
.t-field:hover, .t-field:focus-visible { background: var(--inset); outline: 2px solid var(--accent); }
.t-inline-editor { width: 250px; max-width: 100%; white-space: normal; display: grid; gap: 6px; }
.t-inline-editor input, .t-inline-editor select, .t-inline-editor .select-trigger { width: 100%; min-width: 0; }
.t-inline-editor label { font-size: 12px; }
.t-inline-actions { display: flex; flex-wrap: wrap; gap: 5px; }
html, body { min-height: 100%; }
body {
  font-family: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font-family: inherit; font-size: 14px; color: var(--text); font-weight: 500; }
::selection { background: #FFD9CD; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #D8DAE0; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #C4C7CE; }
::-webkit-scrollbar-track { background: transparent; }

/* ================= Слои ================= */
.app { display: flex; min-height: 100vh; }

/* ---------- Сайдбар ---------- */
.sidebar {
  width: 82px; flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 22px 0 18px;
  position: sticky; top: 0; height: 100vh;
}
.sb-logo {
  width: 46px; height: 46px; border-radius: 16px; border: 0; cursor: default;
  background: linear-gradient(135deg, #FF8A5C, #F04E23);
  color: #fff; font-size: 21px;
  box-shadow: 0 8px 20px rgba(240, 78, 35, .35);
  margin-bottom: 14px;
}
.sb-nav { display: flex; flex-direction: column; gap: 6px; }
.sb-btn {
  width: 46px; height: 46px; border-radius: 15px; border: 0; cursor: pointer;
  background: transparent; font-size: 19px; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s, transform .1s;
  position: relative;
}
.sb-btn:hover { background: rgba(21, 22, 26, .05); color: var(--text); }
.sb-btn:active { transform: scale(.94); }
.sb-btn.active { background: var(--card); color: var(--text); box-shadow: var(--sh-card); }
.sb-btn.active::before {
  content: ''; position: absolute; left: -13px; top: 50%; transform: translateY(-50%);
  width: 3.5px; height: 22px; border-radius: 0 4px 4px 0; background: var(--accent);
}
.sb-fab {
  width: 54px; height: 54px; border-radius: 18px; border: 0; cursor: pointer;
  background: linear-gradient(135deg, #FF8A5C, #F04E23);
  color: #fff; font-size: 26px; font-weight: 600; line-height: 1;
  box-shadow: 0 10px 24px rgba(240, 78, 35, .4);
  transition: transform .12s, box-shadow .15s; margin: 10px 0;
}
.sb-fab:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 14px 30px rgba(240, 78, 35, .5); }
.sb-fab:active { transform: scale(.95); }
.sb-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.sb-currency {
  margin-top: 8px; font-size: 10.5px; font-weight: 600; letter-spacing: .4px;
  background: var(--t-gray); color: var(--text-2);
  padding: 5px 10px; border-radius: 8px;
}

/* ---------- Контент ---------- */
.content { flex: 1; min-width: 0; padding: 26px 30px 44px; max-width: 1340px; }
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.head h1 { font-size: 27px; font-weight: 600; letter-spacing: -.5px; }
.head p { color: var(--muted); font-size: 13.5px; margin-top: 4px; font-weight: 500; }
.head-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 14px; border: 0; cursor: pointer;
  background: var(--card); color: var(--text-2); font-size: 17px;
  box-shadow: var(--sh-card);
  display: flex; align-items: center; justify-content: center;
  transition: transform .12s, color .15s; position: relative;
}
.icon-btn:hover { transform: translateY(-1px); color: var(--text); }
.icon-btn.has-dot::after {
  content: ''; position: absolute; top: 9px; right: 10px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--card);
}

/* ---------- Карточки ---------- */
.card {
  background: var(--card); border-radius: var(--r-card);
  padding: 22px 24px; box-shadow: var(--sh-card);
}
.card h3 {
  font-size: 16.5px; font-weight: 600; letter-spacing: -.3px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.card h3 .hint { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.card-sub { color: var(--muted); font-size: 12.5px; margin: -10px 0 14px; }
.grid { display: grid; gap: 18px; min-width: 0; }
.grid > *, .card, .chart-box { min-width: 0; }
.section-title { font-size: 12px; color: var(--muted); font-weight: 600; letter-spacing: .6px; text-transform: uppercase; margin: 22px 0 10px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* ---------- KPI-плитки ---------- */
.kpis { grid-template-columns: repeat(4, 1fr); margin-bottom: 18px; }
@media (max-width: 1250px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .kpis { grid-template-columns: 1fr; } }
.kpi { background: var(--card); border-radius: var(--r-card); padding: 20px 22px; box-shadow: var(--sh-card); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.kpi .kpi-label { color: var(--text-2); font-size: 13px; font-weight: 600; }
.kpi .kpi-ico {
  width: 42px; height: 42px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.ico-orange { background: var(--t-orange); }
.ico-blue { background: var(--t-blue); }
.ico-green { background: var(--t-green); }
.ico-purple { background: var(--t-purple); }
.ico-yellow { background: var(--t-yellow); }
.ico-gray { background: var(--t-gray); }
.kpi .kpi-value { font-size: 26px; font-weight: 600; letter-spacing: -.9px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.kpi .kpi-sub { font-size: 12px; color: var(--muted); margin-top: 9px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-weight: 500; }
.kpi-hero { background: linear-gradient(140deg, #FF8A5C 0%, #F04E23 100%); }
.kpi-hero .kpi-label, .kpi-hero .kpi-value { color: #fff; }
.kpi-hero .kpi-sub { color: rgba(255,255,255,.85); }
.kpi-hero .kpi-ico { background: rgba(255,255,255,.2); }
.kpi-hero .trend { background: rgba(255,255,255,.22); color: #fff; }
.kpi-dark { background: #17181D; }
.kpi-dark .kpi-label, .kpi-dark .kpi-value { color: #fff; }
.kpi-dark .kpi-sub { color: rgba(255,255,255,.55); }
.kpi-dark .kpi-ico { background: rgba(255,255,255,.12); }
.kpi-spark { margin-top: 12px; }

.trend { display: inline-flex; align-items: center; gap: 3px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 500; }
.trend-up { background: var(--up-bg); color: var(--up); }
.trend-down { background: var(--down-bg); color: var(--down); }
.trend-flat { background: var(--t-gray); color: var(--muted); }

/* компактная строка мелких метрик */
.stat-strip { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.ss-item {
  display: flex; align-items: center; gap: 9px;
  background: var(--card); border-radius: 14px; padding: 10px 16px 10px 11px;
  box-shadow: var(--sh-card); font-weight: 600; font-size: 13px; color: var(--text-2);
}
.ss-ico { width: 30px; height: 30px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.ss-item b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

.row-2 { grid-template-columns: 1.55fr 1fr; }
.row-2b { grid-template-columns: 1fr 1fr; }
.row-charts { grid-template-columns: repeat(3, 1fr); margin-top: 18px; }
@media (max-width: 1150px) {
  .row-2, .row-2b, .row-charts { grid-template-columns: 1fr; }
}

/* ---------- Кнопки ---------- */
.btn {
  border: 0; background: var(--inset); color: var(--text);
  border-radius: 13px; padding: 10px 18px; cursor: pointer;
  font-weight: 500; font-size: 13.5px;
  transition: background .15s, transform .1s;
}
.btn:hover { background: #EBEDF1; }
.btn:active { transform: scale(.97); }
.btn-primary { background: #17181D; color: #fff; }
.btn-primary:hover { background: #2A2C33; }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(240,78,35,.3); }
.btn-accent:hover { background: var(--accent-deep); }
.btn-danger { background: var(--down-bg); color: var(--down); }
.btn-danger:hover { background: #FBD5D9; }
.btn-sm { padding: 6px 13px; font-size: 12.5px; border-radius: 10px; }
.btn-icon { padding: 0; width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; background: var(--inset); }
.btn-icon:hover { background: #EBEDF1; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.link { color: var(--accent); cursor: pointer; text-decoration: none; font-weight: 500; }
.link:hover { text-decoration: underline; }

/* ---------- Формы ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 13px; }
.field label { font-size: 12px; color: var(--text-2); font-weight: 500; }
.field input, .field select, .field textarea {
  background: var(--inset); border: 1.5px solid transparent;
  border-radius: var(--r-sm); padding: 10px 13px; outline: none; width: 100%;
  font-weight: 600; transition: border-color .15s, background .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); background: var(--card); }
.field input::placeholder, .field textarea::placeholder { color: #B7BAC3; font-weight: 500; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 13px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.inline-form { display: flex; gap: 9px; align-items: end; flex-wrap: wrap; }
.inline-form .field { margin-bottom: 0; min-width: 130px; }
.filters {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: end;
  background: var(--card); border-radius: var(--r-card);
  padding: 16px 18px; margin-bottom: 18px; box-shadow: var(--sh-card);
}
.filters .field { margin-bottom: 0; min-width: 140px; }
.filters .field input, .filters .field select { background: var(--inset); }
.checkbox { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text-2); font-size: 13px; user-select: none; font-weight: 600; }
.checkbox input { accent-color: var(--accent); width: 16px; height: 16px; }
.search-box { position: relative; }
.search-box input { padding-left: 36px; }
.search-box::before { content: '⌕'; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 17px; opacity: .4; pointer-events: none; font-weight: 500; }

/* ---------- Таблицы ---------- */
.table-wrap { overflow: auto; border-radius: var(--r); background: var(--card); }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.3px; }
.tbl th {
  text-align: left; padding: 11px 14px; color: var(--muted); font-size: 11.5px;
  font-weight: 600; letter-spacing: .3px; text-transform: uppercase;
  position: sticky; top: 0; z-index: 2; background: var(--card);
  white-space: nowrap; border-bottom: 1px solid var(--line);
}
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; font-weight: 500; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--inset); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--text); }
.tbl tfoot td { font-weight: 600; background: var(--inset); border-top: 1px solid var(--line-2); border-bottom: 0; }
.cell-main { font-weight: 500; display: flex; align-items: center; gap: 9px; }
.cell-sub { color: var(--muted); font-size: 11.5px; margin-top: 2px; font-weight: 500; }
.pos { color: var(--up); }
.neg { color: var(--down); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.empty-state { text-align: center; color: var(--muted); padding: 48px 20px; }
.empty-state .big { font-size: 38px; margin-bottom: 12px; }
.empty-state p { max-width: 520px; margin: 0 auto 16px; line-height: 1.65; color: var(--text-2); font-weight: 500; }

/* ---------- Бейджи ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 500; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-nodot::before { display: none; }
.badge-green { background: var(--up-bg); color: var(--up); }
.badge-red { background: var(--down-bg); color: var(--down); }
.badge-gray { background: var(--t-gray); color: #6B7078; }
.badge-yellow { background: var(--warn-bg); color: var(--warn); }
.badge-blue { background: var(--t-orange); color: var(--accent-deep); }
.badge-dark { background: #17181D; color: #fff; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

/* ---------- Логотипы контор ---------- */
.bk-logo {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; flex-shrink: 0; overflow: hidden;
  font-size: 12px; font-weight: 600; color: #fff;
}
.bk-logo-img { background: var(--card); }
.bk-logo img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 3px; }
.bk-cell { display: flex; align-items: center; gap: 10px; }
.lic-tag { font-size: 9.5px; font-weight: 600; padding: 2px 6px; border-radius: 6px; letter-spacing: .3px; }
.lic-yes { background: var(--up-bg); color: var(--up); }
.lic-no { background: var(--t-gray); color: var(--muted); }

/* ---------- Матрица турниров ---------- */
.stx {
  width: 34px; height: 30px; border-radius: 10px; border: 0;
  cursor: pointer; font-size: 13px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .12s;
}
.stx:hover { transform: scale(1.12); }
.stx-ok { background: var(--up-bg); color: var(--up); }
.stx-fail { background: var(--down-bg); color: var(--down); }
.stx-untested { background: var(--inset); color: #C2C5CC; }
.matrix-wrap { overflow: auto; max-height: 64vh; border-radius: var(--r); }
.matrix-wrap .tbl th.bk-col, .matrix-wrap .tbl td.bk-col { text-align: center; }
.matrix-wrap .tbl td.sticky-col, .matrix-wrap .tbl th.sticky-col { position: sticky; left: 0; background: var(--card); z-index: 3; }
.matrix-wrap .tbl th.sticky-col { z-index: 4; }
.matrix-wrap .tbl tbody tr:hover td.sticky-col { background: var(--inset); }
.legend { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; color: var(--text-2); font-size: 12.5px; font-weight: 600; margin-bottom: 14px; }
.legend .stx { pointer-events: none; width: 26px; height: 22px; margin-right: 7px; font-size: 10px; }
.legend > span { display: flex; align-items: center; }

/* ---------- Календарь ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-title { font-weight: 600; font-size: 15px; letter-spacing: -.2px; }
.cal-nav { display: flex; gap: 6px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.cal-dow { text-align: center; color: var(--muted); font-size: 11px; padding: 2px 0 4px; font-weight: 600; }
.cal-cell {
  min-height: 64px; background: var(--inset); border: 1.5px solid transparent;
  border-radius: 14px; padding: 8px 10px; cursor: pointer;
  transition: border-color .15s, background .15s;
  display: flex; flex-direction: column;
}
.cal-cell:hover { border-color: var(--accent); background: var(--card); }
.cal-cell.blank { background: transparent; cursor: default; }
.cal-cell.today { background: #17181D; }
.cal-cell.today .cal-day { color: rgba(255,255,255,.55); }
.cal-cell.today .cal-amount { color: #fff; }
.cal-cell.today .cal-count { color: rgba(255,255,255,.5); }
.cal-cell.has-profit { background: var(--t-orange); }
.cal-cell.has-loss { background: var(--t-gray); }
.cal-day { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.cal-amount { margin-top: auto; font-weight: 600; font-size: 13.5px; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.cal-count { font-size: 10.5px; color: var(--muted); font-weight: 600; }

/* ---------- Тепловая карта ---------- */
.heatmap { overflow-x: auto; padding-bottom: 4px; }
.hm-inner { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 13px); gap: 3px; width: max-content; }
.hm-cell { width: 13px; height: 13px; border-radius: 4px; background: var(--inset); }
.hm-legend { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11.5px; margin-top: 10px; font-weight: 600; }
.hm-month-labels { display: flex; gap: 3px; width: max-content; margin-bottom: 5px; }
.hm-month-labels span { font-size: 10px; color: var(--muted); width: 16px; flex-shrink: 0; white-space: nowrap; font-weight: 500; }

/* ---------- Прогресс / мини-бары ---------- */
.limit-row { display: flex; justify-content: space-between; font-size: 12.5px; margin-top: 9px; }
.limit-row b { font-size: 14px; }
.bar-track { height: 12px; background: var(--inset); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #FF8A5C, #F04E23); }
.progress-row { display: flex; align-items: center; gap: 12px; margin-bottom: 11px; }
.progress-row .pr-label { width: 136px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.progress-row .pr-bar { flex: 1; height: 8px; background: var(--inset); border-radius: 999px; overflow: hidden; }
.progress-row .pr-fill { height: 100%; border-radius: 999px; }
.progress-row .pr-val { width: 116px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 12.5px; }
.mini-bar { display: flex; align-items: center; gap: 8px; }
.mini-bar .mb-track { width: 60px; height: 6px; border-radius: 999px; background: var(--inset); overflow: hidden; flex-shrink: 0; }
.mini-bar .mb-fill { height: 100%; border-radius: 999px; background: var(--up); }
.mini-bar .mb-val { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 500; }

/* ---------- Кольцо / sparkline ---------- */
.ring-wrap { position: relative; display: inline-block; }
.ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.ring-label b { font-size: 22px; font-weight: 600; letter-spacing: -.7px; }
.ring-label span { font-size: 10.5px; color: var(--muted); font-weight: 500; }
.spark { display: block; overflow: visible; }
.goal-card { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.goal-facts { flex: 1; min-width: 170px; display: flex; flex-direction: column; gap: 9px; }
.goal-fact { display: flex; justify-content: space-between; font-size: 13px; gap: 10px; font-weight: 600; }
.goal-fact span { color: var(--muted); }
.goal-fact b { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- Segmented ---------- */
.segmented { display: inline-flex; background: var(--inset); border-radius: 12px; padding: 4px; gap: 2px; }
.segmented button {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  padding: 7px 14px; border-radius: 9px; font-size: 12.5px; font-weight: 500; white-space: nowrap;
  transition: background .15s, color .15s;
}
.segmented button:hover { color: var(--text); }
.segmented button.active { background: var(--card); color: var(--text); box-shadow: 0 1px 4px rgba(16,17,22,.1); }
.view-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }

/* ---------- Инсайты ---------- */
.insight-list { display: flex; flex-direction: column; gap: 11px; }
.insight { display: flex; align-items: flex-start; gap: 12px; background: var(--inset); border-radius: var(--r-sm); padding: 13px 14px; }
.insight-ico {
  width: 36px; height: 36px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
  background: var(--card);
}
.insight-body { min-width: 0; }
.insight-title { font-size: 13px; font-weight: 600; margin-bottom: 2px; letter-spacing: -.2px; }
.insight-text { font-size: 12px; color: var(--text-2); line-height: 1.5; font-weight: 500; }

/* ---------- Транзакции (последние сделки) ---------- */
.tx-list { display: flex; flex-direction: column; }
.tx-group { font-size: 11.5px; font-weight: 600; color: var(--muted); letter-spacing: .4px; text-transform: uppercase; margin: 14px 0 8px; }
.tx-group:first-child { margin-top: 0; }
.tx-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 6px; border-bottom: 1px solid var(--line); cursor: pointer;
  transition: background .12s; border-radius: 10px;
}
.tx-row:hover { background: var(--inset); }
.tx-row:last-child { border-bottom: 0; }
.tx-ico { width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.tx-main { flex: 1; min-width: 0; }
.tx-title { font-weight: 600; font-size: 13.5px; letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.tx-amount { font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; letter-spacing: -.3px; text-align: right; }
.tx-amount small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; margin-top: 1px; }

/* ---------- Рекорды ---------- */
.rec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rec-item { background: var(--inset); border-radius: var(--r-sm); padding: 13px 14px; }
.rec-item .r-label { font-size: 11.5px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; margin-bottom: 5px; }
.rec-item .r-value { font-weight: 600; font-size: 15.5px; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.rec-item .r-sub { font-size: 11px; color: var(--muted); margin-top: 2px; font-weight: 600; }
.rec-flame {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #FFF0E7, #FFDDD0);
  border-radius: var(--r-sm); padding: 13px 16px; margin-bottom: 10px;
}
.rec-flame .flame { font-size: 22px; }
.rec-flame b { font-size: 15px; font-weight: 600; letter-spacing: -.3px; }
.rec-flame span { display: block; font-size: 11.5px; color: var(--text-2); font-weight: 600; }

/* ---------- Пагинация ---------- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.pager-info { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.pager-btns { display: flex; gap: 6px; align-items: center; }
.pager-btns .page-num { font-size: 12.5px; color: var(--text-2); padding: 0 6px; font-variant-numeric: tabular-nums; font-weight: 500; }

/* ---------- Быстрый результат ---------- */
.res-toggle { display: inline-flex; gap: 3px; }
.res-toggle button {
  border: 0; background: var(--inset); cursor: pointer;
  width: 27px; height: 25px; border-radius: 8px; font-size: 12px; font-weight: 600; color: #B7BAC3;
  display: inline-flex; align-items: center; justify-content: center;
}
.res-toggle button:hover { color: var(--accent-deep); }
.res-toggle button.on-win { background: var(--up-bg); color: var(--up); }
.res-toggle button.on-lose { background: var(--down-bg); color: var(--down); }
.res-toggle button.on-void { background: var(--t-gray); color: #6B7078; }

/* ---------- Задержка / спорт / флаг ---------- */
.delay-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.delay-fast { background: var(--up-bg); color: var(--up); }
.delay-mid { background: var(--warn-bg); color: var(--warn); }
.delay-slow { background: var(--down-bg); color: var(--down); }
.sport-cell { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.sport-ico { font-size: 15px; line-height: 1; }
.flag { font-size: 15px; line-height: 1; }

/* ---------- Модалки ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(21, 22, 26, .4);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 44px 18px; z-index: 100; overflow-y: auto;
  backdrop-filter: blur(5px);
}
.modal {
  background: var(--card); border-radius: 26px; box-shadow: var(--sh-pop);
  width: 570px; max-width: 96vw; animation: pop .18s cubic-bezier(.2,.9,.3,1.2);
}
.modal.modal-lg { width: 880px; }
@keyframes pop { from { transform: translateY(14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 4px; }
.modal-head h2 { font-size: 18.5px; font-weight: 600; letter-spacing: -.4px; }
.modal-close {
  background: var(--inset); border: 0; color: var(--text-2); font-size: 14px; cursor: pointer;
  width: 34px; height: 34px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-weight: 500;
}
.modal-close:hover { background: #EBEDF1; color: var(--text); }
.modal-body { padding: 16px 24px 24px; }
.modal-body .scroll-y { max-height: 48vh; overflow-y: auto; }

/* ---------- Тосты ---------- */
#toastRoot { position: fixed; bottom: 24px; right: 24px; display: flex; flex-direction: column; gap: 9px; z-index: 200; }
.toast {
  background: #17181D; color: #fff; border-left: 4px solid var(--accent);
  padding: 13px 18px; border-radius: 14px; box-shadow: var(--sh-pop);
  animation: pop .18s ease-out; font-size: 13.5px; font-weight: 600; max-width: 350px;
}
.toast-ok { border-left-color: #0EB582; }
.toast-err { border-left-color: #F04452; }

/* ---------- Чипы ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--inset);
  border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600;
}
.chip .x { cursor: pointer; color: var(--muted); font-size: 14px; line-height: 1; font-weight: 500; }
.chip .x:hover { color: var(--down); }
.stat-chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 11px; margin-bottom: 18px; }
.stat-chip { background: var(--card); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--sh-card); }
.stat-chip .sc-label { color: var(--muted); font-size: 11.5px; margin-bottom: 5px; font-weight: 500; }
.stat-chip .sc-value { font-weight: 600; font-size: 16.5px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat-chip-accent { background: var(--t-orange); }
.stat-chip-accent .sc-label { color: var(--accent-deep); }

/* ---------- Калькулятор ---------- */
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.calc-out {
  background: linear-gradient(135deg, #FF8A5C, #F04E23);
  border-radius: 16px; padding: 18px 20px; color: #fff;
}
.calc-out .co-label { font-size: 12px; opacity: .85; font-weight: 600; margin-bottom: 3px; }
.calc-out .co-value { font-size: 25px; font-weight: 600; letter-spacing: -.8px; font-variant-numeric: tabular-nums; }
.calc-split { display: flex; gap: 10px; margin-top: 14px; }
.calc-split > div { flex: 1; background: rgba(255,255,255,.16); border-radius: 12px; padding: 10px 13px; }
.calc-split .cs-label { font-size: 11px; opacity: .85; font-weight: 600; }
.calc-split .cs-val { font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; margin-top: 2px; }

/* ---------- Графики ---------- */
.chart-box { position: relative; }
.chart-box canvas { max-width: 100%; }

/* ================= Тёмная тема ================= */
body.dark {
  --bg: #0E0F12;
  --card: #17181D;
  --inset: #1E2027;
  --line: #262932;
  --line-2: #30333D;
  --text: #F2F3F6;
  --text-2: #B4B8C2;
  --muted: #A1A7AF;
  --t-orange: #33211A;
  --t-blue: #1B2733;
  --t-green: #12281E;
  --t-purple: #262036;
  --t-yellow: #2E2517;
  --t-gray: #24262D;
  --up-bg: #123327;
  --down-bg: #381E22;
  --warn-bg: #33280F;
  --sh-card: none;
  --sh-pop: 0 6px 16px rgba(0,0,0,.4), 0 24px 64px rgba(0,0,0,.5);
}
body.dark .sb-btn:hover { background: rgba(255,255,255,.07); }
body.dark .sb-btn.active { background: var(--card); color: var(--text); }
body.dark .sb-currency { background: var(--inset); color: var(--text-2); }
body.dark .kpi-dark { background: #0A0B0D; }
body.dark .btn:hover { background: #2A2D35; }
body.dark .btn-primary { background: #F2F3F6; color: #17181D; }
body.dark .btn-primary:hover { background: #fff; }
body.dark .btn-icon:hover, body.dark .modal-close:hover { background: #2A2D35; }
body.dark .cal-cell.today { background: var(--accent); }
body.dark .cal-cell.today .cal-day, body.dark .cal-cell.today .cal-count { color: rgba(255,255,255,.75); }
body.dark .rec-flame { background: linear-gradient(135deg, #33211A, #3A241B); }
body.dark .tx-row:hover, body.dark .tbl tbody tr:hover td { background: var(--inset); }
body.dark .stx-untested { color: #4A4E58; }
body.dark .toast { background: #24262D; }
body.dark ::-webkit-scrollbar-thumb { background: #33363F; }

/* Application shell and backward-compatible page tokens */
:root {
  --outside: #dde0e2; --bg: #f1f2f3; --nav-active: #242628; --nav-ink: #fff;
  --panel: var(--card); --panel-2: var(--inset); --border: var(--line); --border-2: var(--line-2);
  --green: var(--up); --red: var(--down);
}
body {
  background: var(--outside); padding: 0 24px; font-weight: 400; color-scheme: light;
  --panel: var(--card); --panel-2: var(--inset); --border: var(--line); --border-2: var(--line-2);
  --green: var(--up); --red: var(--down);
}
body.dark { --outside: #101214; --bg: #1b1e21; --card: #25292d; --nav-active: #eceeef; --nav-ink: #202326; --accent-deep: #f39570; --up: #63c8a2; --down: #f17f87; --warn: #dfb45d; color-scheme: dark; }
.app { display: grid; grid-template-columns: 76px minmax(0,1fr); grid-template-rows: auto 1fr; max-width: 1600px; min-height: calc(100vh - 48px); margin: 24px auto; background: var(--bg); border: 1px solid rgba(255,255,255,.4); border-radius: 28px; padding: 20px 20px 20px 0; }
.app-header { grid-column: 1 / -1; display: flex; align-items: center; gap: 24px; padding: 0 8px 22px 25px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; white-space: nowrap; font-size: 18px; letter-spacing: -.6px; }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; background: #242628; color: var(--accent); display: grid; place-items: center; }
.pill-nav { display: flex; align-items: center; gap: 3px; padding: 5px; background: var(--card); border-radius: 999px; margin: 0 auto; max-width: 100%; overflow-x: auto; }
.nav-pill { border: 0; padding: 11px 18px; border-radius: 999px; background: transparent; color: var(--text-2); cursor: pointer; white-space: nowrap; font-size: 12px; font-weight: 500; }
.nav-pill:hover { background: var(--inset); color: var(--text); }
.nav-pill.active { background: var(--nav-active); color: var(--nav-ink); }
.header-tools { display: flex; align-items: center; gap: 14px; }
.workspace-label { font-size: 11px; color: var(--muted); white-space: nowrap; }
.sidebar { width: 76px; gap: 18px; padding: 18px 0 6px; top: 18px; height: calc(100vh - 150px); min-height: 550px; align-self: start; }
.sb-nav, .sb-bottom { gap: 7px; }
.sb-btn, .sb-fab { width: 40px; height: 40px; border-radius: 12px; background: transparent; color: var(--muted); box-shadow: none; margin: 0; display: flex; align-items: center; justify-content: center; }
.sb-btn.active::before { left: -10px; width: 3px; height: 15px; border-radius: 3px; }
.sb-fab { background: var(--t-orange); color: var(--accent-deep); }
.sb-fab:hover { background: var(--accent); color: #fff; transform: none; box-shadow: none; }
.sb-currency { padding: 6px; font-size: 10px; font-weight: 500; background: transparent; }
.content { min-width: 0; max-width: none; padding: 20px 18px 28px; border-left: 1px solid var(--line-2); }
.eyebrow { color: var(--muted); font-size: 10px; letter-spacing: .09em; text-transform: uppercase; margin-bottom: 8px; }
.head h1 { font-size: 29px; font-weight: 500; }
.head p { line-height: 1.65; max-width: 750px; }
.card h3 { font-size: 15px; }
.kpi-hero, .kpi-dark, body.dark .kpi-dark { background: var(--card); }
.kpi-hero .kpi-label, .kpi-dark .kpi-label { color: var(--text-2); }
.kpi-hero .kpi-value, .kpi-dark .kpi-value { color: var(--text); }
.kpi-hero .kpi-sub, .kpi-dark .kpi-sub { color: var(--muted); }
.kpi .kpi-value { font-weight: 500; line-height: 1.25; overflow-wrap: anywhere; }
.kpi .kpi-ico { width: 34px; height: 34px; border-radius: 11px; color: var(--text-2); background: var(--inset); }
.kpi-hero .kpi-ico, .ico-orange { color: var(--accent-deep); background: var(--t-orange); }
.kpi-hero .trend-up { background: var(--up-bg); color: var(--up); }
.kpi-hero .trend-down { background: var(--down-bg); color: var(--down); }
.kpi-hero .trend-flat { background: var(--inset); color: var(--muted); }
.ico-blue, .ico-green, .ico-purple, .ico-yellow, .ico-gray { background: var(--inset); }
.stat-strip { gap: 1px; background: var(--line); border-radius: 16px; overflow: hidden; }
.ss-item { flex: 1 1 180px; border-radius: 0; padding: 13px; font-size: 12px; }
.insight-ico { color: var(--text-2); }
.btn { font-weight: 500; border-radius: 10px; }
.btn-accent { box-shadow: none; background: var(--nav-active); color: var(--nav-ink); }
.btn-accent:hover { background: var(--text-2); }
b, strong { font-weight: 600; }
.badge-gray { color: var(--text-2); }
.tbl th { text-transform: none; letter-spacing: 0; font-weight: 500; }
.tbl td { font-size: 12px; }
.rec-flame, body.dark .rec-flame { background: var(--inset); }
.cal-cell.today, .cal-cell.today.has-profit, .cal-cell.today.has-loss, body.dark .cal-cell.today { background: var(--nav-active); }
.cal-cell.today .cal-day, .cal-cell.today .cal-count, .cal-cell.today .cal-amount, body.dark .cal-cell.today .cal-day, body.dark .cal-cell.today .cal-count { color: var(--nav-ink); }
.calc-out { background: var(--inset); color: var(--text); }
.calc-split { flex-wrap: wrap; }
.calc-split > div { min-width: 110px; background: var(--card); }
.ui-icon { width: 19px; height: 19px; flex: 0 0 auto; vertical-align: middle; pointer-events: none; }
.btn .ui-icon { width: 16px; height: 16px; margin-right: 6px; }
.btn-icon .ui-icon { margin: 0; }
.empty-state .big .ui-icon { width: 38px; height: 38px; color: var(--accent); }
:where(button, a, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid var(--accent) !important; outline-offset: 3px; }
.skip-link { position: fixed; top: -60px; left: 25px; padding: 10px 20px; background: var(--card); color: var(--text); z-index: 300; border-radius: 10px; }
.skip-link:focus { top: 10px; }
body.dark .app { border-color: var(--line); }
@media (max-width: 1250px) {
  body { padding: 0 14px; }
  .app { margin: 14px auto; min-height: calc(100vh - 28px); }
  .app-header { gap: 16px; flex-wrap: wrap; }
  .header-tools { margin-left: auto; }
  .pill-nav { order: 3; width: 100%; justify-content: center; }
  .nav-pill { flex: 1; }
  .sidebar { height: calc(100vh - 195px); }
}
@media (max-width: 820px) {
  body { padding: 0 8px; }
  .app { grid-template-columns: 56px minmax(0,1fr); border-radius: 22px; padding: 16px 8px 8px 0; margin: 8px auto; }
  .app-header { padding: 0 8px 16px 16px; }
  .sidebar { width: 56px; min-height: 525px; top: 8px; gap: 12px; }
  .sb-btn, .sb-fab { width: 36px; height: 36px; }
  .sb-btn.active::before { left: -6px; }
  .content { padding: 16px 8px 24px 14px; }
  .nav-pill { padding: 10px 13px; }
  .head h1 { font-size: 25px; }
  .head p { font-size: 12px; }
  .kpis { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .kpi, .card { padding: 18px; }
  .kpi .kpi-value { font-size: 23px; }
  .form-row, .form-row-3, .calc-grid { grid-template-columns: 1fr; }
  .filters .field { flex: 1 1 150px; min-width: 0; }
  .cal-cell { min-height: 58px; padding: 6px 4px; }
  .cal-amount { font-size: 11px; }
  .cal-count { font-size: 9px; }
  .modal-overlay { padding: 18px 10px; }
  .modal { border-radius: 20px; }
}
@media (max-width: 540px) {
  .app { display: flex; flex-direction: column; padding: 14px 10px; }
  .app-header { padding: 0 0 12px; gap: 14px; }
  .brand { font-size: 17px; }
  .workspace-label { display: none; }
  .pill-nav { justify-content: flex-start; }
  .nav-pill { flex: 0 0 auto; }
  .sidebar { position: static; width: 100%; height: auto; min-height: 0; flex-direction: row; padding: 8px 2px 12px; border-bottom: 1px solid var(--line-2); }
  .sidebar .sb-nav { display: none; }
  .sb-bottom { margin: 0 0 0 auto; flex-direction: row; gap: 8px; }
  .content { padding: 22px 0 8px; border-left: 0; }
  .head { margin-bottom: 20px; }
  .head p { display: block; }
  .kpis { grid-template-columns: 1fr; }
  .kpi { padding: 20px; }
  .kpi-top { margin-bottom: 8px; }
  .card { padding: 16px; }
  .rec-grid { grid-template-columns: 1fr; }
  .cal-grid { gap: 3px; }
  .cal-head { gap: 8px; flex-wrap: wrap; }
  .cal-nav { gap: 4px; }
  .cal-cell { min-height: 50px; border-radius: 8px; overflow: hidden; }
  .cal-day { font-size: 10px; }
  .cal-amount { font-size: 9px; white-space: nowrap; }
  .cal-count { display: none; }
  .segmented { max-width: 100%; overflow-x: auto; }
  .segmented button { padding: 7px 10px; }
  .modal-body { padding: 14px 17px 20px; }
  .modal-head { padding: 18px 17px 2px; }
  .form-actions { flex-wrap: wrap; }
  .progress-row { gap: 8px; }
  .progress-row .pr-label { width: 85px; }
  .progress-row .pr-val { width: 95px; }
  #toastRoot { bottom: 12px; right: 12px; left: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}


/* Auth and compact synchronization UI */
[hidden]{display:none!important}
#authScreen{min-height:100vh;min-height:100dvh;display:grid;place-items:center;padding:24px;background:#171819;color:#eeeae6;font-family:Manrope,sans-serif;color-scheme:dark}
#authForm{width:min(400px,100%);display:grid;gap:10px;padding:40px 32px;background:#202123;border:1px solid #303133;border-radius:20px;box-shadow:0 20px 70px #0003}
#authForm h1{font-size:26px;font-weight:600;letter-spacing:-.7px;margin:0 0 20px}
#authForm label{font-size:13px;color:#bcbab8;margin-top:8px}
#authForm input{width:100%;min-width:0;height:48px;background:#2a2b2d;border:1px solid #3b3c3e;border-radius:9px;color:#f3efeb;padding:0 14px;font:inherit;font-size:14px;box-shadow:none}
#authForm input:focus{outline:2px solid #d99454;outline-offset:2px;border-color:#d99454}
.auth-password{position:relative}
#authForm .auth-password input{padding-right:52px}
#passwordToggle{position:absolute;right:3px;top:3px;width:44px;height:42px;display:grid;place-items:center;background:transparent;border:0;border-radius:7px;color:#bcbab8;cursor:pointer}
#authForm button:focus-visible{outline:2px solid #d99454;outline-offset:3px}
#authForm #loginSubmit{height:46px;margin-top:18px;background:#d99454;color:#211b16;border:1px solid #d99454;border-radius:9px;font-weight:600;justify-content:center}
#authForm #loginSubmit:hover{background:#e2a267}
#authForm #loginSubmit:disabled{opacity:.6;cursor:wait}
#authError{color:#f1a39b;font-size:13px;line-height:1.5;margin:2px 0 0}
#authError:empty{display:none}
@media(max-width:440px){#authScreen{padding:16px}#authForm{padding:30px 24px}}
#syncIndicator{font-size:11px;max-width:130px}
#toastRoot .toast{font-size:13px;padding:10px 14px;max-width:380px}
.modal pre{max-height:45vh;overflow:auto;white-space:pre-wrap;word-break:break-word}

/* Native form models stay enabled/submittable, but never open an OS popup. */
select.select-native { display: none !important; }
.select-trigger {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 12px;
  min-width: 0; max-width: 100%; min-height: 42px; padding: 10px 13px;
  background: var(--inset); border: 1.5px solid transparent; border-radius: var(--r-sm);
  color: var(--text); text-align: left; cursor: pointer; touch-action: manipulation;
}
.field .select-trigger { width: 100%; }
.select-caption { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-chevron, .select-check { display: flex; flex: 0 0 auto; }
.select-chevron .ui-icon, .select-check .ui-icon { width: 18px; height: 18px; }
.select-trigger:hover:not(:disabled) { border-color: var(--line-2); }
.select-trigger[aria-expanded="true"] { border-color: var(--accent); background: var(--card); }
.select-trigger[aria-expanded="true"] .select-chevron { transform: rotate(180deg); }
.select-trigger:disabled { opacity: .5; cursor: not-allowed; }
.select-trigger[aria-invalid="true"] { border-color: var(--down); }
.select-menu {
  position: fixed; z-index: 1000; display: flex; flex-direction: column; box-sizing: border-box;
  padding: 6px; overflow: hidden; border: 1px solid var(--line-2); border-radius: 14px;
  background: var(--card); color: var(--text); box-shadow: var(--sh-pop);
}
.select-search {
  flex: 0 0 auto; width: 100%; min-width: 0; min-height: 42px; margin-bottom: 6px;
  padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 9px;
  background: var(--inset); color: var(--text);
}
.select-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; position: relative; }
.select-option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 40px; padding: 9px 12px; border-radius: 8px; cursor: pointer;
  font-size: 14px; line-height: 1.4; touch-action: manipulation;
}
.select-option-text { overflow-wrap: anywhere; min-width: 0; }
.select-option[aria-selected="true"] { color: var(--accent-deep); font-weight: 600; }
.select-option:hover:not([aria-disabled="true"]), .select-option.is-active { background: var(--inset); }
.select-option.is-active { box-shadow: inset 0 0 0 1px var(--accent); }
.select-option[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.select-group-label { padding: 12px 12px 5px; color: var(--muted); font-size: 11px; font-weight: 600; }
.select-empty { padding: 18px 12px; color: var(--muted); font-size: 14px; }
#supplierReminder { position: fixed; right: 20px; bottom: 20px; z-index: 50; width: min(350px, calc(100vw - 32px)); max-height: 35vh; overflow: auto; padding: 16px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--card); color: var(--text); box-shadow: var(--sh-pop); overflow-wrap: anywhere; }
#supplierReminder[hidden] { display: none; }
#supplierReminder h2 { font-size: 16px; margin-bottom: 8px; }
#supplierReminder section { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
#supplierReminder p { margin: 5px 0; }
#supplierReminder button { min-height: 44px; margin-top: 6px; }
body:has(#supplierReminder:not([hidden])) .content { padding-bottom: 38vh; }
@media (max-width: 600px) { #supplierReminder { right: 16px; bottom: 12px; max-height: 30vh; } }
@media (pointer: coarse) {
  .select-trigger, .select-option { min-height: 44px; }
  .select-search { font-size: 16px; }
}

/* Fixed-size local SVGs do not depend on Windows emoji fonts. */
.country-flag { display:inline-block; width:20px; height:15px; object-fit:contain; vertical-align:middle; flex:none; }
.select-flag { display:inline-flex; align-items:center; flex:none; }
.select-flag[hidden] { display:none; }
