/* Cursor-inspired: light grey canvas, white cards, black CTAs, minimal chrome */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap");

:root {
  color-scheme: light;
  --cursor-bg: #fafafa;
  --cursor-surface: #ffffff;
  --cursor-border: #ebebeb;
  --cursor-border-strong: #e0e0e0;
  --cursor-text: #111111;
  --cursor-text-secondary: #737373;
  --cursor-muted: #9ca3af;
  --cursor-hover: #f5f5f5;
  --cursor-active: #ebebeb;
  --cursor-focus-ring: rgba(17, 17, 17, 0.12);
  --radius: 8px;
  --radius-sm: 6px;
  --sidebar-width: 260px;
  --sidebar-width-collapsed: 84px;
  --content-max: 1080px;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  background: var(--cursor-bg);
  color: var(--cursor-text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.app-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 0;
  min-height: 100vh;
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: var(--sidebar-width-collapsed) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 100vh;
  background: var(--cursor-surface);
  border: none;
  border-right: 1px solid var(--cursor-border);
  border-radius: 0;
  padding: 20px 12px 16px;
  box-shadow: none;
  transition: padding 0.14s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 6px 10px;
  color: var(--cursor-text);
}

.sidebar .sidebar-collapse-toggle {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--cursor-text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  padding: 0;
}

.sidebar .sidebar-collapse-toggle:hover {
  background: var(--cursor-hover);
  color: var(--cursor-text);
  opacity: 1;
}

.sidebar .sidebar-collapse-toggle svg {
  display: block;
  transition: transform 0.14s ease;
}

body.sidebar-collapsed .sidebar-collapse-toggle svg {
  transform: rotate(180deg);
}

.sidebar-brand-mark {
  display: flex;
  flex-shrink: 0;
  color: var(--cursor-text);
  opacity: 0.92;
}

.sidebar-brand-mark svg {
  display: block;
}

.sidebar-brand-text {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.sidebar-project {
  flex-shrink: 0;
  margin-bottom: 16px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.side-nav-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 10px;
  padding-top: 0;
}

.side-nav--main > .side-nav-section:first-child {
  margin-top: 0;
}

/* Как у .project-switcher-label — единый язык подписей в сайдбаре */
.side-nav-section-title {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--cursor-text-secondary);
  padding: 0 10px 8px;
  margin: 0;
}

.side-nav--main {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-bottom: 8px;
}

.side-nav--footer {
  flex-shrink: 0;
}

.sidebar-divider {
  flex-shrink: 0;
  margin: 10px 10px 12px;
  height: 0;
  border: none;
  border-top: 1px solid var(--cursor-border);
}

.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  color: var(--cursor-text);
  border: 1px solid transparent;
  font-size: 14px;
  line-height: 1.35;
  transition: background 0.12s ease, color 0.12s ease;
}

.side-link-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  color: var(--cursor-text-secondary);
  transition: color 0.12s ease;
}

.side-link-icon svg {
  display: block;
}

.side-link-text {
  min-width: 0;
}

body.sidebar-collapsed .sidebar {
  padding-left: 8px;
  padding-right: 8px;
}

body.sidebar-collapsed .sidebar-brand {
  justify-content: center;
  padding-left: 4px;
  padding-right: 4px;
}

body.sidebar-collapsed .sidebar-brand-text,
body.sidebar-collapsed .project-switcher-label,
body.sidebar-collapsed .project-switcher,
body.sidebar-collapsed .side-nav-section-title,
body.sidebar-collapsed .side-link-text {
  display: none;
}

body.sidebar-collapsed .sidebar-project {
  margin-bottom: 10px;
}

body.sidebar-collapsed .side-nav-section {
  margin-top: 6px;
}

body.sidebar-collapsed .side-link {
  justify-content: center;
  gap: 0;
  padding-left: 0;
  padding-right: 0;
}

body.sidebar-collapsed .sidebar-divider {
  margin-left: 6px;
  margin-right: 6px;
}

.side-link:hover {
  background: var(--cursor-hover);
}

.side-link:hover .side-link-icon {
  color: var(--cursor-text);
}

.side-link.active {
  background: var(--cursor-active);
  border-color: transparent;
  color: var(--cursor-text);
}

.side-link.active .side-link-icon {
  color: var(--cursor-text);
}

.side-link--danger {
  color: var(--cursor-text-secondary);
}

.side-link--danger .side-link-icon {
  color: var(--cursor-muted);
}

.side-link--danger:hover {
  background: rgba(180, 35, 24, 0.06);
  color: #b42318;
}

.side-link--danger:hover .side-link-icon {
  color: #b42318;
}

.content {
  border: none;
  background: transparent;
  border-radius: 0;
  padding: 40px 48px;
  box-shadow: none;
  min-width: 0;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
}

/* Доска и др.: область на всю ширину колонки сетки (без max-width) */
.content.content--full-width {
  max-width: none;
  margin: 0;
}

.hero {
  margin-bottom: 24px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--cursor-text);
}

.hero p {
  margin: 0;
  color: var(--cursor-text-secondary);
  font-size: 14px;
}

.settings-form {
  display: grid;
  gap: 16px;
}

.card {
  background: var(--cursor-surface);
  border: 1px solid var(--cursor-border);
  border-radius: var(--radius);
  padding: 20px;
  display: grid;
  gap: 14px;
  box-shadow: none;
}

.card h2 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--cursor-text);
}

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--cursor-text-secondary);
}

.inline {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cursor-text);
}

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

input,
select,
textarea {
  border: 1px solid var(--cursor-border-strong);
  border-radius: var(--radius-sm);
  background: var(--cursor-surface);
  color: var(--cursor-text);
  padding: 10px 12px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #c4c4c4;
  box-shadow: 0 0 0 3px var(--cursor-focus-ring);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

button {
  border: 0;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  background: var(--cursor-text);
  color: #fff;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  box-shadow: none;
  transition: opacity 0.12s ease, background 0.12s ease;
}

button:hover:not(:disabled) {
  opacity: 0.92;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

button.is-loading {
  position: relative;
  padding-left: 34px;
}

button.is-loading::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

button.danger-outline {
  background: transparent;
  color: #b42318;
  border: 1px solid rgba(180, 35, 24, 0.35);
  box-shadow: none;
}

button.danger-outline:hover:not(:disabled) {
  background: rgba(180, 35, 24, 0.06);
  opacity: 1;
}

button.ghost {
  background: var(--cursor-surface);
  border: 1px solid var(--cursor-border-strong);
  color: var(--cursor-text);
  box-shadow: none;
}

button.ghost:hover:not(:disabled) {
  background: var(--cursor-hover);
  opacity: 1;
}

.nav-link {
  display: inline-block;
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  background: var(--cursor-surface);
  color: var(--cursor-text);
  border: 1px solid var(--cursor-border-strong);
  font-size: 13px;
}

.nav-link:hover {
  background: var(--cursor-hover);
}

.status {
  margin: 2px 0 0;
  color: var(--cursor-text-secondary);
  min-height: 1.2em;
  font-size: 13px;
}

.hint {
  margin: 0;
  font-size: 13px;
  color: var(--cursor-muted);
}

.post-list {
  display: grid;
  gap: 10px;
}

.post-item {
  border: 1px solid var(--cursor-border);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--cursor-surface);
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

.post-item h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
}

.post-item p {
  margin: 0 0 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  color: var(--cursor-text-secondary);
  font-size: 13px;
  flex-wrap: wrap;
}

/* Превью: общая max-width; картинки — полная высота без обрезки; видео — слот с contain/cover в ячейках */
.post-media-wrap {
  width: 100%;
  max-width: min(560px, 100%);
  margin: 0 0 10px;
  min-width: 0;
}

.post-preview-thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  width: 100%;
  align-items: start;
}

@media (max-width: 520px) {
  .post-preview-thumbs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.post-preview-thumb {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--cursor-border);
  width: 100%;
}

/* Изображения: без фиксированной высоты и без cover — не обрезаем сверху/снизу */
.post-preview-thumb:not(.post-preview-thumb--video) {
  height: auto;
}

.post-preview-thumb:not(.post-preview-thumb--video) img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.post-preview-thumb--video {
  position: relative;
  height: 200px;
  background: #0a0a0a;
}

.post-media-wrap--video.post-media-wrap--single .post-preview-thumb--video {
  height: auto;
  min-height: 200px;
  max-height: min(52vh, 420px);
}

.post-inline-video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 200px;
  max-height: min(52vh, 420px);
  border-radius: var(--radius);
  vertical-align: middle;
  object-fit: contain;
  background: #000;
}

.post-preview-thumbs .post-preview-thumb--video {
  height: 112px;
  min-height: 112px;
}

.post-preview-thumbs .post-inline-video {
  min-height: 112px;
  max-height: 112px;
  object-fit: cover;
}

.post-article-link {
  word-break: break-all;
}

.post-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.audio-player {
  display: none;
}

.voice-player {
  margin-top: 10px;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--cursor-border);
  border-radius: var(--radius-sm);
  padding: 8px;
  background: var(--cursor-surface);
}

.voice-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  padding: 0;
}

.voice-progress {
  width: 100%;
  accent-color: var(--cursor-text);
}

.voice-time {
  font-size: 12px;
  color: var(--cursor-text-secondary);
  min-width: 82px;
  text-align: right;
}

.voice-rate-btn {
  min-width: 64px;
}

.voice-player--board {
  margin-top: 10px;
  margin-bottom: 6px;
}

.crm-card-publish-error {
  margin: 8px 0;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(180, 35, 24, 0.35);
  background: rgba(180, 35, 24, 0.08);
  color: #b42318;
  font-size: 12px;
  line-height: 1.4;
}

.prompt-preview {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--cursor-border);
  border-radius: var(--radius-sm);
  background: var(--cursor-surface);
  color: var(--cursor-text);
  font-size: 12px;
  line-height: 1.45;
  overflow: auto;
  max-height: 320px;
}

.combo-list {
  display: grid;
  gap: 10px;
}

.combo-item {
  border: 1px solid var(--cursor-border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--cursor-surface);
}

.combo-item p {
  margin: 8px 0;
  color: var(--cursor-text);
  white-space: pre-wrap;
}

.combo-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.all-fields {
  margin-top: 10px;
}

.all-fields summary {
  cursor: pointer;
  color: var(--cursor-text-secondary);
  font-size: 13px;
}

.raw-json {
  margin: 8px 0 0;
  padding: 10px;
  border: 1px solid var(--cursor-border);
  border-radius: var(--radius-sm);
  background: var(--cursor-bg);
  color: var(--cursor-text);
  font-size: 12px;
  line-height: 1.45;
  overflow: auto;
  max-height: 280px;
  max-width: 100%;
  min-width: 0;
}

