/* ============ BugBoard — общие стили ============ */

:root {
  --bg: #f4f5f7;
  --bg-panel: #ffffff;
  --bg-column: #ebecf0;
  --bg-hover: #f0f1f4;
  --bg-input: #ffffff;
  --border: #dfe1e6;
  --border-strong: #c1c7d0;
  --text: #172b4d;
  --text-muted: #6b778c;
  --text-faint: #97a0af;
  --accent: #4c5fd5;
  --accent-hover: #3d4eb8;
  --accent-soft: #eceefc;
  --danger: #de350b;
  --danger-soft: #ffebe6;
  --ok: #00875a;
  --shadow: 0 1px 3px rgba(9, 30, 66, .13), 0 0 1px rgba(9, 30, 66, .16);
  --shadow-lg: 0 8px 28px rgba(9, 30, 66, .22), 0 0 1px rgba(9, 30, 66, .2);
  --radius: 8px;

  --sev-critical: #de350b; --sev-critical-bg: #ffebe6;
  --sev-major:    #ff8b00; --sev-major-bg:    #fff3e0;
  --sev-minor:    #0065ff; --sev-minor-bg:    #e8f0fe;
  --sev-trivial:  #6b778c; --sev-trivial-bg:  #f0f1f4;

  --st-open: #0065ff; --st-in_progress: #ff8b00; --st-review: #8250df;
  --st-done: #00875a; --st-rejected: #6b778c;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16181d;
    --bg-panel: #1f2229;
    --bg-column: #1b1e24;
    --bg-hover: #262a33;
    --bg-input: #262a33;
    --border: #33384226;
    --border-strong: #3d4350;
    --text: #dde2ec;
    --text-muted: #9aa3b5;
    --text-faint: #6b7382;
    --accent: #7583e8;
    --accent-hover: #8b98f0;
    --accent-soft: #2b2f45;
    --danger: #ff6b52;
    --danger-soft: #3d2420;
    --ok: #4cc38a;
    --shadow: 0 1px 3px rgba(0,0,0,.4);
    --shadow-lg: 0 8px 28px rgba(0,0,0,.55);
    --sev-critical-bg: #3d2420; --sev-major-bg: #3a2e1a;
    --sev-minor-bg: #1f2a44; --sev-trivial-bg: #262a33;
    --border: #343a46;
  }
}
:root[data-theme="dark"] {
  --bg: #16181d; --bg-panel: #1f2229; --bg-column: #1b1e24; --bg-hover: #262a33;
  --bg-input: #262a33; --border: #343a46; --border-strong: #3d4350;
  --text: #dde2ec; --text-muted: #9aa3b5; --text-faint: #6b7382;
  --accent: #7583e8; --accent-hover: #8b98f0; --accent-soft: #2b2f45;
  --danger: #ff6b52; --danger-soft: #3d2420; --ok: #4cc38a;
  --shadow: 0 1px 3px rgba(0,0,0,.4); --shadow-lg: 0 8px 28px rgba(0,0,0,.55);
  --sev-critical-bg: #3d2420; --sev-major-bg: #3a2e1a;
  --sev-minor-bg: #1f2a44; --sev-trivial-bg: #262a33;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; cursor: pointer; color: inherit; background: none; border: none; }
input, textarea, select { font: inherit; color: var(--text); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- элементы форм ---------- */

.input, .select, .textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid var(--border-strong);
  border-radius: 6px;
  background: var(--bg-input);
  transition: border-color .15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.textarea { resize: vertical; min-height: 74px; line-height: 1.45; }
.select { cursor: pointer; }

.field { margin-bottom: 14px; }
.field > label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.field .hint { font-size: 12px; color: var(--text-faint); margin-top: 4px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  background: var(--bg-hover);
  transition: background .15s, opacity .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--border); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg-hover); }
.btn-sm { padding: 5px 10px; font-size: 13px; }

