/* ═══════════════════════════════════════════════
   СТИЛИ КОНКРЕТНЫХ ЭКРАНОВ
════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────
   ЭКРАН: ЛОГИН
───────────────────────────────────────────── */
.login-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 32px var(--space-xl);
  background: var(--color-white);
}

.login-logo {
  font-size: var(--text-3xl);
  font-weight: 900;
  color: var(--color-dark);
  letter-spacing: -0.04em;
}

.login-hint {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-muted);
  margin-top: 8px;
}

/* ─── Точки ─── */
.pin-dots {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin: 32px 0;
}

.pin-dot {
  width: var(--space-lg);
  height: var(--space-lg);
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: transparent;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.pin-dot--filled {
  background: var(--color-dark);
  border-color: var(--color-dark);
}

.pin-dot--loading {
  background: var(--color-border);
  border-color: var(--color-border);
}

.pin-dot--error {
  background: var(--c-loss);
  border-color: var(--c-loss);
}

/* ─── Shake-анимация на контейнере точек ─── */
.pin-dots--shake {
  animation: pin-shake var(--transition-slow) ease;
}

@keyframes pin-shake {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(-8px); }
  40%  { transform: translateX(8px); }
  60%  { transform: translateX(-var(--space-sm)); }
  80%  { transform: translateX(var(--space-sm)); }
  100% { transform: translateX(0); }
}

.pin-error {
  min-height: var(--space-lg);
  font-size: var(--text-sm);
  color: var(--c-loss);
  font-weight: 500;
  text-align: center;
}

/* ─── Клавиатура ─── */
.pin-keyboard {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  gap: 12px;
  margin-top: 8px;
}

.pin-key {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-white);
  border: none;
  font-family: var(--font-family);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-dark);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
  -webkit-user-select: none;
  user-select: none;
}

.pin-key:active:not(:disabled) {
  background: var(--color-bg);
  transform: scale(0.92);
}

.pin-key:disabled {
  opacity: 0.35;
  cursor: default;
}

.pin-key--empty {
  pointer-events: none;
  background: transparent;
}

.pin-key--del {
  background: transparent;
  color: var(--color-dark);
}

.pin-key--del:active:not(:disabled) {
  background: var(--color-bg);
}




/* ─────────────────────────────────────────────
   ЭКРАН: ИСТОРИЯ
───────────────────────────────────────────── */
.history-filters {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: var(--space-md);
  scrollbar-width: none;
}

.history-filters::-webkit-scrollbar { display: none; }

.history-filter-chip {
  flex-shrink: 0;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-xl);
  background: var(--color-white);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-muted);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
  white-space: nowrap;
}

.history-filter-chip--active {
  background: var(--color-dark);
  color: var(--color-white);
}

.history-date-group {
  margin-bottom: var(--space-md);
}

.history-date-label {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 4px;
  margin-bottom: var(--space-sm);
}


/* ─────────────────────────────────────────────
   ЭКРАН: ГЛАВНАЯ (МЕХАНИК)
───────────────────────────────────────────── */

/* Скролл-контейнер экрана (без фиксированного хедера) */
.home-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--navbar-height) + var(--safe-bottom) + var(--space-lg));
}

#screen-home .home-scroll {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ── Тёмная шапка + светлый лоток ── */
.home-header {
  background: #1a1a1a;
  padding: 12px 16px 24px;
  padding-top: max(12px, calc(env(safe-area-inset-top) + 8px));
  position: relative;
  z-index: 0;
  flex-shrink: 0;
}

.home-header--skeleton {
  padding-top: max(12px, calc(env(safe-area-inset-top) + 8px));
}

.home-hdr__brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.home-hdr__logo {
  font-size: var(--text-lg);
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.02em;
}

.home-hdr__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #FFDD2D;
  color: #1A1A1A;
  font-size: var(--text-xl);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kassa-label {
  margin-bottom: 2px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #fff;
  opacity: 0.6;
}

.kassa-amount {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
  line-height: 1;
  margin-bottom: 4px;
}

.kassa-currency {
  font-size: var(--text-lg);
  font-weight: 400;
  color: #888;
  vertical-align: super;
  margin-left: 3px;
}

.home-hdr__delta {
  font-size: var(--text-sm);
  font-weight: 600;
}

.home-hdr__delta--pos { color: #4CAF50; }
.home-hdr__delta--neg { color: #FF5252; }
.home-hdr__delta--zero { color: #888888; }

.home-header .home-action-wrap {
  padding: 0;
  margin-top: var(--space-md);
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.home-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.home-btn-transfer {
  width: 100%;
  padding: 11px 8px;
  background: transparent;
  color: rgba(255,255,255,.55);
  border: 1px solid #2a2a2a;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-family);
  text-align: center;
  cursor: pointer;
}

#screen-home .btn-primary {
  padding: 23px 20px;
  font-size: var(--text-base);
  font-weight: 700;
  background: #ffdd2d;
  color: #111;
  border: none;
  border-radius: var(--radius-md);
  width: 100%;
}

#screen-home .btn-secondary {
  padding: 23px 20px;
  font-size: var(--text-base);
  font-weight: 500;
  background: transparent;
  color: #888;
  border: 1px solid #333;
  border-radius: var(--radius-md);
  width: 100%;
}

.home-content-sheet {
  background: #f5f5f5;
  border-radius: 20px 20px 0 0;
  margin-top: -16px;
  padding: 16px;
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
}

/* ── Блок 3 — «Здоровье парка» ── */
.home-fleet {
  margin: 0 0 8px;
  padding: 16px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.home-fleet__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
}

.home-fleet__title {
  font-size: var(--text-base);
  font-weight: 500;
  color: #1A1A1A;
}

.home-fleet__total {
  font-size: var(--text-sm);
  font-weight: 500;
  color: #888888;
}

.home-fleet__legend {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 8px;
}

.home-fleet__legend-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-sm);
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
  text-align: center;
  -webkit-user-select: none;
  user-select: none;
  transition: opacity var(--transition-fast);
}

.home-fleet__legend-col:active {
  opacity: 0.65;
}

.home-fleet__legend-label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: #aaa;
}

.home-fleet__legend-num {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  color: #1a1a1a;
}

.home-fleet__legend-num--rent,
.home-fleet__legend-num--idle,
.home-fleet__legend-num--repair {
  color: #1a1a1a;
}

.home-fleet__legend-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.fleet-bar {
  height: var(--space-lg);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: row;
  gap: 2px;
  align-items: stretch;
  margin-top: 8px;
  position: relative;
  background: #e8e8e8;
}

.home-fleet__bar-seg {
  border: none;
  padding: 0;
  margin: 0;
  height: var(--space-lg);
  min-height: var(--space-lg);
  align-self: stretch;
  cursor: pointer;
  background: transparent !important;
  position: relative;
  z-index: 1;
  transition: opacity var(--transition-fast);
  -webkit-user-select: none;
  user-select: none;
}

.home-fleet__bar-seg::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: var(--space-lg);
  transform: none;
  border-radius: 0;
  background: var(--fleet-seg, #ccc);
  z-index: 1;
}

.home-fleet__bar-seg:active {
  opacity: 0.75;
}

/* ── Блок 4 — операции ── */
.home-ops {
  padding: 0 0 16px;
}

.ops-header {
  margin-bottom: var(--space-sm);
}

.home-ops-title {
  margin-top: 8px;
  margin-bottom: 4px;
}

.ops-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: #1a1a1a;
}

.home-ops .op-row__amount--pos { color: #16a34a; }
.home-ops .op-row__amount--neg { color: #ef4444; }

.home-ops .op-row__meta {
  color: #888888;
  font-size: var(--text-sm);
}

/* ── День-заголовок ── */
.ops-day-label {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: var(--space-sm) 0 4px;
}

.home-ops .ops-day-label {
  color: #888888;
}

/* ── Строка операции ── */
.op-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 11px 0;
  border-bottom: 0.5px solid var(--color-border);
}

.op-row:last-child {
  border-bottom: none;
}

.home-ops .op-row {
  align-items: stretch;
  gap: 12px;
  border-bottom: 0.5px solid #f2f2f2;
}

.home-ops .op-row:last-child {
  border-bottom: none;
}

.op-bar {
  width: 3px;
  border-radius: var(--radius-xs);
  align-self: stretch;
  flex-shrink: 0;
  min-height: 32px;
  opacity: 1;
}

.op-row__dot {
  width: var(--space-md);
  height: var(--space-md);
  border-radius: 50%;
  flex-shrink: 0;
}

.op-row__body {
  flex: 1;
  min-width: 0;
}

.op-row__cat {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.op-row__meta {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.op-row__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.op-row__amount {
  font-size: var(--text-base);
  font-weight: 700;
}

.op-row__amount--pos { color: var(--c-profit); }
.op-row__amount--neg { color: var(--color-dark); }

.op-row__time {
  font-size: var(--text-xs);
  color: var(--color-muted);
}

/* ── Баннер оффлайн ── */
.home-offline {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 80px var(--space-xl) var(--space-xl);
}

.home-offline__icon { font-size: 48px; margin-bottom: var(--space-md); }
.home-offline__text { font-size: var(--text-lg); font-weight: 700; color: var(--color-dark); }
.home-offline__sub  { font-size: var(--text-sm); color: var(--color-muted); margin-top: 4px; }

/* Нижняя навигация: тёмный фон, жёлтый активный (переопределяет components.css) */
#navbar {
  background: #111;
  border-top: 0.5px solid #222;
}

#navbar .nav-item .nav-label {
  color: #aaa;
  font-size: var(--text-xs);
}

#navbar .nav-item.active .nav-label {
  color: #ffdd2d;
  font-weight: 600;
}