.ai-actions {
  margin-top: 10px;
}

.ai-result {
  margin: 8px 0 0;
  padding: 10px;
  border: 1px solid var(--cursor-border);
  border-radius: var(--radius-sm);
  background: var(--cursor-bg);
  color: var(--cursor-text);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  min-height: 64px;
}

.ai-review-panel {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--cursor-border);
  border-radius: var(--radius-sm);
  background: var(--cursor-surface);
}

.ai-review-panel-inner {
  display: grid;
  gap: 10px;
}

.ai-review-allow-badge {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.ai-review-allow-badge--ok {
  color: #0d6b3d;
}

.ai-review-allow-badge--no {
  color: #b42318;
}

.ai-review-recommendation {
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  color: var(--cursor-text);
}

.ai-review-meta {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.ai-review-row {
  display: grid;
  grid-template-columns: minmax(120px, 200px) 1fr;
  gap: 10px;
  font-size: 13px;
  align-items: start;
}

@media (max-width: 560px) {
  .ai-review-row {
    grid-template-columns: 1fr;
  }
}

.ai-review-label {
  color: var(--cursor-text-secondary);
  font-weight: 500;
}

.ai-review-value {
  color: var(--cursor-text);
  line-height: 1.45;
  white-space: pre-wrap;
}

.ai-publish-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.ai-publish-status {
  font-size: 13px;
  color: var(--cursor-text-secondary);
}

.notes-content {
  display: grid;
  gap: 14px;
  max-width: none;
  width: 100%;
  margin: 0;
  padding-left: 32px;
  padding-right: 32px;
  box-sizing: border-box;
}

.notes-view-switch {
  margin-top: 10px;
  display: inline-flex;
  border: 1px solid var(--cursor-border);
  border-radius: 999px;
  padding: 3px;
  background: var(--cursor-surface);
  gap: 4px;
}

.notes-view-switch__btn {
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  background: transparent;
  color: var(--cursor-text-secondary);
}

.notes-view-switch__btn.active {
  background: #111;
  color: #fff;
}

.notes-app {
  min-height: 68vh;
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(320px, 1fr) minmax(300px, 400px);
  gap: 16px;
  align-items: start;
}

.notes-app[hidden],
.notes-canvas-view[hidden] {
  display: none !important;
}

.notes-canvas-view {
  border: 1px solid var(--cursor-border);
  border-radius: var(--radius);
  background: var(--cursor-surface);
  padding: 12px;
  min-height: 420px;
}

.notes-canvas-view:fullscreen {
  padding: 12px;
  width: 100vw;
  height: 100vh;
  box-sizing: border-box;
}

.notes-canvas-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.notes-canvas-toolbar .ghost.active {
  background: #111;
  color: #fff;
}

.notes-canvas-grid {
  position: relative;
  min-height: 360px;
  user-select: none;
  border: 1px dashed var(--cursor-border);
  border-radius: 8px;
  background: #fcfcfc;
}

.notes-canvas-viewport {
  overflow: auto;
  max-height: 72vh;
  border-radius: 8px;
}

.notes-canvas-view:fullscreen .notes-canvas-viewport {
  max-height: calc(100vh - 90px);
}

.notes-canvas-arrows,
.notes-canvas-zones,
.notes-canvas-cards {
  position: absolute;
  inset: 0;
}

.notes-canvas-arrows {
  pointer-events: none;
  z-index: 1;
}

.notes-canvas-zones {
  z-index: 2;
}

.notes-canvas-cards {
  z-index: 4;
  pointer-events: none;
}

.notes-canvas-item {
  width: 280px;
  position: absolute;
  left: 0;
  top: 0;
  touch-action: none;
  will-change: transform;
  z-index: 1;
  pointer-events: auto;
}

.notes-canvas-zone {
  position: absolute;
  border: 2px dashed #93c5fd;
  background: rgba(147, 197, 253, 0.04);
  border-radius: 10px;
  min-width: 220px;
  min-height: 120px;
  padding: 8px;
  cursor: move;
}

.notes-canvas-zone.is-dragging {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
}

.notes-canvas-zone__title {
  display: inline-block;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
  cursor: text;
  position: relative;
  z-index: 2;
}

.notes-canvas-zone__resize {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 12px;
  height: 12px;
  border-right: 2px solid #3b82f6;
  border-bottom: 2px solid #3b82f6;
  border-radius: 1px;
  cursor: nwse-resize;
}

.notes-canvas-zone.is-resizing {
  border-color: #2563eb;
}

.notes-canvas-item__drag {
  position: absolute;
  right: 8px;
  top: 6px;
  z-index: 2;
  color: var(--cursor-muted);
  font-size: 14px;
  line-height: 1;
}

.notes-canvas-item__inner {
  width: 100%;
  height: 100%;
}

.notes-canvas-card {
  border: 1px solid var(--cursor-border);
  border-radius: var(--radius-sm);
  background: var(--cursor-surface);
  padding: 10px;
  height: 240px;
  display: grid;
  grid-template-rows: 86px auto 1fr auto;
  gap: 8px;
  cursor: grab;
}

.notes-canvas-card:active {
  cursor: grabbing;
}

.notes-canvas-item.is-dragging .notes-canvas-card {
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.notes-canvas-card__media {
  width: 100%;
  height: 86px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--cursor-border);
  background: #f2f2f2;
}

.notes-canvas-card__media--placeholder {
  display: grid;
  place-items: center;
  color: var(--cursor-muted);
  font-size: 12px;
}

.notes-canvas-card__title {
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notes-canvas-card__text {
  margin: 0;
  font-size: 12px;
  color: var(--cursor-text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notes-canvas-card__date {
  font-size: 11px;
  color: var(--cursor-muted);
}

.notes-sidebar {
  border: 1px solid var(--cursor-border);
  border-radius: var(--radius);
  background: var(--cursor-surface);
  padding: 12px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 10px;
  min-height: 0;
  position: sticky;
  top: 20px;
  align-self: start;
  max-height: calc(100vh - 40px);
}

.notes-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
}

/* iOS-like icon buttons (Notes toolbar) */
.notes-toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
  border: none;
  background: rgba(120, 120, 128, 0.12);
  color: #007aff;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.12s ease, color 0.15s ease;
  box-shadow: none;
}

.notes-toolbar-btn:hover:not(:disabled) {
  background: rgba(120, 120, 128, 0.18);
  opacity: 1;
}

.notes-toolbar-btn:active:not(:disabled) {
  transform: scale(0.96);
  background: rgba(120, 120, 128, 0.22);
}

.notes-toolbar-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.notes-toolbar-btn--trash {
  color: #8e8e93;
}

.notes-toolbar-btn--trash:hover:not(:disabled) {
  color: #ff3b30;
  background: rgba(255, 59, 48, 0.1);
}

.notes-toolbar-btn--trash:active:not(:disabled) {
  background: rgba(255, 59, 48, 0.16);
}

.notes-toolbar-btn--ai {
  color: #af52de;
}

.notes-toolbar-btn--ai:hover:not(:disabled) {
  color: #9333ea;
  background: rgba(175, 82, 222, 0.14);
}

.notes-toolbar-btn--ai:active:not(:disabled) {
  background: rgba(175, 82, 222, 0.2);
}

.notes-toolbar-icon {
  display: block;
  pointer-events: none;
}

.notes-list {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 0;
  max-height: min(58vh, calc(100vh - 200px));
  overflow: auto;
  padding-right: 4px;
}

.note-list-item {
  border: 1px solid var(--cursor-border);
  border-radius: var(--radius-sm);
  background: var(--cursor-surface);
  padding: 10px;
  text-align: left;
  box-shadow: none;
  color: var(--cursor-text);
  display: grid;
  gap: 4px;
}

.note-list-item__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.note-list-item__header strong {
  min-width: 0;
  flex: 1;
}

.note-board-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--cursor-border);
  color: var(--cursor-text-secondary);
  background: var(--cursor-hover);
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.3;
}

.note-board-badge--none {
  border-color: var(--cursor-border-strong);
  background: var(--cursor-hover);
  color: var(--cursor-muted);
}

.note-board-badge--review {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.note-board-badge--queue {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #b45309;
}

.note-board-badge--published {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.note-list-item strong {
  font-size: 14px;
}

.note-list-item span {
  display: block;
  font-size: 12px;
  color: var(--cursor-text-secondary);
}

.note-list-item small {
  font-size: 11px;
  color: var(--cursor-muted);
}

.note-list-item.active {
  border-color: var(--cursor-border-strong);
  background: var(--cursor-active);
}

.notes-editor {
  border: 1px solid var(--cursor-border);
  border-radius: var(--radius);
  background: var(--cursor-surface);
  padding: 14px;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.notes-preview-pane {
  position: sticky;
  top: 20px;
  align-self: start;
  min-width: 0;
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
}

.notes-preview-pane-inner {
  border: 1px solid var(--cursor-border);
  border-radius: var(--radius);
  background: var(--cursor-surface);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  flex: 1;
  max-height: inherit;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.notes-preview-hint {
  margin: 0 0 4px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--cursor-muted);
}

.notes-preview-actions {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--cursor-border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notes-send-board-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}

.notes-publish-tg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}

.notes-label {
  margin: 0;
  font-size: 13px;
  color: var(--cursor-text-secondary);
}

.notes-editor #noteTitle {
  font-size: 20px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  letter-spacing: -0.02em;
}

.notes-editor #noteBody {
  resize: vertical;
  min-height: 280px;
  line-height: 1.5;
  font-family: inherit;
}

.notes-editor-hint {
  margin: 0 0 4px;
  font-size: 12px;
  line-height: 1.4;
}

.notes-images-hint {
  margin: 6px 0 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--cursor-muted);
}

.notes-body-render {
  margin: 0;
  min-height: 120px;
  max-height: 420px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--cursor-border);
  border-radius: var(--radius-sm);
  background: var(--cursor-bg);
  color: var(--cursor-text);
  font-size: 14px;
  line-height: 1.55;
  font-family: inherit;
  white-space: normal;
}

.notes-body-render.notes-body-render--pane {
  flex: 1;
  min-height: 200px;
  max-height: min(520px, calc(100vh - 260px));
}

.notes-body-render-empty {
  margin: 0;
}

.notes-body-render-figure {
  margin: 12px 0;
  padding: 0;
}

.notes-body-render-figure--managed {
  margin: 12px 0;
}

.notes-attach-tile {
  position: relative;
  display: block;
  border-radius: var(--radius-sm);
}

.notes-attach-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(145deg, rgba(239, 68, 68, 0.96), rgba(185, 28, 28, 0.98));
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.14) inset;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    transform 0.18s cubic-bezier(0.34, 1.2, 0.64, 1),
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

