/* ── Admin Sidebar Layout ── */
.admin-layout {
  display: flex;
  height: 100vh;
  padding-top: 60px;
  box-sizing: border-box;
}

/* Desktop: icon-only strip by default, expands on --open */
.admin-sidebar {
  width: 56px;
  flex-shrink: 0;
  border-right: 1px solid var(--color-border);
  padding: 20px 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  transition: width 0.2s ease;
}

.admin-layout--open .admin-sidebar {
  width: 200px;
}

.admin-sidebar-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  padding: 0 20px 12px;
  display: none;
}

.admin-sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color var(--transition), background var(--transition);
}

.admin-sidebar-link:hover {
  color: var(--color-text);
  background: var(--color-surface-alt);
}

.admin-sidebar-link--active {
  color: var(--color-primary);
  font-weight: 600;
}

.admin-sidebar-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: inline-flex;
}

.admin-sidebar-label {
  overflow: hidden;
  white-space: nowrap;
  display: none;
}

.admin-layout--open .admin-sidebar-label {
  display: inline;
}

/* Hamburger toggle — inside sidebar, top */
.admin-sidebar-toggle {
  display: flex;
  align-items: center;
  padding: 10px 18px;
  margin-bottom: 8px;
  border: none;
  background: none;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color var(--transition);
}

.admin-sidebar-toggle:hover {
  color: var(--color-text);
}

/* Mobile hamburger — only shown on mobile when sidebar is off-screen */
.admin-hamburger {
  display: none;
}

/* Sidebar overlay — desktop: not used */
.admin-sidebar-overlay {
  display: none;
}

#admin-content,
#project-content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
}

/* Mobile: full overlay drawer */
@media (max-width: 768px) {
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 200px;
    z-index: 1000;
    padding-top: 80px;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .admin-layout--open .admin-sidebar {
    width: 200px;
    transform: translateX(0);
  }

  .admin-sidebar-title {
    display: block;
  }

  .admin-sidebar-link {
    padding: 8px 20px;
    justify-content: flex-start;
  }

  .admin-sidebar-label {
    display: inline;
  }

  .admin-sidebar-toggle {
    display: none;
  }

  .admin-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1001;
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    color: var(--color-text);
    cursor: pointer;
  }

  .admin-hamburger:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
  }

  .admin-sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0,0,0,0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }

  .admin-layout--open .admin-sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }
}

/* ── Sidebar Spacer ── */
.admin-sidebar-spacer {
  flex: 1;
}

/* ── Sidebar Divider ── */
.sidebar-divider {
  height: 1px;
  background: var(--color-border);
  margin: 8px 14px;
}

/* ── Sidebar Section Title ── */
.sidebar-section-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  padding: 8px 18px 4px;
  display: none;
}

.admin-layout--open .sidebar-section-title {
  display: block;
}

/* ── Sidebar Sub-items (indented under current project) ── */
.sidebar-sub-items {
  display: flex;
  flex-direction: column;
}

.sidebar-sub-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 18px 5px 40px;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  transition: color var(--transition), background var(--transition);
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font-sans);
  width: 100%;
  text-align: left;
}

.sidebar-sub-link:hover {
  color: var(--color-text);
  background: var(--color-surface-alt);
}

.sidebar-sub-link--active {
  color: var(--color-primary);
}

.sidebar-sub-link--danger {
  color: var(--color-error);
  opacity: 0.7;
}

.sidebar-sub-link--danger:hover {
  opacity: 1;
  background: rgba(239, 68, 68, 0.06);
}

.sidebar-sub-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  display: inline-flex;
}

/* ── About Page ── */
.admin-about-page {
  max-width: 720px;
  line-height: 1.6;
}

.admin-about-page h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.admin-about-lead {
  font-size: 1.0625rem;
  color: var(--color-text-muted);
  margin-bottom: 32px;
}

.admin-about-page h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 28px 0 12px;
}

.admin-about-page p {
  margin: 0 0 12px;
  font-size: 0.9375rem;
}

.admin-about-page ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.admin-about-page li {
  font-size: 0.9375rem;
  margin-bottom: 6px;
}

.admin-about-pipeline {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  margin-bottom: 12px;
}

.admin-about-pipeline span {
  padding: 4px 12px;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  white-space: nowrap;
}

.admin-about-pipeline span:not(:last-child)::after {
  content: "\2192";
  margin-left: 8px;
  color: var(--color-text-muted);
}

/* ── Admin Layout ── */
.admin {
  min-height: 100vh;
  padding-top: 80px;
}

.admin > .container {
  padding-bottom: 50vh;
}

.admin-layout .admin {
  min-height: 0;
  padding-top: 20px;
}

