/* ══════════════════════════════════════════════════════
   Base
══════════════════════════════════════════════════════ */
body { background: #f4f5f7; }

/* ══════════════════════════════════════════════════════
   Language pill checkboxes
══════════════════════════════════════════════════════ */
.lang-pill {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}
.lang-pill input[type=checkbox] { display: none; }
.lang-pill span {
  padding: 5px 14px;
  border-radius: 999px;
  border: 2px solid #dee2e6;
  background: #fff;
  font-size: .82rem;
  font-weight: 600;
  color: #555;
  transition: all .15s;
}
.lang-pill input:checked + span {
  background: #ffc107;
  border-color: #ffc107;
  color: #000;
  box-shadow: 0 2px 6px rgba(255,193,7,.4);
}
.lang-pill:hover span { border-color: #ffc107; }

/* ══════════════════════════════════════════════════════
   LEGO card wrapper
══════════════════════════════════════════════════════ */
.lego-card {
  overflow: hidden;
  border: none;
  border-radius: 14px;
}
.lego-card .card-header {
  background: #1e1e3a;
  color: #fff;
  border: none;
  padding: 12px 18px;
}

/* ══════════════════════════════════════════════════════
   Film-strip rails (top / bottom)
══════════════════════════════════════════════════════ */
.filmstrip-rail {
  height: 26px;
  background-color: #111122;
  background-image: radial-gradient(circle, #2e2e50 9px, transparent 9px);
  background-size: 44px 26px;
  background-repeat: repeat-x;
}
.top-rail    { background-position: 22px center; }
.bottom-rail { background-position: 22px center; }

/* ══════════════════════════════════════════════════════
   Timeline scroll wrapper
══════════════════════════════════════════════════════ */
.timeline-scroll-wrap {
  background: #16213e;
  overflow-x: auto;
  overflow-y: visible;
  padding: 22px 20px;
  min-height: 320px;
  /* Custom scrollbar */
  scrollbar-width: thin;
  scrollbar-color: #ffc107 #1e1e3a;
}
.timeline-scroll-wrap::-webkit-scrollbar { height: 6px; }
.timeline-scroll-wrap::-webkit-scrollbar-track  { background: #1e1e3a; }
.timeline-scroll-wrap::-webkit-scrollbar-thumb  { background: #ffc107; border-radius: 3px; }
.timeline-scroll-wrap.dz-over { outline: 3px dashed #ffc107; outline-offset: -6px; }

/* ══════════════════════════════════════════════════════
   Timeline track (flex row)
══════════════════════════════════════════════════════ */
.timeline-track {
  display: flex;
  flex-direction: row;
  gap: 16px;
  align-items: flex-start;
  min-width: max-content;
  padding-bottom: 8px; /* space for brick shadow */
}

/* ══════════════════════════════════════════════════════
   Empty state
══════════════════════════════════════════════════════ */
.timeline-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #16213e;
  padding: 40px 20px;
  text-align: center;
  color: #8892b0;
}
.timeline-empty .te-inner { pointer-events: all; }

/* ══════════════════════════════════════════════════════
   LEGO Brick
══════════════════════════════════════════════════════ */
.lego-brick {
  width: 170px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-radius: 10px 10px 6px 6px;
  /* 3-D bottom shadow = darker shade of brick color */
  box-shadow:
    0 8px 0 var(--brick-shadow),
    0 12px 24px rgba(0,0,0,.45);
  cursor: default;
  transition: transform .15s, box-shadow .15s;
  position: relative;
  overflow: visible;
}
.lego-brick:hover {
  transform: translateY(-5px);
  box-shadow:
    0 13px 0 var(--brick-shadow),
    0 18px 30px rgba(0,0,0,.5);
}
/* Removing animation */
.brick-removing {
  animation: brickPop .25s ease forwards;
}
@keyframes brickPop {
  to { opacity: 0; transform: scale(.8) translateY(-10px); }
}
/* Sortable states */
.brick-ghost   { opacity: .35; }
.brick-chosen  { cursor: grabbing !important; }

/* ── Brick top (colored header) ──────────────────── */
.brick-top {
  background: var(--brick-bg);
  border-radius: 10px 10px 0 0;
  padding: 8px 8px 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.brick-studs {
  display: flex;
  gap: 6px;
  flex: 1;
}
.stud {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--brick-stud);
  box-shadow:
    inset 0 -3px 4px rgba(0,0,0,.25),
    inset 0 2px 3px rgba(255,255,255,.25);
  flex-shrink: 0;
}
.brick-drag-handle {
  font-size: 1.2rem;
  line-height: 1;
  color: rgba(255,255,255,.6);
  cursor: grab;
  padding: 2px 4px;
  letter-spacing: -.05em;
  transition: color .1s;
  flex-shrink: 0;
}
.brick-drag-handle:hover { color: #fff; }
.brick-delete {
  background: rgba(0,0,0,.25);
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  color: #fff;
  font-size: .7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s;
  padding: 0;
}
.brick-delete:hover { background: rgba(0,0,0,.55); }

/* ── Brick preview (thumbnail) ───────────────────── */
.brick-preview {
  position: relative;
  background: #0d0d1a;
  height: 170px;
  overflow: hidden;
  flex-shrink: 0;
}
.brick-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.brick-no-preview {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d0d1a;
}
.play-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0,0,0,.6);
  color: #fff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
}

/* ── Brick upload status (top-right of header) ───── */
.brick-upload-status {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.upload-ring {
  position: relative;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.upload-ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.upload-ring span {
  font-size: .5rem;
  color: #fff;
  font-weight: 700;
  position: relative;
  z-index: 1;
  line-height: 1;
}
.upload-done {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: rgba(255,255,255,.25);
  border-radius: 50%;
  color: #fff;
  font-size: .75rem;
  font-weight: 900;
}
.upload-error {
  font-size: .6rem;
  color: #fff;
  background: rgba(0,0,0,.4);
  border-radius: 4px;
  padding: 2px 5px;
  cursor: pointer;
  white-space: nowrap;
}
.upload-error:hover { background: rgba(0,0,0,.7); }

/* ── Brick footer (filename + caption) ───────────── */
.brick-footer {
  background: #fff;
  border-radius: 0 0 6px 6px;
  padding: 8px 8px 4px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.brick-filename {
  font-size: .65rem;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 4px;
}
.brick-caption {
  border: 1.5px solid #e0e0e0;
  border-radius: 6px;
  resize: none;
  font-size: .78rem;
  padding: 5px 7px;
  width: 100%;
  line-height: 1.4;
  color: #333;
  transition: border-color .15s;
  background: #fafafa;
}
.brick-caption:focus {
  outline: none;
  border-color: #ffc107;
  background: #fff;
}
.brick-caption::placeholder { color: #bbb; font-style: italic; }

/* ══════════════════════════════════════════════════════
   LEGO create button
══════════════════════════════════════════════════════ */
.lego-btn {
  border-radius: 10px;
  box-shadow: 0 6px 0 #b38700, 0 8px 20px rgba(255,193,7,.35);
  transition: transform .12s, box-shadow .12s;
}
.lego-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 9px 0 #b38700, 0 12px 24px rgba(255,193,7,.4);
}
.lego-btn:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 3px 0 #b38700;
}
.lego-btn:disabled { opacity: .45; box-shadow: none; }

/* ══════════════════════════════════════════════════════
   Dashboard cards
══════════════════════════════════════════════════════ */
.status-badge.status-created    { background: #6c757d; color: #fff; }
.status-badge.status-queued     { background: #ffc107; color: #000; }
.status-badge.status-generating { background: #0d6efd; color: #fff; }
.status-badge.status-completed  { background: #198754; color: #fff; }
.status-badge.status-error      { background: #dc3545; color: #fff; }
.status-badge.status-stopped    { background: #6c757d; color: #fff; }
.status-badge.status-stopping   { background: #fd7e14; color: #fff; }

.hover-card { transition: box-shadow .2s, transform .15s; }
.hover-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.12) !important;
  transform: translateY(-3px);
}

/* ══════════════════════════════════════════════════════
   Log box (project detail)
══════════════════════════════════════════════════════ */
.log-box {
  max-height: 280px;
  overflow-y: auto;
  background: #1e1e1e;
  color: #d4d4d4;
  border-radius: 0 0 .375rem .375rem;
  line-height: 1.6;
}

/* ══════════════════════════════════════════════════════
   Project Detail — 3-column layout
══════════════════════════════════════════════════════ */

/* Top bar */
.pd-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: #fff;
  border-radius: 14px;
  padding: .75rem 1.1rem;
  box-shadow: 0 1px 6px rgba(0,0,0,.07);
  flex-wrap: wrap;
}
.pd-topbar-left  { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.pd-topbar-right { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }

.pd-back-btn {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1.5px solid #dee2e6; background: #f8f9fa;
  display: flex; align-items: center; justify-content: center;
  color: #495057; text-decoration: none; flex-shrink: 0;
  transition: all .15s;
}
.pd-back-btn:hover { background: #e9ecef; color: #212529; }

.pd-title    { font-size: 1rem; font-weight: 700; color: #1a1a2e; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-meta-line { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem; font-size: .75rem; color: #6c757d; margin-top: .1rem; }
.pd-sep { color: #ced4da; }

.pd-status-dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(0,0,0,.08);
}
.status-dot-created    { background: #6c757d; }
.status-dot-queued     { background: #ffc107; }
.status-dot-generating { background: #0d6efd; animation: pulse-dot 1.2s infinite; }
.status-dot-completed  { background: #28a745; }
.status-dot-error      { background: #dc3545; }
.status-dot-stopped    { background: #6c757d; }
.status-dot-stopping   { background: #fd7e14; animation: pulse-dot 1.2s infinite; }
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 2px rgba(13,110,253,.3); }
  50%       { box-shadow: 0 0 0 5px rgba(13,110,253,.1); }
}
.pd-status-text { font-weight: 600; color: #343a40; }

.pd-icon-btn {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1.5px solid #dee2e6; background: #f8f9fa;
  display: flex; align-items: center; justify-content: center;
  color: #495057; cursor: pointer; transition: all .15s;
}
.pd-icon-btn:hover { background: #e9ecef; color: #212529; }
.pd-icon-danger:hover { background: #fff0f0; border-color: #f5c2c7; color: #dc3545; }

.pd-generate-btn {
  display: inline-flex; align-items: center;
  padding: .45rem 1.1rem; border-radius: 10px;
  background: linear-gradient(135deg,#ffc107,#ff9800);
  color: #1a1a2e; border: none; font-weight: 700; font-size: .85rem;
  cursor: pointer; box-shadow: 0 3px 10px rgba(255,193,7,.4);
  transition: all .15s;
}
.pd-generate-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(255,193,7,.5); }
.pd-generate-btn:active:not(:disabled) { transform: translateY(0); }
.pd-generate-btn:disabled { opacity: .6; cursor: not-allowed; box-shadow: none; }

.pd-remove-queue-btn {
  background: linear-gradient(135deg,#dc3545,#a71d2a);
  color: #fff; box-shadow: 0 3px 10px rgba(220,53,69,.4);
  margin-right: .5rem;
}
.pd-remove-queue-btn:hover:not(:disabled) { box-shadow: 0 5px 14px rgba(220,53,69,.5); }

/* Hashtag chips (Publish modal) */
.hashtag-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .25rem .55rem; border-radius: 999px;
  background: #e9ecef; color: #6c757d; font-size: .8rem;
  border: 1px solid transparent; transition: all .15s;
}
.hashtag-chip.active {
  background: #cfe2ff; color: #084298; border-color: #9ec5fe;
}
.hashtag-chip span:first-child { cursor: pointer; user-select: none; }
.hashtag-chip .bi-x {
  cursor: pointer; font-size: .95rem; line-height: 1; opacity: .6;
}
.hashtag-chip .bi-x:hover { opacity: 1; color: #dc3545; }

/* Grid */
.pd-grid {
  display: grid;
  grid-template-columns: 220px 1fr 260px;
  gap: 1rem;
  align-items: start;
}
@media (max-width: 992px) {
  .pd-grid { grid-template-columns: 1fr 1fr; }
  .pd-col-videos { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .pd-grid { grid-template-columns: 1fr; }
}

/* Info chips */
.info-chips {
  display: grid; grid-template-columns: 1fr 1fr; gap: .4rem;
}
.info-chip {
  background: #fff; border-radius: 10px;
  border: 1.5px solid #e9ecef;
  padding: .45rem .6rem;
}
.chip-label { display: block; font-size: .63rem; text-transform: uppercase; letter-spacing: .06em; color: #adb5bd; font-weight: 700; }
.chip-val   { display: block; font-size: .78rem; font-weight: 600; color: #343a40; margin-top: .1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Panel */
.pd-panel {
  background: #fff; border-radius: 12px;
  border: 1.5px solid #e9ecef; overflow: hidden;
}
.pd-panel-header {
  background: #f8f9fa; padding: .5rem .8rem;
  font-size: .75rem; font-weight: 700; color: #495057;
  border-bottom: 1.5px solid #e9ecef;
  display: flex; align-items: center; gap: .4rem;
}
.pd-panel-body { padding: .7rem .8rem; font-size: .78rem; }

/* Log box */
.pd-log {
  max-height: 200px; overflow-y: auto;
  background: #0d1117; color: #c9d1d9;
  font-family: 'Courier New', monospace; font-size: .72rem;
  line-height: 1.6; padding: .7rem .8rem;
}

/* Section label */
.pd-section-label {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: #6c757d;
  display: flex; align-items: center; gap: .4rem;
  margin-bottom: .6rem;
}

/* Media clip list */
.media-clip-list {
  background: #fff; border-radius: 12px;
  border: 1.5px solid #e9ecef; overflow: hidden;
  max-height: calc(100vh - 200px); overflow-y: auto;
}
.media-clip-row {
  display: flex; align-items: flex-start; gap: .6rem;
  padding: .55rem .75rem; border-bottom: 1px solid #f1f3f5;
  transition: background .1s;
}
.media-clip-row:last-child { border-bottom: none; }
.media-clip-row:hover { background: #f8f9fa; }

.clip-num {
  flex-shrink: 0; width: 20px; height: 20px; border-radius: 5px;
  background: #e9ecef; color: #6c757d;
  font-size: .65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.clip-icon {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
}
.clip-icon-video { background: #e8f5e9; color: #2e7d32; }
.clip-icon-image { background: #e3f2fd; color: #1565c0; }

.clip-info { min-width: 0; flex: 1; }
.clip-filename { font-size: .75rem; font-weight: 600; color: #343a40; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clip-caption  { font-size: .7rem; color: #868e96; font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: .1rem; }
.clip-upload-badge { flex-shrink: 0; display: inline-flex; align-items: center; font-size: .75rem; }
.clip-upload-badge .spinner-border-sm { width: .8rem; height: .8rem; border-width: .15em; }

/* Video cards */
.videos-empty {
  text-align: center; padding: 2rem 1rem;
  background: #fff; border-radius: 12px;
  border: 2px dashed #dee2e6; color: #adb5bd;
}
.videos-empty i  { font-size: 2rem; display: block; margin-bottom: .5rem; }
.videos-empty p  { font-size: .82rem; margin: 0; line-height: 1.5; }

.video-card {
  background: #fff; border-radius: 12px;
  border: 1.5px solid #e9ecef;
  margin-bottom: .6rem; overflow: hidden;
  transition: box-shadow .15s, transform .15s;
}
.video-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.09); transform: translateY(-1px); }

.vc-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .6rem .75rem; border-bottom: 1px solid #f1f3f5;
}
.vc-lang {
  display: flex; align-items: center; gap: .45rem;
  font-weight: 700; font-size: .85rem; color: #1a1a2e;
}
.vc-lang-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg,#28a745,#20c997);
  flex-shrink: 0;
}
.vc-actions { display: flex; gap: .35rem; }

.vc-btn {
  width: 30px; height: 30px; border-radius: 7px;
  border: 1.5px solid transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; cursor: pointer; transition: all .15s;
  text-decoration: none;
}
.vc-btn-success { border-color: #a3d9a5; color: #2e7d32; background: #f1faf2; }
.vc-btn-success:hover { background: #2e7d32; color: #fff; border-color: #2e7d32; }
.vc-btn-primary { border-color: #b6d4fe; color: #0d6efd; background: #f0f6ff; }
.vc-btn-primary:hover { background: #0d6efd; color: #fff; border-color: #0d6efd; }
.vc-btn-danger  { border-color: #f5c2c7; color: #dc3545; background: #fff5f5; }
.vc-btn-danger:hover  { background: #dc3545; color: #fff; border-color: #dc3545; }

/* Platform status dots in video card */
.vc-platforms {
  display: flex; gap: .35rem; padding: .45rem .75rem; flex-wrap: wrap;
}
.vcp {
  display: inline-flex; align-items: center; gap: .2rem;
  padding: .2rem .5rem; border-radius: 20px;
  font-size: .72rem; font-weight: 600; border: 1.5px solid transparent;
  transition: all .15s;
}
.vcp-idle      { background: #f1f3f5; color: #adb5bd; border-color: #e9ecef; }
.vcp-queued    { background: #e0f7fa; color: #00838f; border-color: #80deea; }
.vcp-scheduled { background: #e8eaf6; color: #3949ab; border-color: #9fa8da; }
.vcp-uploading { background: #fff8e1; color: #f57f17; border-color: #ffe082; }
.vcp-done      { background: #e8f5e9; color: #2e7d32; border-color: #a5d6a7; }
.vcp-error     { background: #ffebee; color: #c62828; border-color: #ef9a9a; }
.vcp-check { font-size: .75rem; }
.vcp-warn  { font-size: .75rem; }
.vcp-spinner {
  display: inline-block; width: .6rem; height: .6rem;
  border: 1.5px solid currentColor; border-top-color: transparent;
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════
   Upload Modal
══════════════════════════════════════════════════════ */
.modal-upload { max-width: 480px; }

.upload-modal-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff; border-radius: .5rem .5rem 0 0;
  padding: 1.25rem 1.5rem .75rem;
}
.upload-modal-header .btn-close-white { filter: invert(1) brightness(2); }
.letter-spaced { letter-spacing: .08em; }

/* Platform cards */
.platform-card {
  border-radius: 12px; padding: .9rem 1rem; cursor: pointer;
  border: 2.5px solid transparent; transition: all .18s;
  user-select: none; opacity: .45; filter: grayscale(.6); position: relative;
}
.platform-card:hover { opacity: .75; filter: grayscale(.3); }
.platform-card.selected { opacity: 1; filter: none; border-color: rgba(255,255,255,.55); }
.pc-header { display: flex; align-items: flex-start; justify-content: space-between; }
.pc-icon   { font-size: 1.7rem; line-height: 1; }
.pc-check  {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; color: #fff; opacity: 0; transition: opacity .15s;
}
.platform-card.selected .pc-check { opacity: 1; background: rgba(255,255,255,.5); }
.pc-name { font-weight: 700; font-size: .9rem; color: #fff; margin-top: .4rem; }
.pc-status-line { font-size: .72rem; margin-top: .15rem; font-weight: 500; }
.yt-card { background: linear-gradient(135deg,#ff0000,#cc0000); }
.tt-card { background: linear-gradient(135deg,#010101,#2d2d2d); border-color: #69c9d0 !important; }
.tt-card.selected { border-color: #69c9d0 !important; }
.ig-card { background: linear-gradient(135deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.fb-card { background: linear-gradient(135deg,#1877f2,#0d5fbb); }
.ps-idle      { color: rgba(255,255,255,.55); }
.ps-queued    { color: #80deea; }
.ps-scheduled { color: #b0bec5; }
.ps-uploading { color: #ffe082; }
.ps-done      { color: #a5d6a7; }
.ps-error     { color: #ef9a9a; }

/* When buttons */
.when-btn {
  flex: 1; padding: .5rem .75rem; border-radius: 8px;
  font-size: .85rem; font-weight: 600;
  border: 2px solid #dee2e6; background: #f8f9fa;
  color: #6c757d; cursor: pointer; transition: all .15s;
}
.when-btn:hover { border-color: #adb5bd; color: #343a40; }
.when-btn.selected { background: #0d6efd; color: #fff; border-color: #0d6efd; }

/* Publish button */
.btn-publish {
  background: linear-gradient(135deg,#0d6efd,#6610f2);
  color: #fff; border: none; border-radius: 8px;
  transition: opacity .15s, transform .1s;
}
.btn-publish:hover  { opacity: .9; color: #fff; transform: translateY(-1px); }
.btn-publish:active { transform: translateY(0); }

/* ══════════════════════════════════════════════════════
   Delete Video Modal options
══════════════════════════════════════════════════════ */
.dv-option {
  display: block;
  cursor: pointer;
  border-radius: 10px;
  border: 2px solid #dee2e6;
  background: #fff;
  transition: all .15s;
  overflow: hidden;
}
.dv-option:hover { border-color: #adb5bd; background: #f8f9fa; }
.dv-option.selected { border-color: #dc3545; background: #fff5f5; }

.dv-opt-inner {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .85rem 1rem;
}
.dv-opt-icon {
  font-size: 1.6rem;
  line-height: 1;
  width: 2rem;
  text-align: center;
  flex-shrink: 0;
}
.dv-opt-check {
  font-size: 1.1rem;
  color: #dc3545;
  opacity: 0;
  transition: opacity .15s;
  flex-shrink: 0;
}
.dv-option.selected .dv-opt-check { opacity: 1; }

.dv-path {
  font-size: .72rem;
  background: #f1f3f5;
  padding: .1rem .35rem;
  border-radius: 4px;
  color: #495057;
}

/* Transcription checkbox option — distinct from radio options */
.dv-transcription {
  border-style: dashed;
  border-color: #ced4da;
  background: #fafafa;
}
.dv-transcription:hover  { border-color: #6c757d; background: #f1f3f5; }
.dv-transcription.selected { border-color: #6c757d; border-style: solid; background: #f1f3f5; }
.dv-transcription.selected .dv-opt-check { color: #6c757d; opacity: 1; }

/* ══════════════════════════════════════════════════════
   Settings / Account Credentials
══════════════════════════════════════════════════════ */

/* Platform picker pills (form) */
.plat-pill {
  display: inline-flex; align-items: center;
  padding: .35rem .8rem; border-radius: 20px;
  font-size: .8rem; font-weight: 600; cursor: pointer;
  border: 2px solid transparent; transition: all .15s;
  background: #f1f3f5; color: #495057;
}
.plat-pill:hover { filter: brightness(.95); }
.plat-pill.selected { color: #fff; }
.plat-instagram.selected { background: linear-gradient(135deg,#f09433,#dc2743,#bc1888); border-color: #bc1888; }
.plat-tiktok.selected    { background: #010101; border-color: #69c9d0; }
.plat-facebook.selected  { background: #1877f2; border-color: #0d5fbb; }
.plat-youtube.selected   { background: #ff0000; border-color: #cc0000; }

/* Platform section badge */
.plat-badge {
  display: inline-flex; align-items: center;
  padding: .25rem .7rem; border-radius: 20px;
  font-size: .8rem; font-weight: 700; color: #fff;
}
.plat-instagram { background: linear-gradient(135deg,#f09433,#dc2743,#bc1888); }
.plat-tiktok    { background: #010101; }
.plat-facebook  { background: #1877f2; }
.plat-youtube   { background: #ff0000; }

/* Account cards grid */
.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: .75rem;
}

.account-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  border: 1.5px solid #e9ecef;
  overflow: hidden;
  transition: box-shadow .15s, transform .15s;
  display: flex;
}
.account-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  transform: translateY(-2px);
}

/* Coloured left stripe */
.ac-platform-stripe { width: 5px; flex-shrink: 0; }
.plat-stripe-instagram { background: linear-gradient(180deg,#f09433,#bc1888); }
.plat-stripe-tiktok    { background: #69c9d0; }
.plat-stripe-facebook  { background: #1877f2; }
.plat-stripe-youtube   { background: #ff0000; }

.ac-body   { padding: .85rem 1rem; flex: 1; min-width: 0; }
.ac-name   { font-weight: 700; font-size: .9rem; color: #212529; }
.ac-meta   { font-size: .72rem; color: #6c757d; margin-top: .15rem; }
.ac-notes  { font-size: .75rem; color: #868e96; margin-top: .2rem; font-style: italic; }

.ac-token-row  { display: flex; align-items: center; }
.ac-token-mask { font-size: .75rem; color: #adb5bd; letter-spacing: .1em; }

/* Extra-small button */
.btn-xs {
  padding: .2rem .45rem;
  font-size: .75rem;
  line-height: 1.4;
  border-radius: 6px;
}

/* ══════════════════════════════════════════════════════
   Publish modal — platform rows with account picker
══════════════════════════════════════════════════════ */
.platform-rows { display: flex; flex-direction: column; gap: .5rem; }

.pub-row {
  border-radius: 10px;
  border: 1.5px solid #e9ecef;
  overflow: hidden;
  background: #fff;
  transition: border-color .15s;
}
.pub-row:has(.pub-row-toggle.active) { border-color: #6ea8fe; }

.pub-row-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: .6rem .85rem; cursor: pointer;
  background: #f8f9fa; transition: background .15s;
  user-select: none;
}
.pub-row-toggle.active { background: #1a1a2e; }

.pub-toggle-left  { display: flex; align-items: center; gap: .6rem; }
.pub-toggle-right { display: flex; align-items: center; gap: .4rem; }

.pub-check-box {
  width: 20px; height: 20px; border-radius: 5px;
  border: 2px solid #dee2e6; background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; color: transparent; transition: all .15s; flex-shrink: 0;
}
.pub-row-toggle.active .pub-check-box {
  background: #28a745; border-color: #28a745; color: #fff;
}

.pub-plat-icon { font-size: 1.1rem; color: #6c757d; }
.pub-row-toggle.active .pub-plat-icon { color: #fff; }

.pub-plat-name { font-weight: 700; font-size: .82rem; color: #343a40; }
.pub-row-toggle.active .pub-plat-name { color: #fff; }

/* Platform icon accent colours when active */
.pub-toggle-youtube.active   .pub-plat-icon { color: #ff4444; }
.pub-toggle-tiktok.active    .pub-plat-icon { color: #69c9d0; }
.pub-toggle-instagram.active .pub-plat-icon { color: #f09433; }
.pub-toggle-facebook.active  .pub-plat-icon { color: #6ea8fe; }

.pub-row-status {
  font-size: .7rem; font-weight: 600;
  padding: .15rem .45rem; border-radius: 10px;
  background: rgba(255,255,255,.12); color: rgba(255,255,255,.6);
}
/* Status colour overrides inside dark header */
.prs-idle      { color: rgba(255,255,255,.4); }
.prs-queued    { color: #80deea; background: rgba(0,131,143,.25); }
.prs-scheduled { color: #b0bec5; background: rgba(57,73,171,.25); }
.prs-uploading { color: #ffe082; background: rgba(245,127,23,.25); }
.prs-done      { color: #a5d6a7; background: rgba(46,125,50,.25); }
.prs-error     { color: #ef9a9a; background: rgba(198,40,40,.25); }

.pub-row-picker {
  padding: .55rem .85rem .65rem;
  border-top: 1px solid #f1f3f5;
  background: #fff;
}
.pub-picker-label {
  display: block; font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: #6c757d; margin-bottom: .3rem;
}
.pub-account-select {
  font-size: .82rem; border-radius: 7px;
  border-color: #dee2e6; background: #f8f9fa;
}
.pub-no-creds {
  font-size: .72rem; color: #adb5bd; margin-top: .3rem;
}
.pub-no-creds a { color: #0d6efd; }

/* ══════════════════════════════════════════════════════
   Landing page
══════════════════════════════════════════════════════ */

/* Full-bleed helper — breaks a section out of the parent .container */
.full-bleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Hero */
.landing-hero {
  background: linear-gradient(160deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  padding: 4.5rem 1rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.landing-hero::before,
.landing-hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 26px;
  background-color: #111122;
  background-image: radial-gradient(circle, #2e2e50 9px, transparent 9px);
  background-size: 44px 26px;
  background-position: 22px center;
}
.landing-hero::before { top: 0; }
.landing-hero::after  { bottom: 0; }

.landing-hero .badge-new {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .35rem .9rem; border-radius: 999px;
  background: rgba(255,193,7,.15); color: #ffc107;
  border: 1.5px solid rgba(255,193,7,.4);
  font-size: .78rem; font-weight: 700; letter-spacing: .03em;
  margin-bottom: 1.25rem;
}
.landing-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  max-width: 780px;
  margin: 0 auto 1.1rem;
}
.landing-hero h1 .accent {
  background: linear-gradient(135deg,#ffc107,#ff9800);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.landing-hero p.lead {
  color: rgba(255,255,255,.75);
  max-width: 620px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
}
.landing-hero .hero-ctas { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.landing-hero .btn-hero-primary {
  background: linear-gradient(135deg,#ffc107,#ff9800);
  color: #1a1a2e; border: none; font-weight: 700;
  padding: .7rem 1.6rem; border-radius: 10px;
  box-shadow: 0 6px 0 #b38700, 0 10px 24px rgba(255,193,7,.35);
  transition: transform .12s, box-shadow .12s;
}
.landing-hero .btn-hero-primary:hover { color: #1a1a2e; transform: translateY(-2px); box-shadow: 0 8px 0 #b38700, 0 14px 28px rgba(255,193,7,.4); }
.landing-hero .btn-hero-secondary {
  background: rgba(255,255,255,.08); color: #fff;
  border: 1.5px solid rgba(255,255,255,.3); font-weight: 600;
  padding: .7rem 1.6rem; border-radius: 10px;
  transition: all .15s;
}
.landing-hero .btn-hero-secondary:hover { background: rgba(255,255,255,.16); color: #fff; }

/* Platform strip */
.landing-platforms {
  display: flex; justify-content: center; align-items: center;
  gap: 1.75rem; flex-wrap: wrap;
  padding: 1.75rem 1rem; color: #adb5bd; font-size: .82rem;
}
.landing-platforms .plat-badge { font-size: .78rem; }

/* Section headings */
.landing-section { padding: 3.5rem 0; }
.landing-eyebrow {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: #ff9800; text-align: center; margin-bottom: .5rem;
}
.landing-heading {
  font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800;
  color: #1a1a2e; text-align: center; margin-bottom: .6rem;
}
.landing-subheading {
  color: #6c757d; text-align: center; max-width: 560px;
  margin: 0 auto 2.5rem; font-size: .95rem;
}

/* Feature cards */
.feature-card {
  background: #fff; border-radius: 14px; border: 1.5px solid #e9ecef;
  padding: 1.5rem 1.35rem; height: 100%;
  transition: box-shadow .2s, transform .15s;
}
.feature-card:hover { box-shadow: 0 10px 28px rgba(0,0,0,.08); transform: translateY(-3px); }
.feature-icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: 1rem; color: #1a1a2e;
  background: linear-gradient(135deg,#ffc107,#ff9800);
}
.feature-card h5 { font-weight: 700; font-size: 1rem; margin-bottom: .4rem; }
.feature-card p { color: #6c757d; font-size: .85rem; margin: 0; line-height: 1.55; }

/* How it works steps */
.step-card { text-align: center; padding: 0 1rem; }
.step-num {
  width: 44px; height: 44px; border-radius: 50%;
  background: #1a1a2e; color: #ffc107;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.05rem; margin: 0 auto 1rem;
}
.step-card h5 { font-weight: 700; font-size: .95rem; margin-bottom: .4rem; }
.step-card p { color: #6c757d; font-size: .82rem; line-height: 1.5; margin: 0; }
.step-arrow { color: #dee2e6; font-size: 1.4rem; }

/* Language pills (display-only, reuses .lang-pill look) */
.landing-langs { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.lang-pill-static {
  padding: .4rem 1rem; border-radius: 999px; border: 2px solid #e9ecef;
  background: #fff; font-size: .82rem; font-weight: 600; color: #495057;
}

/* Final CTA banner */
.landing-cta {
  background: linear-gradient(135deg,#ffc107,#ff9800);
  border-radius: 20px; padding: 3rem 2rem; text-align: center;
  margin: 1rem 0 3.5rem;
}
.landing-cta h2 { font-weight: 800; color: #1a1a2e; font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: .5rem; }
.landing-cta p { color: rgba(26,26,46,.75); margin-bottom: 1.5rem; }
.landing-cta .btn {
  background: #1a1a2e; color: #fff; font-weight: 700;
  padding: .7rem 1.8rem; border-radius: 10px; border: none;
  transition: transform .12s;
}
.landing-cta .btn:hover { color: #fff; transform: translateY(-2px); }

/* Footer */
.landing-footer {
  text-align: center; color: #adb5bd; font-size: .78rem;
  padding-bottom: 2rem;
}
.landing-footer a { color: #6c757d; }
