:root {
  /* TG 641: белая тема с синим акцентом. v3: «сейчас» (остатки, открытые заказы) отделено от «за период» тоном фона */
  color-scheme: light;
  --bg: #eef0f4;
  --surface: #ffffff;
  --surface-2: #f4f5f9;
  --current: #e6e9fb;
  --text: #16181d;
  --hint: #5f6672;
  --accent: #4f46e5;
  --on-accent: #ffffff;
  --line: #e3e6ec;
  --pressed: #e2e5ec;
  --plus: #127a49;
  --minus: #c8303f;
  --attention: #a35800;
  --bottom-inset: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px), var(--tg-content-safe-area-inset-bottom, 0px));
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); overscroll-behavior: none; }
body { margin: 0; background: var(--bg); font: 500 15px/1.45 "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; overscroll-behavior: none; }
[hidden] { display: none !important; }
p, h1, h2, h3, figure, dl, dd { margin: 0; }
button, input, select { font: inherit; }
button { border: 0; background: transparent; color: inherit; cursor: pointer; min-height: 44px; -webkit-tap-highlight-color: transparent; text-align: left; }
button:disabled { opacity: .55; cursor: default; }
button:active { background: var(--pressed); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1 { font-size: 28px; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; padding: 4px 4px 0; }
h2 { font-size: 16px; line-height: 1.35; font-weight: 750; }
.good { color: var(--plus); }
.bad { color: var(--minus); }
.warn { color: var(--attention); }
.muted, .sub { color: var(--hint); }
.sub { font-size: 13px; }
.app { max-width: 760px; margin: 0 auto; min-height: var(--app-height, 100svh);
  padding-top: max(env(safe-area-inset-top, 0px), calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px)));
  padding-right: max(env(safe-area-inset-right, 0px), var(--tg-safe-area-inset-right, 0px));
  padding-left: max(env(safe-area-inset-left, 0px), var(--tg-safe-area-inset-left, 0px));
  padding-bottom: calc(88px + var(--bottom-inset)); }