.notes-attach-remove:hover {
  transform: scale(1.06);
  filter: brightness(1.05);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.24),
    0 0 0 1px rgba(255, 255, 255, 0.18) inset;
}

.notes-attach-remove:active {
  transform: scale(0.98);
}

.notes-attach-remove:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--cursor-accent, #6366f1) 85%, white);
  outline-offset: 2px;
}

.notes-attach-remove__icon {
  display: block;
  width: 14px;
  height: 14px;
  position: relative;
  pointer-events: none;
}

.notes-attach-remove__icon::before,
.notes-attach-remove__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.notes-attach-remove__icon::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.notes-attach-remove__icon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.notes-body-render-text {
  margin-top: 14px;
}

.notes-body-render-text:first-child {
  margin-top: 0;
}

.notes-body-render-img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--cursor-border);
  background: var(--cursor-surface);
}

.notes-body-render-video-wrap {
  margin: 16px 0 0;
}

.notes-body-render-video {
  display: block;
  width: 100%;
  max-height: 420px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--cursor-border);
  background: #000;
}

.notes-meta {
  margin-top: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px 12px;
  color: var(--cursor-muted);
  font-size: 12px;
  flex-wrap: wrap;
}

.notes-meta .note-board-badge {
  text-transform: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
}

.notes-editor-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--cursor-border);
}

.notes-delete-note-btn {
  align-self: flex-start;
}

.notes-ai-box {
  border: 1px solid var(--cursor-border);
  border-radius: var(--radius);
  background: var(--cursor-bg);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.notes-ai-actions {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.notes-ai-duration-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 10px 0;
}

.notes-ai-duration-wrap .notes-label {
  margin: 0;
}

.notes-ai-duration-hint {
  flex-basis: 100%;
  margin: 0;
}

.notes-ai-preview {
  margin: 0;
  border: 1px solid var(--cursor-border);
  border-radius: var(--radius-sm);
  background: var(--cursor-surface);
  padding: 10px;
  color: var(--cursor-text);
  font-size: 13px;
  line-height: 1.45;
  max-height: 240px;
  overflow: auto;
  white-space: pre-wrap;
  resize: vertical;
  min-height: 140px;
}

.notes-hidden-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.notes-upload-hint {
  margin: 0;
}

.notes-upload-status {
  margin: 0;
  min-height: 18px;
}

.notes-upload-status.is-error {
  color: #b42318;
}

.notes-upload-status.is-success {
  color: #067647;
}

.note-media-toolbar {
  border: 1px solid var(--cursor-border);
  border-radius: var(--radius);
  background: var(--cursor-bg);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.note-photo-slot {
  display: grid;
  gap: 10px;
}

.note-photo-slot__preview {
  width: 100%;
  min-height: 132px;
  border: 1px solid var(--cursor-border);
  border-radius: var(--radius);
  background: var(--cursor-surface);
  padding: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.note-photo-slot__preview:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.note-photo-slot__preview.has-image {
  border-color: var(--cursor-border-strong);
}

.note-photo-slot__img {
  width: 100%;
  height: 100%;
  min-height: 132px;
  max-height: 180px;
  object-fit: cover;
  display: block;
}

.note-photo-slot__placeholder {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: var(--cursor-muted);
  font-size: 13px;
  padding: 14px;
}

.note-photo-slot__count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(17, 17, 17, 0.8);
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  line-height: 1.4;
}

.note-photo-slot__controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.notes-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.notes-modal[hidden] {
  display: none;
}

.notes-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
}

.notes-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.notes-modal__dialog {
  position: relative;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: var(--radius);
  background: var(--cursor-surface);
  border: 1px solid var(--cursor-border);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.18);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.notes-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.notes-modal__header h2 {
  margin: 0;
  font-size: 18px;
}

.notes-image-gen-prompt {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 0.75rem;
  font: inherit;
  line-height: 1.45;
  resize: vertical;
  min-height: 6.5rem;
}

.notes-image-gen {
  border: 1px solid var(--cursor-border);
  border-radius: var(--radius);
  background: var(--cursor-bg);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.notes-image-gen-result {
  min-height: 0;
}

.notes-image-gen-preview img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--cursor-border);
  background: var(--cursor-surface);
}

.notes-image-gen-caption {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--cursor-muted);
  white-space: pre-wrap;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1100px) {
  .notes-app {
    grid-template-columns: minmax(180px, 200px) minmax(0, 1fr) minmax(240px, 300px);
  }
}

@media (max-width: 900px) {
  .notes-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .notes-app {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .notes-sidebar {
    position: static;
    max-height: none;
  }

  .notes-list {
    max-height: 280px;
  }

  .notes-preview-pane {
    position: static;
    max-height: none;
  }

  .notes-body-render.notes-body-render--pane {
    max-height: 420px;
  }
}

@media (max-width: 768px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding: 16px;
    gap: 16px;
  }

  .sidebar {
    position: static;
    height: auto;
    min-height: 0;
    border-right: none;
    border: 1px solid var(--cursor-border);
    border-radius: var(--radius);
  }

  .side-nav--main {
    flex: none;
    overflow: visible;
    max-height: none;
  }

  .content {
    padding: 0;
    max-width: none;
  }

  .content.notes-content {
    padding: 0 16px 32px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .notes-editor #noteBody {
    min-height: 280px;
  }
}

/* Статус Telegram MTProto (external-channels) */
.session-banner {
  margin-bottom: 16px;
  font-size: 15px;
  line-height: 1.5;
  border-radius: var(--radius);
  padding: 12px 14px;
}
.session-banner--warn {
  border: 1px solid rgba(200, 120, 50, 0.35);
  background: rgba(255, 250, 235, 0.95);
  color: var(--cursor-text);
}
.session-banner--ok {
  border: 1px solid rgba(60, 140, 80, 0.35);
  background: rgba(235, 248, 238, 0.95);
  font-size: 14px;
  color: var(--cursor-text);
}

/* Переключатель проекта (канала) */
.project-switcher-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--cursor-text-secondary);
  padding: 0 10px 8px;
}
.project-switcher {
  width: 100%;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--cursor-border);
  background: var(--cursor-bg);
  font: inherit;
  color: var(--cursor-text);
  cursor: pointer;
}
.project-switcher:hover {
  border-color: var(--cursor-border-strong);
}
.project-switcher:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--cursor-focus-ring);
  border-color: var(--cursor-border-strong);
}
.projects-list .project-card {
  margin-bottom: 16px;
}
.projects-list .project-card h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
}