#navbar .nav-item .nav-icon {
  color: #aaa;
}

#navbar .nav-item.active .nav-icon {
  color: #ffdd2d;
}

#navbar .nav-item .nav-icon svg {
  color: inherit;
}

#navbar .nav-item .nav-icon svg path,
#navbar .nav-item .nav-icon svg circle,
#navbar .nav-item .nav-icon svg rect,
#navbar .nav-item .nav-icon svg line,
#navbar .nav-item .nav-icon svg polyline,
#navbar .nav-item .nav-icon svg polygon {
  stroke: currentColor;
}



/* ─────────────────────────────────────────────
   ЭКРАН: ИСТОРИЯ (kassa two-axis)
───────────────────────────────────────────── */

.screen-history {
  background: #1a1a1a;
}

.hist-history-root {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding-bottom: 0;
}

.hist-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.hist-hdr {
  background: #1a1a1a;
  padding: max(48px, calc(env(safe-area-inset-top) + 32px)) 0 0;
  flex-shrink: 0;
}

.hist-hdr--skeleton {
  padding: 48px var(--space-lg) var(--space-md);
}

/* Навигация месяца — одна симметричная строка */
.hist-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 16px var(--space-md);
}

.hist-nav-row--hidden {
  display: none !important;
}

.hist-month-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: var(--text-lg);
  font-weight: 500;
  cursor: pointer;
  padding: var(--space-sm) 8px;
  border-radius: var(--radius-sm);
  min-width: 0;
}

.hist-month-center svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.hist-nav-actions {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.hist-round-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
}

.hist-round-btn:active {
  background: rgba(255, 255, 255, 0.12);
}

.hist-round-btn--disabled,
.hist-round-btn:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.hist-round-btn--dark {
  background: rgba(0, 0, 0, 0.06);
  color: #1a1a1a;
}

.hist-search-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  min-width: 0;
}

.hist-search-field__ico {
  display: flex;
  color: rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

.hist-search-field__inp {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: #fff;
  font-size: var(--text-base);
  outline: none;
}

.hist-search-field__inp::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

/* Фильтры: типы + разделитель + доп. чипы и «+» */
.hist-filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) 4px;
  padding: 4px 16px 8px;
}

.hist-filters-row__types {
  display: flex;
  flex: 1 1 220px;
  gap: 4px;
  min-width: 0;
}

.hist-type-chip {
  flex: 1;
  padding: var(--space-sm) 4px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-family: var(--font-family);
  text-align: center;
  cursor: pointer;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: #d4d4d4;
}

.hist-type-chip--on {
  background: #ffc72c;
  color: #1a1a1a;
  font-weight: 500;
}

.hist-filters-row__vsep {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 2px;
  flex-shrink: 0;
}

.hist-filters-row__extra-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) 4px;
  flex: 1 1 96px;
  justify-content: flex-end;
}

.hist-filters-row__extra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm) 4px;
  justify-content: flex-end;
}

.hist-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  cursor: pointer;
  border: 0.5px solid rgba(255, 199, 44, 0.4);
  background: rgba(255, 199, 44, 0.16);
  color: #ffc72c;
  font-family: var(--font-family);
}

.hist-filter-chip__x {
  display: flex;
  align-items: center;
  line-height: 0;
  color: #ffc72c;
}

.hist-add-dot {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  border: 0.5px dashed rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  padding: 0;
}

.hist-add-dot:active {
  background: rgba(255, 255, 255, 0.06);
}

/* Сводка (раскрывающаяся) */
.hist-saldo-wrap {
  margin: 0 16px var(--space-md);
}

.hist-saldo2 {
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.hist-saldo2__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-family);
}

.hist-saldo2__lbl {
  font-size: var(--text-xs);
  color: #888;
  letter-spacing: 0.3px;
}

.hist-saldo2__right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.hist-saldo2__val {
  font-size: var(--text-base);
  font-weight: 500;
}

.hist-saldo2__val--pos {
  color: #4ade80;
}

.hist-saldo2__val--neg {
  color: #ff5e5e;
}

.hist-saldo2__chev-wrap {
  color: #888;
  display: flex;
  transition: transform var(--transition-base) ease;
}

.hist-saldo2--open .hist-saldo2__chev-wrap {
  transform: rotate(180deg);
}

.hist-saldo2__detail {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height var(--transition-base) ease, opacity 0.22s ease;
  border-top: 0.5px solid transparent;
}

.hist-saldo2--open .hist-saldo2__detail {
  max-height: 120px;
  opacity: 1;
  border-top-color: rgba(255, 255, 255, 0.08);
}

.hist-saldo2__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px var(--space-lg) var(--space-md);
}

.hist-saldo2__row:first-child {
  padding-top: var(--space-md);
}

.hist-saldo2__sub-lbl {
  font-size: var(--text-sm);
  color: #888;
}

.hist-saldo2__sub-val {
  font-size: var(--text-base);
  font-weight: 500;
}

.hist-saldo2__sub-val--inc {
  color: #4ade80;
}

.hist-saldo2__sub-val--exp {
  color: #ff5e5e;
}

/* Тело — светлый блок */
.hist-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #f4f4f0;
  border-radius: var(--space-lg) var(--space-lg) 0 0;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
}

.hist-body.hist-body--loading .hist-list {
  padding-top: 16px;
}

.hist-list {
  padding: var(--space-md) var(--space-lg) 24px;
}

.hist-list .op-row {
  cursor: pointer;
  border-bottom-color: #e5e5e0;
}

.hist-day-block {
  margin-bottom: 4px;
}

.hist-day-hdr {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 16px 4px 8px;
}

.hist-day-hdr__left {
  font-size: var(--text-xs);
  font-weight: 500;
  color: #888;
  letter-spacing: 0.5px;
}

.hist-day-hdr__cnt {
  font-size: var(--text-xs);
  color: #999;
}

.hist-day-cards {
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.op-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px var(--space-lg);
  border-bottom: 0.5px solid #ececea;
  cursor: pointer;
  font-family: var(--font-family);
}

.op-card:last-child {
  border-bottom: none;
}

.op-card__tile {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.op-card__body {
  flex: 1;
  min-width: 0;
}

.op-card__title {
  font-size: var(--text-base);
  font-weight: 500;
  color: #1a1a1a;
  line-height: 1.25;
}

.op-card__sub {
  margin-top: 1px;
  font-size: var(--text-sm);
  color: #888;
  line-height: 1.3;
}

.op-card__amt {
  font-size: var(--text-base);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-start;
}

.op-card__amt--inc {
  color: #2d8a3f;
}

.op-card__amt--exp {
  color: #c43838;
}

.op-card__amt--xfer {
  color: #666;
}

.op-row__rub {
  font-weight: 600;
  opacity: 0.85;
}

/* Пустое состояние */
.hist-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  text-align: center;
  padding: 24px 16px;
}

.hist-empty__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid #c5c4be;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  color: #888;
}

.hist-empty__text {
  font-size: var(--text-base);
  color: #555;
  margin-bottom: 4px;
}

.hist-empty__sub {
  font-size: var(--text-sm);
  color: #999;
  margin-bottom: var(--space-lg);
}

.hist-empty__reset {
  padding: 8px var(--space-lg);
  border-radius: var(--radius-md);
  background: #1a1a1a;
  border: none;
  color: #fff;
  font-size: var(--text-sm);
  cursor: pointer;
}

/* Bottomsheet выбора фильтра */
.hist-filter-sheet__title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-dark);
}

.hist-filter-section__label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.hist-filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.hist-filter-opt {
  padding: 7px var(--space-lg);
  border-radius: var(--radius-lg);
  background: #f0f0f5;
  color: #0a0a0f;
  font-size: var(--text-sm);
  font-weight: 500;
  border: none;
  cursor: pointer;
}

.hist-filter-opt--active {
  background: #ffdd2d;
  color: #1a1a1a;
}

.hist-filter-empty {
  font-size: var(--text-sm);
  color: var(--color-muted);
}

/* Bottomsheet: добавить фильтр (2 шага) */
.hist-fs {
  text-align: left;
  padding: 0 0 calc(12px + env(safe-area-inset-bottom, 0px));
}

.hist-fs-handle {
  width: 36px;
  height: 4px;
  border-radius: var(--radius-xs);
  background: #ddd;
  margin: 8px auto 12px;
}

.hist-fs-head,
.hist-fs-head2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 12px;
  border-bottom: 0.5px solid #ececea;
}

.hist-fs-head2 {
  gap: 8px;
}

.hist-fs-title {
  font-size: var(--text-lg);
  font-weight: 500;
  color: #1a1a1a;
}

.hist-fs-title--center {
  flex: 1;
  text-align: center;
}