/* шапка */
.bar { padding: 10px 12px 0; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 4px; border-radius: 14px; background: var(--surface); }
.seg button { border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--hint); text-align: center; }
.seg button[aria-selected="true"] { color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
/* TG 4265: выбор месяца стрелками и списком под вкладкой «Месяц» */
.mon-pick { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; margin-top: 6px; padding: 2px 4px; border-radius: 12px; background: var(--surface); }
.mon-pick[hidden] { display: none; }
.mon-pick > button { height: 36px; font-size: 22px; line-height: 1; color: var(--text); border-radius: 10px; }
.mon-pick > button:disabled { opacity: .3; }
.mon-name { position: relative; text-align: center; font-size: 15px; font-weight: 700; color: var(--text); }
.mon-name span::after { content: " ▾"; color: var(--hint); font-size: 12px; }
.mon-name select { position: absolute; inset: 0; width: 100%; opacity: 0; font-size: 16px; }
.meta { display: flex; align-items: center; gap: 8px; padding: 4px 12px 8px; }
#updated { flex: 1; min-width: 0; padding: 0 4px; color: var(--hint); font-size: 13px; border-radius: 8px; }
#updated.warn { color: var(--attention); }
#updated.bad { color: var(--minus); }
#refresh-btn { flex: none; padding: 0 14px; border-radius: 12px; background: var(--surface); font-size: 14px; font-weight: 700; color: var(--accent); }
.refresh-box { margin: 0 12px 10px; padding: 10px 14px; border-radius: 14px; background: var(--surface); font-size: 13px; display: grid; gap: 4px; }
.rrow { display: flex; justify-content: space-between; gap: 12px; }
.rrow span:last-child { text-align: right; color: var(--hint); }
.rrow .ok { color: var(--plus); } .rrow .err { color: var(--minus); }
.rsum { padding-top: 4px; font-weight: 700; }

.banner { display: flex; align-items: center; gap: 12px; margin: 0 12px 12px; padding: 10px 10px 10px 14px; border-radius: 14px; background: #fff4e5; color: #6b3a00; font-size: 14px; }
.banner.bad { background: #fde8ea; color: #7d1420; }
.banner p { flex: 1; }
.banner button { flex: none; padding: 0 12px; border-radius: 10px; background: rgba(255,255,255,.7); font-weight: 700; }

.screen { display: grid; gap: 12px; padding: 0 12px 16px; }
.card, .current { border-radius: 20px; padding: 14px 16px; min-width: 0; }
.card { background: var(--surface); }
.current { background: var(--current); }
.cap { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.cap .muted { font-size: 13px; text-align: right; }
.info { min-width: 44px; min-height: 32px; padding: 0; border-radius: 10px; color: var(--hint); font-weight: 800; text-align: center; }
.lbl { display: block; font-size: 13px; font-weight: 650; color: var(--hint); }
.pad { padding: 8px 0; }

/* «Сейчас»: срочное */
.now { display: grid; gap: 6px; }
.now:empty { display: none; }
.alert { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; border-radius: 14px; background: var(--surface); font-size: 14px; font-weight: 650; }
.alert::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--attention); }
.alert.bad::before { background: var(--minus); }
.alert.bad { color: var(--minus); }
.alert span { flex: 1; min-width: 0; }
.alert b { flex: none; font-weight: 750; color: var(--text); }
.alert.ok { color: var(--hint); font-weight: 600; }
.alert.ok::before { background: var(--plus); }

/* текущее состояние */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cell { display: grid; align-content: start; gap: 2px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.75); }
.cell b { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.cell .sub { line-height: 1.35; }

/* период */
.hero { display: grid; gap: 2px; width: 100%; padding: 6px 0 10px; border-radius: 12px; }
.hero-num { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.hero-num b { font-size: clamp(34px, 10vw, 44px); font-weight: 800; letter-spacing: -.03em; line-height: 1.15; }
.delta { font-size: 13px; font-weight: 650; color: var(--hint); }
.delta:empty { display: none; }
.split { font-size: 13px; color: var(--hint); }
.rows { display: grid; border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 0 2px; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 14px; }
.row:last-child { border-bottom: 0; }
.row b { font-weight: 750; white-space: nowrap; }
.chart { margin-top: 10px; }
.chart figcaption { font-size: 12px; margin-bottom: 6px; }
.days { display: flex; align-items: flex-end; gap: 3px; height: 116px; overflow-x: auto; scrollbar-width: none; }
.day { position: relative; flex: 1 0 18px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-height: 44px; padding: 0; border-radius: 6px; }
.day i { display: block; width: 70%; min-height: 2px; border-radius: 4px 4px 1px 1px; background: var(--accent); }
.day.zero i { background: var(--line); }
.day.extra i { background: #b9bdf3; }
.day.today i { box-shadow: 0 0 0 2px var(--current); }
.day small { font-size: 10.5px; color: var(--hint); line-height: 1.6; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; }
.stats div { min-width: 0; }
.stats dt { font-size: 12px; color: var(--hint); line-height: 1.3; }
.stats dd { font-size: 20px; font-weight: 800; }
.stats dd small { font-size: 12px; font-weight: 600; color: var(--hint); margin-left: 4px; white-space: nowrap; }

/* списки */
.list { display: grid; gap: 8px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.chips button { flex: none; padding: 0 12px; min-height: 36px; border-radius: 18px; background: var(--surface); font-size: 13px; font-weight: 700; color: var(--hint); }
.chips button[aria-pressed="true"] { background: var(--text); color: #fff; }
.chips button.bad:not([aria-pressed="true"]) { color: var(--minus); }
.order { display: grid; gap: 4px; width: 100%; padding: 12px 14px; border-radius: 16px; background: var(--surface); }
.order .top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; }
.order .top b { font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.order .top strong { flex: none; font-weight: 800; }
.order .line { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--hint); }
.pill { display: inline-block; padding: 1px 8px; border-radius: 8px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--hint); }
.pill.bad { background: #fde8ea; color: var(--minus); }
.pill.warn { background: #fff1dd; color: var(--attention); }
.pill.good { background: #e3f4ea; color: var(--plus); }
.pill.work { background: var(--current); color: var(--accent); }
.empty { padding: 24px 8px; text-align: center; color: var(--hint); }
.mark { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; color: #fff; font-size: 10px; font-weight: 800; flex: none; vertical-align: -5px; margin-right: 6px; }

.plat { display: grid; gap: 6px; padding: 12px 14px; border-radius: 16px; background: var(--surface); }
.plat .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plat .top b { font-weight: 750; }
.plat dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.plat dt { font-size: 12px; color: var(--hint); }
.plat dd { font-weight: 750; }
.src { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.src:last-child { border-bottom: 0; }
.src span:last-child { text-align: right; color: var(--hint); font-size: 13px; }

/* форма */
.add { width: 100%; border-radius: 14px; background: var(--surface); color: var(--accent); font-weight: 750; text-align: center; }
.entry { display: grid; gap: 10px; }
.entry label { display: grid; gap: 4px; font-size: 13px; font-weight: 650; color: var(--hint); }
.entry input, .entry select { min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--text); font-size: 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* тёплые и важное (как в v2) */
.lead-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.lead-row:last-child { border-bottom: 0; }
.item-top { display: flex; justify-content: space-between; gap: 8px; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lead-wait { flex: none; font-size: 12px; font-weight: 700; }
.next { font-size: 13px; }
.closed { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.closed p { display: grid; font-size: 12px; color: var(--hint); }
.closed b { font-size: 20px; color: var(--text); }
.att-group { display: grid; gap: 6px; margin-bottom: 14px; }
.att-group h2 { padding: 0 4px; }
.att-row { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 14px; background: var(--surface); }
.att-row > button:first-child, .att-row > div { flex: 1; min-width: 0; display: grid; gap: 2px; padding: 0; }
.att-row .done { flex: none; padding: 0 12px; border-radius: 10px; background: var(--surface-2); font-size: 13px; font-weight: 700; }

/* нижняя панель */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); max-width: 760px; margin: 0 auto;
  padding: 4px 6px calc(4px + var(--bottom-inset)); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); z-index: 5; }
.tabs button { position: relative; display: grid; justify-items: center; gap: 1px; padding: 4px 0; border-radius: 12px; font-size: 11px; font-weight: 700; color: var(--hint); text-align: center; }
.tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs button[aria-current="page"] { color: var(--accent); }
.badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--minus); color: #fff; font: 800 11px/18px "Manrope", sans-serif; font-style: normal; }

/* лист с расшифровкой */
.sheet-overlay { position: fixed; inset: 0; z-index: 10; display: flex; align-items: flex-end; justify-content: center; background: rgba(16,18,24,.38); }
.sheet { width: 100%; max-width: 760px; max-height: 86vh; overflow: auto; padding: 8px 16px calc(16px + var(--bottom-inset)); border-radius: 22px 22px 0 0; background: var(--surface); }
.sheet-heading { position: sticky; top: -8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; background: var(--surface); }
.sheet-heading h2 { font-size: 18px; }
#sheet-close { width: 44px; font-size: 26px; text-align: center; color: var(--hint); border-radius: 12px; }
.sheet p { margin-bottom: 8px; }
.brk { display: grid; }
.brk-row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.brk-row > span { min-width: 0; }
.brk-row b { flex: none; white-space: nowrap; margin-left: auto; text-align: right; }
.brk-row .sub { display: block; }
.brk-total { display: flex; justify-content: space-between; padding: 10px 0 4px; font-weight: 800; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.actions button { padding: 0 14px; border-radius: 12px; background: var(--surface-2); font-size: 14px; font-weight: 700; }
.actions button.danger { color: var(--minus); }
.hist { font-size: 13px; color: var(--hint); }

/* загрузка */
.skeleton { padding-top: 4px; }
.sk { border-radius: 18px; background: linear-gradient(90deg, #e4e7ee, #f2f3f7, #e4e7ee); background-size: 200% 100%; animation: sk 1.4s linear infinite; }
.sk-now { height: 44px; } .sk-big { height: 120px; } .sk-mid { height: 220px; }
body:not(.loading) .skeleton { display: none; }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }
@media (max-width: 360px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pair { grid-template-columns: 1fr; } }
.urgent { display: grid; gap: 8px; } .urgent h2 { padding: 0 4px; }

/* календарь по дням (TG 1135) */
.cal-cap { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; font-size: 14px; }
.cal-cap .muted { font-size: 12px; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.cal-week span { text-align: center; font-size: 11px; color: var(--hint); padding-bottom: 2px; }
.cal-day { display: grid; place-content: center; justify-items: center; gap: 0; min-height: 50px; padding: 4px 0; border-radius: 12px; background: var(--surface-2); text-align: center; line-height: 1.15; }
.cal-day b { font-size: 14px; font-weight: 700; }
.cal-day small { font-size: 11px; font-weight: 750; color: var(--plus); min-height: 13px; }
.cal-day:disabled { opacity: .35; }
.cal-day.l1 { background: #e3f4ea; } .cal-day.l2 { background: #c6ead5; } .cal-day.l3 { background: #9bdab6; } .cal-day.l4 { background: #6cc795; }
.cal-day.today b { text-decoration: underline; text-underline-offset: 3px; }
.cal-day.picked { box-shadow: inset 0 0 0 2px var(--text); }
.daybox { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.daybox-head { display: flex; justify-content: space-between; gap: 8px; padding-bottom: 4px; font-size: 15px; }

/* TG 1139 совет: шапка, площадки, карточка заказа */
#updated.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 999px; background: var(--surface); font-size: 13px; font-weight: 650; color: var(--text); }
#updated.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--plus); }
#updated.chip.warn::before { background: var(--attention); } #updated.chip.bad::before { background: var(--minus); }
#updated.chip.bad { color: var(--minus); }
.meta { justify-content: space-between; }
.srcbox summary { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; cursor: pointer; list-style: none; min-height: 32px; }
.srcbox summary::-webkit-details-marker { display: none; }
.srcbox[open] summary { margin-bottom: 8px; }
.order .top b { flex: 1; }
.order .oid { font-size: 12px; opacity: .6; }
.actions { display: grid; gap: 8px; }
.act-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.actions .link { background: none !important; border: 0 !important; box-shadow: none !important; justify-content: center; color: var(--minus); font-weight: 650; min-height: 44px; }
.actions .link::after, .actions .link::before { display: none !important; }
/* четыре вкладки + колокольчик в шапке (TG 1142) */
.tabs { grid-template-columns: repeat(4, 1fr); }
.meta-r { display: inline-flex; align-items: center; gap: 8px; }
.bell { position: relative; display: grid; place-items: center; width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%; background: var(--surface); color: var(--text); text-align: center; }
.bell svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bell .badge { top: -4px; left: auto; right: -6px; }
.golink { display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left; }
.golink > span { display: grid; gap: 2px; }

/* «Проекты» и «Клиенты» в одной вкладке (TG 3086) */
.lpseg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 4px 0 12px; border-radius: 14px; background: var(--surface); }
.lpseg button { min-height: 36px; border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--hint); background: none; box-shadow: none; }
.lpseg button[aria-pressed="true"] { color: var(--text); background: var(--bg, #fff); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
body.on-projects .lpseg { background: color-mix(in srgb, var(--pj-text) 8%, transparent); }
body.on-projects .lpseg button { color: var(--pj-hint); }
body.on-projects .lpseg button[aria-pressed="true"] { color: var(--pj-text); background: var(--pj-bg); }

.order.grp .top b { display: flex; align-items: center; flex: 1; }
.order.grp .top b { white-space: normal; }
.order.grp .grp-t { min-width: 0; overflow-wrap: anywhere; }
.order.grp .grp-n { white-space: nowrap; }
.vsbal dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vsbal dl > div { min-width: 0; overflow-wrap: anywhere; }
.sub.warn { color: var(--attention); }
.sheet-heading h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sheet-close { flex: none; }

/* TG 6004/6016: биржи на «Деньгах»: герой-блок, плитки 2 в ряд, лента «Живое» */
.exh { gap: 8px; grid-template-columns: minmax(0, 1fr); }
.exh-hero { padding: 14px 16px 10px; border-radius: 18px; background: var(--surface); }
.exh-top { display: flex; align-items: center; justify-content: space-between; }
.exh-top h2 { padding: 0; font-size: 15px; color: var(--hint); font-weight: 650; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--hint); }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--attention); }
.live i.on { background: var(--plus); animation: exPulse 1.6s ease-out infinite; }
.live i.off { background: var(--minus); }
@keyframes exPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--plus) 70%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }
@media (prefers-reduced-motion: reduce) { .live i.on { animation: none; } }
.exh-big { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .75fr) minmax(0, 1.35fr); gap: 6px; margin: 6px 0 10px; }
.exh-big div { display: grid; min-width: 0; }
.exh-big b { font-size: 28px; line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.exh-big span { font-size: 12px; color: var(--hint); font-weight: 600; }
.exh-big .exh-work { font-size: 11px; color: var(--hint); font-weight: 600; opacity: .8; white-space: nowrap; }
.exh-chart { display: block; width: 100%; height: 48px; }
.exh-axis { display: flex; justify-content: space-between; margin-top: 3px; font-size: 10px; color: var(--hint); }
.exg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.ext { position: relative; min-width: 0; padding: 10px 12px 10px; border-radius: 16px; background: var(--surface); box-shadow: inset 3px 0 0 var(--c, var(--line)); }
.ext.ex-bad { box-shadow: inset 0 0 0 1.5px var(--minus); }
.ext.ex-warn { box-shadow: inset 0 0 0 1.5px var(--attention); }
.ext-h { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--hint); }
.ext-h span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ext .dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--plus); }
.ext.ex-warn .dot { background: var(--attention); }
.ext.ex-bad .dot { background: var(--minus); }
.ext-n { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 6px; font-size: 28px; line-height: 1.1; font-weight: 800; letter-spacing: -0.02em; }
.ext-n { flex-wrap: wrap; row-gap: 2px; }
.ext-n small { font-size: 12px; line-height: 1; font-weight: 650; letter-spacing: 0; color: var(--hint); white-space: nowrap; }
.ext-n em { font-style: normal; font-size: 20px; line-height: 1; font-weight: 850; color: #06170e; padding: 3px 9px; border-radius: 99px; background: #3ddc84; }
.ext svg { display: block; width: 100%; height: 20px; }
.ext-w { margin-top: 5px; font-size: 12px; font-weight: 700; color: var(--minus); }
.ext.ex-warn .ext-w { color: var(--attention); }
.ext.soon { box-shadow: inset 0 0 0 1px var(--line); background: transparent; }
.ext.soon .ext-n { font-size: 15px; color: var(--hint); font-weight: 650; margin-bottom: 0; }
.exf { padding: 10px 14px; border-radius: 16px; background: var(--surface); }
.exf:empty { display: none; }
.exf h3 { margin-bottom: 4px; font-size: 13px; color: var(--hint); font-weight: 650; }
.exf-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13.5px; }
.exf-row time { flex: none; width: 38px; color: var(--hint); font-variant-numeric: tabular-nums; }
.exf-row i { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.exf-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.exf-row em { flex: none; font-style: normal; font-weight: 750; font-variant-numeric: tabular-nums; }
.exf-row b { font-weight: 800; }
.exf-row.k-chosen b, .exf-row.k-chosen em { color: #3ddc84; }
.exf-row.k-paid b, .exf-row.k-paid em { color: #facc15; }
.exf-row.k-msg b { color: var(--text); }
.exf-row.k-msg span { color: var(--hint); }
.exh-big b.good { color: #3ddc84; }
.exp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.exp:empty { display: none; }
.pill { display: flex; align-items: baseline; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 12px; border-radius: 14px; background: var(--surface); font-size: 13px; font-weight: 650; color: var(--hint); white-space: nowrap; min-width: 0; overflow: hidden; }
.pill b { font-size: 16px; font-weight: 800; }
.pill small { font-size: 12px; font-weight: 700; padding: 0 6px; border-radius: 99px; background: var(--surface-2); color: var(--text); }
.pill.warn { box-shadow: inset 0 0 0 1.5px #facc15; color: #facc15; } .pill.warn b { color: #facc15; }
.pill.bad { box-shadow: inset 0 0 0 1.5px var(--minus); } .pill.bad b { color: var(--minus); }
.pill::after { content: "›"; margin-left: 2px; font-size: 16px; color: var(--hint); }
/* 15.11 TG 6800: балансы бирж в конце главного экрана */
.bal-head, .bal-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline; }
.bal-head { font-size: 12px; color: var(--hint); padding-bottom: 4px; }
.bal-head span, .bal-row b { text-align: right; min-width: 78px; font-variant-numeric: tabular-nums; }
.bal-row { padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.bal-row b { font-weight: 600; }
.bal-row small { display: block; font-size: 12px; color: var(--hint); margin-top: 2px; }
.bal-row.none b { color: var(--hint); font-weight: 400; }
.bal-row small.warn { color: var(--attention); }  /* 16.11 TG 5825: устаревшая биржа */
.bal-total { font-size: 16px; }
.bal-total span, .bal-total b { font-weight: 800; }
