/* Jozon — правая лента на дашборде и светлая тема приложения (класс body.jz-light).
   Подключается в _base.html. Правила темы идут с префиксом body.jz-light,
   поэтому перебивают тёмные стили базового шаблона по специфичности. */

/* ============ Правая колонка (лента) ============ */
.jz-page-row { display: flex; align-items: flex-start; gap: 24px; }
.jz-page-main { flex: 1 1 auto; min-width: 0; }
.jz-rail { flex: 0 0 320px; width: 320px; position: sticky; top: 16px; }
/* минимальная ширина основной колонки — только на страницах с лентой, чтобы сетка не сжималась */
@media (min-width: 1661px) { .jz-page-row--with-rail .jz-page-main { min-width: 1000px; } }
@media (max-width: 1660px) {
  .jz-page-row--with-rail { flex-direction: column; }
  .jz-page-row--with-rail .jz-rail { position: static; width: 100%; flex-basis: auto; }
}
.jz-rail-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 16px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}
.jz-rail-head {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
  color: #64748b; font-weight: 700; margin-bottom: 10px;
}
.jz-feed-item { display: block; text-decoration: none; padding: 10px 0; border-bottom: 1px solid #eef2f7; }
.jz-feed-item:last-of-type { border-bottom: none; }
.jz-feed-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.jz-feed-badge {
  font-size: 10px; font-weight: 700; letter-spacing: .05em; color: #047857;
  background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 999px; padding: 2px 8px;
}
.jz-feed-date { font-size: 11px; color: #94a3b8; }
.jz-feed-title { font-size: .92rem; font-weight: 600; color: #0f172a; line-height: 1.35; }
.jz-feed-item:hover .jz-feed-title { color: #1d4ed8; }
.jz-feed-desc { font-size: .78rem; color: #64748b; margin-top: 4px; line-height: 1.4; }
.jz-feed-empty { font-size: .85rem; color: #64748b; padding: 6px 0; }
.jz-feed-all { display: inline-block; margin-top: 10px; font-size: .85rem; color: #2563eb; text-decoration: none; font-weight: 600; }
.jz-rail-cta { font-size: .85rem; color: #475569; line-height: 1.45; }
.jz-rail-cta a { color: #2563eb; font-weight: 600; text-decoration: none; }

/* Быстрые ссылки под заголовком страницы */
.jz-quicklinks { display: flex; flex-wrap: wrap; gap: 8px; margin: -10px 0 18px; }
.jz-quicklinks a {
  font-size: .85rem; padding: 6px 12px; border-radius: 8px;
  border: 1px solid #e2e8f0; background: #fff; color: #1d4ed8; text-decoration: none;
}
.jz-quicklinks a:hover { background: #f1f5f9; border-color: #cbd5e1; }

/* ============ Светлая тема ============ */
body.jz-light { background: #f1f5f9; color: #0f172a; }
body.jz-light .jz-sidebar { background: #fff; border-right-color: #e2e8f0; }
body.jz-light .jz-sidebar-header { border-bottom-color: #e2e8f0; }
body.jz-light .jz-sidebar-header .logo { color: #1d4ed8; }
body.jz-light .jz-sidebar-toggle { color: #475569; }
body.jz-light .jz-sidebar-toggle:hover { background: #f1f5f9; color: #0f172a; }
body.jz-light .jz-menu-group-title { color: #94a3b8; }
body.jz-light .jz-menu-group-title:hover { color: #334155; }
body.jz-light .jz-menu-item { color: #334155; }
body.jz-light .jz-menu-item:hover { background: #f1f5f9; color: #0f172a; }
body.jz-light .jz-menu-item.active { background: #e0ecff; color: #1d4ed8; border-left-color: #2563eb; }
body.jz-light .jz-sidebar-footer { border-top-color: #e2e8f0; }
body.jz-light .jz-sidebar-footer a { color: #b91c1c; }
body.jz-light .jz-topbar { background: #fff; border-bottom-color: #e2e8f0; }
body.jz-light .jz-topbar .jz-burger { color: #475569; }
body.jz-light .jz-topbar .jz-burger:hover { background: #f1f5f9; color: #0f172a; }
body.jz-light h1 { color: #1d4ed8; }
body.jz-light .kpi-card { background: #fff; border-color: #e2e8f0; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
body.jz-light .kpi-label { color: #64748b; }
body.jz-light .kpi-value { color: #0f172a; }
body.jz-light .kpi-sub { color: #64748b; }
body.jz-light .chart-card { background: #fff; border-color: #e2e8f0; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
body.jz-light .chart-card h2, body.jz-light .chart-card h3 { color: #0f172a; }
body.jz-light .gauge-glass-card { background: #fff; border-color: #e2e8f0; box-shadow: 0 6px 20px rgba(15, 23, 42, .06); backdrop-filter: none; }
body.jz-light .gauge-title { color: #64748b; }
body.jz-light .gauge-value { text-shadow: none; }
body.jz-light .spark-bar { background: #e2e8f0; }
body.jz-light .spark-fill::after { display: none; }
body.jz-light .text-green { color: #15803d !important; text-shadow: none; }
body.jz-light .text-red { color: #b91c1c !important; }
body.jz-light .text-orange { color: #b45309 !important; }
body.jz-light .text-blue { color: #1d4ed8 !important; }
body.jz-light .info { background: #ecfdf5; color: #047857; }
body.jz-light .error { background: #fef2f2; color: #b91c1c; }
body.jz-light .empty { color: #64748b; }
body.jz-light thead { background: #f1f5f9; }
body.jz-light th { color: #475569; }
body.jz-light td { border-top-color: #e2e8f0; }
body.jz-light tbody tr:hover { background: #f8fafc; }

/* Панель фильтров */
body.jz-light .jz-filters { background: #ffffff; border-color: #e2e8f0; }
body.jz-light .jz-filters-loader { background: transparent; }
body.jz-light .jz-filter-checks label { color: #1e293b; }
body.jz-light .jz-filter-group label { color: #475569; }
body.jz-light .jz-filter-group input[type="date"],
body.jz-light .jz-filter-group select { background: #fff; border-color: #cbd5e1; color: #0f172a; }
body.jz-light .jz-filter-presets button { background: #fff; border-color: #cbd5e1; color: #475569; }
body.jz-light .jz-filter-presets button:hover { background: #f1f5f9; color: #0f172a; }
body.jz-light .jz-filter-presets button.active { background: #2563eb; border-color: #2563eb; color: #fff; }
body.jz-light .jz-filter-actions button.secondary { background: #e2e8f0; color: #0f172a; }
body.jz-light .jz-filter-actions button.secondary:hover { background: #cbd5e1; }
body.jz-light .jz-dropdown-toggle { background: #fff; border-color: #cbd5e1; color: #0f172a; }
body.jz-light .jz-dropdown-toggle.active { border-color: #2563eb; }
body.jz-light .jz-dropdown-menu { background: #fff; border-color: #e2e8f0; box-shadow: 0 8px 24px rgba(15, 23, 42, .12); }
body.jz-light .jz-dropdown-search { background: #f8fafc; border-color: #e2e8f0; color: #0f172a; }
body.jz-light .jz-dropdown-actions button { background: #fff; border-color: #cbd5e1; color: #475569; }
body.jz-light .jz-dropdown-actions button:hover { background: #f1f5f9; color: #0f172a; }
body.jz-light .jz-dropdown-item { color: #0f172a; }
body.jz-light .jz-dropdown-item:hover { background: #f1f5f9; }
body.jz-light .jz-dropdown-empty { color: #94a3b8; }

/* Прочие блоки приложения */
body.jz-light .ue-top-card { background: #fff; border-color: #e2e8f0; }
body.jz-light .ue-top-card h4 { color: #64748b; }
body.jz-light .ue-top-item { border-bottom-color: #eef2f7; }
body.jz-light .ue-top-item .sku-name { color: #0f172a; }/* === Мастерская задач === */
.jz-lead { color: #475569; font-size: .95rem; margin: -6px 0 18px; max-width: 900px; line-height: 1.5; }
.jz-insight-summary { padding: 16px 20px; }
.jz-insight-summary .kpi-value { font-size: 1.8rem; }
.jz-insights { display: grid; gap: 14px; }
.jz-insight { border-left: 4px solid #cbd5e1; }
.jz-insight-high { border-left-color: #b91c1c; }
.jz-insight-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.jz-sev {
  font-size: 10px; font-weight: 700; letter-spacing: .06em; padding: 3px 9px; border-radius: 999px;
}
.jz-sev-high { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.jz-sev-medium { background: #fffbeb; color: #b45309; border: 1px solid #fcd34d; }
.jz-sev-info { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.jz-insight-amount { font-size: 1.15rem; font-weight: 700; color: #0f172a; }
.jz-insight-title { font-size: 1.02rem; font-weight: 600; margin-bottom: 6px; color: #0f172a; }
.jz-insight-detail { color: #475569; font-size: .9rem; line-height: 1.5; }
.jz-insight-items { margin: 10px 0 0; padding-left: 18px; color: #334155; font-size: .85rem; line-height: 1.6; }
.jz-insight-items a { color: #1d4ed8; text-decoration: none; }
.jz-insight-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.jz-btn-primary, .jz-btn-ghost {
  display: inline-block; padding: 9px 16px; border-radius: 8px; font-size: .88rem; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 1px solid transparent;
}
.jz-btn-primary { background: #2563eb; color: #fff; }
.jz-btn-primary:hover { background: #1d4ed8; }
.jz-btn-ghost { background: #fff; color: #475569; border-color: #cbd5e1; }
.jz-btn-ghost:hover { background: #f1f5f9; }

/* === Метка среды и демо-режима === */
.jz-env-badge {
  margin-left: 10px; font-size: 11px; font-weight: 700; letter-spacing: .04em;
  padding: 3px 9px; border-radius: 999px; text-transform: uppercase;
}
.jz-env-stage { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.jz-env-demo { background: #ede9fe; color: #5b21b6; border: 1px solid #ddd6fe; }

/* === Кнопка демо на публичных страницах === */
.lp-demo-link { display: block; text-align: center; margin-top: 12px; color: var(--lp-accent2); font-size: .88rem; cursor: pointer; }
.lp-demo-link:hover { text-decoration: underline; }

/* === Плотный дашборд: плитки, разбор выручки, топы === */
.jz-section-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 6px 0 12px; }
.jz-section-head h3 { margin: 0; font-size: 1rem; color: #15803d; }
.jz-hint { color: #94a3b8; font-size: .78rem; }
.jz-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 24px; }
.jz-tile { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px; box-shadow: 0 1px 2px rgba(15,23,42,.05); }
.jz-tile-label { color: #64748b; font-size: .8rem; margin-bottom: 6px; min-height: 32px; }
.jz-tile-value { font-size: 1.25rem; font-weight: 700; color: #0f172a; }
.jz-tile-delta { font-size: .78rem; margin-top: 6px; color: #64748b; }
.jz-tile-delta .good { color: #15803d; font-weight: 600; }
.jz-tile-delta .bad { color: #b91c1c; font-weight: 600; }
.jz-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
@media (max-width: 1200px) { .jz-two-col { grid-template-columns: 1fr; } }
.jz-split-row { display: grid; grid-template-columns: 190px 1fr 90px; gap: 10px; align-items: center; padding: 5px 0; font-size: .85rem; }
.jz-split-name { color: #334155; }
.jz-split-bar { height: 10px; background: #f1f5f9; border-radius: 6px; overflow: hidden; }
.jz-split-bar > i { display: block; height: 100%; background: linear-gradient(90deg, #60a5fa, #2563eb); }
.jz-split-val { text-align: right; color: #0f172a; font-variant-numeric: tabular-nums; }
.jz-top-row { display: grid; grid-template-columns: 1fr 110px 80px; gap: 10px; padding: 7px 0; border-bottom: 1px solid #eef2f7; font-size: .86rem; }
.jz-top-row:last-child { border-bottom: none; }
.jz-top-name { color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jz-top-name a { color: #0f172a; text-decoration: none; }
.jz-top-name a:hover { color: #1d4ed8; }
.jz-top-sku { color: #94a3b8; font-size: .75rem; }
.jz-top-val { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.jz-top-pct { text-align: right; color: #64748b; font-variant-numeric: tabular-nums; }
.jz-good { color: #15803d; }
.jz-bad { color: #b91c1c; }

/* === Тепловая карта === */
.jz-heat-controls { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: -6px 0 16px; }
.jz-heat-controls label { color: #475569; font-size: .82rem; display: flex; gap: 6px; align-items: center; }
.jz-heat-controls select, .jz-heat-controls input[type="search"] {
  padding: 7px 10px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: #0f172a; font-size: .85rem;
}
.jz-heat-controls input[type="search"] { min-width: 220px; }
.jz-heat-legend { color: #64748b; font-size: .8rem; margin-left: auto; }
.jz-heat-wrap { overflow: auto; max-height: 70vh; }
table.jz-heat { border-collapse: collapse; font-size: .78rem; min-width: 100%; }
table.jz-heat th, table.jz-heat td { padding: 4px 6px; border: 1px solid #eef2f7; white-space: nowrap; text-align: right; }
table.jz-heat thead th { position: sticky; top: 0; background: #f8fafc; color: #475569; z-index: 2; }
.jz-heat-th { font-size: .68rem; color: #94a3b8; }
.jz-heat-name {
  position: sticky; left: 0; background: #fff; text-align: left !important; min-width: 220px;
  max-width: 240px; overflow: hidden; text-overflow: ellipsis;
}
.jz-heat-name a { color: #0f172a; text-decoration: none; }
.jz-heat-name a:hover { color: #1d4ed8; }
.jz-heat-sku { color: #94a3b8; font-size: .68rem; }
.jz-heat-total { font-weight: 600; background: #f8fafc; }
.jz-heat-sum td { font-weight: 700; background: #f1f5f9; }

/* === Раскраска и пояснения плиток, широкая сетка === */
body.jz-light .jz-container { max-width: none; }
.jz-tile-spark { margin-top: 8px; height: 26px; }
.jz-tile-spark svg { display: block; width: 100%; height: 26px; }
.jz-tile-label { display: flex; align-items: center; gap: 4px; }
.jz-hint-inline { color: #94a3b8; font-size: .74rem; line-height: 1.4; margin-top: 4px; }
.chart-card > .jz-hint-inline { margin: -6px 0 12px; }