.hist-fs-close {
  border: none;
  background: transparent;
  padding: 4px;
  cursor: pointer;
  color: #666;
  display: flex;
}

.hist-fs-back {
  border: none;
  background: transparent;
  padding: 4px;
  cursor: pointer;
  color: #1a1a1a;
}

.hist-fs-reset {
  border: none;
  background: transparent;
  font-size: var(--text-base);
  color: #0066ff;
  cursor: pointer;
  padding: 4px;
  min-width: 72px;
  text-align: right;
}

.hist-fs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: none;
  border-bottom: 0.5px solid #ececea;
  background: #fff;
  font-size: var(--text-base);
  color: #1a1a1a;
  cursor: pointer;
  text-align: left;
}

.hist-fs-row__meta {
  color: #888;
  font-size: var(--text-base);
}

.hist-fs-list {
  max-height: 52vh;
  overflow-y: auto;
  padding: 8px 0 72px;
}

.hist-fs-check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: var(--space-md) 16px;
  font-size: var(--text-base);
  color: #1a1a1a;
  cursor: pointer;
}

.hist-fs-apply {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  width: calc(100% - 32px);
  margin: 12px 16px;
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius-md);
  background: #ffc72c;
  color: #1a1a1a;
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
}

/* Модалка выбора месяца */
.hist-modal {
  position: fixed;
  inset: 0;
  z-index: 12050;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.hist-modal.hidden {
  display: none;
}

.hist-mp-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.hist-mp-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 1;
}

.hist-mp-handle {
  width: 36px;
  height: 4px;
  border-radius: var(--radius-xs);
  background: #ddd;
  margin: 8px auto 4px;
}

.hist-mp-year {
  text-align: center;
  font-size: var(--text-base);
  color: #888;
  padding: 4px 0 8px;
}

.hist-mp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px 16px 16px;
}

.hist-mp__cell {
  height: 40px;
  border-radius: var(--radius-sm);
  border: none;
  background: #f4f4f0;
  font-size: var(--text-sm);
  font-weight: 500;
  color: #1a1a1a;
  cursor: pointer;
}

.hist-mp__cell--on {
  background: #ffc72c;
  color: #1a1a1a;
}

.hist-mp__cell:disabled {
  opacity: 0.3;
  cursor: default;
}

.hist-mp-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 8px;
  gap: 12px;
  border-top: 0.5px solid #ececea;
  padding-top: 12px;
}

.hist-mp-year-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--text-base);
  font-weight: 500;
}

.hist-mp-today {
  padding: 8px var(--space-lg);
  border-radius: var(--radius-sm);
  border: none;
  background: #f4f4f0;
  font-size: var(--text-base);
  cursor: pointer;
}

/* Bottomsheet: детали операции */
.bs-op-hero--in {
  background: rgba(34, 197, 94, 0.12);
}

.bs-op-hero--out {
  background: rgba(239, 68, 68, 0.1);
}

.bs-op-hero--xfer {
  background: rgba(96, 165, 250, 0.12);
}

.bs-op-hero {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
}

.bs-op-hero__sign {
  font-size: var(--text-xl);
  font-weight: 900;
}

.bs-op-hero__amount {
  font-size: var(--text-2xl);
  font-weight: 900;
  letter-spacing: -0.03em;
  flex: 1;
}

.bs-op-hero__dir {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-muted);
  text-transform: capitalize;
}

.bs-op-fields {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.bs-op-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 0.5px solid var(--color-border);
}

.bs-op-field:last-child {
  border-bottom: none;
}

.bs-op-field__lbl {
  font-size: var(--text-sm);
  color: var(--color-muted);
  font-weight: 500;
}

.bs-op-field__val {
  font-size: var(--text-base);
  color: var(--color-dark);
  font-weight: 600;
  text-align: right;
  max-width: 60%;
  word-break: break-word;
}

/* Выдача машины после добавления водителя */
.drv-assign-sheet { padding: 4px 0; }
.drv-assign-title { font-size: var(--text-lg); font-weight: 700; color: #111; margin-bottom: 4px; }
.drv-assign-sub   { font-size: var(--text-sm); color: #aaa; margin-bottom: 16px; }
.drv-assign-empty { font-size: var(--text-sm); color: #aaa; text-align: center; padding: 20px 0; }

.drv-assign-cars { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; max-height: 300px; overflow-y: auto; }

.drv-assign-car {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 12px var(--space-lg);
  border-radius: var(--radius-md);
  background: #f9f9f9;
  cursor: pointer;
  border: 1.5px solid transparent;
}
.drv-assign-car--selected {
  background: #dcfce7;
  border-color: #16a34a;
}
.drv-assign-car-id   { font-size: var(--text-base); font-weight: 700; color: #111; min-width: 50px; }
.drv-assign-car-meta { font-size: var(--text-sm); color: #aaa; flex: 1; }
.drv-assign-car-rate { font-size: var(--text-sm); font-weight: 600; color: #111; white-space: nowrap; }

.drv-assign-confirm {
  width: 100%;
  padding: var(--space-lg);
  background: #FFDD2D;
  color: #111;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 8px;
}
.drv-assign-confirm:disabled { background: #f0f0f0; color: #bbb; cursor: default; }

.drv-assign-skip {
  width: 100%;
  padding: 12px;
  background: transparent;
  color: #aaa;
  border: none;
  font-size: var(--text-base);
  cursor: pointer;
}

/* ── Bottomsheet: детали машины ── */
.fleet-bs-hero {
  margin-bottom: 0;
}

.fleet-bs-drag {
  width: 36px;
  height: 4px;
  background: #e0e0e0;
  border-radius: var(--radius-xs);
  margin: 0 auto 16px;
}

.fleet-bs-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-lg);
}

.fleet-bs-plate {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: #111;
  margin-bottom: 2px;
  letter-spacing: 0.03em;
}

.fleet-bs-model {
  font-size: var(--text-sm);
  color: #aaa;
}

.fleet-bs-badge {
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 4px var(--space-md);
  border-radius: var(--radius-xl);
  white-space: nowrap;
  margin-top: 4px;
}

.fleet-bs-badge--rent {
  background: #dcfce7;
  color: #15803d;
}

.fleet-bs-badge--idle {
  background: #fef9c3;
  color: #854d0e;
}

.fleet-bs-badge--repair {
  background: #fee2e2;
  color: #991b1b;
}

.fleet-bs-divider {
  height: 0.5px;
  background: #f0f0f0;
  margin: 12px 0;
}

.fleet-bs-change-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #aaa;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

.fleet-status-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fleet-status-btn {
  width: 100%;
  padding: var(--space-lg) 16px;
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-align: left;
  min-height: 48px;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.fleet-status-btn--rent {
  background: #dcfce7;
  color: #15803d;
}

.fleet-status-btn--idle {
  background: #fef9c3;
  color: #854d0e;
}

.fleet-status-btn--repair {
  background: #fee2e2;
  color: #991b1b;
}

.fleet-status-btn:active {
  opacity: 0.85;
  transform: scale(0.99);
}

/* Контекст в bottomsheet: пробег, ТО, водитель, примечание */
.fleet-bs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 0;
}

.fleet-bs-lbl {
  font-size: var(--text-xs);
  color: #aaa;
  margin-bottom: 2px;
}

.fleet-bs-val {
  font-size: var(--text-base);
  font-weight: 600;
  color: #111;
}

.fleet-bs-section-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #aaa;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.fleet-bs-driver {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 12px;
  background: #f5f5f5;
  border-radius: var(--radius-sm);
  margin-bottom: 0;
}

.fleet-bs-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  color: #555;
  flex-shrink: 0;
}

.fleet-bs-driver-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: #111;
}

.fleet-bs-driver-phone {
  font-size: var(--text-xs);
  color: #aaa;
}

.fleet-bs-driver-empty {
  padding: var(--space-md) 12px;
  background: #f5f5f5;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: #aaa;
  margin-bottom: 0;
}

.fleet-bs-note {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px var(--space-md);
  background: #fef9c3;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: #854d0e;
  margin-bottom: 0;
}

/* Второй шит — выбор водителя */
.fleet-bs-back {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: 12px;
  cursor: pointer;
  font-size: var(--text-sm);
  color: #aaa;
}

.fleet-bs-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: #111;
  margin-bottom: var(--space-lg);
}

.fleet-driver-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: 16px;
  max-height: 280px;
  overflow-y: auto;
}

.fleet-driver-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  background: #f9f9f9;
  cursor: pointer;
}

.fleet-driver-item--selected {
  background: #dcfce7;
}

.fleet-driver-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 700;
  color: #555;
  flex-shrink: 0;
}

.fleet-driver-info {
  flex: 1;
}

.fleet-driver-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: #111;
}

.fleet-driver-car {
  font-size: var(--text-xs);
  color: #aaa;
}

.fleet-driver-check {
  font-size: var(--text-base);
  color: #16a34a;
}

.fleet-driver-check.hidden {
  display: none;
}

.fleet-bs-confirm {
  width: 100%;
  padding: 15px;
  background: #ffdd2d;
  color: #111;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: 700;
  cursor: pointer;
}