/* ---------- бейджи ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .2px;
  white-space: nowrap;
}
.badge.sev-critical { color: var(--sev-critical); background: var(--sev-critical-bg); }
.badge.sev-major    { color: var(--sev-major);    background: var(--sev-major-bg); }
.badge.sev-minor    { color: var(--sev-minor);    background: var(--sev-minor-bg); }
.badge.sev-trivial  { color: var(--sev-trivial);  background: var(--sev-trivial-bg); }

.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.st-open .status-dot { background: var(--st-open); }
.st-in_progress .status-dot { background: var(--st-in_progress); }
.st-review .status-dot { background: var(--st-review); }
.st-done .status-dot { background: var(--st-done); }
.st-rejected .status-dot { background: var(--st-rejected); }

.prio { font-weight: 700; font-size: 12px; }
.prio-urgent { color: var(--danger); }
.prio-high { color: var(--sev-major); }
.prio-medium { color: var(--sev-minor); }
.prio-low { color: var(--text-faint); }

.label-chip {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

.avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex: none;
  user-select: none;
}

.bug-key { font-size: 12px; font-weight: 700; color: var(--text-faint); letter-spacing: .3px; }

/* ---------- страница входа ---------- */

.auth-page {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-panel);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 32px;
}
.auth-logo {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 22px; font-weight: 800; margin-bottom: 6px;
}
.auth-sub { text-align: center; color: var(--text-muted); margin-bottom: 24px; font-size: 13px; }
.auth-tabs {
  display: flex;
  background: var(--bg-hover);
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 20px;
}
.auth-tabs button {
  flex: 1; padding: 7px; border-radius: 6px; font-weight: 600; color: var(--text-muted);
}
.auth-tabs button.active { background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow); }
.auth-error {
  background: var(--danger-soft);
  color: var(--danger);
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 13px;
  margin-bottom: 14px;
  display: none;
}
.auth-error.show { display: block; }
.auth-card .btn-primary { width: 100%; justify-content: center; padding: 10px; margin-top: 4px; }

/* ---------- каркас приложения ---------- */

.topbar {
  height: 54px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar .logo {
  font-size: 16px; font-weight: 800;
  display: flex; align-items: center; gap: 8px;
  margin-right: 6px;
}
.topbar .search {
  flex: 1;
  max-width: 420px;
  position: relative;
}
.topbar .search input {
  width: 100%;
  padding: 7px 12px 7px 34px;
  border-radius: 6px;
  border: 1.5px solid var(--border-strong);
  background: var(--bg-input);
}
.topbar .search input:focus { outline: none; border-color: var(--accent); }
.topbar .search .icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--text-faint); pointer-events: none;
}
.topbar .spacer { flex: 1; }

.view-toggle {
  display: flex;
  background: var(--bg-hover);
  border-radius: 7px;
  padding: 3px;
}
.view-toggle button {
  padding: 5px 13px;
  border-radius: 5px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
}
.view-toggle button.active { background: var(--bg-panel); color: var(--text); box-shadow: var(--shadow); }

.user-menu { position: relative; }
.user-menu .avatar { width: 32px; height: 32px; font-size: 13px; cursor: pointer; }
.user-dropdown {
  position: absolute;
  right: 0; top: 40px;
  background: var(--bg-panel);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  min-width: 210px;
  padding: 6px;
  display: none;
  z-index: 60;
}
.user-dropdown.open { display: block; }
.user-dropdown .who { padding: 8px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.user-dropdown .who .name { font-weight: 700; }
.user-dropdown .who .email { font-size: 12px; color: var(--text-muted); }
.user-dropdown button {
  display: block; width: 100%; text-align: left;
  padding: 8px 10px; border-radius: 6px;
}
.user-dropdown button:hover { background: var(--bg-hover); }

/* ---------- табы бордов ---------- */

.board-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 18px 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
}
.board-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 8px 8px 0 0;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1px;
  max-width: 280px;
}
.board-tab:hover { background: var(--bg-hover); color: var(--text); }
.board-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--bg);
}
.board-tab .tab-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-tab .tab-count {
  background: var(--bg-hover);
  border-radius: 9px;
  padding: 1px 8px;
  font-size: 11.5px;
  color: var(--text-muted);
}
.board-tab.active .tab-count { background: var(--accent-soft); color: var(--accent); }
.board-tab .tab-edit {
  font-size: 12px;
  opacity: .55;
  padding: 2px;
}
.board-tab .tab-edit:hover { opacity: 1; }
.tab-rename {
  font: inherit;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-input);
  border: 1.5px solid var(--accent);
  border-radius: 5px;
  padding: 2px 8px;
  width: 160px;
}
.tab-rename:focus { outline: none; }

/* ---------- фильтры ---------- */