.admin--list {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.admin--list > .container {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  max-width: 1600px;
}

.admin--list #admin-list-content {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.admin--list .admin-header {
  margin-bottom: 8px;
}

.admin-header {
  margin-bottom: 32px;
}

.admin-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.admin-header p {
  color: var(--color-text-muted);
  margin-top: 4px;
}


/* ── Tabs ── */
.admin-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 0;
}

.admin-tab {
  padding: 10px 20px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
}

.admin-tab:hover {
  color: var(--color-text);
}

.admin-tab--active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}

/* ── Search & Filters ── */
.admin-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.admin-search {
  flex: 1;
  min-width: 200px;
  padding: 10px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color var(--transition);
}

.admin-search:focus {
  outline: none;
  border-color: var(--color-primary);
}

.admin-filter {
  padding: 10px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  background: var(--color-surface);
  color: var(--color-text);
  cursor: pointer;
}

.admin-filter:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* ── Table ── */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.admin-table th {
  text-align: left;
  padding: 10px 16px;
  border-bottom: 2px solid var(--color-border);
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.admin-table tr[data-href] {
  cursor: pointer;
}

.admin-table tr:hover td {
  background: var(--color-surface-alt);
}

.admin-table a {
  color: var(--color-text);
  text-decoration: none;
}

.admin-table a:hover {
  color: var(--color-primary);
}

.admin-th-thumb,
.admin-td-thumb {
  width: 40px;
  padding-left: 8px;
  padding-right: 0;
}


.admin-thumb-placeholder {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-alt);
  color: var(--color-text-muted);
  opacity: 0.4;
}

.admin-thumb-placeholder:has(img) {
  opacity: 1;
}

.admin-thumb-placeholder img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.admin-thumb-placeholder svg {
  width: 18px;
  height: 18px;
}

.admin-links {
  display: flex;
  gap: 8px;
}

.admin-icon-link {
  display: inline-flex;
  color: var(--color-text-muted);
  opacity: 0.6;
  transition: all var(--transition);
}

.admin-group-header {
  cursor: pointer;
}

.admin-group-header td {
  background: var(--color-surface-alt);
}

.admin-group-count {
  font-size: 0.75rem;
  color: var(--color-primary);
  font-weight: 500;
  margin-left: 4px;
}

.admin-icon-link:hover {
  color: var(--color-primary);
  opacity: 1;
}

.admin-thumb-placeholder--ref {
  opacity: 0.6;
  color: var(--color-primary);
}

.admin-table .cell-name {
  font-weight: 500;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-table .cell-key {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-type-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.admin-type-badge--code {
  background: #EEF2FF;
  color: #4F46E5;
}

.admin-type-badge--footprint {
  background: #ECFDF5;
  color: #059669;
}

.admin-type-badge--cell {
  background: #FFF7ED;
  color: #C2410C;
}

/* ── Detail Page ── */
.admin-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.admin-detail-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  word-break: break-all;
}

.admin-detail-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.admin-detail-meta dt {
  font-weight: 600;
  color: var(--color-text);
}

.admin-detail-meta dd {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.admin-detail-meta dd a {
  color: var(--color-primary);
  text-decoration: none;
}

.admin-detail-meta dd a:hover {
  text-decoration: underline;
}

.admin-detail-meta dl {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.admin-detail-links {
  display: flex;
  gap: 16px;
  margin-left: auto;
}

.admin-detail-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--color-primary);
  text-decoration: none;
}

.admin-detail-link:hover {
  text-decoration: underline;
}

/* ── Sibling Footprints Dropdown ── */
.admin-siblings-select {
  padding: 2px 6px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.8125rem;
  font-family: var(--font-sans);
  cursor: pointer;
}

/* ── LEGACY sibling pills (unused) ── */
.admin-siblings-list a {
  display: inline-block;
  padding: 2px 10px;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-primary);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  transition: all var(--transition);
}

.admin-siblings-list a:hover {
  border-color: var(--color-primary);
  background: var(--color-surface);
}

.admin-siblings-list a.admin-siblings-current {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* ── Detail Text Blocks ── */
.admin-detail-text {
  margin-bottom: 20px;
}

.admin-detail-text h3 {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.admin-detail-text p {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--color-text);
}

/* ── Image Preview ── */
.admin-image-preview {
  float: right;
  margin: 0 0 16px 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px;
  background: var(--color-surface-alt);
  text-align: center;
}

.admin-image-preview img {
  max-height: 200px;
  display: inline-block;
  border-radius: var(--radius-sm);
}

/* ── Ace Editor Container ── */
.admin-editor-label {
  clear: both;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 8px;
  margin-top: 24px;
}

.admin-editor-label:first-of-type {
  margin-top: 0;
}

.admin-editor-label-link {
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: var(--color-primary);
  text-decoration: none;
  margin-left: 6px;
}

.admin-editor-label-link:hover {
  text-decoration: underline;
}

.admin-editor-container {
  clear: both;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 16px;
  max-width: 500px;
}

.admin-editor-container--wide {
  max-width: 100%;
}

.admin-editor {
  width: 100%;
}

.admin-wire-code {
  background: #272822;
  color: #f8f8f2;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  overflow-x: auto;
  margin-bottom: 16px;
  white-space: pre;
}

.admin-wire-toggle {
  float: right;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--color-text-muted);
  cursor: pointer;
  user-select: none;
}