/* Доска постов (CRM) */
.crm-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  margin-top: 8px;
}
@media (max-width: 1024px) {
  .crm-board {
    grid-template-columns: 1fr;
  }
}
.crm-column {
  background: var(--cursor-bg, #fff);
  border: 1px solid var(--cursor-border, #e0e0e0);
  border-radius: var(--radius, 8px);
  min-height: 200px;
  display: flex;
  flex-direction: column;
}
.crm-column-header {
  margin: 0;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 600;
  border-bottom: 1px solid var(--cursor-border, #e0e0e0);
  background: rgba(0, 0, 0, 0.02);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.crm-column-header__main {
  min-width: 0;
}
.crm-column-header__title {
  display: block;
  font-weight: 700;
  line-height: 1.2;
}
.crm-column-header__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.crm-stat-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.04);
  font-size: 12px;
  font-weight: 500;
  color: var(--cursor-text, #1f2937);
}
.crm-stat-chip--danger {
  color: #9b1c1c;
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.22);
}
.board-trash-btn {
  margin-top: 2px;
}
.board-stats-toolbar {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.board-stats-toolbar__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--cursor-muted, #6b7280);
}
.board-stats-toolbar__date {
  min-width: 170px;
}
@media (max-width: 1200px) {
  .crm-column-header {
    flex-direction: column;
    align-items: stretch;
  }
  .crm-column-header .ghost {
    align-self: flex-start;
  }
}
.crm-column-body {
  padding: 10px;
  flex: 1;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.crm-card {
  border: 1px solid var(--cursor-border, #ddd);
  border-radius: var(--radius-sm, 6px);
  padding: 8px;
  background: var(--cursor-bg, #fff);
  cursor: default;
}
.crm-card--create {
  min-height: 96px;
  border-style: dashed;
  background: var(--cursor-surface, #fafafa);
  color: var(--cursor-text-secondary, #667085);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  width: 100%;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.crm-card--create:hover {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.06);
  color: #2563eb;
  transform: translateY(-1px);
}
.crm-card--create:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.crm-card--create__plus {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  display: grid;
  place-items: center;
  font-size: 30px;
  line-height: 1;
}
.crm-card--create__label {
  font-size: 13px;
  font-weight: 600;
}
.crm-load-more {
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px dashed var(--cursor-border, #ddd);
  border-radius: var(--radius-sm, 6px);
  background: var(--cursor-surface, #fafafa);
  color: var(--cursor-text-secondary, #667085);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.crm-load-more:hover:not(:disabled) {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.06);
  color: #2563eb;
}
.crm-load-more:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.crm-load-more:disabled,
.crm-load-more.is-loading {
  opacity: 0.6;
  cursor: progress;
}
.crm-load-more__rest {
  font-weight: 400;
  opacity: 0.7;
  margin-left: 4px;
}
.crm-card-drag {
  cursor: grab;
  user-select: none;
  color: var(--cursor-muted);
  font-size: 16px;
  line-height: 1;
  letter-spacing: 2px;
  padding: 2px 0 6px;
  margin: -2px 0 4px;
  border-bottom: 1px dashed var(--cursor-border);
}
.crm-card-drag:active {
  cursor: grabbing;
}
.crm-card-preview {
  max-height: 140px;
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1.35;
  margin-bottom: 8px;
  border-radius: 4px;
  padding: 6px;
  background: rgba(0, 0, 0, 0.03);
}
.crm-card-preview--rich {
  max-height: none;
  overflow: visible;
  padding: 8px;
}
.crm-card-text-full {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--cursor-text);
}
.crm-card-text-p {
  margin: 0 0 10px;
}
.crm-card-text-p:last-child {
  margin-bottom: 0;
}
.crm-card-text-empty {
  margin: 0;
}

/* Слайдер медиа на доске */
.board-card-slider {
  margin-bottom: 10px;
}
.board-card-slider__viewport {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 6px;
  align-items: center;
}
.board-card-slider__arr {
  width: 28px;
  height: 36px;
  border: 1px solid var(--cursor-border);
  border-radius: var(--radius-sm);
  background: var(--cursor-surface);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--cursor-text);
  padding: 0;
}
.board-card-slider__arr:hover {
  background: var(--cursor-hover);
}
.board-card-slider__main {
  position: relative;
  min-height: 120px;
  max-height: 220px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}
.board-card-slider__main--placeholder {
  min-height: 160px;
  border: 1px dashed var(--cursor-border, #d0d0d0);
  border-radius: 12px;
  color: var(--cursor-text-secondary, #777);
  background: var(--cursor-bg, #fff);
  font-size: 14px;
}
.board-card-slider--placeholder .board-card-slider__viewport {
  grid-template-columns: 1fr;
}
.board-card-slider__thumbs--placeholder {
  min-height: 38px;
}
.board-card-slider__media {
  max-width: 100%;
  max-height: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  vertical-align: middle;
  display: block;
}
.board-card-slider__media:is(video) {
  width: 100%;
  max-height: 220px;
}
.board-card-slider__media--audio {
  width: 100%;
  max-height: 120px;
  min-height: 44px;
}
.board-card-slider__thumb--audio {
  display: flex;
  align-items: center;
  justify-content: center;
}
.board-card-slider__thumb-aud {
  font-size: 20px;
  color: var(--cursor-text-secondary);
  line-height: 1;
}
.board-card-slider__zoom {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--cursor-border);
  background: rgba(255, 255, 255, 0.92);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  color: var(--cursor-text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  padding: 0;
  z-index: 2;
}
.board-card-slider__zoom:hover {
  background: var(--cursor-surface);
}
.board-card-slider__thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  max-height: 120px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
}
.board-card-slider__thumb {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.06);
  position: relative;
}
.board-card-slider__thumb.is-active {
  border-color: var(--cursor-text);
}
.board-card-slider__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.board-card-slider__thumb-vid {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 18px;
  color: var(--cursor-text-secondary);
}
.board-card-slider__remove {
  appearance: none;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  z-index: 3;
}
.board-card-slider__remove:hover {
  background: #fff;
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
}
.board-card-slider__remove:active {
  transform: translateY(0) scale(0.98);
}
.board-card-slider__remove:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}
.board-card-slider__remove--main {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  font-size: 19px;
}
.board-card-slider__remove--thumb {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  font-size: 14px;
  padding: 0;
}

/* Полноэкранная галерея (lightbox) */
.board-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 16px 52px;
}
.board-lightbox[hidden] {
  display: none !important;
}
.board-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  cursor: pointer;
}
.board-lightbox__inner {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1400px);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  pointer-events: none;
}
.board-lightbox__inner > * {
  pointer-events: auto;
}
.board-lightbox__stage {
  flex: 1;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100% - 100px);
}
.board-lightbox__img {
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
}
.board-lightbox__video {
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
}
.board-lightbox__audio {
  width: min(100%, 560px);
  max-height: 40vh;
}
.board-lightbox__close {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 2002;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--cursor-border);
  background: var(--cursor-surface);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: var(--cursor-text);
}
.board-lightbox__nav {
  flex-shrink: 0;
  width: 44px;
  height: 56px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.board-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.22);
}
.board-lightbox__counter {
  position: absolute;
  bottom: -36px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
}
body.board-lightbox-open {
  overflow: hidden;
}
.crm-card-meta {
  font-size: 12px;
  color: var(--cursor-text-secondary, #666);
  margin-bottom: 8px;
}
.crm-card-eta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--cursor-text, #1a1a1a);
}
.crm-card-eta--ok {
  color: #1e8e3e;
}
.crm-card-eta--bad {
  color: #c62828;
  font-weight: 600;
}
.crm-card-eta__icon {
  display: inline-block;
  margin-right: 4px;
}
.crm-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.crm-empty {
  margin: 8px 0;
}

textarea.external-settings-display[readonly] {
  cursor: default;
  background: rgba(0, 0, 0, 0.03);
  color: var(--cursor-text);
}

body.modal-open {
  overflow: hidden;
}
.modal-overlay[hidden] {
  display: none !important;
}
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
}
.modal-dialog.post-edit-modal {
  width: min(1100px, 100%);
  margin: 24px auto;
  background: var(--cursor-bg, #fff);
  border-radius: var(--radius, 8px);
  border: 1px solid var(--cursor-border, #e0e0e0);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--cursor-border, #e0e0e0);
}
.modal-header h2 {
  margin: 0;
  font-size: 18px;
}
.modal-close {
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: var(--cursor-text-secondary, #666);
}
.modal-body.post-edit-modal-body {
  position: relative;
  padding: 16px 18px;
  max-height: min(70vh, 720px);
  overflow-y: auto;
}
.modal-footer.post-edit-modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--cursor-border, #e0e0e0);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.modal-footer-start,
.modal-footer-end {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.modal-footer-toolbar {
  gap: 8px;
}
.post-ai-card-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: var(--cursor-bg, #fff);
  padding: 12px 18px 18px;
  overflow-y: auto;
  border-radius: inherit;
}
.post-ai-card-overlay__verdict.crm-ai-verdict {
  margin-top: 0;
}
.post-ai-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.post-ai-compare-col {
  min-width: 0;
}
.post-ai-compare-col .telegram-post-card .board-card-slider {
  max-width: 100%;
}
@media (max-width: 900px) {
  .post-ai-compare-grid {
    grid-template-columns: 1fr;
  }
}
.post-ai-compare-col__title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--cursor-text-secondary, #555);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.telegram-post-card {
  border: 1px solid var(--cursor-border, #e6e6e6);
  border-radius: 14px;
  background: var(--cursor-surface, #fafafa);
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.telegram-post-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}
.telegram-post-card__meta {
  font-size: 13px;
  line-height: 1.35;
  color: var(--cursor-text, #111);
}
.telegram-post-card__meta strong {
  font-weight: 600;
}
.telegram-post-card__time {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--cursor-text-secondary, #666);
  white-space: nowrap;
}
.telegram-post-card__status {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--cursor-text-secondary, #666);
  line-height: 1.45;
}
.telegram-post-card__gallery {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 12px;
  margin: 0 -2px 4px;
  scrollbar-width: thin;
}
.telegram-post-card__thumb {
  height: 120px;
  width: auto;
  max-width: min(200px, 42vw);
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 0, 0, 0.06);
}
.telegram-post-card__video-wrap {
  flex-shrink: 0;
}
.telegram-post-card__video {
  height: 120px;
  width: auto;
  max-width: min(220px, 48vw);
  border-radius: 8px;
  background: #000;
  vertical-align: middle;
}
.telegram-post-card__text {
  font-size: 15px;
  line-height: 1.45;
  color: var(--cursor-text, #1a1a1a);
}
.telegram-post-card__text--editor {
  margin-top: 10px;
}
.telegram-post-card__editor-toolbar {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
  margin: 8px 0 2px;
  flex-wrap: wrap;
}
.telegram-post-card__add-photo-tile {
  appearance: none;
  width: 96px;
  height: 72px;
  border: 1.5px dashed var(--cursor-border, #cfd4dc);
  border-radius: 12px;
  background: var(--cursor-bg, #fff);
  color: var(--cursor-text-secondary, #667085);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.telegram-post-card__add-photo-tile:hover {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.06);
  color: #2563eb;
  transform: translateY(-1px);
}
.telegram-post-card__add-photo-tile:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.telegram-post-card__add-photo-plus {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  display: grid;
  place-items: center;
  font-size: 22px;
  line-height: 1;
  font-weight: 500;
}
.telegram-post-card__add-photo-label {
  font-size: 11px;
  line-height: 1.2;
}
.telegram-post-card__add-photo-tile--ai {
  border-color: rgba(124, 58, 237, 0.45);
  color: #7c3aed;
}
.telegram-post-card__add-photo-tile--ai:hover {
  border-color: #7c3aed;
  background: rgba(124, 58, 237, 0.08);
  color: #6d28d9;
}
.board-ai-image-modal {
  z-index: 12050;
}
.board-ai-image-dialog {
  width: min(560px, calc(100vw - 24px));
  max-height: min(90vh, 820px);
  display: flex;
  flex-direction: column;
}
.board-ai-image-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  flex: 1;
}
.board-ai-image-hint {
  margin: 0;
}
.board-ai-image-chat {
  flex: 1;
  min-height: 160px;
  max-height: 360px;
  overflow: auto;
  border: 1px solid var(--cursor-border, #e5e7eb);
  border-radius: 12px;
  padding: 12px;
  background: rgba(248, 250, 252, 0.9);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.board-ai-image-msg {
  max-width: 92%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
}
.board-ai-image-msg p {
  margin: 0;
}
.board-ai-image-msg--system {
  align-self: center;
  background: transparent;
  color: var(--cursor-text-secondary, #667085);
  font-size: 13px;
  padding: 0;
}
.board-ai-image-msg--user {
  align-self: flex-end;
  background: #2563eb;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.board-ai-image-msg--bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--cursor-border, #e5e7eb);
  border-bottom-left-radius: 4px;
}
.board-ai-image-preview img {
  display: block;
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 8px;
}
.board-ai-image-form textarea {
  width: 100%;
  resize: vertical;
}
.telegram-post-card__emoji-panel {
  display: grid;
  grid-template-columns: repeat(10, minmax(28px, 1fr));
  gap: 6px;
  margin: 10px 0 0;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(14px);
}
.telegram-post-card__emoji-panel[hidden] {
  display: none !important;
}
.telegram-post-card__emoji-choice {
  appearance: none;
  width: 100%;
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.telegram-post-card__emoji-choice:hover,
.telegram-post-card__emoji-choice:focus-visible {
  border-color: rgba(37, 99, 235, 0.2);
  background: rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
  outline: none;
}
.telegram-post-card__editor {
  width: 100%;
  min-height: 160px;
  border: none;
  background: transparent;
  resize: vertical;
  font: inherit;
  line-height: inherit;
  color: inherit;
  padding: 0;
  margin: 0;
  outline: none;
}
.telegram-post-card__editor::placeholder {
  color: var(--cursor-text-secondary, #8a8a8a);
}
.telegram-post-card__p {
  margin: 0 0 12px;
}
.telegram-post-card__p:last-child {
  margin-bottom: 0;
}
.telegram-post-card__empty {
  margin: 0;
  color: var(--cursor-text-secondary);
  font-size: 14px;
}
.telegram-post-card__loading {
  padding: 28px 16px;
  text-align: center;
  color: var(--cursor-text-secondary);
  font-size: 14px;
}
.post-ai-card-rec {
  margin: 14px 0 8px;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  max-height: 180px;
  overflow: auto;
  color: var(--cursor-text-secondary, #555);
}
.post-ai-card-overlay__actions {
  margin-top: 12px;
}
.post-edit-preview-wrap {
  margin: 14px 0;
}
.notes-body-render--modal {
  min-height: 80px;
  max-height: 220px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--cursor-border, #e0e0e0);
  border-radius: var(--radius-sm, 6px);
  background: rgba(0, 0, 0, 0.02);
}
.post-board-ai-preview-title {
  margin-top: 0;
}
.notes-body-render--ai {
  margin-top: 8px;
}
.crm-ai-verdict {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm, 6px);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}
.crm-ai-verdict--allow {
  border: 1px solid rgba(60, 140, 80, 0.45);
  background: rgba(235, 248, 238, 0.95);
  color: var(--cursor-text, #1a1a1a);
}
.crm-ai-verdict--deny {
  border: 1px solid rgba(180, 60, 60, 0.4);
  background: rgba(255, 240, 240, 0.95);
  color: var(--cursor-text, #1a1a1a);
}
.crm-ai-rec {
  white-space: pre-wrap;
  max-height: 200px;
  overflow: auto;
}
.crm-card-preview .notes-body-render-img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Чистка подписчиков (отдельный бот) */
.tg-cleanup-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 16px;
}
.tg-cleanup-section-head h2 {
  margin: 0;
  flex: 1 1 auto;
}
.tg-cleanup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.tg-cleanup-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tg-cleanup-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.tg-cleanup-card__head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}
.tg-cleanup-card__meta {
  margin: 0;
}
.tg-cleanup-card__status-msg {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--cursor-text-secondary, #555);
  flex: 1 1 auto;
}
.tg-cleanup-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.tg-cleanup-status {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.tg-cleanup-status--ok {
  background: rgba(60, 140, 80, 0.15);
  color: #1d6b32;
}
.tg-cleanup-status--bad {
  background: rgba(180, 60, 60, 0.12);
  color: #9b2c2c;
}
.tg-cleanup-status--warn {
  background: rgba(200, 120, 50, 0.15);
  color: #8a4f12;
}
.tg-cleanup-status--muted {
  background: rgba(0, 0, 0, 0.06);
  color: var(--cursor-text-secondary, #666);
}
.tg-cleanup-empty {
  text-align: center;
  padding: 32px 20px;
}
.tg-cleanup-empty__title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
}
.tg-cleanup-modal {
  width: min(480px, 100%);
  margin: 24px auto;
  background: var(--cursor-bg, #fff);
  border-radius: var(--radius, 8px);
  border: 1px solid var(--cursor-border, #e0e0e0);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}
.tg-cleanup-modal .modal-body {
  padding: 16px 18px;
}
.tg-cleanup-card__link {
  color: inherit;
  text-decoration: none;
}
.tg-cleanup-card__link:hover {
  text-decoration: underline;
}
.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 15px;
}
.tg-cleanup-channel-bot-status {
  margin: 8px 0 0;
}
.tg-cleanup-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.tg-cleanup-stat {
  padding: 12px;
  border-radius: var(--radius-sm, 6px);
  background: rgba(0, 0, 0, 0.04);
  text-align: center;
}
.tg-cleanup-stat__n {
  display: block;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
}
.tg-cleanup-stat__l {
  display: block;
  font-size: 13px;
  color: var(--muted, #666);
  margin-top: 4px;
}
.tg-cleanup-purge-preview {
  font-weight: 500;
  margin: 8px 0 12px;
}
.tg-cleanup-prefix-table-wrap {
  overflow-x: auto;
  max-height: min(52vh, 520px);
  overflow-y: auto;
  margin-top: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
}
.tg-cleanup-prefix-row--running td {
  background: rgba(33, 150, 243, 0.12);
}
.tg-cleanup-prefix-row--pending td {
  color: var(--muted, #666);
}
.tg-cleanup-prefix-row--dead td {
  background: rgba(244, 67, 54, 0.06);
}
.tg-cleanup-prefix-row--done td {
  background: rgba(76, 175, 80, 0.05);
}
.tg-cleanup-prefix-status {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.tg-cleanup-prefix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.tg-cleanup-prefix-table th,
.tg-cleanup-prefix-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.tg-cleanup-prefix-table th {
  font-weight: 600;
  position: sticky;
  top: 0;
  background: var(--card-bg, #fff);
}
.tg-cleanup-progress-bar {
  height: 8px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 12px;
}
.tg-cleanup-progress-bar__fill {
  height: 100%;
  width: 0;
  background: var(--accent, #2563eb);
  border-radius: 999px;
  transition: width 0.35s ease;
}
.tg-cleanup-progress {
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.5;
  margin: 0 0 12px;
}
.tg-cleanup-log {
  white-space: pre-wrap;
  max-height: 280px;
  overflow: auto;
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  background: rgba(0, 0, 0, 0.03);
  padding: 10px 12px;
  border-radius: var(--radius-sm, 6px);
}
.tg-cleanup-jobs-list ul {
  margin: 0;
  padding-left: 1.2em;
}
.tg-cleanup-jobs-list li {
  margin-bottom: 8px;
  line-height: 1.45;
}

/* Контент-план */
.content-plan-rubrics {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.content-plan-rubric-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.content-plan-rubric-row input {
  flex: 1;
}
.content-plan-rubric-remove {
  min-width: 2.5rem;
  padding: 0.35rem 0.5rem;
}
.content-plan-table-wrap {
  overflow-x: auto;
  margin-top: 12px;
}
.content-plan-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.content-plan-table th,
.content-plan-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  vertical-align: top;
}
.content-plan-table th {
  font-weight: 600;
  color: var(--muted, #64748b);
}
.content-plan-table-actions {
  white-space: nowrap;
}
.content-plan-status--done {
  color: var(--success, #15803d);
}
.content-plan-status--cancelled {
  color: var(--muted, #64748b);
  text-decoration: line-through;
}
.content-plan-dialog {
  border: none;
  border-radius: var(--radius, 10px);
  padding: 0;
  max-width: 520px;
  width: calc(100% - 32px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}
.content-plan-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}
.content-plan-dialog form {
  padding: 20px 22px 18px;
}
.content-plan-delete-btn {
  color: var(--danger, #b91c1c);
}

.cp-research-panel {
  margin-bottom: 1.25rem;
}
.cp-research-steps {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.cp-research-step {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: var(--surface-2, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  font-size: 0.92rem;
}
.cp-research-step--done {
  border-color: rgba(72, 187, 120, 0.35);
}
.cp-research-step--done .cp-research-step__icon::before {
  content: "✓";
  color: #48bb78;
}
.cp-research-step--active {
  border-color: rgba(99, 179, 237, 0.5);
  background: rgba(99, 179, 237, 0.08);
}
.cp-research-step--active .cp-research-step__icon::before {
  content: "…";
  animation: cp-pulse 1s ease infinite;
}
.cp-research-step--pending .cp-research-step__icon::before {
  content: "○";
  opacity: 0.45;
}
.cp-research-step__icon {
  flex-shrink: 0;
  width: 1.25rem;
  font-weight: 700;
}
@keyframes cp-pulse {
  50% { opacity: 0.35; }
}
.cp-research-details {
  margin-top: 0.75rem;
}
.cp-research-pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.82rem;
  max-height: 12rem;
  overflow: auto;
  padding: 0.75rem;
  background: var(--surface-2, rgba(0, 0, 0, 0.2));
  border-radius: 6px;
}
.cp-research-themes {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 280px;
  overflow: auto;
}
.cp-research-theme {
  padding: 0.65rem;
  border-radius: 6px;
  background: var(--surface-2, rgba(255, 255, 255, 0.03));
  font-size: 0.88rem;
}
.cp-research-theme p {
  margin: 0.35rem 0 0;
  opacity: 0.9;
}
.cp-requirements-json {
  width: 100%;
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  line-height: 1.45;
}

.cp-research-board {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.1));
}
.cp-research-hero {
  margin-bottom: 1.25rem;
}
.cp-research-hero__label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}
.cp-research-hero__text {
  width: 100%;
  font-size: 1rem;
  line-height: 1.5;
  resize: vertical;
}
.cp-research-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: start;
}
@media (max-width: 1100px) {
  .cp-research-cols {
    grid-template-columns: 1fr;
  }
}
.cp-research-col {
  background: var(--surface-2, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 10px;
  padding: 1rem;
  min-height: 200px;
}
.cp-research-col__title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}
.cp-research-col__hint {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  opacity: 0.75;
}
.cp-research-col__body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 420px;
  overflow-y: auto;
}
.cp-info-card {
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.15);
}
.cp-info-card--muted {
  opacity: 0.92;
}
.cp-info-card__label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.7;
  margin-bottom: 0.35rem;
}
.cp-info-card__text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}
.cp-theme-card {
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  background: rgba(0, 0, 0, 0.12);
}
.cp-theme-card h4 {
  margin: 0.35rem 0 0.4rem;
  font-size: 0.95rem;
}
.cp-theme-card p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  opacity: 0.92;
}
.cp-theme-badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-weight: 600;
}
.cp-theme-badge--study { background: rgba(99, 179, 237, 0.25); }
.cp-theme-badge--news { background: rgba(72, 187, 120, 0.25); }
.cp-theme-badge--book { background: rgba(237, 137, 54, 0.25); }
.cp-theme-badge--lifehack { background: rgba(159, 122, 234, 0.25); }
.cp-theme-badge--expert { background: rgba(246, 224, 94, 0.2); }
.cp-theme-action {
  margin-top: 0.5rem !important;
  font-size: 0.85rem !important;
}
.cp-link {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: 0.82rem;
}
.cp-metric-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.cp-metric-tile {
  text-align: center;
  padding: 0.55rem 0.35rem;
  border-radius: 8px;
  background: rgba(99, 179, 237, 0.12);
}
.cp-metric-tile__n {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
}
.cp-metric-tile__l {
  display: block;
  font-size: 0.72rem;
  opacity: 0.8;
}
.cp-metric-line {
  font-size: 0.88rem;
  margin: 0 0 0.75rem;
}
.cp-subheading {
  margin: 0.75rem 0 0.4rem;
  font-size: 0.88rem;
}
.cp-rubric-order {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.88rem;
}
.cp-rubric-order li {
  margin-bottom: 0.45rem;
}
.cp-muted {
  opacity: 0.75;
  font-size: 0.82rem;
}
.cp-bullet-list {
  margin: 0.25rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.88rem;
}
.cp-empty {
  margin: 0;
  opacity: 0.6;
  font-size: 0.88rem;
}
.cp-week-plan {
  margin-top: 1.5rem;
}
.cp-week-plan__title {
  margin: 0 0 0.35rem;
}
.cp-week-wait {
  grid-column: 1 / -1;
  text-align: center;
  padding: 1.5rem;
  opacity: 0.8;
  font-size: 0.95rem;
}
.cp-week-plan-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.65rem;
  margin-top: 0.75rem;
}
@media (max-width: 1200px) {
  .cp-week-plan-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 800px) {
  .cp-week-plan-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .cp-week-plan-grid {
    grid-template-columns: 1fr;
  }
}
.cp-week-day {
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 10px;
  padding: 0.65rem;
  background: var(--surface-2, rgba(255, 255, 255, 0.04));
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.cp-week-day__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.15rem;
}
.cp-week-day__name {
  font-weight: 700;
  font-size: 0.88rem;
}
.cp-week-time {
  width: 4.2rem;
  font-size: 0.78rem;
  padding: 0.2rem 0.35rem;
  text-align: center;
}
.cp-week-label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.85;
}
.cp-week-label textarea,
.cp-week-label input {
  font-size: 0.82rem;
  font-weight: 400;
  width: 100%;
}
.cp-week-label textarea {
  resize: vertical;
  min-height: 3.5rem;
}
.cp-tech-json {
  margin-top: 1rem;
  font-size: 0.85rem;
  opacity: 0.85;
}
.cp-research-save-bar {
  margin-top: 1rem;
}

/* —— Collected content week board (Bot Studio light) —— */
.cp-collected-page .hero {
  margin-bottom: 4px;
}
.cp-collected-page .hero p {
  max-width: 52rem;
  color: var(--cursor-text-secondary);
}

.cc-toolbar {
  margin-bottom: 0;
}
.cc-toolbar__main {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.cc-toolbar__picker-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--cursor-text-secondary);
  margin-bottom: 6px;
}
.cc-week-picker__input {
  min-width: 148px;
  font-weight: 500;
}
.cc-toolbar__actions {
  flex-shrink: 0;
}
.cc-toolbar__status {
  margin-top: 12px;
  font-weight: 500;
}
.cc-toolbar__hint {
  margin-top: 4px;
  color: var(--cursor-text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.cc-week-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--cursor-border);
}
.cc-week-progress__track {
  flex: 1;
  height: 6px;
  background: var(--cursor-hover);
  border-radius: 999px;
  overflow: hidden;
}
.cc-week-progress__fill {
  height: 100%;
  width: 0;
  background: var(--cursor-text);
  border-radius: 999px;
  transition: width 0.35s ease;
}
.cc-week-progress__label {
  font-size: 12px;
  font-weight: 500;
  color: var(--cursor-text-secondary);
  white-space: nowrap;
}

.cc-week-board {
  margin-top: 16px;
  min-width: 0;
}

.cp-collected-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(220px, 1fr));
  gap: 12px;
  align-items: start;
}
@media (max-width: 1600px) {
  .cc-week-board {
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }
  .cp-collected-week-grid {
    min-width: min(100%, 1680px);
  }
}
@media (max-width: 900px) {
  .cp-collected-week-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    min-width: 0;
  }
}
@media (max-width: 560px) {
  .cp-collected-week-grid {
    grid-template-columns: 1fr;
  }
}

.cp-collected-day-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  background: var(--cursor-surface);
  border: 1px solid var(--cursor-border);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.04);
}
.cp-collected-day-column--done {
  border-color: #c6e7d0;
  box-shadow: 0 1px 2px rgba(34, 84, 48, 0.06);
}
.cp-collected-day-column__head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--cursor-border);
}
.cc-day-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.cc-day-badge {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.02em;
  background: var(--cursor-hover);
  border: 1px solid var(--cursor-border);
  border-radius: var(--radius-sm);
  color: var(--cursor-text);
}
.cp-collected-day-column--done .cc-day-badge {
  background: #ecfdf3;
  border-color: #bbf7d0;
  color: #166534;
}
.cc-day-title__text {
  min-width: 0;
}
.cp-collected-day__name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.cp-collected-day__date {
  display: block;
  font-size: 12px;
  color: var(--cursor-text-secondary);
  margin-top: 2px;
}
.cc-day-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cc-day-progress__count {
  font-size: 11px;
  font-weight: 600;
  color: var(--cursor-text-secondary);
  min-width: 2.5rem;
}
.cc-day-progress__bar {
  flex: 1;
  height: 4px;
  background: var(--cursor-hover);
  border-radius: 999px;
  overflow: hidden;
}
.cc-day-progress__fill {
  display: block;
  height: 100%;
  background: var(--cursor-text);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.cp-collected-day-column--done .cc-day-progress__fill {
  background: #22c55e;
}

.cp-collected-day-column__slots {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.cc-day-regen {
  width: 100%;
  margin-top: auto;
  font-size: 13px;
}

.cp-collected-slot {
  position: relative;
  border: 1px solid var(--cursor-border);
  border-radius: var(--radius-sm);
  padding: 10px 10px 10px 14px;
  background: var(--cursor-bg);
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cp-collected-slot:hover {
  border-color: var(--cursor-border-strong);
  box-shadow: 0 2px 8px rgba(17, 17, 17, 0.06);
}
.cc-slot-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--cursor-muted);
}
.cp-collected-slot--type-news_short .cc-slot-accent { background: #3b82f6; }
.cp-collected-slot--type-analytical .cc-slot-accent { background: #8b5cf6; }
.cp-collected-slot--type-trends .cc-slot-accent { background: #10b981; }
.cp-collected-slot--type-expert .cc-slot-accent { background: #f59e0b; }
.cp-collected-slot--type-digest .cc-slot-accent { background: #64748b; }
.cp-collected-slot--ready {
  border-color: #bbf7d0;
  background: #fafdfb;
}
.cp-collected-slot--failed {
  border-color: #fecaca;
  background: #fffbfb;
}
.cp-collected-slot--busy {
  border-color: #bfdbfe;
  background: #f8fafc;
}
.cp-collected-slot__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.cc-slot-headline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.cc-slot-type {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--cursor-text);
}
.cc-slot-time {
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--cursor-text-secondary);
}
.cp-collected-slot__purpose {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--cursor-text-secondary);
}
.cc-slot-topic {
  padding: 8px 10px;
  background: var(--cursor-surface);
  border: 1px solid var(--cursor-border);
  border-radius: var(--radius-sm);
}
.cc-slot-topic__lbl {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cursor-muted);
  margin-bottom: 4px;
}
.cc-slot-topic p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 500;
  color: var(--cursor-text);
}
.cc-slot-query {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--cursor-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cc-slot-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cc-slot-meta-chip {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--cursor-hover);
  color: var(--cursor-text-secondary);
}
.cc-slot-placeholder {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border: 1px dashed var(--cursor-border-strong);
  border-radius: var(--radius-sm);
  background: var(--cursor-surface);
  font-size: 12px;
  color: var(--cursor-muted);
  text-align: center;
}
.cc-slot-placeholder__pulse {
  color: #2563eb;
  font-weight: 500;
  animation: cc-pulse-text 1.2s ease infinite;
}
@keyframes cc-pulse-text {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.cp-collected-post--slot {
  max-height: 200px;
  font-size: 13px;
  line-height: 1.5;
}
.cp-collected-slot__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  margin-top: 2px;
  border-top: 1px solid var(--cursor-border);
  font-size: 12px;
}
.cc-slot-link {
  margin-right: auto;
  font-weight: 500;
}
.cp-collected-day {
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 10px;
  padding: 0.75rem;
  background: var(--surface-2, rgba(255, 255, 255, 0.03));
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 220px;
}
.cp-collected-day--ready {
  border-color: rgba(72, 187, 120, 0.35);
}
.cp-collected-day--failed {
  border-color: rgba(245, 101, 101, 0.4);
}
.cp-collected-day--searching,
.cp-collected-day--drafting {
  border-color: rgba(99, 179, 237, 0.45);
}
.cp-collected-day__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.35rem;
}
.cp-collected-day__name {
  display: block;
  font-size: 0.95rem;
}
.cp-collected-day__date {
  font-size: 0.78rem;
  opacity: 0.7;
}
.cp-collected-status {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
}
.cp-collected-status--ready {
  background: #ecfdf3;
  color: #166534;
  border-color: #bbf7d0;
}
.cp-collected-status--failed {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
.cp-collected-status--pending {
  background: var(--cursor-hover);
  color: var(--cursor-text-secondary);
  border-color: var(--cursor-border);
}
.cp-collected-status--searching,
.cp-collected-status--drafting {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.cp-collected-rubric {
  margin: 0;
  font-weight: 600;
  font-size: 0.85rem;
}
.cp-collected-focus {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--cursor-text-secondary);
  padding: 6px 8px;
  background: var(--cursor-hover);
  border-radius: var(--radius-sm);
}
.cc-day-focus-lbl {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cursor-muted);
  margin-right: 4px;
}
.cp-collected-tasks {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.78rem;
  opacity: 0.85;
}
.cp-collected-meta {
  margin: 0;
  font-size: 0.75rem;
  opacity: 0.75;
}
.cp-collected-meta__lbl {
  font-weight: 600;
}
.cp-collected-kind {
  display: inline-flex;
  align-self: flex-start;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
}
.cp-collected-kind--external {
  background: #eff6ff;
  color: #1e40af;
}
.cp-collected-kind--internal {
  background: #fff7ed;
  color: #c2410c;
}
.cp-collected-kind--engagement {
  background: #f5f3ff;
  color: #6d28d9;
}
.cp-collected-kind--media {
  background: #ecfdf5;
  color: #047857;
}
.cp-collected-error {
  margin: 0;
  color: #b91c1c;
  font-size: 12px;
  line-height: 1.4;
  padding: 6px 8px;
  background: #fef2f2;
  border-radius: var(--radius-sm);
}
.cp-collected-post {
  flex: 1;
  font-size: 13px;
  line-height: 1.5;
  max-height: 280px;
  overflow-y: auto;
  white-space: pre-wrap;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--cursor-surface);
  border: 1px solid var(--cursor-border);
  color: var(--cursor-text);
}
.cp-collected-post--slot {
  scrollbar-width: thin;
}
.cp-collected-wait {
  margin: 0;
  color: var(--cursor-muted);
  font-size: 13px;
}
.cp-collected-day__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-top: auto;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}
.cp-collected-time {
  font-size: 0.78rem;
  opacity: 0.8;
}

.content-plan-ai-panel {
  margin-top: 8px;
}
.content-plan-ai-panel .cp-ai-steps {
  margin: 0 0 12px;
  padding-left: 1.2em;
  line-height: 1.5;
}
.content-plan-ai-panel .cp-ai-steps li {
  margin-bottom: 4px;
}
.content-plan-ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.content-plan-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.content-plan-tabs button.active {
  font-weight: 600;
  border-color: var(--accent, #2563eb);
}
.content-plan-tab-panel[hidden] {
  display: none;
}
.cp-ai-snapshot-preview {
  font-size: 13px;
  max-height: 200px;
  overflow: auto;
  background: rgba(0, 0, 0, 0.03);
  padding: 10px 12px;
  border-radius: var(--radius-sm, 6px);
  white-space: pre-wrap;
  word-break: break-word;
}

.cp-ai-day-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: flex-end;
  margin-bottom: 12px;
}
.cp-ai-day-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  min-width: 160px;
}
.cp-ai-day-label input {
  max-width: 200px;
}
.cp-ai-manage-link {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
}
.cp-ai-section-title {
  font-size: 1.05rem;
  margin: 20px 0 8px;
}
.cp-ai-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 12px 0 8px;
}
@media (max-width: 1024px) {
  .cp-ai-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .cp-ai-cards-grid {
    grid-template-columns: 1fr;
  }
}
.cp-ai-card {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius-md, 10px);
  padding: 14px 14px 12px;
  background: var(--card-bg, #fff);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 140px;
}
.cp-ai-card--applied {
  border-color: #86efac;
  background: rgba(34, 197, 94, 0.06);
}
.cp-ai-card--ignored {
  opacity: 0.55;
}
.cp-ai-card--slot {
  border-color: #93c5fd;
  background: rgba(37, 99, 235, 0.04);
}
.cp-ai-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cp-ai-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
}
.cp-ai-badge--crit {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}
.cp-ai-badge--id {
  font-family: ui-monospace, monospace;
  font-size: 10px;
  background: rgba(0, 0, 0, 0.04);
}
.cp-ai-badge--section {
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
}
.cp-ai-card__meta--warn {
  color: #b45309;
}
.cp-ai-badge--status {
  background: rgba(0, 0, 0, 0.04);
}
.cp-ai-card__title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  line-height: 1.35;
}
.cp-ai-card__summary {
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
  color: var(--muted, #64748b);
  flex: 1;
}
.cp-ai-card__post {
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm, 6px);
  background: rgba(0, 0, 0, 0.04);
  white-space: pre-wrap;
  word-break: break-word;
  flex: 1;
  max-height: 320px;
  overflow-y: auto;
}
.cp-ai-card__meta {
  margin: 0;
  font-size: 12px;
}
.cp-ai-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 4px;
}
.cp-ai-approve-idea-btn {
  flex: 1;
  min-width: 100px;
  font-weight: 600;
}
.cp-ai-primary-btn {
  font-weight: 600;
}
.cp-trends-page .cp-trends-panel {
  margin-top: 0;
}
.cp-ai-card--on-board {
  border-color: #93c5fd;
  background: rgba(37, 99, 235, 0.06);
}
.cp-ai-send-board-btn {
  flex: 1;
  min-width: 140px;
  font-weight: 600;
}