.filters {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  flex-wrap: wrap;
}
.filters .select { width: auto; padding: 6px 28px 6px 10px; font-size: 13px; }
.filters .clear-btn { font-size: 13px; color: var(--text-muted); display: none; }
.filters .clear-btn.show { display: inline-flex; }
.filters .stats { margin-left: auto; font-size: 13px; color: var(--text-muted); }

/* ---------- доска ---------- */

.board {
  display: flex;
  gap: 12px;
  padding: 4px 18px 20px;
  overflow-x: auto;
  align-items: flex-start;
  min-height: calc(100vh - 130px);
}
.column {
  background: var(--bg-column);
  border-radius: 10px;
  min-width: 280px;
  width: 280px;
  flex: none;
  max-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s, outline-color .15s;
  outline: 2px solid transparent;
}
.column.drag-over { outline-color: var(--accent); }
.column-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px 8px;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
}
.column-header .count {
  background: var(--bg-panel);
  border-radius: 9px;
  padding: 1px 8px;
  font-size: 11.5px;
  color: var(--text-muted);
}
.column-body {
  padding: 4px 8px 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 60px;
}
.column-empty {
  text-align: center;
  color: var(--text-faint);
  font-size: 12.5px;
  padding: 18px 8px;
  border: 1.5px dashed var(--border-strong);
  border-radius: 8px;
  margin: 2px 4px;
}

.card {
  background: var(--bg-panel);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 10px 12px;
  cursor: pointer;
  transition: transform .1s, box-shadow .15s;
}
.card:hover { box-shadow: var(--shadow-lg); }
.card.dragging { opacity: .5; transform: rotate(2deg); }
.card .card-title {
  font-weight: 600;
  line-height: 1.35;
  margin: 4px 0 8px;
  word-break: break-word;
}
.card .card-top { display: flex; align-items: center; gap: 8px; }
.card .card-labels { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.card .card-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-faint);
  font-size: 12px;
}
.card .card-bottom .meta { display: inline-flex; align-items: center; gap: 3px; }
.card .card-bottom .avatar { margin-left: auto; width: 24px; height: 24px; font-size: 10px; }

/* ---------- таблица ---------- */

.table-wrap {
  margin: 4px 18px 20px;
  background: var(--bg-panel);
  border-radius: 10px;
  box-shadow: var(--shadow);
  overflow-x: auto;
}
table.bug-table { width: 100%; border-collapse: collapse; }
.bug-table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-muted);
  padding: 11px 14px;
  border-bottom: 2px solid var(--border);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.bug-table th .arrow { font-size: 10px; }
.bug-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.bug-table tbody tr { cursor: pointer; }
.bug-table tbody tr:hover { background: var(--bg-hover); }
.bug-table tbody tr:last-child td { border-bottom: none; }
.bug-table .title-cell { font-weight: 600; max-width: 420px; }
.bug-table .title-cell .labels { display: inline-flex; gap: 4px; margin-left: 8px; vertical-align: middle; }
.bug-table .who { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.bug-table .status-cell { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.bug-table .muted { color: var(--text-muted); font-size: 13px; white-space: nowrap; }

.empty-state {
  text-align: center;
  padding: 70px 20px;
  color: var(--text-muted);
}
.empty-state .big { font-size: 42px; margin-bottom: 12px; }

/* ---------- модалки ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(9, 30, 66, .55);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  z-index: 100;
  overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-panel);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 640px;
  padding: 24px;
  animation: pop .16s ease-out;
}
.modal.modal-lg { max-width: 980px; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.modal-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
}
.modal-head h2 { font-size: 18px; flex: 1; }
.modal-close {
  color: var(--text-muted);
  font-size: 20px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
}
.modal-close:hover { background: var(--bg-hover); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* ---------- зона вложений ---------- */

.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: 8px;
  padding: 14px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.drag-over { border-color: var(--accent); background: var(--accent-soft); }
.attach-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.attach-thumb {
  position: relative;
  width: 84px; height: 64px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-hover);
  cursor: pointer;
}
.attach-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.attach-thumb .file-icon {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; font-size: 10px; color: var(--text-muted); padding: 4px; gap: 3px;
  word-break: break-all; text-align: center; overflow: hidden;
}
.attach-thumb .file-icon span:first-child { font-size: 18px; }
.attach-thumb .rm {
  position: absolute;
  top: 2px; right: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}

/* ---------- детальная карточка ---------- */

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 26px;
}
@media (max-width: 760px) {
  .detail-grid { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
}

.detail-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  word-break: break-word;
  flex: 1;
  border-radius: 6px;
  padding: 2px 6px;
  margin-left: -6px;
}
.detail-title[contenteditable="true"]:hover { background: var(--bg-hover); }
.detail-title:focus { outline: 2px solid var(--accent); background: var(--bg-input); }