.admin-wire-toggle input {
  vertical-align: -1px;
  margin-right: 4px;
}

.admin-wire-code a {
  color: #66d9ef;
  text-decoration: none;
}

.admin-wire-code a:hover {
  text-decoration: underline;
}

/* ── Footprint workspace: canvas | params | code ── */
.container:has(+ .fp-workspace) {
  padding-bottom: 0;
}

.fp-workspace {
  max-width: 1200px;
  margin: 0 auto 20px;
  padding: 0 24px;
}

.fp-workspace .fp-canvas-container {
  margin-bottom: 16px;
}

.fp-workspace .admin-editor-label {
  margin-top: 0;
}

.fp-workspace-editors {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}

.fp-workspace-symbols {
  flex: 0 0 auto;
  width: 220px;
}

.fp-workspace-code {
  flex: 1;
  min-width: 300px;
}

.fp-workspace .admin-editor-container {
  margin-bottom: 0;
}

.fp-workspace .admin-symbols-table {
  margin-bottom: 0;
}

/* ── Side-by-side editors (non-workspace) ── */
.admin-editors-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
}

.admin-editors-grid .admin-editor-label {
  margin-top: 0;
}

@media (max-width: 900px) {
  .admin-editors-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Collection Link ── */
.admin-collection-link {
  font-weight: 400;
  font-size: 0.8125rem;
  color: var(--color-primary);
  text-decoration: none;
  margin-left: 4px;
}

.admin-collection-link:hover {
  text-decoration: underline;
}

/* ── Symbols Table ── */
.admin-symbols-table {
  max-width: 500px;
  margin-bottom: 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.admin-symbols-table td,
.admin-symbols-table th {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  padding: 3px 8px;
}

.symbol-desc-row td {
  font-family: var(--font-sans, sans-serif);
  color: var(--color-text-muted);
  font-size: 0.75rem;
  padding: 4px 8px 1px;
  border-bottom: none;
}

.symbol-input {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  width: 100%;
  color: var(--color-text);
  transition: border-color var(--transition);
}

.symbol-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* ── Save Button ── */
.admin-save-btn {
  padding: 6px 20px;
  font-size: 0.8125rem;
}

.admin-save-btn:disabled {
  background: #888;
  color: #ccc;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.admin-save-status {
  font-size: 0.8125rem;
  margin-left: 10px;
  vertical-align: middle;
}

.admin-save-status--ok {
  color: #059669;
}

.admin-save-status--warn {
  color: #D97706;
}

.admin-save-status--error {
  color: #DC2626;
}

/* ── Access Denied ── */
.admin-denied {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 12px;
  color: var(--color-text-muted);
}

.admin-denied h2 {
  font-size: 1.5rem;
  color: var(--color-text);
}

/* ── Loading ── */
.admin-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--color-text-muted);
}

.admin-loading[hidden] {
  display: none;
}

/* ── Total count ── */
.admin-total {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-left: auto;
  white-space: nowrap;
}

/* ── Footprint Canvas Renderer ── */
.fp-canvas-container {
  position: relative;
  border: 1px solid #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  padding-top: 12px;
  margin-top: 20px;
  margin-bottom: 20px;
  text-align: center;
  max-width: 100%;
  min-height: 400px;
  background: #e0e0e0;
}

.fp-canvas {
  display: inline-block;
  max-width: 100%;
  height: auto !important;
}

.fp-toggle-bar {
  background: #272822;
  border-top: 1px solid #3E3D32;
}

.fp-layer-toggles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
}

.fp-unit-btn {
  width: 60px;
  text-align: center;
  justify-content: center;
}

.fp-layer-pills {
}

.fp-layer-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid #555;
  border-radius: var(--radius-full);
  background: transparent;
  color: #666;
  font-size: 0.75rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all 0.15s ease;
}

.fp-layer-btn--active {
  color: #ccc;
  border-color: #888;
}

.fp-layer-btn:hover {
  border-color: #aaa;
}

.fp-layer-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.fp-snap-info {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #aaa;
  white-space: nowrap;
  text-align: center;
  align-self: center;
}

