/* Шрифт фирменного стандарта — Jost (см. minfoto/brandbook). */
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/brand/fonts/jost-300-cyrillic.woff2') format('woff2'),
    url('/brand/fonts/jost-300-latin.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('/brand/fonts/jost-300-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/brand/fonts/jost-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/brand/fonts/jost-400-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/brand/fonts/jost-500-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/brand/fonts/jost-500-latin.woff2') format('woff2');
}

@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/brand/fonts/jost-600-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/brand/fonts/jost-600-latin.woff2') format('woff2');
}

/* Палитра и типографика из брендбука: чёрно-белая основа, акцент #E4503F. */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f7f7;
  --line: #dcdcdc;
  --line-strong: #c9c9c9;
  --ink: #000000;
  --ink-2: #222222;
  --muted: #6e6e6e;
  --muted-2: #ababab;
  --accent: #000000;
  --accent-ink: #ffffff;
  --brand-accent: #e4503f;
  --ok: #0f7b5c;
  --warn: #a8630a;
  --danger: #b42318;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.16);
  --font: 'Jost', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
}

/* Тёмная тема: тот же чёрно-белый строй, но инвертированный. */
html[data-theme='dark'] {
  --bg: #121212;
  --surface: #1a1a1a;
  --surface-2: #202020;
  --line: #2c2c2c;
  --line-strong: #3d3d3d;
  --ink: #f5f5f5;
  --ink-2: #d8d8d8;
  --muted: #9a9a9a;
  --muted-2: #6f6f6f;
  --accent: #f5f5f5;
  --accent-ink: #111111;
  --brand-accent: #e4503f;
  --ok: #3fbf8f;
  --warn: #d79a3c;
  --danger: #ef6f6f;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
}

/* Тёплая тема: бумажный фон, как на печатных носителях. */
html[data-theme='warm'] {
  --bg: #f6f1ea;
  --surface: #fffdf9;
  --surface-2: #f1ebe2;
  --line: #e2d8cb;
  --line-strong: #cfc2b1;
  --ink: #1b1613;
  --ink-2: #3a3029;
  --muted: #6f655c;
  --muted-2: #a3988c;
  --accent: #1b1613;
  --accent-ink: #fffdf9;
  --brand-accent: #c8452f;
  --ok: #226b52;
  --warn: #8a5a12;
  --danger: #a52a1c;
  --shadow-sm: 0 1px 2px rgba(60, 45, 30, 0.08);
  --shadow-md: 0 6px 20px rgba(60, 45, 30, 0.12);
  --shadow-lg: 0 24px 60px rgba(60, 45, 30, 0.22);
}

/* Размер интерфейса: масштабируем всё разом, чтобы на телефоне можно было крупнее. */
html[data-ui-size='s'] body {
  zoom: 0.94;
}

html[data-ui-size='l'] body {
  zoom: 1.08;
}

html[data-ui-size='xl'] body {
  zoom: 1.18;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.hidden {
  display: none !important;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 620;
  letter-spacing: -0.01em;
}

/* ---------- вход ---------- */
.login {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 15%, rgba(29, 31, 35, 0.06), transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(29, 31, 35, 0.05), transparent 50%),
    var(--bg);
}

.login-card {
  width: min(380px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow-md);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}

/* Логотип «Министерства фотографии» — чёрный знак на прозрачном фоне.
   В тёмной теме инвертируем: знак остаётся тем же, но белым. */
.brand-mark {
  display: block;
  height: 40px;
  width: auto;
  flex: 0 0 auto;
}

html[data-theme='dark'] .brand-mark {
  filter: invert(1);
}

.brand-mark.small {
  height: 30px;
  width: auto;
  flex: 0 0 auto;
}

.brand-title {
  font-weight: 600;
  letter-spacing: 0.16em;
  font-size: 14px;
  text-transform: uppercase;
}

/* Название в шапке: тонкая разрядка, как в фирменных материалах */
.brand-name {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-right: 6px;
  border-right: 1px solid var(--line);
  margin-right: 6px;
}