.detail-section { margin-bottom: 20px; }
.detail-section > h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.detail-section .edit-link { font-size: 11px; text-transform: none; letter-spacing: 0; }
.prose {
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.prose.empty-text { color: var(--text-faint); font-style: italic; }
.prose code {
  background: var(--bg-hover);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* маркдаун-контент */
.prose.md { white-space: normal; }
.prose.md p { margin: 0 0 8px; }
.prose.md h2 { font-size: 16px; margin: 14px 0 6px; }
.prose.md h3 { font-size: 14.5px; margin: 12px 0 5px; }
.prose.md h4 { font-size: 13.5px; margin: 10px 0 4px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .3px; }
.prose.md h2:first-child, .prose.md h3:first-child, .prose.md h4:first-child { margin-top: 0; }
.prose.md ul, .prose.md ol { margin: 0 0 8px 22px; }
.prose.md li { margin: 2px 0; }
.prose.md pre {
  background: var(--bg-hover);
  border-radius: 6px;
  padding: 10px 12px;
  overflow-x: auto;
  margin: 0 0 8px;
  white-space: pre;
}
.prose.md pre code { background: none; padding: 0; }
.prose.md > :last-child { margin-bottom: 0; }

/* панель форматирования */
.md-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  border: 1.5px solid var(--border-strong);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  background: var(--bg-hover);
}
.md-toolbar button {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 26px;
}
.md-toolbar button:hover { background: var(--border); color: var(--text); }
.md-toolbar button.active { background: var(--accent-soft); color: var(--accent); }
.md-toolbar .sep { width: 1px; align-self: stretch; margin: 2px 4px; background: var(--border-strong); }
.md-toolbar + .textarea, .md-toolbar ~ .md-preview { border-top-left-radius: 0; border-top-right-radius: 0; }
.md-preview {
  border: 1.5px dashed var(--border-strong);
  border-radius: 6px;
  padding: 10px 12px;
  min-height: 74px;
  background: var(--bg-input);
}

.side-field { margin-bottom: 14px; }
.side-field > label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-muted);
  margin-bottom: 5px;
}
.side-meta { font-size: 12.5px; color: var(--text-muted); line-height: 1.7; }
.labels-edit { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.labels-edit .label-chip .x { margin-left: 4px; cursor: pointer; opacity: .8; }
.labels-edit input {
  border: none; background: transparent; width: 90px; padding: 2px;
  font-size: 12px; color: var(--text);
}
.labels-edit input:focus { outline: none; }

/* ---------- комментарии и история ---------- */

.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 14px;
}
.tabs button {
  padding: 7px 14px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }

.comment { display: flex; gap: 10px; margin-bottom: 16px; }
.comment .body { flex: 1; min-width: 0; }
.comment .head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.comment .head .name { font-weight: 700; }
.comment .head .time { font-size: 12px; color: var(--text-faint); }
.comment .head .del { font-size: 12px; color: var(--text-faint); opacity: 0; transition: opacity .15s; }
.comment:hover .head .del { opacity: 1; }
.comment .del:hover { color: var(--danger); }

.activity-item {
  display: flex;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-item .time { margin-left: auto; color: var(--text-faint); font-size: 12px; white-space: nowrap; }
.activity-item b { color: var(--text); font-weight: 600; }

.comment-form { display: flex; gap: 10px; margin-top: 16px; }
.comment-form .box { flex: 1; }
.comment-form .controls { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.comment-form .hint-paste { font-size: 12px; color: var(--text-faint); }

/* ---------- лайтбокс ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  cursor: zoom-out;
  padding: 30px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; box-shadow: var(--shadow-lg); }
.lightbox .lb-name {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 13px; background: rgba(0,0,0,.5); padding: 4px 12px; border-radius: 12px;
}

/* ---------- тосты ---------- */

.toasts {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 300;
}
.toast {
  background: var(--text);
  color: var(--bg-panel);
  padding: 10px 16px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  animation: slide-in .2s ease-out;
  max-width: 360px;
}
.toast.error { background: var(--danger); color: #fff; }
@keyframes slide-in { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

.loading { text-align: center; padding: 60px; color: var(--text-muted); }
