:root {
  --bg: #eef2f0;
  --bg-accent: #e4ebe7;
  --surface: #ffffff;
  --ink: #1c2421;
  --muted: #5c6b64;
  --line: #d5ddd8;
  --brand: #0f6b5c;
  --brand-soft: #d8efe9;
  --brand-hover: #0b5347;
  --danger: #9b2c2c;
  --danger-bg: #fdf2f2;
  --shadow: 0 1px 2px rgba(28, 36, 33, 0.04), 0 8px 24px rgba(28, 36, 33, 0.06);
  --radius: 14px;
  --font: "Manrope", system-ui, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(1200px 500px at 10% -10%, #d9ebe4 0%, transparent 55%),
    radial-gradient(900px 400px at 100% 0%, #dde5ef 0%, transparent 50%),
    var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.logo {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 18px;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.logo span { color: var(--brand); }
.logo:hover { text-decoration: none; }
.header nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.header nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
}
.header nav a:hover {
  background: var(--brand-soft);
  color: var(--brand);
  text-decoration: none;
}
.user { font-size: 13px; color: var(--muted); white-space: nowrap; }

.container { max-width: 960px; margin: 0 auto; padding: 28px 20px 72px; }
.container-wide { max-width: 1400px; }

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}
.page-header h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.page-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.subtitle {
  display: block;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
  margin-top: 6px;
}

.btn {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { background: #f7faf8; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.btn.primary:hover { background: var(--brand-hover); }
.btn.secondary { background: var(--surface); }
.btn.danger {
  background: var(--danger-bg);
  border-color: #f0c4c4;
  color: var(--danger);
}
.btn.danger:hover { background: #f8e4e4; }
.btn-sm {
  padding: 6px 11px;
  font-size: 12px;
  border-radius: 8px;
}
.filters .btn { align-self: center; }
.login-box .btn { width: 100%; margin-top: 8px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card h2, .card h3 {
  margin-top: 0;
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.card h2 { font-size: 20px; }
.card h3 { font-size: 17px; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.filters input, .filters select {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: var(--surface);
}
.filters input[type="search"] { flex: 1; min-width: 200px; }
.filters-export { margin-left: 4px; }

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.table-wrap .table { box-shadow: none; margin: 0; }
.table th, .table td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid #e8eeea;
  font-size: 14px;
  vertical-align: middle;
}
.table th {
  background: #f4f7f5;
  font-weight: 700;
  color: #6a7a72;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.table tbody tr:nth-child(odd) td { background: #ffffff; }
.table tbody tr:nth-child(even) td { background: #f3f7f5; }
.table tbody tr.row-archived td {
  background: #fdeceb !important;
}
.table tbody tr.row-archived:hover td {
  background: #fad8d4 !important;
}
.table tr:last-child td { border-bottom: none; }
.table tr.clickable { cursor: pointer; transition: background .12s; }
.table tr.clickable:hover td {
  background: #fff8ef !important;
}
.table tr.clickable.row-archived:hover td {
  background: #fad8d4 !important;
}
.table tr.clickable:hover td:first-child {
  box-shadow: inset 3px 0 0 #0f6b5c;
}
.table tr.clickable.row-archived:hover td:first-child {
  box-shadow: inset 3px 0 0 #c0392b;
}
.table-count { margin-top: 12px; }

.th-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
  border-radius: 6px;
  padding: 2px 4px;
  margin: -2px -4px;
}
.th-sort:hover {
  color: var(--brand);
  background: var(--brand-soft);
  text-decoration: none;
}
.th-sort.is-active { color: var(--brand); }
.th-sort-arrow {
  font-size: 12px;
  line-height: 1;
  opacity: 0.85;
}


.idea-badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.idea-badge-empty {
  background: #eef0ef;
  color: var(--muted);
  font-weight: 600;
}
.task-title {
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}
.task-date {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 13px;
}
.task-igraetsya {
  margin-top: 5px;
  font-size: 11px;
  color: #3d6b58;
  font-weight: 500;
}

.board-chip,
.status-pill,
.author-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

/* Авторы — 18 явно разных цветов по кругу оттенков */
.author-pill {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
/* Палитра авторов: каждый слот — другой оттенок круга (не два синих подряд) */
.author-pill.author-c0  { background: #f0b27a; color: #5c2d0a; } /* персик — Никита */
.author-pill.author-c1  { background: #f1c40f; color: #4a3b00; } /* жёлтый */
.author-pill.author-c2  { background: #e67e22; color: #ffffff; } /* оранжевый */
.author-pill.author-c3  { background: #2471a3; color: #ffffff; } /* синий — Голомолзин */
.author-pill.author-c4  { background: #27ae60; color: #ffffff; } /* зелёный */
.author-pill.author-c5  { background: #8e44ad; color: #ffffff; } /* фиолетовый */
.author-pill.author-c6  { background: #148f77; color: #ffffff; } /* бирюза — Барат */
.author-pill.author-c7  { background: #e91e63; color: #ffffff; } /* розовый */
.author-pill.author-c8  { background: #5d6d7e; color: #ffffff; } /* серо-синий */
.author-pill.author-c9  { background: #6c3483; color: #ffffff; } /* баклажан — Миркин */
.author-pill.author-c10 { background: #1abc9c; color: #063d32; } /* мята */
.author-pill.author-c11 { background: #922b21; color: #ffffff; } /* бордо */
.author-pill.author-c12 { background: #d4ac0d; color: #3a3000; } /* золото — Зинкевич */
.author-pill.author-c13 { background: #3498db; color: #ffffff; } /* голубой */
.author-pill.author-c14 { background: #196f3d; color: #ffffff; } /* тёмно-зелёный */
.author-pill.author-c15 { background: #c0392b; color: #ffffff; } /* красный — Ilya */
.author-pill.author-c16 { background: #af7ac5; color: #2c0f3d; } /* сирень */
.author-pill.author-c17 { background: #2c3e50; color: #ffffff; } /* графит — Булыкин */

/* Назначение — спокойные оттенки бренда */
.board-chip { background: #e8f0ec; color: #3d5c50; }
.board-tyue { background: #d7e8f6; color: #245578; }
.board-both { background: #d6eee4; color: #176850; }
.board-kapitany { background: #e8dff3; color: #553a70; }
.board-none { background: #eef0ef; color: var(--muted); }

/* Статусы */
.status-pill { font-weight: 600; }
.status-tg { background: #e0e7ef; color: #3a4d61; }
.status-formulirovka { background: #dcefdc; color: #2f5f38; }
.status-metodkom { background: #dce5f5; color: #334978; }
.status-igraetsya { background: #d4efe5; color: #146347; }
.status-otklonena { background: #f3dede; color: #7d3535; }
.status-archived { background: #e74c3c; color: #fff; }
.status-other { background: #eef0ef; color: var(--muted); }

@media (max-width: 768px) {
  .table th, .table td { padding: 10px 10px; }
}

label {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
input[type="text"], input[type="url"], input[type="number"], input[type="datetime-local"],
input[type="password"], select, textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  background: #fbfcfc;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(15, 107, 92, 0.15);
  background: #fff;
}
textarea { resize: vertical; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .header-inner { flex-wrap: wrap; }
  .page-header { flex-direction: column; }
}

.author-field {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.author-field .author-select {
  margin-top: 0;
  width: 100%;
}
.author-field .author-custom {
  margin-top: 0;
}

.hint { font-weight: 400; color: #8a968f; font-size: 12px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.empty {
  padding: 48px;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px dashed var(--line);
}

.alert {
  background: var(--danger-bg);
  border: 1px solid #f0c4c4;
  color: var(--danger);
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 16px;
}
.alert.success {
  background: #e8f6ef;
  border-color: #b7e4cb;
  color: #1b5e3b;
}
.help-box {
  background: #f4f8f6;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.login-box {
  max-width: 380px;
  margin: 80px auto;
  background: var(--surface);
  padding: 36px;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.login-box h1 {
  font-family: var(--serif);
  margin-top: 0;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.meta-grid .full { grid-column: 1 / -1; }
.meta-grid .label {
  display: block;
  font-size: 11px;
  color: #8a968f;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
  font-weight: 600;
}
@media (max-width: 768px) {
  .meta-grid { grid-template-columns: 1fr 1fr; }
}

.pre-wrap {
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.6;
}
.links { padding-left: 20px; margin: 0; }
.links li { margin-bottom: 6px; word-break: break-all; }
.tg-link { margin-top: 14px; margin-bottom: 0; }

.comments { margin-bottom: 20px; }
.comment {
  border-left: 3px solid var(--brand);
  background: #f6faf8;
  border-radius: 0 10px 10px 0;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.comment-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
.comment-text { white-space: pre-wrap; }
.comment-delete { display: inline; margin: 0; margin-left: auto; }
.btn-link-danger {
  background: none;
  border: none;
  color: var(--danger);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.btn-link-danger:hover { text-decoration: underline; }
.comment-form {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 8px;
}
.count-pill {
  display: inline-block;
  background: var(--brand-soft);
  color: var(--brand);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  vertical-align: middle;
}

.comments-create {
  margin: 20px 0;
  padding: 16px;
  background: #f4f8f6;
  border: 1px dashed var(--line);
  border-radius: 12px;
}
.comment-row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}

.actions { display: flex; gap: 8px; margin-top: 12px; }
.actions-inline { display: flex; gap: 8px; align-items: center; }


.hidden { display: none !important; }
.paste-box { margin-bottom: 16px; }
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  color: var(--ink);
  font-weight: 500;
}
.checkbox-label input { width: auto; margin: 0; }
.checkbox-archive {
  margin: 4px 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #f0b4ad;
  background: #fdeceb;
  color: #8b1e14;
  font-weight: 600;
}

.archive-pill {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e74c3c;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
  white-space: nowrap;
}
.alert.archive-alert {
  background: #fdeceb;
  border-color: #f0b4ad;
  color: #8b1e14;
  font-weight: 600;
}

.board-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.board-tab {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.board-tab:hover {
  text-decoration: none;
  background: var(--brand-soft);
  color: var(--brand);
}
.board-tab.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  align-items: start;
  min-height: 60vh;
}
.kanban-col {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  min-height: 280px;
}
.kanban-col-archive {
  background: #fdeceb;
  border-color: #f0b4ad;
}
.kanban-col-archive .kanban-col-header {
  color: #8b1e14;
}
.kanban-col-archive .kanban-col-header .count {
  background: #fad2cd;
  color: #8b1e14;
}
.kanban-col-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 10px;
  padding: 4px 6px;
  color: var(--ink);
}
.kanban-col-header .count {
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 12px;
}
.kanban-list {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kanban-card {
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  cursor: grab;
}
.kanban-card-archived {
  background: #fdeceb;
  border-color: #e74c3c;
  box-shadow: inset 4px 0 0 #e74c3c;
}
.kanban-card:active { cursor: grabbing; }
.kanban-card-link {
  display: block;
  padding: 12px;
  color: inherit;
  text-decoration: none;
}
.kanban-card-link:hover { text-decoration: none; }
.kanban-card-num {
  font-size: 12px;
  color: var(--brand);
  font-weight: 700;
  margin-bottom: 4px;
}
.kanban-card-archived .kanban-card-num { color: #c0392b; }
.kanban-card-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.35;
}
.kanban-card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
.kanban-card-meta .author-pill {
  font-size: 11px;
  padding: 3px 8px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kanban-card-archive {
  margin-top: 8px;
  font-size: 11px;
  color: #fff;
  background: #e74c3c;
  border-radius: 6px;
  padding: 3px 8px;
  display: inline-block;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.kanban-card-badge {
  margin-top: 8px;
  font-size: 11px;
  color: #1b5e3b;
  background: #e8f6ef;
  border-radius: 6px;
  padding: 3px 7px;
  display: inline-block;
  font-weight: 600;
}
.kanban-ghost { opacity: 0.4; }
.kanban-drag { box-shadow: 0 12px 28px rgba(28, 36, 33, 0.14); }

.history-list { display: flex; flex-direction: column; gap: 14px; }
.history-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  background: #fbfcfb;
}
.history-meta {
  font-size: 14px;
  margin-bottom: 8px;
}
.history-summary {
  margin: 0 0 10px;
  padding: 10px 12px;
  background: #f4f8f6;
  border-radius: 8px;
  font-size: 14px;
}
.history-changes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.history-field {
  font-size: 12px;
  font-weight: 600;
  color: #5a6b62;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.history-diff {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.history-diff-single { grid-template-columns: 1fr; }
.history-old, .history-new {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
}
.history-old { background: #faf6f4; }
.history-new { background: #f3f9f5; }
.history-old .label, .history-new .label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #8a968f;
  margin-bottom: 4px;
  font-weight: 600;
}
@media (max-width: 768px) {
  .history-diff { grid-template-columns: 1fr; }
}

.file-list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.file-list-compact { margin-top: 10px; }
.file-chip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 10px 12px;
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.file-chip-image,
.file-chip-video {
  align-items: flex-start;
}
.file-preview {
  display: block;
  flex: 1 1 220px;
  max-width: 420px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #eef2f0;
  line-height: 0;
}
.file-preview:hover { text-decoration: none; opacity: 0.96; }
.file-preview img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  background: #f4f7f5;
}
.file-preview-video {
  flex: 1 1 280px;
  max-width: 560px;
  background: #111;
}
.file-preview-video video {
  display: block;
  width: 100%;
  max-height: 360px;
  background: #111;
}
.file-list-compact .file-preview {
  max-width: 280px;
}
.file-list-compact .file-preview-video {
  max-width: 360px;
}
.file-list-compact .file-preview img {
  max-height: 220px;
}
.file-list-compact .file-preview-video video {
  max-height: 240px;
}
.file-chip-video .file-chip-body {
  flex: 1 1 160px;
}
.file-chip-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.file-chip-body {
  flex: 1;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.file-chip-image .file-chip-body {
  flex: 1 1 160px;
  align-self: center;
}
.file-chip-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
  word-break: break-all;
}
.file-chip-name:hover { color: var(--brand); }
.file-chip-meta {
  font-size: 12px;
  color: var(--muted);
}
.file-chip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
  align-self: center;
}
.inline-form { display: inline; margin: 0; }

.field-block { margin-bottom: 14px; }
.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.file-drop { margin-top: 2px; }
.file-drop-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.file-drop-zone {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 16px 18px;
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  background: #f7faf8;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
  font-weight: 500;
  color: var(--ink);
}
.file-drop-zone:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.file-drop.is-dragover .file-drop-zone,
.file-drop-input:focus + .file-drop-zone {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: 0 0 0 3px rgba(15, 107, 92, 0.15);
}
.file-drop.has-files .file-drop-zone {
  border-style: solid;
  border-color: #b7d9cf;
  background: #f2f9f6;
}
.file-drop-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.file-drop-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.file-drop-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.file-drop-hint {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.file-drop-chosen {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  margin-top: 4px;
  word-break: break-word;
}
.file-drop:not(.has-files) .file-drop-chosen {
  color: var(--muted);
  font-weight: 500;
}

@media (max-width: 640px) {
  .file-drop-zone { align-items: flex-start; }
  .file-chip-actions { width: 100%; margin-left: 0; }
  .file-chip-actions .btn { flex: 1; text-align: center; }
}

/* Импорт из Telegram */
.import-upload label { display: block; margin-bottom: 12px; }
.import-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 12px 0 16px;
}
.import-toolbar.sticky-bottom {
  position: sticky;
  bottom: 0;
  padding: 12px 0;
  background: linear-gradient(transparent, var(--surface) 30%);
  z-index: 2;
}
.import-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  background: var(--surface);
}
.import-row.kind-idea { border-left: 4px solid var(--brand); }
.import-row.kind-comment { border-left: 4px solid #3b6ea5; }
.import-row.kind-skip { border-left: 4px solid #b0b0b0; opacity: 0.92; }
.import-row-head {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin-bottom: 10px;
}
.import-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: #eef1ef;
  padding: 2px 8px;
  border-radius: 999px;
}
.import-fwd {
  font-size: 13px;
  color: #3b6ea5;
}
.import-notes {
  margin: 0 0 10px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}
.import-raw {
  white-space: pre-wrap;
  background: #f4f6f5;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  max-height: 160px;
  overflow: auto;
}
.import-row.kind-media { border-left: 4px solid #8a6d3b; }
.import-row.is-reviewed {
  box-shadow: inset 0 0 0 2px rgba(46, 125, 90, 0.35);
  background: #f7fbf8;
}
.import-reviewed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  white-space: nowrap;
}
.import-hint {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #f6f4ef;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.45;
}
.import-row input.field-error {
  border-color: #b00020;
  background: #fff5f5;
}
.import-media-hint {
  margin: 4px 0 8px;
  font-size: 13px;
}
.import-media-count { font-size: 13px; color: var(--brand); font-weight: 700; }
.import-media-summary { margin: 10px 0 0; }
.import-media-block {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #f0f6f3;
  border: 1px solid #c5ddd4;
  border-radius: 10px;
}
.import-media-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.import-media-item {
  width: 120px;
  font-size: 11px;
}
.import-media-item img {
  display: block;
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}
.import-media-video,
.import-media-file {
  width: 120px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px dashed #8a6d3b;
  background: #fff8e8;
  color: #6b5428;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.import-media-video-wrap {
  width: 220px;
}
.import-media-video-wrap video {
  display: block;
  width: 220px;
  max-height: 160px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #111;
}
.import-media-item:has(.import-media-video-wrap) {
  width: 220px;
}
.import-media-file { border-color: #6a8a9a; background: #eef5f8; color: #3a5560; }
.import-media-name {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.import-files {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 12px;
  color: var(--muted);
}
.import-help {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: #f4f8f6;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 14px;
}
.import-help ul { margin: 6px 0 0; padding-left: 18px; }
.import-help li { margin-bottom: 4px; }
