/* Platenko Admin CMS, Organizer, Automation & /whatsnew Stylesheet */

/* ==========================================================================
   Phase 3: Admin CMS (/admin) & 4-Point Perspective Homography Modal
   ========================================================================== */
.admin-cms-container {
  max-width: 1360px;
  margin: 28px auto 80px;
  padding: 0 24px;
}

.admin-cms-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 28px;
  align-items: start;
}

.admin-cms-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--card-shadow);
  min-width: 0;
  max-width: 100%;
}

.admin-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.adm-upload-zone {
  background: var(--bg-subtle);
  border: 1.5px dashed var(--border-color);
  border-radius: 12px;
  padding: 16px;
  transition: border-color 0.2s, background 0.2s;
}

.adm-upload-zone.drag-over {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.08);
}

.adm-upload-zone.is-uploading {
  opacity: 0.78;
  pointer-events: none;
}

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

.adm-upload-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 10px 0 0;
}

.adm-upload-progress {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.28);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
}

.adm-preview-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.adm-cover-thumb {
  width: 82px;
  height: 82px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}

.adm-dims-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
}

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

.preset-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 3px 9px;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.preset-chip:hover {
  border-color: var(--border-focus);
}

.adm-sofa-preview {
  position: relative;
  height: 190px;
  background: linear-gradient(180deg, #F4F2EC 0%, #ECEAE2 88%, #CFC4AE 88%, #B8AA90 100%);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.adm-sofa-paint {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #27272A, #52525B);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  transition: width 0.12s, height 0.12s, bottom 0.12s;
}

.adm-sofa-couch {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  transition: width 0.12s, height 0.12s;
}

.adm-sofa-caption {
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.68rem;
  color: #3F3F46;
  white-space: nowrap;
}

.adm-inventory-scroll {
  overflow-x: auto;
  max-height: 75vh;
  overflow-y: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.adm-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
}

.adm-table th {
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 8px 10px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: var(--bg-surface);
  z-index: 2;
}

.adm-table td {
  padding: 10px 8px;
  vertical-align: middle;
}

.adm-table tbody tr.adm-clickable-row {
  cursor: pointer;
}

.adm-table tbody tr.adm-clickable-row td {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.adm-table tbody tr.adm-clickable-row td:first-child {
  border-left: 1px solid var(--border-color);
  border-radius: 10px 0 0 10px;
}

.adm-table tbody tr.adm-clickable-row td:last-child {
  border-right: 1px solid var(--border-color);
  border-radius: 0 10px 10px 0;
}

.adm-table tbody tr.adm-clickable-row:hover td {
  background: var(--bg-subtle);
  border-top-color: rgba(99, 102, 241, 0.4);
  border-bottom-color: rgba(99, 102, 241, 0.4);
}

.adm-table tbody tr.adm-clickable-row:hover td:first-child {
  border-left-color: rgba(99, 102, 241, 0.4);
}

.adm-table tbody tr.adm-clickable-row:hover td:last-child {
  border-right-color: rgba(99, 102, 241, 0.4);
}

.adm-row-thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  display: block;
}

.adm-icon-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
}