.fleet-bs-confirm:disabled {
  background: #f0f0f0;
  color: #bbb;
  cursor: default;
}

/* ═══════════════════════════════════════════════════════════
   ЭКРАН: СПИСОК ВОДИТЕЛЕЙ (screen-drivers)
═══════════════════════════════════════════════════════════ */

/* Хедер «Водители» + кнопка «+ Добавить» */
.drvs-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-md) var(--space-sm);
}

.drvs-add-btn {
  background: var(--color-yellow);
  color: var(--color-dark);
  border: none;
  border-radius: var(--radius-xl);
  padding: var(--space-sm) 16px;
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
}
.drvs-add-btn:active {
  opacity: 0.8;
  transform: scale(0.96);
}

/* Аватар в строке водителя */
.drv-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-dark);
}

/* Итоговая строка депозитов */
.drvs-total {
  font-size: var(--text-sm);
  color: var(--color-muted);
  padding: var(--space-sm) var(--space-md) var(--space-md);
  text-align: right;
}
.drvs-total strong {
  color: var(--color-dark);
  font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════
   ЭКРАН: КАРТОЧКА ВОДИТЕЛЯ (screen-driver)
═══════════════════════════════════════════════════════════ */

/* Карточка профиля */
.drv-profile-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  margin: var(--space-sm) var(--space-md) var(--space-md);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  box-shadow: var(--shadow-sm);
}

.drv-profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  font-weight: 900;
  color: var(--color-dark);
  flex-shrink: 0;
}

.drv-profile-name {
  font-size: var(--text-xl);
  font-weight: 900;
  color: var(--color-dark);
  text-align: center;
  line-height: 1.2;
}

.drv-profile-phone {
  font-size: var(--text-base);
  color: var(--color-yellow);
  font-weight: 600;
  text-decoration: none;
}
.drv-profile-phone:active { opacity: 0.7; }

/* Мета-поля: машина, дата, комментарий */
.drv-profile-meta {
  width: 100%;
  margin-top: var(--space-xs);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drv-meta-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-sm);
  font-size: var(--text-base);
  padding: 4px 0;
  border-bottom: 1px solid var(--color-bg);
}
.drv-meta-row:last-child { border-bottom: none; }

.drv-meta-lbl {
  color: var(--color-muted);
  flex-shrink: 0;
}
.drv-meta-val {
  color: var(--color-dark);
  font-weight: 600;
  text-align: right;
}

/* Карточка депозита */
.drv-deposit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) 0;
}

.drv-deposit-label {
  font-size: var(--text-xs);
  color: #aaa;
  margin-bottom: 3px;
}

.drv-deposit-amount {
  font-size: var(--text-xl);
  font-weight: 700;
}

.drv-deposit--pos  { color: #16a34a; }
.drv-deposit--neg  { color: #ef4444; }
.drv-deposit--zero { color: #aaa; }

.drv-deposit-return-btn {
  padding: 8px 16px;
  background: #111;
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
}

/* Шит возврата депозита */
.drv-return-sheet { padding: 4px 0; }
.drv-return-title { font-size: var(--text-lg); font-weight: 700; color: #111; margin-bottom: 4px; }
.drv-return-sub   { font-size: var(--text-sm); color: #aaa; margin-bottom: 16px; }

.drv-return-field { margin-bottom: 12px; }
.drv-return-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #aaa;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
  display: block;
}

.drv-return-input {
  width: 100%;
  padding: 12px var(--space-lg);
  border: 1px solid #e0e0e0;
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  color: #111;
  background: #f9f9f9;
  outline: none;
}

.drv-return-input:focus {
  border-color: #111;
  background: #fff;
}

.drv-return-remain {
  font-size: var(--text-sm);
  color: #16a34a;
  margin-top: var(--space-sm);
}

.drv-return-err {
  font-size: var(--text-sm);
  color: #ef4444;
  margin-top: var(--space-sm);
}

.drv-return-submit {
  width: 100%;
  padding: 15px;
  background: #FFDD2D;
  color: #111;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
}

.drv-return-submit:disabled {
  background: #f0f0f0;
  color: #bbb;
  cursor: default;
}

/* История депозитов */
.drv-dep-history {
  border-top: 1px solid var(--color-bg);
}
.drv-dep-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-md);
  border-bottom: 1px solid var(--color-bg);
  font-size: var(--text-base);
}
.drv-dep-row:last-child { border-bottom: none; }

.drv-dep-date  { color: var(--color-muted); flex-shrink: 0; }
.drv-dep-type  { flex: 1; font-weight: 600; }
.drv-dep--income { color: var(--c-profit); }
.drv-dep--return { color: var(--c-loss);   }
.drv-dep-sum   { font-weight: 700; color: var(--color-dark); white-space: nowrap; }

.drv-dep-empty {
  padding: var(--space-md);
  font-size: var(--text-sm);
  color: var(--color-muted);
  text-align: center;
}

/* Кнопки внизу */
.drv-actions {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md) var(--space-lg);
}
.drv-actions > * { flex: 1; }

.btn-primary--outline {
  background: transparent;
  border: 2px solid var(--color-yellow);
  color: var(--color-dark);
}
.btn-danger {
  background: var(--c-loss);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  font-size: var(--text-base);
  font-weight: 700;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}
.btn-danger:active { opacity: 0.8; }
.btn-danger:disabled { opacity: 0.5; cursor: default; }


/* ─────────────────────────────────────────────
   ЭКРАН: АНАЛИТИКА (лист «Дашборд»)
───────────────────────────────────────────── */

#screen-analytics.screen--active {
  overflow: hidden;
  min-height: 100dvh;
  /**
   * Высота фиксированного подвала (.analytics-bottom-bar):
   * padding-top + ряд точек + navbar + нижний padding (включая safe-area).
   * Должна совпадать по смыслу с реальной высотой панели — см. блок .analytics-bottom-bar.
   */
  --analytics-fixed-footer-h: calc(
    8px + 26px + (var(--navbar-height) - 8px) + var(--space-sm) + var(--safe-bottom)
  );
}

.analytics-root {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #f0f1f3;
}

/* Фиксированный тёмный хедер + карусель + нижняя панель */
.analytics-header {
  flex-shrink: 0;
  background: #1a1a1a;
  padding: max(12px, env(safe-area-inset-top)) 12px var(--space-md);
}

.analytics-header__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: var(--space-md);
}

.analytics-title {
  color: #ffdd2d;
  font-size: var(--text-base);
  font-weight: 900;
  letter-spacing: -0.3px;
  flex-shrink: 0;
}

.analytics-header__page-label {
  font-size: var(--text-sm);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  text-align: right;
  min-width: 0;
}

.analytics-header__pills {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.analytics-header__pills-m {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  min-width: 0;
}

.analytics-pill {
  border: none;
  cursor: pointer;
  padding: var(--space-sm) var(--space-md);
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.08);
  transition: background var(--transition-fast) ease, color var(--transition-fast) ease;
  -webkit-user-select: none;
  user-select: none;
}

.analytics-pill:active {
  opacity: 0.85;
}

.analytics-pill--ghost {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
}

.analytics-pill--active {
  color: #1a1a1a;
  background: #ffdd2d;
}

.analytics-carousel {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.analytics-carousel::-webkit-scrollbar {
  display: none;
}

.analytics-page {
  min-width: 100%;
  height: 100%;
  box-sizing: border-box;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-align: start;
  /* нижний отступ под фиксированный подвал (вариант A) */
  padding: 12px 12px calc(16px + var(--analytics-fixed-footer-h, 96px));
  scrollbar-width: none;
}

.analytics-page::-webkit-scrollbar {
  display: none;
}

.analytics-page-inner {
  min-height: min-content;
}

.analytics-page-inner > .section-label:first-child {
  margin-top: 0;
}

.analytics-bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  box-sizing: border-box;
  background: #111;
  padding-bottom: calc(var(--safe-bottom) + var(--space-sm));
  padding-top: 8px;
  border-top: 0.5px solid rgba(255, 255, 255, 0.06);
}

.analytics-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px 8px;
}

.analytics-dot {
  width: var(--space-sm);
  height: var(--space-sm);
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: width var(--transition-base) ease, background var(--transition-base) ease;
}

.analytics-dot.is-active {
  width: var(--space-lg);
  background: #ffdd2d;
}

.analytics-navbar {
  display: flex;
  align-items: stretch;
  min-height: calc(var(--navbar-height) - 8px);
  padding: 0 4px;
}

.analytics-navbar .nav-item {
  flex: 1;
}

.analytics-navbar .nav-label {
  color: rgba(255, 255, 255, 0.42);
}

.analytics-navbar .nav-item .nav-icon {
  color: rgba(255, 255, 255, 0.42);
}

.analytics-navbar .nav-item.active .nav-label {
  color: #ffdd2d;
}

.analytics-navbar .nav-item.active .nav-icon {
  color: #ffdd2d;
}