@media (max-width: 720px) {
  .brand-name {
    display: none;
  }
}

.brand-sub {
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}

.login-error {
  min-height: 18px;
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 13px;
}

/* ---------- каркас ---------- */
.app {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  padding-top: max(10px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.tabs {
  display: flex;
  gap: 4px;
}

.tabs a {
  padding: 7px 11px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.tabs a:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink);
}

.tabs a.active {
  background: var(--ink);
  color: var(--accent-ink);
}

.search input {
  width: 230px;
  max-width: 34vw;
  padding: 8px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  outline: none;
}

.search input:focus {
  border-color: var(--ink-2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 10%, transparent);
}

.view {
  flex: 1;
  padding: 18px 20px 90px;
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
}

/* Доска занимает всю ширину окна — на больших экранах поля по бокам не нужны */
.view.view-wide {
  max-width: none;
  margin: 0;
}

.tabbar {
  display: none;
}

/* ---------- кнопки и поля ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.06s ease;
  white-space: nowrap;
}

.btn:hover {
  background: var(--surface-2);
  border-color: var(--ink-2);
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
}

.btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--accent-ink);
}

.btn.primary:hover {
  opacity: 0.88;
}

.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.btn.ghost:hover {
  background: rgba(24, 25, 27, 0.05);
  color: var(--ink);
}

.btn.danger {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 35%, var(--line));
  background: var(--surface);
}

.btn.danger:hover {
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
  border-color: var(--danger);
}

.btn.success {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 35%, var(--line));
}

.btn.success:hover {
  background: color-mix(in srgb, var(--ok) 9%, var(--surface));
  border-color: var(--ok);
}

.btn.small {
  padding: 5px 9px;
  font-size: 13px;
}

.btn.block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: default;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.field > span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  outline: none;
  width: 100%;
}

.field textarea {
  min-height: 84px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--ink-2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 10%, transparent);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hint {
  color: var(--muted);
  font-size: 12.5px;
}

.mobile-only {
  display: none;
}

/* ---------- доска ---------- */
/* Переключатель этапов нужен только на телефоне: там доска листается по одному этапу */
.board-stages {
  display: none;
}

.board {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  overflow-x: auto;
  padding-bottom: 14px;
  scroll-snap-type: x proximity;
}

.col {
  flex: 1 1 200px;
  min-width: 204px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 230px);
  min-height: 360px;
  scroll-snap-align: start;
}

.col-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px 13px 9px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}

.col-head .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
  transform: translateY(-1px);
}