.fp-cursor-info {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #ccc;
  white-space: nowrap;
  align-self: center;
  min-width: 10ch;
  text-align: right;
}

.fp-drawing-opacity {
  width: 60px;
  height: 16px;
  cursor: pointer;
  vertical-align: middle;
  accent-color: #FF6600;
}

.fp-drawing-rotation {
  width: 50px;
  height: 16px;
  cursor: pointer;
  vertical-align: middle;
  accent-color: #FF6600;
}

.fp-render-error {
  padding: 24px;
  color: #CC3333;
  font-size: 0.875rem;
  font-family: var(--font-mono);
}

.fp-render-empty {
  padding: 24px;
  color: #666;
  font-size: 0.875rem;
  text-align: center;
}

/* ── Sources List ── */
.admin-table--sources .source-name {
  font-weight: 500;
}

.admin-table--sources .source-url {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  word-break: break-all;
}

/* ── Sources ── */

.source-paste-target {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 24px;
}

.source-paste-target:hover,
.source-paste-target:focus {
  border-color: var(--color-primary);
  background: rgba(99, 102, 241, 0.03);
  outline: none;
}
.source-paste-target--dragover {
  border-color: var(--color-primary);
  background: rgba(99, 102, 241, 0.08);
  border-style: solid;
}

.sources-dragover {
  outline: 2px dashed var(--color-primary);
  outline-offset: -2px;
  background: rgba(99, 102, 241, 0.04);
  border-radius: var(--radius-md);
}

.source-paste-hint {
  text-align: center;
  color: var(--color-text-muted);
}

.source-paste-hint p {
  margin-top: 8px;
  font-size: 0.9375rem;
}

.source-paste-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.source-paste-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
  transition: all var(--transition);
}

.source-paste-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.source-paste-card img {
  width: 100%;
  display: block;
  background: var(--color-surface-alt);
}

.source-paste-card-status {
  padding: 8px 12px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-align: center;
}

.source-paste-card-status--ok {
  color: #059669;
}

.source-paste-card-status--error {
  color: #DC2626;
}

.source-image-preview {
  margin-bottom: 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface-alt);
  text-align: center;
}

.source-image-preview img {
  max-width: 100%;
  display: inline-block;
}

.source-name-input {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-sans);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  background: transparent;
  color: var(--color-text);
  width: 100%;
  transition: border-color var(--transition), background var(--transition);
}

.source-name-input:hover {
  border-color: var(--color-border);
  background: var(--color-surface);
}

.source-name-input:focus {
  outline: none;
  border-color: var(--color-primary);
  background: var(--color-surface);
}

.source-name-input::placeholder {
  color: var(--color-text-muted);
  font-weight: 400;
}

/* ── Todo List ── */
.admin--todo > .container {
  max-width: 100%;
  margin: 0;
}

.todo-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.todo-input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color var(--transition);
}

.todo-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.todo-add-btn {
  padding: 10px 20px;
  white-space: nowrap;
}

.todo-sections {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.todo-section-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.todo-list {
  min-height: 4px;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}

.todo-list--dragover {
  background: rgba(99, 102, 241, 0.06);
}

.todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
  border: none;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  background: transparent;
  transition: opacity 0.15s ease;
  cursor: default;
}

.todo-item[draggable="true"] {
  cursor: grab;
}

.todo-item[draggable="true"]:active {
  cursor: grabbing;
}

.todo-item--dragging {
  opacity: 0.4;
}

.todo-item--done .todo-title {
  text-decoration: line-through;
  color: var(--color-text-muted);
}

.todo-checkbox-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  position: relative;
  cursor: pointer;
}

.todo-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.todo-checkmark {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-border);
  border-radius: 3px;
  transition: all 0.15s ease;
}

.todo-checkbox:checked + .todo-checkmark {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.todo-checkbox:checked + .todo-checkmark::after {
  content: '';
  display: block;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin: 1px auto 0;
}

.todo-title {
  flex: 1;
  font-size: 0.9375rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.todo-delete-btn {
  opacity: 0;
  border: none;
  background: none;
  color: var(--color-text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.todo-item:hover .todo-delete-btn {
  opacity: 0.6;
}

.todo-delete-btn:hover {
  opacity: 1 !important;
  color: var(--color-error);
}

.todo-empty {
  padding: 8px 12px;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-style: italic;
}

.todo-drop-indicator {
  height: 2px;
  background: var(--color-primary);
  border-radius: 1px;
  margin: 2px 0;
}

/* ── Block Detail Pins ── */
.admin-block-pins {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.admin-block-pin {
  display: inline-block;
  padding: 2px 10px;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--color-text);
}