.analytics-capex-hero__label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.analytics-capex-hero__amount {
  font-size: var(--text-3xl);
  font-weight: 900;
  color: var(--color-dark);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.analytics-capex-hint {
  margin-top: 12px;
  padding: 0 4px;
}

.analytics-seg {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.analytics-seg__btn {
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px var(--space-md);
  font-size: var(--text-sm);
  font-weight: 700;
  color: #555;
  background: #f0f1f3;
}

.analytics-seg__btn--active {
  background: #ffdd2d;
  color: #111;
}

.analytics-capex-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-md);
  padding: 8px 0;
  border-bottom: 0.5px solid var(--color-border);
}

.analytics-capex-row:last-child {
  border-bottom: none;
}

.analytics-capex-row__name {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-dark);
}

.analytics-capex-row__sum {
  font-size: var(--text-base);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.analytics-capex-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.analytics-capex-table th {
  text-align: left;
  font-size: var(--text-sm);
  color: var(--color-muted);
  font-weight: 700;
  padding: 8px 0;
  border-bottom: 0.5px solid var(--color-border);
}

.analytics-capex-table th:last-child {
  text-align: right;
}

.analytics-capex-table td {
  padding: var(--space-md) 0;
  border-bottom: 0.5px solid var(--color-border);
  font-size: var(--text-sm);
}

.analytics-capex-table tr:last-child td {
  border-bottom: none;
}

.analytics-capex-car {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 8px;
}

.analytics-capex-sum {
  text-align: right;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.analytics-kassa-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-md);
  padding: var(--space-md) 0;
  border-bottom: 0.5px solid var(--color-border);
}

.analytics-kassa-row:last-child {
  border-bottom: none;
}

.analytics-kassa-row__name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-dark);
}

.analytics-kassa-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.analytics-kassa-row--azamat {
  background: #ffdd2d;
}

.analytics-kassa-row--vladimir {
  background: #4b74ff;
}

.analytics-kassa-row--yulia {
  background: #f59e0b;
}

.analytics-kassa-row__nums {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-size: var(--text-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.analytics-kassa-row__inc {
  color: var(--c-profit);
}

.analytics-kassa-row__exp {
  color: var(--c-loss);
}

.analytics-kassa-row--deposits {
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-sm);
  padding-top: 12px;
}

.analytics-kassa-row__cov {
  font-size: var(--text-xs);
  color: var(--color-muted);
}

.analytics-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: 16px;
}

.analytics-tile {
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.analytics-tile__label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-sm);
}

.analytics-tile__amount {
  font-size: var(--text-xl);
  font-weight: 900;
  color: var(--color-dark);
  letter-spacing: -0.4px;
  margin-bottom: 4px;
}

.analytics-delta {
  font-size: var(--text-sm);
  font-weight: 700;
}

.analytics-delta--good {
  color: var(--c-profit);
}

.analytics-delta--bad {
  color: var(--c-loss);
}

.analytics-delta--na {
  color: var(--color-muted);
  font-weight: 600;
}

.analytics-card-pad {
  padding: var(--space-lg) 16px;
  margin-bottom: 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.analytics-donut-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px;
}

.analytics-donut {
  position: relative;
  width: 88px;
  height: 88px;
  flex-shrink: 0;
}

.analytics-donut svg {
  width: 100%;
  height: 100%;
}

.analytics-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.analytics-donut-val {
  font-size: var(--text-xs);
  font-weight: 900;
  color: #1A1A1A;
  letter-spacing: -0.03em;
  line-height: 1;
}

.analytics-donut-lbl {
  font-size: var(--text-xs);
  font-weight: 700;
  color: #8A8A8E;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.analytics-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.analytics-leg-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-xs);
}

.analytics-leg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.analytics-leg-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: #1A1A1A;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-leg-pct {
  font-size: var(--text-xs);
  font-weight: 700;
  color: #8A8A8E;
}

.analytics-leg-amt {
  font-size: var(--text-xs);
  font-weight: 700;
  color: #1A1A1A;
  min-width: 56px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.analytics-opex-row {
  margin-bottom: var(--space-lg);
}

.analytics-opex-row:last-child {
  margin-bottom: 0;
}

.analytics-opex-row__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.analytics-opex-row__name {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-dark);
}

.analytics-opex-row__sum {
  font-size: var(--text-base);
  font-weight: 800;
  color: var(--color-dark);
  font-variant-numeric: tabular-nums;
}

.analytics-bar {
  height: var(--space-sm);
  border-radius: 4px;
  background: rgba(26, 26, 26, 0.08);
  overflow: hidden;
}

.analytics-bar span {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: #ffdd2d;
  min-width: 0;
}

.analytics-bar--accent span {
  background: #ffdd2d;
}

.analytics-bar--danger span {
  background: #e34234;
}

.analytics-bar--muted span {
  background: #8a8a8e;
}

.analytics-pnl-list {
  width: 100%;
}

.analytics-heat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  padding: 12px;
}

.analytics-heat-cell {
  border-radius: var(--radius-md);
  padding: var(--space-md) 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-height: 72px;
}

.analytics-heat-id {
  font-size: var(--text-sm);
  font-weight: 800;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-heat-rev {
  font-size: var(--text-xs);
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  margin-top: 2px;
}

.analytics-heat-result {
  font-size: var(--text-xs);
  font-weight: 800;
  margin-top: auto;
  padding-top: 4px;
  font-variant-numeric: tabular-nums;
}

.analytics-heat-general {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  border-top: 0.5px solid #F0F1F3;
  background: #FFFBE8;
}

.analytics-heat-gen-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: #8A8A8E;
}

.analytics-heat-gen-val {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--c-loss);
}

.analytics-heat-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid #F0F1F3;
  background: #F8F8F8;
  font-size: var(--text-sm);
  font-weight: 800;
  color: #1A1A1A;
  font-variant-numeric: tabular-nums;
}

.pnl-row {
  display: flex;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  gap: var(--space-sm);
  border-bottom: 0.5px solid var(--color-border);
}