.adm-icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Admin Catalog Drag-and-Drop (⋮⋮) & Inline Position Jump (#N) */
.adm-order-cell {
  white-space: nowrap;
  padding-left: 6px !important;
  padding-right: 4px !important;
}

.adm-order-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.adm-drag-handle {
  cursor: grab;
  touch-action: none;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  padding: 6px 4px;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.adm-drag-handle:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.adm-drag-handle:active {
  cursor: grabbing;
}

.adm-drag-handle:disabled {
  opacity: 0.28;
  cursor: not-allowed;
  pointer-events: none;
}

.adm-pos-btn {
  min-width: 28px;
  height: 26px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.adm-pos-btn:hover {
  border-color: #6366f1;
  color: var(--text-main);
  background: var(--bg-surface);
}

.adm-pos-input {
  width: 46px;
  height: 26px;
  padding: 0 4px;
  border-radius: 6px;
  border: 2px solid #6366f1;
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
  outline: none;
  -moz-appearance: textfield;
}

.adm-pos-input::-webkit-outer-spin-button,
.adm-pos-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

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

.adm-table tr.adm-row-dragging {
  opacity: 0.35;
  background: var(--bg-subtle);
}

.adm-table tr.adm-drop-before td {
  box-shadow: inset 0 3px 0 #6366f1;
}

.adm-table tr.adm-drop-after td {
  box-shadow: inset 0 -3px 0 #6366f1;
}

.adm-table tr.adm-row-just-moved {
  animation: admRowFlash 1.2s ease;
}

@keyframes admRowFlash {
  0% { background: rgba(99, 102, 241, 0.24); }
  100% { background: transparent; }
}

.adm-drag-ghost {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 260px;
  padding: 7px 11px;
  border-radius: 10px;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1.5px solid #6366f1;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
  font-size: 0.82rem;
  font-weight: 600;
}

.adm-drag-ghost img {
  width: 32px;
  height: 32px;
  border-radius: 5px;
  object-fit: cover;
  flex-shrink: 0;
}

.adm-drag-ghost-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.adm-drag-ghost-pos {
  background: #6366f1;
  color: #fff;
  border-radius: 9999px;
  padding: 2px 8px;
  font-size: 0.74rem;
  font-weight: 700;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* Admin CMS Automation Channels Modal & Per-Artwork Publish Panel */
.adm-auto-cli-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 0.8rem;
}

.adm-auto-cli-box code {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.76rem;
  color: var(--text-main);
}

.adm-auto-scroll {
  overflow-y: auto;
  padding-right: 2px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.adm-auto-section-title {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0 0 8px;
}

.adm-auto-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.adm-auto-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 12px;
}

.adm-auto-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.adm-auto-row-info {
  min-width: 0;
  flex: 1;
}

.adm-auto-row-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.adm-auto-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.adm-auto-pill {
  font-size: 0.71rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.adm-auto-pill.ready {
  color: #166534;
  background: #DCFCE7;
  border-color: rgba(22, 101, 52, 0.22);
}

.adm-auto-pill.stub {
  color: #6B21A8;
  background: #F3E8FF;
  border-color: rgba(107, 33, 168, 0.2);
}

[data-theme="dark"] .adm-auto-pill.ready {
  color: #86EFAC;
  background: rgba(22, 101, 52, 0.35);
}

[data-theme="dark"] .adm-auto-pill.stub {
  color: #D8B4FE;
  background: rgba(107, 33, 168, 0.35);
}

.adm-auto-row-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.adm-auto-draft-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
}

/* Accessible ON/OFF pill toggle switch */
.adm-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 44px;
  height: 24px;
  cursor: pointer;
  flex-shrink: 0;
}

.adm-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.adm-switch-track {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: #D4D4D8;
  transition: background 0.2s ease;
}

[data-theme="dark"] .adm-switch-track {
  background: #3F3F46;
}

.adm-switch-thumb {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transform: translateX(3px);
  transition: transform 0.2s ease;
}

.adm-switch input:checked + .adm-switch-track {
  background: #22C55E;
}

.adm-switch input:checked ~ .adm-switch-thumb {
  transform: translateX(23px);
}

.adm-switch input:focus-visible + .adm-switch-track {
  outline: 2px solid #6366F1;
  outline-offset: 2px;
}

.adm-publish-panel {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

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

.adm-social-thumb-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 6px 10px;
  min-width: 0;
}

.adm-social-thumb-wrap img {
  width: 40px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.adm-publish-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px;
  min-width: 0;
}

.adm-pub-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 0.76rem;
  min-width: 0;
  max-width: 100%;
}

.adm-pub-chip-left {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.adm-pub-chip-name {
  font-weight: 600;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adm-pub-state {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 9999px;
  white-space: nowrap;
}

.adm-pub-state.published { background: #DCFCE7; color: #166534; }
.adm-pub-state.drafted { background: #FEF3C7; color: #92400E; }
.adm-pub-state.publishing { background: #E0E7FF; color: #3730A3; }
.adm-pub-state.error { background: #FEE2E2; color: #991B1B; }
.adm-pub-state.pending { background: var(--bg-subtle); color: var(--text-muted); }
.adm-pub-chip-left:has(input:disabled) { opacity: 0.65; cursor: not-allowed; }

@media (max-width: 640px) {
  .adm-auto-row-top {
    flex-wrap: wrap;
  }
  .adm-auto-row-controls {
    width: 100%;
    justify-content: space-between;
  }
}

/* Per-Portal Pricing Grid, Social Photo Picker & Integrations Cards */
.adm-prices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
}

.adm-photo-item.is-social {
  border-color: #6366f1;
}

.adm-photo-tool.is-active {
  background: #6366f1;
  color: #fff;
}

/* Super-Admin Lock Box for Integrations Tab */
.adm-integ-lock-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.adm-integ-lock-box.unlocked {
  background: rgba(234, 179, 8, 0.12);
  border-color: rgba(217, 119, 6, 0.45);
}

.adm-integ-unlock-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.adm-integ-locked-tag {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.adm-publish-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.adm-publish-actions .btn-edit-save {
  white-space: normal;
  text-align: center;
  line-height: 1.3;
}

.adm-publish-results {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.78rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 10px;
}

.adm-pub-res-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.adm-auto-tab-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.adm-integ-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.adm-integ-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.adm-integ-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.adm-integ-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 9999px;
  white-space: nowrap;
}

.adm-integ-badge.connected { background: #DCFCE7; color: #166534; }
.adm-integ-badge.configured { background: #E0E7FF; color: #3730A3; }
.adm-integ-badge.error { background: #FEE2E2; color: #991B1B; }
.adm-integ-badge.disconnected { background: var(--bg-surface); color: var(--text-muted); border: 1px solid var(--border-color); }

.adm-integ-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.adm-secret-input {
  -webkit-text-security: disc;
}

.adm-integ-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* 4-Point Perspective Modal */
.warp-modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  max-width: 1100px;
  width: 96%;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
}

.warp-body {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  padding: 20px;
  overflow-y: auto;
  align-items: center;
}

.warp-source-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.warp-source-canvas {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  touch-action: none;
  cursor: crosshair;
  display: block;
}

.warp-rot-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-subtle);
  border-radius: 8px;
}

.warp-preview-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.warp-preview-frame {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  width: 100%;
}

.warp-preview-canvas {
  max-width: 100%;
  max-height: 360px;
  border-radius: 2px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.warp-loupe-canvas {
  position: fixed;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  z-index: 400;
}

@media (max-width: 960px) {
  .admin-cms-container {
    padding: 0 12px;
  }
  .admin-cms-card {
    padding: 16px;
  }
  .admin-cms-grid {
    grid-template-columns: 1fr;
  }
  .warp-body {
    grid-template-columns: 1fr;
  }
}
/* Unified /admin CMS Album Photo Grid */
.adm-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}

.adm-photo-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid var(--border-color);
  background: var(--bg-surface);
  cursor: pointer;
}

.adm-photo-item.is-cover {
  border-color: #22c55e;
  box-shadow: 0 0 0 1px #22c55e;
}

.adm-photo-item.is-over-limit {
  opacity: 0.78;
}

.adm-photo-item.adm-photo-dragging {
  opacity: 0.32;
  transform: scale(0.96);
}

.adm-photo-item.adm-photo-drop-before {
  box-shadow: -4px 0 0 #6366f1, 0 0 0 2px rgba(99, 102, 241, 0.35);
}

.adm-photo-item.adm-photo-drop-after {
  box-shadow: 4px 0 0 #6366f1, 0 0 0 2px rgba(99, 102, 241, 0.35);
}

.adm-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.adm-photo-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 4px 5px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(15, 15, 18, 0.84) 45%);
  pointer-events: none;
}

.adm-photo-drag-handle {
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(24, 24, 27, 0.85);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  padding: 3px 5px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.adm-photo-drag-handle:hover {
  background: #6366f1;
  border-color: #818cf8;
}

.adm-photo-drag-handle:active {
  cursor: grabbing;
}

.adm-photo-pills {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.adm-photo-pill {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 4px;
  color: #ffffff;
  text-transform: uppercase;
  line-height: 1.1;
}

.adm-photo-pill.cover {
  background: rgba(22, 163, 74, 0.94);
}

.adm-photo-pill.social {
  background: rgba(99, 102, 241, 0.95);
}

.adm-photo-pill.limit {
  background: rgba(113, 113, 122, 0.9);
}

.adm-photo-drag-ghost {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 10px;
  background: var(--bg-surface);
  color: var(--text-main);
  border: 2px solid #6366f1;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.adm-photo-drag-ghost img {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
}

.adm-photo-drag-ghost span {
  background: #6366f1;
  color: #fff;
  border-radius: 9999px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.adm-photo-tools {
  position: absolute;
  top: 4px;
  right: 4px;
  left: 4px;
  display: flex;
  justify-content: space-between;
  gap: 3px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.adm-photo-item:hover .adm-photo-tools,
.adm-photo-item:focus-within .adm-photo-tools {
  opacity: 1;
}

@media (hover: none) {
  .adm-photo-tools {
    opacity: 1;
  }
}

.adm-photo-tool {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(24, 24, 27, 0.82);
  color: #ffffff;
  font-size: 0.72rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.adm-photo-tool.danger {
  background: rgba(220, 38, 38, 0.9);
}

.cover-studio-body {
  grid-template-columns: 1fr 1fr;
}

.adm-table tbody tr.is-active td {
  background: rgba(99, 102, 241, 0.09);
  border-top-color: rgba(99, 102, 241, 0.5);
  border-bottom-color: rgba(99, 102, 241, 0.5);
}

.adm-table tbody tr.is-active td:first-child {
  border-left: 3px solid #6366f1;
}

.adm-table tbody tr.is-active td:last-child {
  border-right-color: rgba(99, 102, 241, 0.5);
}

.adm-zoom-bar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.lookup-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.lookup-tab-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 13px;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.lookup-tab-btn.active {
  background: var(--text-main);
  color: var(--bg-primary);
  border-color: var(--text-main);
}

.lookup-add-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 12px;
}

.lookups-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lookup-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-surface);
}

.lookup-row.adm-row-dragging {
  opacity: 0.35;
  background: var(--bg-subtle);
}

.lookup-row.adm-drop-before {
  box-shadow: inset 0 3px 0 #6366f1;
}

.lookup-row.adm-drop-after {
  box-shadow: inset 0 -3px 0 #6366f1;
}

.lookup-row.adm-row-just-moved {
  animation: admRowFlash 1.2s ease;
}

@media (max-width: 960px) {
  .cover-studio-body {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Unified Admin Navigation Bar (.admin-subnav) & /whatsnew Markdown Page
   ========================================================================== */
.admin-subnav-wrap {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  width: 100%;
}

.admin-subnav-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.admin-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.admin-nav-item:hover {
  border-color: var(--border-focus);
  background: var(--bg-surface);
}

.admin-nav-item.active {
  background: var(--text-main);
  color: var(--bg-primary);
  border-color: var(--text-main);
}

@media (max-width: 640px) {
  .admin-subnav-inner {
    padding: 8px 12px;
    gap: 6px;
  }
  .admin-nav-item {
    padding: 6px 11px;
    font-size: 0.78rem;
  }
}

/* /whatsnew Markdown Changelog Subpage */
.wn-container {
  max-width: 960px;
  margin: 26px auto 80px;
  padding: 0 24px;
}

.wn-hero {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--card-shadow);
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wn-eyebrow {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6366f1;
  margin-bottom: 4px;
}

.wn-hero h1 {
  font-size: 1.55rem;
  margin: 0 0 6px;
  line-height: 1.25;
}

.wn-hero p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.wn-toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wn-search {
  max-width: 420px;
}

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

.wn-jump-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.wn-jump-chip:hover {
  color: var(--text-main);
  border-color: var(--border-focus);
}

.wn-timeline {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.wn-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: var(--card-shadow);
  scroll-margin-top: 20px;
}

.wn-card.is-latest {
  border-color: #6366f1;
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.12);
}

.wn-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}

.wn-date-badge {
  background: var(--text-main);
  color: var(--bg-primary);
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.wn-card.is-latest .wn-date-badge {
  background: #6366f1;
  color: #ffffff;
}

.wn-card-head h2 {
  font-size: 1.18rem;
  margin: 0;
  line-height: 1.3;
}

.wn-md-body {
  font-size: 0.92rem;
  line-height: 1.62;
  color: var(--text-main);
}

.wn-md-body h3 {
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 14px 0 8px;
}

.wn-md-body h3:first-child {
  margin-top: 0;
}

.wn-md-body ul,
.wn-md-body ol {
  margin: 0 0 12px;
  padding-left: 20px;
}

.wn-md-body li {
  margin-bottom: 5px;
}

.wn-md-body p {
  margin: 0 0 10px;
}

.wn-md-body code {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 0.84em;
}

.wn-md-body pre {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px;
  overflow-x: auto;
  margin: 10px 0;
}

.wn-md-body pre code {
  border: none;
  padding: 0;
  background: transparent;
}

.wn-md-body a {
  color: #6366f1;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .wn-container {
    padding: 0 12px;
    margin-top: 16px;
  }
  .wn-hero,
  .wn-card {
    padding: 16px;
  }
  .wn-hero h1 {
    font-size: 1.3rem;
  }
}
/* ==========================================================================
   3-Tab Artwork Editor, Sticky Save Bar, Catalog Filters, Inquiries & Site Modal
   ========================================================================== */
.adm-editor-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  background: var(--bg-subtle);
  padding: 5px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-bottom: 14px;
  width: 100%;
  max-width: 100%;
}

.adm-editor-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 8px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  white-space: normal;
  word-break: break-word;
}

.adm-tab-title {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
}

.adm-tab-sub {
  font-size: 0.68rem;
  font-weight: 500;
  opacity: 0.78;
  line-height: 1.15;
}

@media (max-width: 480px) {
  .adm-editor-tab {
    padding: 7px 4px;
  }
  .adm-tab-title {
    font-size: 0.73rem;
  }
  .adm-tab-sub {
    font-size: 0.62rem;
  }
}

.adm-editor-tab:hover {
  color: var(--text-main);
}

.adm-editor-tab.active {
  background: var(--bg-surface);
  color: var(--text-main);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.adm-btn-crop,
.adm-btn-3dcover {
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 600;
}

.adm-btn-crop {
  border-color: #0d9488;
  color: #0f766e;
  background: rgba(13, 148, 136, 0.08);
}

.adm-btn-crop:hover {
  border-color: #0d9488;
  background: #0d9488;
  color: #ffffff;
}

[data-theme="dark"] .adm-btn-crop {
  color: #2dd4bf;
  border-color: rgba(45, 212, 191, 0.55);
  background: rgba(45, 212, 191, 0.12);
}

[data-theme="dark"] .adm-btn-crop:hover {
  border-color: #0d9488;
  background: #0d9488;
  color: #ffffff;
}

.adm-btn-3dcover {
  border-color: #6366f1;
  color: #4f46e5;
  background: rgba(99, 102, 241, 0.08);
}

.adm-btn-3dcover:hover {
  border-color: #6366f1;
  background: #6366f1;
  color: #ffffff;
}

[data-theme="dark"] .adm-btn-3dcover {
  color: #818cf8;
  border-color: rgba(129, 140, 248, 0.55);
  background: rgba(129, 140, 248, 0.12);
}

[data-theme="dark"] .adm-btn-3dcover:hover {
  border-color: #6366f1;
  background: #6366f1;
  color: #ffffff;
}

.adm-editor-panel {
  display: none;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
}

.adm-editor-panel > *,
.adm-dims-box {
  min-width: 0;
  max-width: 100%;
}

.adm-editor-panel.active {
  display: flex;
}

.adm-sticky-save-bar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  margin: 4px -4px -4px;
  padding: 12px 4px calc(4px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.adm-dirty-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.adm-dirty-badge {
  display: none;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #b45309;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 3px 10px;
  border-radius: 9999px;
}

.adm-dirty-badge.visible {
  display: inline-flex;
}

.btn-primary.is-dirty {
  background: #6366f1;
  border-color: #6366f1;
  color: #ffffff;
}

.adm-cat-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.adm-cat-chip {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.adm-cat-chip.active {
  background: var(--text-main);
  color: var(--bg-primary);
  border-color: var(--text-main);
}

.adm-micro-badges {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  vertical-align: middle;
}

.adm-micro-badge {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.adm-micro-badge.ok {
  background: #DCFCE7;
  color: #166534;
  border-color: rgba(22, 101, 52, 0.22);
}

.adm-micro-badge.social {
  background: #E0E7FF;
  color: #3730A3;
  border-color: rgba(55, 48, 163, 0.2);
}

.adm-micro-badge.stat {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.adm-nav-badge {
  background: #ef4444;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.adm-readiness-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px;
  min-width: 0;
}

.adm-readiness-item {
  font-size: 0.76rem;
  padding: 5px 8px;
  border-radius: 7px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  word-break: break-word;
}

.adm-readiness-item.ok {
  border-color: rgba(22, 163, 74, 0.3);
}

.adm-inq-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.adm-inq-card.is-new {
  border-color: #6366f1;
}

.adm-inq-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.adm-inq-msg {
  font-size: 0.86rem;
  line-height: 1.5;
  white-space: pre-wrap;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 10px;
}

.adm-site-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.adm-site-section {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.adm-site-section-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0 0 2px;
}

.adm-logo-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 12px;
}

.adm-logo-preview-wrap {
  min-width: 120px;
  min-height: 48px;
  max-width: 180px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px dashed var(--border-color);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.adm-logo-preview-img {
  max-height: 42px;
  max-width: 160px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.adm-logo-preview-empty {
  font-size: 0.74rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
}

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

.adm-accent-picker {
  width: 44px;
  height: 36px;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  cursor: pointer;
}

.adm-accent-hex {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (max-width: 640px) {
  .adm-site-grid {
    grid-template-columns: 1fr;
  }
}

/* Draft status & Publish readiness checklist (#4) */
.adm-micro-badge.draft {
  background: rgba(100, 116, 139, 0.18);
  color: var(--text-muted);
  border-color: rgba(100, 116, 139, 0.38);
  font-weight: 700;
}

.adm-table tbody tr.adm-clickable-row.is-draft td {
  opacity: 0.88;
  border-top-style: dashed;
  border-bottom-style: dashed;
}

.adm-web-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-muted);
}

.adm-web-status-pill.public {
  background: rgba(34, 197, 94, 0.14);
  color: #15803d;
  border-color: rgba(34, 197, 94, 0.35);
}

[data-theme="dark"] .adm-web-status-pill.public {
  color: #4ade80;
}

.adm-web-status-pill.draft {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.35);
}

[data-theme="dark"] .adm-web-status-pill.draft {
  color: #fbbf24;
}

.adm-readiness-item.is-clickable {
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.adm-readiness-item.is-clickable:hover {
  border-color: var(--accent, #6366f1);
  transform: translateY(-1px);
}

.adm-readiness-item.missing-req {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
}

[data-theme="dark"] .adm-readiness-item.missing-req {
  color: #f87171;
}

.adm-publish-draft-warn {
  font-size: 0.8rem;
  line-height: 1.45;
  padding: 9px 11px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--text-main);
}

.adm-sofa-paint.is-empty {
  background: transparent;
  border: 2px dashed rgba(82, 82, 91, 0.55);
  color: #52525B;
  box-shadow: none;
}

/* ==========================================================================
   Vlastné dialógy (#admDialogModal), publikačný náhľad & Kôš (soft-delete)
   ========================================================================== */
.adm-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 2600;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.adm-dialog-overlay[hidden] {
  display: none;
}

.adm-dialog-card {
  width: 100%;
  max-width: 540px;
  max-height: 90dvh;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.adm-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.adm-dialog-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.adm-dialog-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}

.adm-dialog-close:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.adm-dialog-body {
  padding: 18px 20px;
  overflow-y: auto;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-main);
}

.adm-dialog-msg {
  margin: 0;
  white-space: pre-line;
}

.adm-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-color);
  background: var(--bg-subtle);
}

.adm-btn-danger {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
}

.adm-btn-danger:hover {
  background: #b91c1c !important;
}

.adm-pub-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.adm-pub-meta-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.82rem;
}

.adm-pub-meta-box strong {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.adm-pub-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.adm-pub-thumb-wrap {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
}

.adm-pub-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.adm-pub-thumb-badge {
  position: absolute;
  top: 3px;
  left: 3px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  font-size: 0.65rem;
  padding: 1px 4px;
  border-radius: 4px;
}

.adm-pub-desc {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.84rem;
  max-height: 120px;
  overflow-y: auto;
  white-space: pre-wrap;
  color: var(--text-main);
}

.adm-pub-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
}

.adm-trash-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 9999px;
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .adm-trash-badge {
  color: #f87171;
}
/* ==== Modál Nastavenia webu & Texty — záložky, pevná hlavička a pätka ==== */
#siteSettingsModal .edit-modal-box.adm-site-modal {
  max-width: 820px;
  width: 94vw;
  max-height: 88vh;
  max-height: 88dvh;
  padding: 0;
  overflow: hidden;
}

.adm-site-head {
  flex: 0 0 auto;
  padding: 20px 24px 0;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.adm-site-head-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.adm-site-title {
  font-size: 1.3rem;
  margin: 0 0 4px;
}

.adm-site-lead {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

.adm-site-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.adm-site-close:hover {
  background: var(--border-color);
}

.adm-site-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.adm-site-tab {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 10px 16px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
}

.adm-site-tab:hover {
  color: var(--text-main);
}

.adm-site-tab.is-active {
  color: var(--text-main);
  border-bottom-color: var(--text-main);
}

.adm-site-tab:focus-visible {
  outline: 2px solid var(--text-main);
  outline-offset: -2px;
}

.adm-site-form {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0;
}

.adm-site-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px;
}

.adm-site-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  align-items: start;
}

.adm-site-panel[hidden] {
  display: none;
}

.adm-site-full {
  grid-column: 1 / -1;
}

.adm-site-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 24px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.adm-site-status {
  flex: 1 1 200px;
  font-size: 0.84rem;
}

.adm-site-footer-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

@media (max-width: 640px) {
  #siteSettingsModal .edit-modal-box.adm-site-modal {
    width: 100vw;
    max-height: 94dvh;
  }
  .adm-site-head { padding: 16px 16px 0; }
  .adm-site-body { padding: 16px; }
  .adm-site-footer { padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
  .adm-site-lead { display: none; }
  .adm-site-panel { grid-template-columns: 1fr; }
  .adm-site-footer-actions { width: 100%; }
  .adm-site-footer-actions > * { flex: 1; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ---- Texty pre kanály (admin-descriptions.js) ---- */
.adm-chdesc-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 12px;
  min-width: 0;
}

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

.adm-chdesc-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.adm-chdesc-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.adm-chdesc-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.adm-chdesc-tab:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

.adm-chdesc-tab.active {
  background: var(--text-main);
  color: var(--bg-surface);
  border-color: var(--text-main);
}

.adm-chdesc-dot {
  display: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
}

.adm-chdesc-tab.has-custom .adm-chdesc-dot {
  display: inline-block;
}

.adm-chdesc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.adm-chdesc-state-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.71rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
}

.adm-chdesc-state-badge.auto {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.adm-chdesc-state-badge.custom {
  background: #dcfce7;
  color: #166534;
  border: 1px solid rgba(22, 101, 52, 0.22);
}

[data-theme="dark"] .adm-chdesc-state-badge.custom {
  background: rgba(22, 101, 52, 0.35);
  color: #86efac;
}

.adm-chdesc-counter {
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.adm-chdesc-counter.warn {
  color: #b45309;
  font-weight: 600;
}

.adm-chdesc-counter.over {
  color: #dc2626;
  font-weight: 700;
}

[data-theme="dark"] .adm-chdesc-counter.warn {
  color: #fbbf24;
}

[data-theme="dark"] .adm-chdesc-counter.over {
  color: #f87171;
}

.adm-chdesc-textarea {
  font-size: 0.84rem;
  line-height: 1.45;
  resize: vertical;
  min-height: 96px;
}

.adm-chdesc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.adm-chdesc-auto-preview {
  background: var(--bg-subtle);
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  padding: 8px 10px;
}

.adm-chdesc-auto-preview-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.adm-chdesc-auto-preview-text {
  margin: 0;
  font-family: inherit;
  font-size: 0.78rem;
  line-height: 1.42;
  color: var(--text-main);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 150px;
  overflow-y: auto;
}

/* Zbaliteľná šablóna popisu v modáli Automatizácia */
.adm-tpl-details {
  width: 100%;
  border-top: 1px dashed var(--border-color);
  padding-top: 7px;
}

.adm-tpl-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.adm-tpl-summary::-webkit-details-marker {
  display: none;
}

.adm-tpl-summary:hover {
  color: var(--text-main);
}

.adm-tpl-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.adm-tpl-vars {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.adm-tpl-var-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}

.adm-tpl-var-chip:hover {
  background: var(--text-main);
  color: var(--bg-surface);
  border-color: var(--text-main);
}

.adm-tpl-textarea {
  font-size: 0.8rem;
  line-height: 1.42;
  resize: vertical;
  min-height: 92px;
}

.adm-tpl-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.adm-tpl-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.adm-tpl-btns {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Per-channel náhľady v potvrdzovacom modáli publikovania */
.adm-pub-ch-previews {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.adm-pub-ch-preview {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 6px 10px;
}

.adm-pub-ch-preview-sum {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  list-style: none;
}

.adm-pub-ch-preview-sum::-webkit-details-marker {
  display: none;
}

.adm-pub-ch-preview-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.adm-pub-ch-preview-body {
  margin-top: 6px;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 180px;
  overflow-y: auto;
}

/* AI generátor popisov pre kanály (Fáza 2) */
.adm-chdesc-ai-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.adm-chdesc-ai-notes {
  flex: 1 1 180px;
  min-width: 0;
  font-size: 0.78rem;
  padding: 6px 10px;
}

.adm-chdesc-ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  border-color: rgba(99, 102, 241, 0.45);
  color: #4f46e5;
}

.adm-chdesc-ai-btn:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.08);
  border-color: #6366f1;
}

[data-theme="dark"] .adm-chdesc-ai-btn {
  color: #a5b4fc;
  border-color: rgba(129, 140, 248, 0.45);
}

[data-theme="dark"] .adm-chdesc-ai-btn:hover:not(:disabled) {
  background: rgba(129, 140, 248, 0.14);
  border-color: #818cf8;
}

.adm-chdesc-ai-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.adm-chdesc-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: admChdescSpin 0.7s linear infinite;
}

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

.adm-chdesc-ai-status {
  font-size: 0.76rem;
  line-height: 1.4;
  padding: 6px 9px;
  border-radius: 8px;
}

.adm-chdesc-ai-status.success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid rgba(22, 101, 52, 0.22);
}

.adm-chdesc-ai-status.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid rgba(153, 27, 27, 0.22);
}

[data-theme="dark"] .adm-chdesc-ai-status.success {
  background: rgba(22, 101, 52, 0.3);
  color: #86efac;
}

[data-theme="dark"] .adm-chdesc-ai-status.error {
  background: rgba(153, 27, 27, 0.35);
  color: #fca5a5;
}

.adm-chdesc-meta-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.adm-chdesc-lang-switch {
  display: inline-flex;
  align-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 2px;
  gap: 1px;
}

.adm-chdesc-lang-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 2px 7px;
  border-radius: 9999px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  line-height: 1.3;
}