.col-head .name {
  font-weight: 620;
  font-size: 14px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.col-head .count {
  font-size: 12px;
  color: var(--muted);
  background: color-mix(in srgb, var(--ink) 8%, transparent);
  padding: 1px 7px;
  border-radius: 20px;
}

.col-head .sum {
  font-size: 12.5px;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.col-body {
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 60px;
}

.col.drag-over {
  outline: 2px dashed var(--ink-2);
  outline-offset: -3px;
  background: #e9e9e2;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 11px;
  box-shadow: var(--shadow-sm);
  cursor: grab;
  transition: box-shadow 0.12s ease, border-color 0.12s ease;
}

.card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.card.dragging {
  opacity: 0.45;
}

.card-title {
  font-weight: 560;
  font-size: 14px;
  line-height: 1.35;
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.card-top .card-title {
  margin-bottom: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.card-shoot {
  flex: 0 0 auto;
  font-size: 11.5px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  padding: 0 8px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.card-client {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.card-foot .card-amount {
  flex: 0 0 auto;
}

/* Теги прижимаются к правому краю строки с суммой; если не влезают —
   переносятся на отдельную строку целиком. */
.card .card-foot .card-tags {
  margin: 0 0 0 auto;
  justify-content: flex-end;
}

.card-amount {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 13.5px;
}

.chip {
  font-size: 11.5px;
  padding: 2px 7px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.05);
  color: var(--ink-2);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.chip.overdue {
  background: color-mix(in srgb, var(--brand-accent) 12%, var(--surface));
  color: var(--brand-accent);
}

.chip.soon {
  background: #fdf3e3;
  color: var(--warn);
}

.chip.won {
  background: #e7f5ef;
  color: var(--ok);
}

.col-empty {
  padding: 14px 10px;
  text-align: center;
  color: var(--muted-2);
  font-size: 12.5px;
}

.segmented {
  display: flex;
  gap: 6px;
}

.date-input {
  border: 1px solid transparent;
  background: transparent;
  padding: 4px 6px;
  border-radius: 7px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  max-width: 152px;
}

.date-input:hover {
  border-color: var(--line);
  background: var(--surface);
}

.date-input:focus {
  border-color: var(--ink-2);
  background: var(--surface);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 10%, transparent);
}

.date-input.overdue {
  color: var(--brand-accent);
  border-color: color-mix(in srgb, var(--brand-accent) 40%, var(--line));
}

.date-input::-webkit-calendar-picker-indicator {
  opacity: 0.45;
  cursor: pointer;
}

.board-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

/* Карточка, которую тащат: копия следует за курсором в полную силу */
.drag-float {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  opacity: 1;
  transform: rotate(2deg) scale(1.02);
  border-style: solid;
  border-color: var(--line-strong);
  background: var(--surface);
  box-shadow: 0 18px 38px rgba(20, 20, 25, 0.3);
}

body.is-dragging {
  user-select: none;
  cursor: grabbing;
}

body.is-dragging .card {
  cursor: grabbing;
}

.card.dragging {
  opacity: 0.32;
  border-style: dashed;
}

.col-more {
  width: 100%;
  justify-content: center;
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- таблицы ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.panel + .panel {
  margin-top: 16px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 620;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  text-align: left;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 620;
  padding: 9px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  white-space: nowrap;
}

.table td {
  padding: 10px 16px;
  border-bottom: 1px solid #f0f0eb;
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table tbody tr {
  cursor: pointer;
}

.table tbody tr:hover {
  background: var(--surface-2);
}

.num {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

/* Заголовки таблиц выравниваем так же, как числа под ними */
.table th.num,
.table td.num {
  text-align: right;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 12px;
  background: color-mix(in srgb, var(--c, #7b8794) 13%, var(--surface));
  color: color-mix(in srgb, var(--c, #7b8794) 65%, var(--ink));
  white-space: nowrap;
}

.pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c, #7b8794);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12.5px;
}

.empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--muted);
}

.empty h3 {
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--ink);
}

/* ---------- сводка ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.stat .label {
  font-size: 11.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 620;
  margin-bottom: 6px;
}

.stat .value {
  font-size: 26px;
  font-weight: 620;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat .note {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 4px;
}

.stat.accent {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--accent-ink);
}

.stat.accent .label,
.stat.accent .note {
  color: color-mix(in srgb, var(--accent-ink) 70%, transparent);
}

.range {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 16px;
  align-items: start;
}

.month-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 9px 16px;
  border-bottom: 1px solid #f0f0eb;
  font-size: 14px;
}

.month-row:last-child {
  border-bottom: 0;
}

.month-row .sum {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.month-row .cnt {
  color: var(--muted);
  font-size: 12.5px;
  min-width: 62px;
  text-align: right;
}

.bar {
  height: 5px;
  border-radius: 3px;
  background: #ecece6;
  overflow: hidden;
  margin-top: 6px;
}

.bar > i {
  display: block;
  height: 100%;
  background: var(--ink);
  border-radius: 3px;
}

.bar.thin {
  height: 3px;
  margin-top: 6px;
}

.bar.thin > i {
  background: var(--muted-2);
}

/* ---------- доход и средний чек по годам ---------- */
.year-legend {
  display: flex;
  gap: 16px;
  padding: 10px 16px 2px;
  flex-wrap: wrap;
}

.legend-bar {
  display: inline-block;
  width: 22px;
  height: 5px;
  border-radius: 3px;
  background: var(--ink);
  margin-right: 5px;
  vertical-align: middle;
}

.legend-bar.thin {
  height: 3px;
  background: var(--muted-2);
}

.year-row {
  display: grid;
  grid-template-columns: 130px 1fr 190px 130px;
  gap: 14px;
  align-items: center;
  padding: 9px 16px;
  border-bottom: 1px solid #f0f0eb;
}

.year-row:last-of-type {
  border-bottom: 0;
}

.year-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.year-title b {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.year-values {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.year-values > span:first-child {
  font-weight: 600;
}

.year-deltas {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-end;
  font-variant-numeric: tabular-nums;
}

.delta {
  font-size: 12.5px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 20px;
  background: rgba(29, 31, 35, 0.06);
}

.delta.up {
  color: var(--ok);
  background: #e8f6ef;
}

.delta.down {
  color: var(--danger);
  background: #fdecea;
}

@media (max-width: 760px) {
  .year-row {
    grid-template-columns: 84px 1fr 96px;
    gap: 10px;
    padding: 8px 12px;
  }
  .year-deltas {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-end;
    gap: 8px;
  }
}

.list-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid #f0f0eb;
  cursor: pointer;
}

.list-item:last-child {
  border-bottom: 0;
}

.list-item:hover {
  background: var(--surface-2);
}

.list-item .t {
  min-width: 0;
}

.list-item .title {
  font-weight: 550;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- модальные окна ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 21, 24, 0.42);
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 5vh 16px 16px;
  overflow-y: auto;
  animation: fade 0.12s ease;
}

.modal {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  width: min(660px, 100%);
  margin-bottom: 5vh;
  animation: rise 0.14s ease;
}

.modal.wide {
  width: min(880px, 100%);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  z-index: 1;
}

.modal-head h2 {
  font-size: 17px;
}

.modal-body {
  padding: 18px 20px;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 0 0 16px 16px;
  flex-wrap: wrap;
}

.modal-foot .right {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.icon-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}

.icon-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.timeline .item {
  border-left: 2px solid var(--line-strong);
  padding: 2px 0 2px 11px;
}

.timeline .when {
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.timeline .what {
  font-size: 13.5px;
}

.timeline .note-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.note-add {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-top: 12px;
}

.note-add textarea {
  flex: 1;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  resize: vertical;
  outline: none;
}

.note-add textarea:focus {
  border-color: var(--ink-2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 10%, transparent);
}

.section-title {
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 620;
  margin: 20px 0 8px;
}

.section-title:first-child {
  margin-top: 0;
}

.client-line {
  display: flex;
  gap: 8px;
  align-items: center;
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ---------- клиенты ---------- */
.client-card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.client-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.clients-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.clients-toolbar .filter-label select {
  padding: 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  font-size: 13px;
}

.client-card .name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.client-kind {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(29, 31, 35, 0.06);
  border-radius: 20px;
  padding: 1px 7px;
  margin-left: 6px;
  vertical-align: middle;
}

.contact-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid #f0f0eb;
  text-decoration: none;
  color: var(--ink);
}

.contact-row:last-child {
  border-bottom: 0;
}

.contact-row:hover {
  color: var(--ink);
  background: var(--surface-2);
}

[hidden] {
  display: none !important;
}

.client-card .meta {
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.client-card .nums {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  font-size: 12.5px;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.client-card .nums > span {
  white-space: nowrap;
}

/* ---------- настройки ---------- */
.settings-block {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr 1fr;
  align-items: start;
}

.settings-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.settings-card h2 {
  font-size: 15px;
  margin-bottom: 4px;
}

.settings-card p {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 12px;
}

.status-edit {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0eb;
}

.status-edit input[type="text"] {
  flex: 1;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
}

.status-edit input[type="text"]:hover {
  border-color: var(--line);
}

.status-edit input[type="text"]:focus {
  border-color: var(--ink-2);
  outline: none;
  background: var(--surface);
}

.status-edit select {
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  font-size: 12.5px;
}

.status-edit input[type="number"] {
  width: 64px;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  font-size: 12.5px;
  text-align: right;
}

/* ---------- теги ---------- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}

.card .tags {
  margin-bottom: 8px;
}

.tag {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 20px;
  background: rgba(29, 31, 35, 0.07);
  color: var(--ink-2);
  white-space: nowrap;
}

.tag[data-tag] {
  cursor: pointer;
}

.tag[data-tag]:hover {
  background: rgba(29, 31, 35, 0.14);
}

.tag-chip {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-2);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 12.5px;
  cursor: pointer;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.tag-chip > span {
  color: var(--muted);
  font-size: 11.5px;
}

.tag-chip:hover {
  border-color: var(--line-strong);
}

.tag-chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--accent-ink);
}

.tag-chip.active > span {
  color: color-mix(in srgb, var(--accent-ink) 72%, transparent);
}

/* ---------- фильтры в разделе «Проекты» ---------- */
.filters {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filters-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.filters-row > input[type="search"],
.filters-row > select {
  flex: 1 1 200px;
  min-width: 150px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  outline: none;
}

.filters-row > input:focus,
.filters-row > select:focus {
  border-color: var(--ink-2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 10%, transparent);
}

.filter-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
}

.filter-label input {
  padding: 7px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  width: 128px;
  outline: none;
}

.filter-label input:focus {
  border-color: var(--ink-2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 10%, transparent);
}

.filters-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 9px;
}

th.sortable {
  cursor: pointer;
  user-select: none;
}

th.sortable:hover,
th.sortable.sorted {
  color: var(--ink);
}

th.sortable .arrow {
  margin-left: 3px;
  font-size: 10px;
  opacity: 0.7;
}

/* ---------- зоны завершения проекта при перетаскивании ---------- */
.finish-zones {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 26px;
  display: none;
  gap: 10px;
  z-index: 45;
}

body.is-dragging .finish-zones {
  display: flex;
}

.finish-zone {
  padding: 11px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  border: 2px dashed transparent;
  box-shadow: var(--shadow-md);
  white-space: nowrap;
}

.finish-zone.won {
  background: #e8f6ef;
  color: var(--ok);
  border-color: #b7e0cd;
}

.finish-zone.lost {
  background: #fdecea;
  color: var(--danger);
  border-color: #f0c6c1;
}

.finish-zone.over {
  transform: scale(1.04);
}

/* ---------- уведомления ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: var(--accent-ink);
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 90;
  max-width: 90vw;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.error {
  background: var(--danger);
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

@keyframes rise {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
}

/* ---------- планшет/телефон ---------- */
@media (max-width: 1080px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .settings-block {
    grid-template-columns: 1fr;
  }
  .search input {
    width: 170px;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 15px;
  }
  .topbar {
    padding: 8px 12px;
  }
  .tabs {
    display: none;
  }
  .search {
    flex: 1;
  }
  .search input {
    width: 100%;
    max-width: none;
  }
  .topbar-right {
    flex: 1;
    gap: 8px;
  }
  #new-project {
    padding: 8px 11px;
  }
  .view {
    padding: 12px 12px 86px;
  }
  .tabbar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 2px 7px;
    text-decoration: none;
    color: var(--muted);
    font-size: 10.5px;
  }
  .tabbar a .ico {
    font-size: 16px;
    line-height: 1.1;
  }
  .tabbar a.active {
    color: var(--ink);
  }
  /* Доска листается по одному этапу: колонка занимает экран целиком, свайп — переход.
     Лента этапов сверху показывает, где мы и сколько всего. */
  .board-stages {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    margin: 0 -12px 8px;
    padding: 2px 12px 6px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .board-stages::-webkit-scrollbar {
    display: none;
  }
  .board-stages button {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 550;
    white-space: nowrap;
    cursor: pointer;
  }
  .board-stages button .n {
    font-size: 11.5px;
    color: var(--muted);
  }
  .board-stages button .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex: 0 0 auto;
    align-self: center;
  }
  .board-stages button.active {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--accent-ink);
  }
  .board-stages button.active .n {
    color: color-mix(in srgb, var(--accent-ink) 72%, transparent);
  }
  .board {
    margin: 0 -12px;
    padding: 0 12px;
    gap: 10px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }
  .board::-webkit-scrollbar {
    display: none;
  }
  .col {
    flex: 0 0 calc(100vw - 24px);
    min-width: calc(100vw - 24px);
    scroll-snap-align: center;
    scroll-snap-stop: always;
    /* Высота оставляет место строке-подсказке и нижней панели, иначе
       подсказка уходит под таббар и страница кажется «застрявшей». */
    height: calc(100vh - 292px);
    height: calc(100dvh - 292px);
    min-height: 280px;
  }
  .col-body {
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .modal-backdrop {
    padding: 0;
    align-items: flex-end;
  }
  .modal,
  .modal.wide {
    width: 100%;
    border-radius: 18px 18px 0 0;
    margin: 0;
    max-height: 94vh;
    overflow-y: auto;
  }
  .modal-head {
    border-radius: 18px 18px 0 0;
  }
  .modal-foot {
    border-radius: 0;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
    /* Кнопки всегда под рукой: форма длинная, а «Завершить» нужен в любой момент */
    position: sticky;
    bottom: 0;
    z-index: 3;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
  .table .hide-sm {
    display: none;
  }
  .table th,
  .table td {
    padding: 9px 12px;
  }
  .stat .value {
    font-size: 20px;
  }
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stat {
    padding: 12px 13px;
  }
  .stat .label {
    font-size: 10.5px;
  }
  .stat .note {
    font-size: 11.5px;
  }
  .desktop-only {
    display: none;
  }
  .mobile-only {
    display: inline;
  }
  .finish-zones {
    bottom: 88px;
    width: 100%;
    justify-content: center;
    padding: 0 12px;
  }
  .finish-zone {
    padding: 10px 12px;
    font-size: 13px;
  }
  .filter-label {
    flex: 1 1 100%;
    justify-content: space-between;
    gap: 12px;
  }
  .filter-label input {
    width: 58%;
  }
  .filters-row > input[type="search"],
  .filters-row > select {
    flex: 1 1 100%;
  }
  /* На телефоне таблица шире экрана — пусть прокручивается по горизонтали */
  .panel:has(> .table) {
    overflow-x: auto;
  }
  .modal-foot .right {
    width: 100%;
  }
  .modal-foot .right .btn {
    flex: 1;
  }
}

.confirm-modal {
  width: min(460px, 100%);
}

.confirm-modal .modal-body p {
  line-height: 1.5;
}

/* ---------- оплаты в карточке проекта ---------- */

.payments {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.pay-summary {
  display: flex;
  gap: 14px;
  align-items: baseline;
  flex-wrap: wrap;
  font-size: 13.5px;
}

.pay-due {
  color: var(--warn);
  font-weight: 600;
}

.pay-ok {
  color: var(--ok);
  font-weight: 600;
}

.pay-list {
  display: flex;
  flex-direction: column;
}

.pay-row {
  display: grid;
  grid-template-columns: 92px 120px 1fr 28px;
  gap: 8px;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}

.pay-amount {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.pay-note {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pay-add {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 4px;
}

.pay-add input {
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  font: inherit;
  font-size: 13px;
}

.pay-add input[type="number"] {
  width: 130px;
  text-align: right;
}

.pay-add input[type="text"] {
  flex: 1;
  min-width: 140px;
}

.modal-foot .left {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* выделение строк в таблице проектов */
.table tr.selected {
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.bulk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-bottom: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.bulk-bar select {
  padding: 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  font-size: 13px;
  max-width: 320px;
}

.table .check-cell {
  width: 34px;
  text-align: center;
}

.table .check-cell input {
  width: auto;
  cursor: pointer;
}

.table tbody tr {
  cursor: pointer;
}

/* ---------- календарь ---------- */

.cal-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.cal-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cal-title {
  min-width: 190px;
  text-align: center;
  font-size: 15px;
}

.cal-month {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.cal-weekday {
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 6px 4px;
}

.cal-cell {
  min-height: 108px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}

.cal-cell:hover {
  border-color: var(--line-strong);
}

.cal-cell.outside {
  background: transparent;
  opacity: 0.55;
}

.cal-cell.today {
  border-color: var(--line-strong);
  background: color-mix(in srgb, var(--accent) 3%, var(--surface));
}

.cal-day {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--muted);
}

.cal-cell.today .cal-day {
  color: #fff;
  background: var(--brand-accent);
  border-radius: 6px;
  padding: 0 6px;
  display: inline-block;
  align-self: flex-start;
}

.cal-events {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}

.cal-chip {
  display: flex;
  gap: 5px;
  align-items: baseline;
  width: 100%;
  padding: 3px 6px;
  border: 0;
  border-left: 3px solid var(--c, var(--muted));
  border-radius: 5px;
  background: color-mix(in srgb, var(--c, #7b8794) 12%, transparent);
  font: inherit;
  font-size: 11.5px;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.cal-chip:hover {
  background: color-mix(in srgb, var(--c, #7b8794) 22%, transparent);
}

.cal-chip .t {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cal-chip .n {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cal-more {
  font-size: 11px;
  color: var(--muted);
  padding: 0 6px;
}

.cal-week {
  display: grid;
  grid-template-columns: 56px repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.cal-week-hours {
  display: flex;
  flex-direction: column;
}

.cal-week-allday {
  min-height: 30px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 4px;
}

.cal-hour {
  height: 48px;
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  padding-right: 6px;
  border-top: 1px solid var(--line);
}

.cal-week-col {
  border-left: 1px solid var(--line);
  min-width: 0;
}

.cal-week-col.today {
  background: color-mix(in srgb, var(--accent) 4%, transparent);
}

.cal-week-head {
  font-size: 12px;
  padding: 2px 6px 4px;
  color: var(--muted);
}

.cal-week-col.today .cal-week-head {
  color: var(--ink);
  font-weight: 650;
}

.cal-week-body {
  position: relative;
  height: calc(48px * 15);
  background-image: repeating-linear-gradient(
    to bottom,
    var(--line) 0,
    var(--line) 1px,
    transparent 1px,
    transparent 48px
  );
}

.cal-block {
  position: absolute;
  left: 2px;
  right: 2px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px 6px;
  border: 0;
  border-left: 3px solid var(--c, var(--muted));
  border-radius: 6px;
  background: color-mix(in srgb, var(--c, #7b8794) 16%, transparent);
  font: inherit;
  font-size: 11.5px;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.cal-block:hover {
  background: color-mix(in srgb, var(--c, #7b8794) 26%, transparent);
}

.cal-block .t {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.cal-block .n {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- оформление в настройках ---------- */

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 4px 0 16px;
}

.theme-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.12s ease, transform 0.12s ease;
}

.theme-card:hover {
  border-color: var(--line-strong);
}

.theme-card.active {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.theme-card b {
  font-size: 13px;
  font-weight: 600;
}

.theme-preview {
  display: flex;
  height: 34px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.theme-preview i {
  flex: 1;
}

.theme-preview[data-preview='light'] i:nth-child(1) { background: #ffffff; }
.theme-preview[data-preview='light'] i:nth-child(2) { background: #e4503f; }
.theme-preview[data-preview='light'] i:nth-child(3) { background: #000000; }

.theme-preview[data-preview='dark'] i:nth-child(1) { background: #121212; }
.theme-preview[data-preview='dark'] i:nth-child(2) { background: #e4503f; }
.theme-preview[data-preview='dark'] i:nth-child(3) { background: #f5f5f5; }

.theme-preview[data-preview='warm'] i:nth-child(1) { background: #f6f1ea; }
.theme-preview[data-preview='warm'] i:nth-child(2) { background: #c8452f; }
.theme-preview[data-preview='warm'] i:nth-child(3) { background: #1b1613; }

.size-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