.pnl-row .pnl-car {
  font-size: var(--text-sm);
  font-weight: 700;
  flex: 0 0 auto;
  min-width: 0;
  max-width: 90px;
  color: var(--color-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pnl-row .pnl-car--full {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
}

.pnl-metrics {
  flex: 1;
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  align-items: baseline;
}

.pnl-rev {
  font-size: var(--text-xs);
  font-weight: 600;
  color: #16a34a;
}

.pnl-exp {
  font-size: var(--text-xs);
  font-weight: 600;
  color: #8a8a8e;
}

.pnl-result {
  font-size: var(--text-sm);
  font-weight: 800;
  min-width: 60px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.analytics-pnl-profit--pos {
  color: var(--c-profit);
}

.analytics-pnl-profit--neg {
  color: var(--c-loss);
}

.pnl-row--head {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-muted);
  letter-spacing: 0.04em;
}

.pnl-row--head .pnl-rev,
.pnl-row--head .pnl-exp,
.pnl-row--head .pnl-result,
.pnl-row--head .pnl-car {
  color: var(--color-muted);
  font-size: var(--text-xs);
  font-weight: 700;
}

.pnl-row--total {
  font-weight: 800;
  border-bottom: none;
}

.analytics-util-row {
  margin-bottom: var(--space-lg);
}

.analytics-util-row:last-child {
  margin-bottom: 0;
}

.analytics-util-row__top {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
  font-size: var(--text-base);
  font-weight: 600;
}

.analytics-util-pct {
  font-variant-numeric: tabular-nums;
}

.analytics-empty-banner {
  text-align: center;
  font-size: var(--text-base);
  color: var(--color-muted);
  padding: 12px;
  margin-bottom: 12px;
}

.analytics-center-msg {
  display: flex;
  align-items: center;
  justify-content: center;
}

.analytics-error-card {
  text-align: center;
  padding: 28px 20px;
  max-width: 320px;
}

.analytics-error-text {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-dark);
}

.analytics-muted {
  font-size: var(--text-sm);
  color: var(--color-muted);
  padding: 8px 0;
}

.sec {
  font-size: var(--text-xs);
  font-weight: 700;
  color: #8A8A8E;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: var(--space-sm);
}

/* CAPEX timeline */
.tl { display:flex; flex-direction:column; gap:0; }
.tl-row { display:flex; align-items:center; gap:8px; padding:5px 0; border-bottom:.5px solid #F0F1F3; }
.tl-row:last-child { border-bottom:none; }
.tl-mo { font-size: var(--text-xs); font-weight:700; color:#8A8A8E; width:26px; flex-shrink:0; text-transform:capitalize; }
.tl-track { flex:1; height:7px; background:#F0F1F3; border-radius:4px; overflow:hidden; }
.tl-fill { height:100%; border-radius:4px; background:#E08000; transform-origin:left; transform:scaleX(0); }
.tl-val { font-size: var(--text-xs); font-weight:700; color:#E08000; min-width:64px; text-align:right; font-variant-numeric:tabular-nums; opacity:0; }
.capex-divider { height: .5px; background: #f0f1f3; margin: var(--space-md) 0; }

.opex-top3 { display: flex; flex-direction: column; gap: var(--space-sm); margin-top: 12px; }
.opex-top3__row { display: flex; align-items: center; gap: 8px; }
.opex-top3__name { font-size: var(--text-xs); font-weight: 600; color: #1a1a1a; width: 64px; flex-shrink: 0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.opex-top3__bar { flex: 1; height: var(--space-sm); background: #f0f1f3; border-radius: 3px; overflow: hidden; }
.opex-top3__fill {
  height: 100%; border-radius: 3px;
  width: var(--pct, 0%);
  transform-origin: left; transform: scaleX(0);
  animation: hbar-grow 0.7s cubic-bezier(.4,0,.2,1) forwards;
}
.opex-top3__row:nth-child(1) .opex-top3__fill { animation-delay: .3s; }
.opex-top3__row:nth-child(2) .opex-top3__fill { animation-delay: .45s; }
.opex-top3__row:nth-child(3) .opex-top3__fill { animation-delay: .6s; }
.opex-top3__val { font-size: var(--text-xs); font-weight: 700; color: #1a1a1a; min-width: 56px; text-align: right; font-variant-numeric: tabular-nums; }

.opex-dynamics { margin-bottom: 0; }

.opex-dyn-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.opex-dyn-hero__lbl {
  font-size: var(--text-xs);
  font-weight: 700;
  color: #8a8a8e;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 3px;
}

.opex-dyn-hero__val {
  font-size: var(--text-lg);
  font-weight: 900;
  color: #1a1a1a;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.opex-dyn-hero__val--muted { color: #8a8a8e; }

.opex-dyn-hero__arrow {
  font-size: var(--text-2xl);
  font-weight: 900;
  line-height: 1;
}

.opex-dyn-hero__arrow--up { color: var(--c-loss); }
.opex-dyn-hero__arrow--down { color: var(--c-profit); }
.opex-dyn-hero__arrow--flat { color: #8a8a8e; }

.opex-dyn-delta {
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: var(--space-md);
  font-variant-numeric: tabular-nums;
}

.opex-dyn-delta--up { color: var(--c-loss); }
.opex-dyn-delta--down { color: var(--c-profit); }
.opex-dyn-delta--flat { color: #8a8a8e; }

.opex-dyn-top {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px var(--space-md);
  background: #fff5f5;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
}

.opex-dyn-top__lbl { color: #8a8a8e; font-weight: 500; flex-shrink: 0; }
.opex-dyn-top__cat { font-weight: 700; color: #1a1a1a; flex: 1; }
.opex-dyn-top__val { font-weight: 800; font-variant-numeric: tabular-nums; flex-shrink: 0; }

/* ROI card */
.roi-card { background:#FFF8F0; border-radius: var(--radius-md); padding:12px var(--space-lg); border-left:3px solid #E08000; margin-top:var(--space-md); opacity:0; transform:translateY(var(--space-md)); }
.roi-lbl { font-size: var(--text-xs); font-weight:700; color:#8A8A8E; text-transform:uppercase; letter-spacing:.06em; margin-bottom:4px; }
.roi-val { font-size: var(--text-xl); font-weight:900; color:#E08000; letter-spacing:-.03em; }
.roi-sub { font-size: var(--text-xs); color:#8A8A8E; margin-top:3px; line-height:1.4; }
.roi-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:8px; }
.roi-cell { background:#fff; border-radius: var(--radius-sm); padding:9px var(--space-md); }
.roi-c-lbl { font-size: var(--text-xs); font-weight:700; color:#8A8A8E; text-transform:uppercase; letter-spacing:.05em; margin-bottom:3px; }
.roi-c-val { font-size: var(--text-base); font-weight:800; letter-spacing:-.02em; }

.pnl-heat3 {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 4px; padding: 8px var(--space-md);
}
.phc {
  border-radius: var(--radius-sm); padding: 8px 8px 7px;
  display: flex; flex-direction: column; min-height: 62px;
  opacity: 0; transform: scale(.9);
}
.phc__id {
  font-size: var(--text-xs); font-weight: 800; color: #fff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.phc__rev {
  font-size: 8px; font-weight: 600;
  color: rgba(255,255,255,.55); margin-top: 2px;
}
.phc__res {
  font-size: var(--text-xs); font-weight: 800; margin-top: auto;
  padding-top: 4px; font-variant-numeric: tabular-nums;
}
.phc--pos .phc__res { color: #7EFFC4; }
.phc--neg .phc__res { color: #FFB3B3; }
.phc--zero .phc__res { color: rgba(255,255,255,.4); }

.pnl-heat3-total {
  background: #fff; margin: 0 var(--space-md) 8px; border-radius: var(--radius-sm);
  padding: 8px 12px; display: flex;
  justify-content: space-between; align-items: center;
}
.pnl-heat3-total__val {
  font-size: var(--text-base); font-weight: 900; color: var(--c-loss);
  font-variant-numeric: tabular-nums;
}

/* Animation states */
.donut-ring { stroke-dashoffset:0; }
.analytics-donut-center { opacity:0; }
.analytics-leg-row { opacity:0; transform:translateX(8px); }

/* Keyframes */
@keyframes donut-draw { from { stroke-dashoffset: 88; } }
@keyframes hbar-grow  { to   { transform: scaleX(1); } }
@keyframes heat-in    { to   { opacity:1; transform:scale(1); } }
@keyframes roi-in     { to   { opacity:1; transform:none; } }
@keyframes leg-in     { to   { opacity:1; transform:none; } }
@keyframes fade-in    { to   { opacity:1; } }


/* ─────────────────────────────────────────────
   Matizi: Home payments + new income flow
───────────────────────────────────────────── */
.home-cash-card {
  background: #2a2a2a;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-top: var(--space-md);
}
.home-cash-card__label { color: #a1a1aa; font-size: var(--text-xs); font-weight: 700; letter-spacing: 0.05em; }
.home-cash-card__amount { color: #fff; font-size: 34px; font-weight: 800; margin-top: 4px; }
.home-cash-card__delta { font-size: var(--text-sm); margin-top: 4px; font-weight: 600; }
.home-cash-card__delta.is-pos { color: #22c55e; }
.home-cash-card__delta.is-neg { color: #ef4444; }

.home-cash-card--ops-overview { margin-top: var(--space-md); }
.home-ops-fin__label {
  color: #a1a1aa;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
}
.home-ops-fin__total {
  color: #fff;
  font-size: 34px;
  font-weight: 800;
  margin-top: var(--space-sm);
  text-align: center;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.home-ops-fin__subtitle {
  text-align: center;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.55);
  margin-top: var(--space-sm);
  font-weight: 500;
}
.home-ops-fin__tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-lg);
}
.home-ops-fin__tile-val {
  font-size: var(--text-base);
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}
.home-ops-fin__tile-val--inc { color: #22c55e; }
.home-ops-fin__tile-val--exp { color: #ef4444; }
.home-ops-fin__tile-val--net { color: #ffffff; }
.home-ops-fin__tile-lbl {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  margin-top: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.home-action-row--3 { grid-template-columns: 1fr 1fr 1fr; margin-top: var(--space-md); }
.home-action-row--3 .btn-secondary { font-size: var(--text-sm); padding: 12px 8px; }
.home-action-row--3 .btn-primary { font-size: var(--text-base); padding: 12px 8px !important; }

.home-block-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: #777;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: var(--space-sm) 2px var(--space-md);
}
.home-pill-counters { display: flex; gap: var(--space-sm); align-items: center; }
.home-pill--count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 var(--space-sm);
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
  box-sizing: border-box;
}
.home-pill--count-red { background: #ef4444; }
.home-pill--count-purple { background: #7c3aed; }
.home-pill--count-orange { background: #f97316; }

.mock-banner {
  background: #7c3aed;
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 700;
  text-align: center;
  padding: 4px 0;
  letter-spacing: 0.04em;
}

/* PaymentTaskCard — карточка задачи оплаты на главной */
.payment-task-card {
  display: flex;
  align-items: stretch;
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  overflow: hidden;
  min-height: 0;
}
.payment-task-card--overdue,
.payment-task-card--broke-promise { background: #fff5f5; }
.payment-task-card--promised { background: #f8f5ff; }
.payment-task-card--warning { background: #fff8f0; }
.payment-task-card--paid { background: #f0fdf4; }
.payment-task-card--neutral { background: #ffffff; }

.payment-task-card__status-stripe {
  width: 3px;
  flex-shrink: 0;
  align-self: stretch;
}
.payment-task-card--overdue .payment-task-card__status-stripe,
.payment-task-card--broke-promise .payment-task-card__status-stripe { background: #ef4444; }
.payment-task-card--promised .payment-task-card__status-stripe { background: #7c3aed; }
.payment-task-card--warning .payment-task-card__status-stripe { background: #f97316; }
.payment-task-card--paid .payment-task-card__status-stripe { background: #22c55e; }
.payment-task-card--neutral .payment-task-card__status-stripe { background: #e5e7eb; }

.payment-task-card__inner {
  flex: 1;
  min-width: 0;
  padding: var(--space-md) 12px var(--space-md) var(--space-md);
}
.payment-task-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-md);
}
.payment-task-card__identity {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px var(--space-md);
  min-width: 0;
}
.payment-task-card__car { font-size: var(--text-base); font-weight: 800; color: #111111; letter-spacing: -0.02em; }
.payment-task-card__driver { font-size: var(--text-base); color: #52525b; }

.payment-task-card__sum-col {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.payment-task-card__amount-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.payment-task-card__sum {
  font-size: var(--text-lg);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: #111111;
}
.payment-task-card__pay-btn {
  background: #ffd60a;
  color: #000;
  font-weight: 800;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px var(--space-lg);
  font-size: var(--text-sm);
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
  transition: opacity var(--transition-fast) ease, transform var(--transition-fast) ease;
}
.payment-task-card__pay-btn:active {
  opacity: 0.92;
  transform: scale(0.98);
}

.payment-task-card__badge-wrap {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}
.payment-task-card__badge {
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  color: #fff;
}
.payment-task-card__badge--red { background: #ef4444; }
.payment-task-card__badge--purple { background: #7c3aed; }
.payment-task-card__badge--orange { background: #f97316; }
.payment-task-card__badge--green { background: #22c55e; }
.payment-task-card__badge--dark { background: #1a1a1a; color: #ffffff; }

.payment-task-card__meta-line {
  margin-top: var(--space-sm);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
  line-height: 1.35;
}
.payment-task-card__tag {
  font-size: var(--text-xs);
  font-weight: 800;
  padding: 2px var(--space-sm);
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
}
.payment-task-card__tag--promised { background: #7c3aed; }
.payment-task-card__tag--broke { background: #ef4444; }
.payment-task-card__tag--paid { background: #22c55e; }
.payment-task-card__meta-rest {
  font-size: var(--text-sm);
  color: #71717a;
}

.payment-task-card__promise-section {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.payment-task-card__promise-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: #52525b;
  margin-bottom: 8px;
}
.payment-task-card__promise-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.payment-task-card__promise-shortcut {
  background: #ede9fe;
  color: #7c3aed;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: var(--text-xs);
  padding: 7px 11px;
  cursor: pointer;
  font-family: inherit;
  transition: background var(--transition-fast) ease, color var(--transition-fast) ease;
}
.payment-task-card__promise-shortcut:hover,
.payment-task-card__promise-shortcut:active {
  background: #7c3aed;
  color: #ffffff;
}

.payment-task-card__promise-readonly-line {
  font-size: var(--text-sm);
  font-weight: 500;
  color: #3f3f46;
  line-height: 1.35;
}

/* OPERATIONS / INVESTOR — карточка оплат только для просмотра */
.payment-task-card--readonly .payment-task-card__pay-btn {
  opacity: 0.4 !important;
  pointer-events: none !important;
  background: #e5e5ea !important;
  color: #8a8a8e !important;
  cursor: default !important;
}

.payment-task-card--readonly .payment-task-card__pay-btn:disabled {
  opacity: 0.4 !important;
}

.payment-task-card--readonly .payment-task-card__promise-shortcut {
  opacity: 0.4 !important;
  pointer-events: none !important;
  cursor: default !important;
}

.payment-task-card--readonly .payment-task-card__promise-shortcut:hover,
.payment-task-card--readonly .payment-task-card__promise-shortcut:active {
  background: #ede9fe !important;
  color: #7c3aed !important;
}

.payment-task-card--readonly .payment-task-card__promise-title::after {
  content: ' (только механик)';
  font-size: var(--text-xs);
  color: #8a8a8e;
  font-weight: 400;
}

.home-due-list { margin-bottom: 12px; }
.home-due-row { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: var(--space-md); }
.home-due-date { font-size: var(--text-xl); font-weight: 800; line-height: 1; }
.home-due-date small { display: block; color: #888; font-size: var(--text-xs); margin-top: 2px; font-weight: 600; }
.home-due-main strong { font-size: var(--text-base); display: block; }
.home-due-main span,
.home-due-driver { font-size: var(--text-sm); color: #888; display: block; }
.home-due-check { color: #22c55e; font-weight: 800; margin-left: 2px; }
.home-due-amount { font-size: var(--text-base); font-weight: 800; }
.home-due-amount--paid { color: #22c55e; }
.home-due-row.is-today .home-due-date { color: #ffd60a; }

.home-park-card { padding: 12px !important; margin-bottom: 8px; }
.home-park-head { display: flex; justify-content: space-between; align-items: center; font-size: var(--text-base); margin-bottom: var(--space-md); }
.home-park-bar { height: 16px; background: #efefef; border-radius: var(--radius-sm); display: flex; overflow: hidden; gap: 2px; cursor: pointer; }
.home-park-seg { display: block; height: 100%; border: none; padding: 0; margin: 0; cursor: pointer; }
.home-park-seg:active { opacity: 0.8; }
.home-park-legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-sm); margin-top: var(--space-md); text-align: center; }
.home-park-legend strong { display: block; font-size: var(--text-xl); }
.home-park-legend span { color: #888; font-size: var(--text-xs); text-transform: uppercase; }

.home-park-legend-btn {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
  text-align: center;
}
.home-park-legend-btn:active { opacity: 0.7; }

/* ─── Касса (screen-history): шапка, фильтры, сводка, список ─── */
#screen-history .kassa-page {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: #f4f4f0;
}

#screen-history .kassa-header-dark {
  background: #272b30;
  padding-bottom: var(--space-md);
}

#screen-history .kassa-topbar {
  padding: 12px 16px var(--space-md);
  padding-top: calc(12px + env(safe-area-inset-top, 0));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  flex-shrink: 0;
}

#screen-history .kassa-topbar--hidden {
  display: none;
}

#screen-history .kassa-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

#screen-history .kassa-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--space-lg);
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: rgba(255, 255, 255, 0.82);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.12s, opacity 0.12s, transform 0.1s;
  flex-shrink: 0;
}

#screen-history .kassa-icon-btn:active {
  transform: scale(0.96);
  background: rgba(255, 255, 255, 0.1);
}

#screen-history .kassa-icon-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

#screen-history .kassa-month-btn {
  flex: 1;
  min-width: 0;
  height: 36px;
  border-radius: var(--space-lg);
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: #fff;
  font-size: var(--text-lg);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

#screen-history .kassa-month-btn:active {
  background: rgba(255, 255, 255, 0.1);
}

#screen-history .kassa-ic {
  width: var(--space-lg);
  height: var(--space-lg);
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

#screen-history .kassa-ic-sm {
  width: 16px;
  height: 16px;
}

#screen-history .kassa-ic--tile {
  width: 15px;
  height: 15px;
}

#screen-history .kassa-nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px var(--space-md);
}

#screen-history .kassa-nav-search--hidden {
  display: none;
}

#screen-history .kassa-search-field {
  flex: 1;
  min-width: 0;
  height: 36px;
  border-radius: var(--space-lg);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.75);
}

#screen-history .kassa-search-field input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: #fff;
  font-size: var(--text-base);
  outline: none;
}

#screen-history .kassa-search-field input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

#screen-history .kassa-filters {
  padding: 0 16px;
}

#screen-history .kassa-filter-bar {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}

#screen-history .kassa-type-chip {
  flex: 1;
  min-width: 64px;
  padding: var(--space-sm) 4px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  text-align: center;
  border: none;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  color: #d4d4d4;
}

#screen-history .kassa-type-chip.active {
  background: #ffc72c;
  color: #1a1a1a;
}

#screen-history .kassa-filter-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 2px;
  flex-shrink: 0;
}

#screen-history .kassa-extra-wrap {
  display: flex;
  gap: var(--space-sm) 4px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 1 1 100%;
}

#screen-history .kassa-extra-chip {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  background: rgba(255, 199, 44, 0.16);
  border: 0.5px solid rgba(255, 199, 44, 0.4);
  color: #ffc72c;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

#screen-history .kassa-extra-chip svg {
  width: 12px;
  height: 12px;
}

#screen-history .kassa-plus-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  background: transparent;
  border: 0.5px dashed rgba(255, 255, 255, 0.25);
  color: #888;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

#screen-history .kassa-content {
  flex: 1;
  padding: 12px 16px 88px;
}

#screen-history .kassa-summary-card {
  margin: 0;
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

#screen-history .kassa-summary-btn {
  width: 100%;
  border: none;
  background: transparent;
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  cursor: pointer;
  text-align: left;
}

#screen-history .kassa-summary-left {
  font-size: var(--text-xs);
  color: #888;
  letter-spacing: 0.3px;
}

#screen-history .kassa-summary-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

#screen-history .kassa-summary-value {
  font-size: var(--text-base);
  font-weight: 500;
  white-space: nowrap;
}

#screen-history .kassa-summary-value.pos {
  color: #2d8a3f;
}

#screen-history .kassa-summary-value.neg {
  color: #c43838;
}

#screen-history .kassa-summary-chevron {
  color: #888;
  transition: transform 0.18s ease;
}

#screen-history .kassa-summary-card.expanded .kassa-summary-chevron {
  transform: rotate(180deg);
}

#screen-history .kassa-summary-details {
  border-top: 0.5px solid #ececea;
  padding: var(--space-md) var(--space-lg) 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px var(--space-md);
  font-size: var(--text-sm);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height var(--transition-base) ease, opacity var(--transition-base) ease;
}

#screen-history .kassa-summary-card.expanded .kassa-summary-details {
  max-height: 120px;
  opacity: 1;
}

#screen-history .kassa-summary-row-label {
  color: #888;
  font-size: var(--text-sm);
}

#screen-history .kassa-summary-row-val {
  font-weight: 600;
  white-space: nowrap;
}

#screen-history .kassa-summary-row-val.in {
  color: #2d8a3f;
}

#screen-history .kassa-summary-row-val.out {
  color: #c43838;
}

#screen-history .kassa-ops {
  margin-top: 12px;
}

#screen-history .kassa-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  margin-top: 16px;
  margin-bottom: 8px;
  gap: var(--space-md);
}

#screen-history .kassa-day-head:first-child {
  margin-top: 4px;
}

#screen-history .kassa-day-left {
  font-size: var(--text-xs);
  font-weight: 500;
  color: #888;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

#screen-history .kassa-day-right {
  font-size: var(--text-xs);
  color: #999;
  white-space: nowrap;
}

#screen-history .kassa-day-group {
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

#screen-history .op-card {
  display: flex;
  gap: 12px;
  padding: 12px var(--space-lg);
  align-items: center;
  border-bottom: 0.5px solid #ececea;
  cursor: pointer;
}

#screen-history .op-card:last-child {
  border-bottom: none;
}

#screen-history .op-icon-tile {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#screen-history .op-body {
  flex: 1;
  min-width: 0;
}

#screen-history .op-title {
  font-size: var(--text-base);
  font-weight: 500;
  color: #1a1a1a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#screen-history .op-subtitle {
  font-size: var(--text-sm);
  color: #888;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#screen-history .op-amount {
  font-size: var(--text-base);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

#screen-history .kassa-empty {
  padding: 40px var(--space-lg);
  text-align: center;
}

#screen-history .kassa-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid #c5c4be;
  margin: 0 auto var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
}

#screen-history .kassa-empty-title {
  font-size: var(--text-base);
  color: #555;
}

#screen-history .kassa-empty-sub {
  font-size: var(--text-sm);
  color: #999;
  margin-top: 8px;
  line-height: 1.45;
}

#screen-history .kassa-empty-reset {
  margin-top: 16px;
  padding: 8px var(--space-lg);
  border-radius: var(--radius-md);
  background: #1a1a1a;
  color: #fff;
  border: none;
  font-size: var(--text-sm);
  cursor: pointer;
}

/* Bottomsheet: фильтр / месяц */
.kassa-bs-wrap .kassa-sheet-list-item {
  height: 48px;
  padding: 0 0;
  margin: 0 calc(-1 * var(--space-lg, 16px));
  padding-left: var(--space-lg, 16px);
  padding-right: var(--space-lg, 16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 0.5px solid #ececea;
  cursor: pointer;
  font-size: var(--text-base);
  color: #1a1a1a;
}

.kassa-bs-wrap .kassa-sheet-list-item:active {
  background: #f8f8fb;
}

.kassa-bs-wrap .kassa-sheet-right {
  color: #999;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}

.kassa-bs-wrap .kassa-sheet-values-head {
  padding: var(--space-sm) 0 var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.kassa-bs-wrap .kassa-sheet-back {
  border: none;
  background: none;
  color: #666;
  font-size: var(--text-base);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}

.kassa-bs-wrap .kassa-sheet-reset {
  border: none;
  background: none;
  color: #666;
  font-size: var(--text-base);
  cursor: pointer;
}

.kassa-bs-wrap .kassa-sheet-checkbox-row {
  padding: 12px 0;
  margin: 0 calc(-1 * var(--space-lg, 16px));
  padding-left: var(--space-lg, 16px);
  padding-right: var(--space-lg, 16px);
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 0.5px solid #ececea;
  cursor: pointer;
  font-size: var(--text-base);
}

.kassa-bs-wrap .kassa-sheet-checkbox-row input {
  width: var(--space-lg);
  height: var(--space-lg);
  flex-shrink: 0;
}

.kassa-bs-wrap .kassa-sheet-apply {
  padding: 12px 0 0;
  margin-top: 8px;
}

.kassa-bs-wrap .kassa-sheet-apply button {
  width: 100%;
  height: 44px;
  border-radius: var(--radius-md);
  background: #ffc72c;
  border: none;
  font-size: var(--text-base);
  font-weight: 700;
  cursor: pointer;
  color: #1a1a1a;
}

.kassa-bs-wrap .kassa-sheet-apply button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.kassa-bs-wrap .kassa-month-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: var(--space-md) 0 12px;
}

.kassa-bs-wrap .kassa-month-cell {
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid #ececea;
  background: #fff;
  font-size: var(--text-sm);
  cursor: pointer;
}

.kassa-bs-wrap .kassa-month-cell.active {
  background: #ffc72c;
  border-color: #ffc72c;
  color: #1a1a1a;
  font-weight: 700;
}

.kassa-bs-wrap .kassa-month-cell:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.kassa-bs-wrap .kassa-month-footer {
  padding: 12px 0 0;
  border-top: 0.5px solid #ececea;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.kassa-bs-wrap .kassa-year-switch {
  display: inline-flex;
  align-items: center;
  gap: var(--space-md);
  color: #666;
}

.kassa-bs-wrap .kassa-year-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid #ececea;
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kassa-bs-wrap .kassa-today-btn {
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-lg);
  border: 1px solid #ececea;
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  color: #666;
}

/* ── Быстрая смена статуса: бейдж-кнопка + попап ── */
.fleet-quick-wrap {
  position: relative;
}

.fleet-car__badge.fleet-quick-trigger {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  border: none;
  font-family: var(--font-family);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 4px var(--space-md);
  border-radius: var(--radius-xl);
  -webkit-user-select: none;
  user-select: none;
}

.fleet-quick-popover {
  position: absolute;
  top: calc(100% + var(--space-sm));
  right: 0;
  background: var(--color-white);
  border: 0.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) !important;
  display: flex;
  flex-direction: column;
  gap: 2px !important;
  z-index: 50;
  min-width: 148px;
  box-shadow: var(--shadow-md);
}

.fleet-quick-popover[hidden] {
  display: none;
}

.fleet-quick-item {
  display: flex !important;
  align-items: center;
  gap: var(--space-md) !important;
  width: 100%;
  padding: 9px var(--space-md) !important;
  border-radius: 7px;
  border: none;
  background: transparent;
  font-family: var(--font-family);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-dark);
  cursor: pointer;
  text-align: left;
}

.fleet-quick-item:active {
  background: var(--color-bg);
}

.fleet-quick-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.fleet-quick-dot--green { background: #16a34a; }
.fleet-quick-dot--amber { background: #F59E0B; }
.fleet-quick-dot--red   { background: #EF4444; }
.fleet-quick-dot--gray  { background: #9ca3af; }

/* ═══════════════════════════════════════════════════════════════
   ПРОГНОЗ ДЕНЕЖНОГО ПОТОКА
═══════════════════════════════════════════════════════════════ */

.fcst-hero {
  background: linear-gradient(135deg, #1A1A1A 0%, #2C1A0E 100%);
  border-radius: var(--radius-lg);
  padding: 16px 16px var(--space-lg);
  margin-bottom: var(--space-md);
  text-align: center;
}
.fcst-hero__label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #A8845A;
  margin-bottom: 5px;
}
.fcst-hero__amount {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.02em;
  margin-bottom: 3px;
}
.fcst-hero__sub {
  font-size: var(--text-sm);
  color: #8a8a8e;
}

/* Блок недели */
.fcst-wk {
  margin-bottom: var(--space-md);
  padding: var(--space-lg) var(--space-lg) 12px;
}
.fcst-wk__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}
.fcst-wk__meta {
  font-size: var(--text-xs);
  color: #8a8a8e;
}
.fcst-wk__amt {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
  line-height: 1;
}
.fcst-wk__bars {
  display: flex;
  gap: 4px;
  height: 54px;
  align-items: flex-end;
}
.fcst-wk__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.fcst-wk__fill {
  width: 100%;
  border-radius: 3px 3px 0 0;
  min-height: 3px;
}
.fcst-wk__day {
  font-size: var(--text-xs);
  color: #8a8a8e;
  line-height: 1;
}
.fcst-wk__col--today .fcst-wk__day {
  color: #C2501A;
  font-weight: 600;
}

/* Ближайшие 3 дня */
.fcst-nearest {
  padding: var(--space-lg) var(--space-lg) 12px;
}
.fcst-nd__grid {
  display: flex;
  gap: 8px;
}
.fcst-nd {
  flex: 1;
  background: var(--color-background-secondary, #F5F5F5);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-sm);
  text-align: center;
}
.fcst-nd--today {
  background: #FFF0E6;
}
.fcst-nd__date {
  font-size: var(--text-xs);
  color: #A8845A;
  margin-bottom: 4px;
  font-weight: 500;
}
.fcst-nd--today .fcst-nd__date {
  color: #C2501A;
}
.fcst-nd__amt {
  font-size: var(--text-xl);
  font-weight: 700;
  color: #1C1410;
  line-height: 1;
  letter-spacing: -0.02em;
}
.fcst-nd__cur {
  font-size: var(--text-xs);
  color: #8a8a8e;
  margin-top: 1px;
}
.fcst-nd__cars {
  font-size: var(--text-xs);
  color: #8a8a8e;
  margin-top: 5px;
}

.fcst-loading {
  padding: 4px 0;
}