.adm-chdesc-lang-btn:hover {
  color: var(--text-primary);
}

.adm-chdesc-lang-btn.active {
  background: var(--accent, #111827);
  color: #ffffff;
}

[data-theme="dark"] .adm-chdesc-lang-btn.active {
  background: #6366f1;
  color: #ffffff;
}

.adm-chdesc-provider-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 9999px;
  white-space: nowrap;
}

.adm-chdesc-provider-badge.gemini {
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

[data-theme="dark"] .adm-chdesc-provider-badge.gemini {
  background: rgba(129, 140, 248, 0.18);
  color: #c7d2fe;
  border-color: rgba(129, 140, 248, 0.35);
}

.adm-chdesc-provider-badge.fallback {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid rgba(217, 119, 6, 0.35);
}

[data-theme="dark"] .adm-chdesc-provider-badge.fallback {
  background: rgba(180, 83, 9, 0.28);
  color: #fde68a;
  border-color: rgba(245, 158, 11, 0.38);
}

.adm-btn-danger-soft {
  color: #dc2626 !important;
  border-color: rgba(220, 38, 38, 0.35) !important;
}

.adm-btn-danger-soft:hover {
  background: rgba(220, 38, 38, 0.08) !important;
}

[data-theme="dark"] .adm-btn-danger-soft {
  color: #f87171 !important;
  border-color: rgba(248, 113, 113, 0.4) !important;
}

/* ==== Modál Automatizácia & Integrácie — pevná hlavička/pätka, 2-stĺpcový grid, mobil fullscreen ==== */
#automationModal .edit-modal-box.adm-auto-modal {
  width: min(1080px, 94vw);
  max-width: none;
  max-height: 90vh;
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.adm-auto-head {
  flex: 0 0 auto;
  padding: 20px 24px 0;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.adm-auto-head-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.adm-auto-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.adm-auto-tab {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 10px 16px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
}

.adm-auto-tab:hover {
  color: var(--text-main);
}

.adm-auto-tab.active {
  color: var(--text-main);
  border-bottom-color: var(--text-main);
}

.adm-auto-tab:focus-visible {
  outline: 2px solid var(--text-main);
  outline-offset: -2px;
}

.adm-auto-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
}

#automationModal .adm-auto-tab-panel {
  flex: 0 0 auto;
  min-height: auto;
}