/* Trends module (TZ_trends.md) */
.tr-page .hero {
  margin-bottom: 1rem;
}
.tr-page__hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.tr-page__hero-actions {
  margin: 0;
}
.tr-tracks-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.85rem;
}
.tr-section-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}
.tr-track-tile-wrap {
  position: relative;
  min-height: 148px;
}
.tr-track-tile-wrap--active .tr-track-tile--select {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.05);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.25);
}
.tr-track-tile--select {
  width: 100%;
  height: 100%;
  min-height: 148px;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.tr-track-tile__edit {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--border, #e5e7eb);
  background: #fff;
  color: #374151;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.tr-track-tile__edit:hover {
  border-color: #93c5fd;
  color: #2563eb;
}
.tr-track-tile--add {
  font: inherit;
  cursor: pointer;
}
.tr-settings-dialog {
  max-width: min(720px, calc(100vw - 32px));
  width: calc(100% - 32px);
}
.content-plan-dialog.tr-settings-dialog form {
  padding: 0;
}
.tr-settings-dialog__form {
  display: flex;
  flex-direction: column;
  max-height: min(90vh, 900px);
  padding: 0;
}
.tr-settings-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 18px 22px 12px;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.tr-settings-dialog__header h2 {
  margin: 0;
  font-size: 1.15rem;
}
.tr-settings-dialog__close {
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.2rem 0.55rem;
}
.tr-settings-dialog__body {
  padding: 16px 22px;
  overflow-y: auto;
  flex: 1;
}
.tr-settings-dialog__footer {
  padding: 12px 22px 18px;
  border-top: 1px solid var(--border, #e5e7eb);
}
.tr-settings-dialog__delete {
  color: var(--danger, #b91c1c);
  margin-left: auto;
}
.tr-settings-dialog__footer .actions {
  flex-wrap: wrap;
}
.tr-ru-hint {
  margin: 0;
}
.tr-tracks-grid__inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.85rem;
}
.tr-track-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.35rem;
  min-height: 148px;
  padding: 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border, #e5e7eb);
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.tr-track-tile:hover {
  border-color: #93c5fd;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}
.tr-track-tile--active {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.05);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.25);
}
.tr-track-tile--add {
  align-items: center;
  justify-content: center;
  border-style: dashed;
  color: #6b7280;
  background: #fafafa;
}
.tr-track-tile--add:hover {
  color: #2563eb;
  border-color: #93c5fd;
}
.tr-track-tile__icon {
  font-size: 1.1rem;
  color: #2563eb;
  opacity: 0.85;
}
.tr-track-tile__plus {
  font-size: 1.75rem;
  line-height: 1;
  font-weight: 300;
}
.tr-track-tile__title {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
}
.tr-track-tile__meta {
  font-size: 0.78rem;
  color: #6b7280;
}
.tr-track-tile__badge {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  min-width: 1.4rem;
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}
.tr-track-detail__head,
.tr-settings-detail .tr-track-detail__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.tr-panel--nested {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border, #e5e7eb);
}
.tr-panel--nested:first-of-type {
  border-top: none;
  padding-top: 0;
}
.tr-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.tr-panel__title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}
.tr-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
}
.tr-form-grid__full {
  grid-column: 1 / -1;
}
.tr-form-grid__check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  align-self: end;
}
.tr-form-actions {
  margin-top: 1rem;
}
.tr-results__head h2 {
  margin: 0 0 0.35rem;
}
.tr-meta {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: rgba(46, 144, 250, 0.06);
  border: 1px solid rgba(46, 144, 250, 0.2);
}
.tr-meta__grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
  margin: 0;
  font-size: 0.9rem;
}
.tr-meta__grid dt {
  color: #6b7280;
  font-weight: 600;
}
.tr-meta__grid dd {
  margin: 0;
}
.tr-trends-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.tr-trend-card {
  padding: 0.85rem 1rem;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  background: #fff;
}
.tr-trend-card__head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}
.tr-trend-card__title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}
.tr-trend-card__score {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
}
.tr-trend-card__meta {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: #6b7280;
}
.tr-trend-card__snippet {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: #374151;
}
@media (max-width: 720px) {
  .tr-form-grid {
    grid-template-columns: 1fr;
  }
}