#automationModal .adm-auto-scroll {
  overflow: visible;
  padding-right: 0;
  gap: 18px;
}

#automationModal .adm-auto-row,
#automationModal .adm-integ-card {
  min-width: 0;
}

#automationModal .adm-auto-cli-box code {
  word-break: break-word;
  overflow-wrap: anywhere;
}

@media (min-width: 780px) {
  #automationModal .adm-auto-list,
  #automationModal #admIntegrationsList {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
  }
}

.adm-auto-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 24px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
}

.adm-auto-status {
  flex: 1 1 200px;
  font-size: 0.84rem;
}

.adm-auto-footer-actions {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

@media (max-width: 640px) {
  #automationModal {
    padding: 0;
  }
  #automationModal .edit-modal-box.adm-auto-modal {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    margin: 0;
    border: none;
    overflow-x: hidden;
  }
  .adm-auto-head {
    padding: 14px 16px 0;
  }
  .adm-auto-body {
    padding: 14px 16px;
  }
  .adm-auto-footer {
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  }
  #automationModal .adm-site-lead {
    display: none;
  }
  #automationModal .adm-auto-list,
  #automationModal #admIntegrationsList {
    grid-template-columns: 1fr;
  }
  .adm-auto-footer-actions {
    width: 100%;
  }
  .adm-auto-footer-actions > * {
    flex: 1;
    justify-content: center;
  }
}