/* Content Strategy (TZ v3) */
.cs-page .cs-section-title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}
.cs-form-hint {
  margin: -0.5rem 0 1rem;
}
/* Аида — чат-помощник (светлая тема) */
.cs-aida {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1200;
  font-size: 0.9rem;
  color: #1f2937;
}
.cs-aida-fab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #2e90fa);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(46, 144, 250, 0.35);
}
.cs-aida-fab:hover {
  filter: brightness(1.05);
}
.cs-aida-fab--active {
  background: #4b5563;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.cs-aida-fab--unread::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #fff;
}
.cs-aida-fab__icon {
  font-size: 1.1rem;
}
.cs-aida-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.65rem);
  width: min(380px, calc(100vw - 2rem));
  max-height: min(520px, calc(100vh - 6rem));
  flex-direction: column;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #1f2937;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.14);
  overflow: hidden;
}
.cs-aida-panel[hidden] {
  display: none !important;
}
.cs-aida-panel--open,
.cs-aida-panel:not([hidden]) {
  display: flex;
}
.cs-aida-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}
.cs-aida-panel__title {
  display: block;
  font-size: 1rem;
  color: #111827;
}
.cs-aida-panel__sub {
  display: block;
  font-size: 0.75rem;
  margin-top: 0.15rem;
  color: #6b7280;
}
.cs-aida-close {
  border: none;
  background: #e5e7eb;
  color: #374151;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  flex-shrink: 0;
}
.cs-aida-close:hover {
  background: #d1d5db;
}
.cs-aida-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 200px;
  background: #ffffff;
}
.cs-aida-msg {
  max-width: 92%;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.45;
}
.cs-aida-msg--user {
  align-self: flex-end;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a5f;
}
.cs-aida-msg--aida {
  align-self: flex-start;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #374151;
}
.cs-aida-msg--status {
  align-self: flex-start;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 0.82rem;
}
.cs-aida-msg__who {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.65;
  margin-bottom: 0.25rem;
}
.cs-aida-status {
  margin: 0;
  padding: 0 0.75rem;
  min-height: 1.1rem;
  color: #6b7280;
}
.cs-aida-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}
.cs-aida-input {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #ffffff;
  color: #1f2937;
  font: inherit;
  resize: vertical;
  box-sizing: border-box;
}
.cs-aida-input::placeholder {
  color: #9ca3af;
}
.cs-aida-send {
  align-self: flex-end;
}
@media (max-width: 480px) {
  .cs-aida {
    right: 0.75rem;
    bottom: 0.75rem;
  }
  .cs-aida-panel {
    width: calc(100vw - 1.5rem);
  }
  .cs-aida-fab__label {
    display: none;
  }
}
.cs-intake {
  margin-bottom: 1.25rem;
}
.cs-intake__label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
}
.cs-intake__textarea {
  width: 100%;
  min-height: 6rem;
  margin-top: 0.5rem;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  background: var(--surface-2, rgba(255, 255, 255, 0.03));
  color: inherit;
  font: inherit;
  resize: vertical;
  box-sizing: border-box;
}
.cs-intake__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.cs-intake__result {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  background: var(--surface-2, rgba(46, 144, 250, 0.06));
  border: 1px solid var(--border, rgba(46, 144, 250, 0.2));
}
.cs-intake__result-title {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
}
.cs-intake__explanation {
  margin: 0 0 0.75rem;
  line-height: 1.5;
}
.cs-intake__hints {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.88rem;
}
.cs-intake__hints li {
  margin-bottom: 0.35rem;
}
.cs-intake-divider {
  border: none;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  margin: 0 0 1.25rem;
}
.cs-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
}
.cs-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
}
.cs-form-span2 {
  grid-column: 1 / -1;
}
.cs-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.25rem;
}
.cs-draft-status {
  margin: 0;
  flex: 1 1 12rem;
}
.cs-ghost-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  z-index: 10050;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.cs-ghost-cursor--visible {
  opacity: 1;
}
.cs-ghost-cursor__ring {
  position: absolute;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  border: 2px solid rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.12);
  animation: csGhostPulse 1.2s ease-in-out infinite;
}
.cs-ghost-cursor__dot {
  position: absolute;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: #6366f1;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
@keyframes csGhostPulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.15); opacity: 1; }
}
.cs-ghost-target--active {
  outline: 2px solid rgba(99, 102, 241, 0.65);
  outline-offset: 3px;
  transition: outline-color 0.15s ease, box-shadow 0.15s ease;
}
.cs-ghost-target--click {
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.22);
  transform: scale(0.985);
}
.cs-ghost-target--fill {
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
  transition: box-shadow 0.3s ease;
}
.cs-form-error {
  color: var(--danger, #b42318);
  margin-top: 0.75rem;
}
.cs-result-card {
  margin-top: 1rem;
}
.cs-block {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}
.cs-block:last-child {
  border-bottom: none;
}
.cs-type-grid,
.cs-campaign-grid,
.cs-slot-grid {
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 900px) {
  .cs-type-grid { grid-template-columns: repeat(3, 1fr); }
  .cs-campaign-grid { grid-template-columns: repeat(3, 1fr); }
  .cs-slot-grid { grid-template-columns: repeat(2, 1fr); }
}
.cs-type-card,
.cs-campaign-card,
.cs-slot-card {
  padding: 0.75rem;
  border-radius: 8px;
  background: var(--surface-2, rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}
.cs-campaign-card {
  border-width: 2px;
}
.cs-slot-card time {
  display: block;
  font-size: 0.78rem;
  opacity: 0.75;
  margin-bottom: 0.35rem;
}
.cs-json-details {
  margin-top: 1rem;
}
.cs-result-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.cs-result-toolbar .cs-section-title {
  margin: 0;
}
.cs-levels {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.cs-level-card {
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 10px;
  padding: 1rem;
  background: var(--surface-2, rgba(255, 255, 255, 0.02));
}
.cs-level-card--locked {
  opacity: 0.72;
}
.cs-level-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.cs-level-card__head h3 {
  margin: 0;
  font-size: 1rem;
}
.cs-level-card__foot {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.08));
}
.cs-level-lock {
  margin: 0 0 0.5rem;
}
.cs-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.cs-badge--active,
.cs-badge--draft {
  background: rgba(46, 144, 250, 0.15);
  color: var(--accent, #2e90fa);
}
.cs-badge--muted,
.cs-badge--archived {
  background: rgba(255, 255, 255, 0.06);
  opacity: 0.85;
}
.cs-history-card {
  margin-top: 1rem;
}
.cs-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.cs-history-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}
.cs-history-item:hover {
  background: var(--surface-2, rgba(255, 255, 255, 0.04));
}
.cs-history-item__date {
  font-size: 0.78rem;
  opacity: 0.7;
}
.cs-history-view__bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.cs-history-view__body {
  max-height: 70vh;
  overflow: auto;
}
.cs-calendar-card {
  margin-top: 1rem;
}
.cs-cal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.cs-cal-nav__btn {
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 0.85rem;
}
.cs-cal-nav__btn[data-cal-active] {
  background: var(--accent, #2e90fa);
  border-color: transparent;
  color: #fff;
}
.cs-cal-view__title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}
.cs-cal-targets {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}
.cs-cal-timeline {
  position: relative;
  margin-bottom: 1rem;
  padding-top: 1.5rem;
}
.cs-cal-ruler {
  position: relative;
  height: 1.25rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.1));
}
.cs-cal-ruler__day {
  position: absolute;
  transform: translateX(-50%);
  font-size: 0.65rem;
  opacity: 0.65;
}
.cs-cal-track {
  position: relative;
  min-height: 3.5rem;
  background: var(--surface-2, rgba(255, 255, 255, 0.03));
  border-radius: 8px;
}
.cs-cal-track--month {
  min-height: 4.5rem;
}
.cs-cal-bar {
  position: absolute;
  top: 0.35rem;
  height: 1.75rem;
  border-radius: 4px;
  font-size: 0.72rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #fff;
  padding: 0.15rem 0.4rem;
  box-sizing: border-box;
}
.cs-cal-bar--week {
  position: static;
  height: 0.35rem;
  margin-bottom: 0.25rem;
  border-radius: 2px;
  padding: 0;
}
.cs-cal-bar__label small {
  opacity: 0.85;
}
.cs-cal-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.5rem;
}
@media (max-width: 900px) {
  .cs-cal-week-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.cs-cal-week-col {
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  padding: 0.5rem;
  min-height: 8rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.cs-cal-week-col__head {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
}
.cs-cal-week-slots {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.cs-cal-slot-chip {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.35rem 0.5rem;
  border: none;
  border-left: 3px solid #888;
  border-radius: 4px;
  background: var(--surface-2, rgba(255, 255, 255, 0.04));
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
}
.cs-cal-slot-chip time {
  opacity: 0.75;
  margin-right: 0.25rem;
}
.cs-cal-day-open {
  margin-top: auto;
  font-size: 0.75rem;
  padding: 0.25rem;
  border: none;
  background: transparent;
  color: var(--accent, #2e90fa);
  cursor: pointer;
  text-align: left;
}
.cs-cal-hours {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 1rem;
}
.cs-cal-hour-row {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 0.5rem;
  align-items: start;
  min-height: 2rem;
}
.cs-cal-hour-label {
  font-size: 0.75rem;
  opacity: 0.65;
  padding-top: 0.25rem;
}
.cs-cal-hour-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.cs-cal-day-report {
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  padding-top: 1rem;
}
.cs-cal-day-report h4,
.cs-cal-day-report h5 {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.9rem;
}
.cs-cal-slot-card__inner {
  padding: 1rem;
  border-radius: 8px;
  background: var(--surface-2, rgba(255, 255, 255, 0.03));
}
.cs-cal-view--slot .cs-cal-slot-back {
  margin-bottom: 0.75rem;
}
@media (max-width: 720px) {
  .cs-form-grid {
    grid-template-columns: 1fr;
  }
}

/* Товары / услуги */
.products-toolbar {
  margin-bottom: 1rem;
  padding: 12px 16px;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.products-card {
  margin: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.products-card--add {
  border-style: dashed;
  border-color: var(--cursor-border, #d0d5dd);
  background: var(--cursor-surface, #fafafa);
  color: var(--cursor-text-secondary, #667085);
  cursor: pointer;
  text-align: left;
  font: inherit;
  width: 100%;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.products-card--add:hover {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.06);
  color: #2563eb;
  transform: translateY(-1px);
}
.products-card--add:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}
.products-card__img--add {
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px dashed var(--cursor-border, #e5e7eb);
  background: transparent;
}
.products-card--add__plus {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1.5px solid currentColor;
  display: grid;
  place-items: center;
  font-size: 32px;
  line-height: 1;
  font-weight: 300;
}
.products-card--add__label {
  font-size: 13px;
  font-weight: 600;
  color: inherit;
}
.products-card__skeleton {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: var(--cursor-border, #e5e7eb);
  opacity: 0.55;
}
.products-card--add:hover .products-card__skeleton {
  background: rgba(37, 99, 235, 0.2);
  opacity: 0.85;
}
.products-card__skeleton--desc {
  width: 100%;
  margin-bottom: 8px;
}
.products-card__skeleton--short {
  width: 72%;
  margin-bottom: 12px;
}
.products-card__skeleton--price {
  width: 38%;
  height: 14px;
}
.products-card__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  background: var(--surface-2, #f3f4f6);
}
.products-card__img--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted, #6b7280);
  font-size: 14px;
}
.products-card__body {
  padding: 14px 16px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.products-card__desc {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
  font-size: 14px;
}
.products-card__price {
  margin: 0;
  font-weight: 600;
  font-size: 16px;
}
.products-card__price--sale {
  color: var(--danger, #b91c1c);
}
.products-card__price--old {
  font-weight: 400;
  font-size: 14px;
  color: var(--muted, #6b7280);
  text-decoration: line-through;
}
.products-card__price--empty {
  font-weight: 400;
  font-size: 13px;
  color: var(--muted, #6b7280);
}
.products-card__actions {
  padding: 0 16px 14px;
}
.modal-overlay--center {
  align-items: center;
}
.products-modal {
  width: min(520px, 100%);
  margin: 0 auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 48px);
  background: var(--cursor-bg, #fff);
  border-radius: var(--radius, 8px);
  border: 1px solid var(--cursor-border, #e0e0e0);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}
.products-modal .modal-header {
  flex-shrink: 0;
  background: var(--cursor-bg, #fff);
}
.products-modal__body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 18px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}
.products-modal__footer {
  flex-shrink: 0;
  padding: 12px 18px;
  border-top: 1px solid var(--cursor-border, #e0e0e0);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  background: var(--cursor-bg, #fff);
}
.products-modal__footer .modal-footer-start {
  flex: 1 1 auto;
  display: flex;
  min-width: 0;
}
.products-modal__footer .modal-footer-end {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.products-photo-field__label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}
.products-photo-field__preview {
  width: 100%;
  max-height: 220px;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2, #f3f4f6);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.products-photo-field__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.products-photo-field__placeholder {
  color: var(--muted, #6b7280);
  font-size: 14px;
}
.products-photo-field__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.products-card__media {
  position: relative;
}
.products-card__photos-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
}
.products-album-field__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.products-album-field__add {
  margin-top: 10px;
}
.products-album {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.products-album__empty {
  grid-column: 1 / -1;
  padding: 20px 12px;
  text-align: center;
  font-size: 13px;
  color: var(--muted, #6b7280);
  border: 1px dashed var(--cursor-border, #d0d5dd);
  border-radius: 8px;
  background: var(--surface-2, #f9fafb);
}
.products-album__item {
  margin: 0;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--cursor-border, #e5e7eb);
  background: var(--surface-2, #f3f4f6);
  aspect-ratio: 1;
}
.products-album__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.products-album__toolbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 6px;
  background: linear-gradient(transparent, rgba(15, 23, 42, 0.75));
}
.products-album__ai {
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
}
.products-album__ai:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}
.products-album__ai-icon {
  margin-right: 2px;
}
.products-album__remove {
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.products-album__remove:hover {
  background: rgba(185, 28, 28, 0.85);
}
.products-album__add-tile {
  aspect-ratio: 1;
  border: 1px dashed var(--cursor-border, #d0d5dd);
  border-radius: 8px;
  background: var(--surface-2, #f9fafb);
  color: var(--muted, #6b7280);
  font-size: 32px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.products-album__add-tile:hover {
  border-color: #2563eb;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.06);
}
.products-photo-field__upload {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
