/* ================================================================
   ADMIN PANEL — editorial CMS
   ================================================================ */

.admin-body {
  display: flex;
  flex-direction: row;   /* override base.css `body { flex-direction: column }` */
  min-height: 100vh;
  background: #f4f3f0;
  font-family: var(--font-sans);
}
/* Kill the paper-grain overlay from base.css inside the admin */
.admin-body::before { display: none; }

/* ── Sidebar ── */
.admin-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  padding: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-brand {
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.admin-brand-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--paper);
  text-decoration: none;
  transition: color 0.2s;
}
.admin-brand-name:hover { color: var(--crimson); }
.admin-brand-tag {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--crimson);
  background: rgba(180,35,42,0.15);
  padding: 0.15rem 0.4rem;
  border-radius: 2px;
}

.admin-nav { padding: 0.75rem 0; flex: 1; }

.admin-nav-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(247,243,234,0.35);
  padding: 1rem 1.25rem 0.4rem;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(247,243,234,0.65);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  border-left: 3px solid transparent;
}
.admin-nav-item:hover { color: var(--paper); background: rgba(255,255,255,0.06); }
.admin-nav-item.active { color: var(--paper); border-left-color: var(--crimson); background: rgba(255,255,255,0.06); }
.admin-nav-icon { font-size: 1rem; }

.admin-logout {
  display: block;
  padding: 1rem 1.25rem;
  font-size: 0.82rem;
  color: rgba(247,243,234,0.4);
  text-decoration: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  transition: color 0.2s;
}
.admin-logout:hover { color: var(--crimson); }

/* ── Main area ── */
.admin-main {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

/* ── Shared buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  background: var(--crimson);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--color-secondary); transform: translateY(-1px); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1.25rem;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(22,19,15,0.2);
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
  white-space: nowrap;
}
.btn-secondary:hover { border-color: var(--ink); background: rgba(22,19,15,0.04); }

/* ── Dashboard ── */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 2rem 1.25rem;
  border-bottom: 1px solid rgba(22,19,15,0.08);
  background: #fff;
  gap: 1rem;
}
.dash-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--ink);
}
.dash-subtitle { font-size: 0.82rem; color: var(--muted); margin-top: 0.2rem; }

.dash-table-wrap {
  padding: 1.5rem 2rem;
  overflow-x: auto;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(22,19,15,0.07);
}
.dash-table th {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.75rem 1rem;
  text-align: start;
}
.dash-table td { padding: 0.85rem 1rem; border-bottom: 1px solid rgba(22,19,15,0.06); vertical-align: middle; }
.dash-row:last-child td { border-bottom: none; }
.dash-row:hover td { background: rgba(22,19,15,0.02); }

.dash-cell-title { display: flex; align-items: center; gap: 0.5rem; }
.dash-article-link {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s;
}
.dash-article-link:hover { color: var(--crimson); }
.dash-view-link { font-size: 0.75rem; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.dash-view-link:hover { color: var(--crimson); }

.dash-cat {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--crimson);
}

.dash-status {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}
.dash-status--published { background: rgba(22,163,74,0.12); color: #16a34a; }
.dash-status--draft     { background: rgba(22,19,15,0.07);  color: var(--muted); }

.dash-date { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }

.dash-actions { display: flex; gap: 0.4rem; align-items: center; }
.dash-delete-form { margin: 0; }
.dash-btn {
  padding: 0.3rem 0.7rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 2px;
  border: 1px solid rgba(22,19,15,0.15);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.dash-btn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.dash-btn--danger:hover { background: var(--crimson); border-color: var(--crimson); color: #fff; }

.dash-empty {
  padding: 4rem 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
}
.dash-empty a { color: var(--crimson); text-decoration: none; }

/* ── Editor ── */
.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: #fff;
  border-bottom: 1px solid rgba(22,19,15,0.08);
  position: sticky;
  top: 0;
  z-index: 10;
  gap: 1rem;
}
.editor-header-left { display: flex; align-items: center; gap: 1rem; }
.editor-back {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.editor-back:hover { color: var(--ink); }
.editor-heading {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--ink);
}
.editor-header-actions { display: flex; gap: 0.5rem; }

.editor-status-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  white-space: nowrap;
}
.editor-status-badge--published { background: #e8f5e9; color: #2e7d32; }
.editor-status-badge--draft     { background: #eceae6; color: #5a5348; }
.editor-status-badge--scheduled { background: #fff3e0; color: #a16207; }

.editor-flash {
  margin: 1rem 2rem 0;
  padding: 0.75rem 1rem;
  border-radius: 3px;
  font-size: 0.88rem;
}
.editor-flash--success { background: rgba(22,163,74,0.1); color: #16a34a; border: 1px solid rgba(22,163,74,0.2); }
.editor-flash--error   { background: rgba(180,35,42,0.08); color: var(--crimson); border: 1px solid rgba(180,35,42,0.2); }

.editor-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 0;
  min-height: calc(100vh - 61px);
  align-items: start;
}

.editor-fields {
  padding: 1.5rem;
  border-inline-end: 1px solid rgba(22,19,15,0.08);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: calc(100vh - 61px);
}

.editor-content-col {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: calc(100vh - 61px);
}

.editor-section { margin-bottom: 1.1rem; }
.editor-section--seo { border-top: 1px solid rgba(22,19,15,0.08); padding-top: 1rem; }

.editor-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

.editor-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate);
  margin-bottom: 0.4rem;
}
.editor-label-hint { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); }

.editor-input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(22,19,15,0.15);
  border-radius: 3px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--ink);
  background: var(--paper);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}
.editor-input:focus {
  border-color: var(--crimson);
  box-shadow: 0 0 0 3px rgba(180,35,42,0.08);
}
.editor-input--lg { font-size: 1rem; font-weight: 600; padding: 0.65rem 0.75rem; }
.editor-input[type="checkbox"] { width: auto; margin-inline-end: 0.4rem; }

.editor-select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(22,19,15,0.15);
  border-radius: 3px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--ink);
  background: var(--paper);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a7367' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 0.75rem center;
  padding-left: 2rem;
}

.editor-image-preview {
  margin-top: 0.75rem;
}
.editor-image-preview img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid rgba(22,19,15,0.1);
}
.editor-image-caption {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

.editor-seo-toggle {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate);
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}
.editor-seo-fields { display: none; }
.editor-seo-fields.open { display: block; }

.editor-serp {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: var(--paper);
  border-radius: 4px;
  border: 1px solid rgba(22,19,15,0.1);
}
.serp-title { font-size: 0.9rem; color: #1a0dab; font-weight: 500; }
.serp-url   { font-size: 0.72rem; color: #006621; margin: 0.15rem 0; }
.serp-desc  { font-size: 0.78rem; color: #545454; line-height: 1.4; }

.editor-body-input {
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  min-height: 420px;
  background: #fafaf8;
}

.editor-preview {
  border: 1px solid rgba(22,19,15,0.1);
  border-radius: 3px;
  padding: 1.25rem;
  background: #fff;
  min-height: 200px;
  font-size: 1rem;
  line-height: 1.8;
}

/* ── Sheet-sync banner ── */
.sync-banner {
  margin: 1rem 2rem 0;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sync-banner--ok   { background: rgba(22,163,74,0.1);  color: #16a34a; border: 1px solid rgba(22,163,74,0.2); }
.sync-banner--warn { background: rgba(202,138,4,0.1);  color: #a16207; border: 1px solid rgba(202,138,4,0.25); }
.sync-banner--err  { background: rgba(192,57,43,0.1);  color: #c0392b; border: 1px solid rgba(192,57,43,0.25); }

/* ================================================================
   CONSOLE HOME
   ================================================================ */

.console-body { padding: 1.5rem 2rem 3rem; }
.console-section { margin-bottom: 2.5rem; }
.console-h {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.console-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.85rem;
}
.console-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.1rem;
  background: #fff;
  border: 1px solid rgba(22,19,15,0.1);
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.console-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(22,19,15,0.1);
  border-color: var(--crimson);
}
.console-card-icon { font-size: 1.4rem; color: var(--crimson); }
.console-card-name { font-weight: 700; text-transform: capitalize; }
.console-card-count { font-size: 0.75rem; color: var(--muted); }

.console-sites {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}
.console-site {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: #fff;
  border: 1px solid rgba(22,19,15,0.1);
  border-radius: 6px;
}
.console-site--off { opacity: 0.55; }
.console-site-top { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.console-site-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}
.console-site-body { flex: 1; min-width: 0; }
.console-site-name { font-weight: 700; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.console-site-domain { font-size: 0.75rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.console-site-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.console-site-btn {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 3px;
  text-decoration: none;
  background: var(--ink);
  color: var(--paper);
  white-space: nowrap;
  transition: background 0.2s;
}
.console-site-btn:hover { background: var(--crimson); }
.console-site-btn--ghost { background: transparent; color: var(--ink); border: 1px solid rgba(22,19,15,0.2); }
.console-site-btn--ghost:hover { background: rgba(22,19,15,0.05); color: var(--ink); }

/* ================================================================
   DATA GRID — spreadsheet UI
   ================================================================ */

.grid-filter {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.grid-filter select {
  padding: 0.4rem 0.6rem;
  border: 1px solid rgba(22,19,15,0.2);
  border-radius: 3px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  background: #fff;
  cursor: pointer;
}

.grid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem 1rem;
  background: #fff;
  border-bottom: 1px solid rgba(22,19,15,0.08);
  gap: 1rem;
}
.grid-header .dash-subtitle { max-width: 60ch; }
.grid-header code {
  background: rgba(22,19,15,0.06);
  padding: 0.05rem 0.35rem;
  border-radius: 3px;
  font-size: 0.78em;
}
.grid-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }

/* Sheet tabs */
.grid-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0 2rem;
  background: #fff;
  border-bottom: 1px solid rgba(22,19,15,0.1);
  overflow-x: auto;
}
.grid-tab {
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}
.grid-tab:hover { color: var(--ink); }
.grid-tab.active { color: var(--crimson); border-bottom-color: var(--crimson); }
.grid-tab-count {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  background: rgba(22,19,15,0.06);
  border-radius: 10px;
  padding: 0.05rem 0.45rem;
  margin-inline-start: 0.25rem;
}

.grid-status {
  margin: 1rem 2rem 0;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  font-size: 0.85rem;
}
.grid-status--ok  { background: rgba(22,163,74,0.1); color: #16a34a; border: 1px solid rgba(22,163,74,0.2); }
.grid-status--err { background: rgba(180,35,42,0.08); color: var(--crimson); border: 1px solid rgba(180,35,42,0.2); }

.grid-scroll {
  margin: 1rem 2rem 2rem;
  overflow: auto;
  max-height: calc(100vh - 230px);
  border: 1px solid rgba(22,19,15,0.12);
  border-radius: 4px;
  background: #fff;
}

.grid-table {
  border-collapse: collapse;
  font-size: 0.8rem;
  font-family: var(--font-sans);
  min-width: 100%;
}
.grid-table th, .grid-table td {
  border: 1px solid rgba(22,19,15,0.1);
  padding: 0;
  vertical-align: top;
}

/* Sticky header row */
.grid-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  padding: 0.5rem 0.6rem;
  text-align: left;
  white-space: nowrap;
}

.grid-rownum {
  background: #f4f3f0;
  color: var(--muted);
  text-align: center;
  font-size: 0.7rem;
  padding: 0.3rem 0.5rem !important;
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 36px;
  user-select: none;
}
.grid-table thead .grid-rownum { z-index: 3; background: var(--ink); }

.grid-cell {
  padding: 0.4rem 0.6rem !important;
  min-width: 120px;
  max-width: 420px;
  outline: none;
  white-space: pre-wrap;
  word-break: break-word;
  cursor: text;
  line-height: 1.4;
}
.grid-cell:focus {
  box-shadow: inset 0 0 0 2px var(--crimson);
  background: rgba(180,35,42,0.03);
}

.grid-action-col { width: 40px; background: var(--ink); }
.grid-action { text-align: center; background: #f4f3f0; }
.grid-action-btn {
  display: inline-block;
  padding: 0.2rem 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--slate);
  text-decoration: none;
  border-radius: 3px;
  border: 1px solid rgba(22,19,15,0.15);
  background: #fff;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}
.grid-action-btn:hover { color: var(--ink); background: #e8e6e0; }
.grid-del-col { width: 32px; background: var(--ink); }
.grid-del { text-align: center; background: #f4f3f0; }
.grid-del-btn {
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  transition: color 0.2s, background 0.2s;
}
.grid-del-btn:hover { color: #fff; background: var(--crimson); }

/* ================================================================
   RESPONSIVE — admin on mobile/tablet
   ================================================================ */

@media (max-width: 900px) {
  .editor-layout { grid-template-columns: 1fr; }
  .editor-fields {
    border-inline-end: none;
    border-bottom: 1px solid rgba(22,19,15,0.08);
    min-height: auto;
  }
  .editor-content-col { min-height: auto; }
}

@media (max-width: 768px) {
  .admin-body { flex-direction: column; }
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  .admin-brand { border-bottom: none; padding: 0.85rem 1rem; flex: 1; }
  .admin-nav {
    display: flex;
    flex: none;
    padding: 0;
    width: auto;
  }
  .admin-nav-item { padding: 0.6rem 0.8rem; border-left: none; }
  .admin-nav-item.active { border-left: none; border-bottom: 2px solid var(--crimson); }
  .admin-logout { border-top: none; padding: 0.85rem 1rem; }

  .editor-header { flex-wrap: wrap; gap: 0.75rem; padding: 1rem; }
  .editor-header-actions { width: 100%; }
  .editor-header-actions .btn-primary,
  .editor-header-actions .btn-secondary { flex: 1; justify-content: center; }

  .dash-header { flex-wrap: wrap; padding: 1.25rem 1rem; }
  .dash-table-wrap { padding: 1rem; }
  .editor-row { grid-template-columns: 1fr; }
}

/* ================================================================
   IMAGE LIBRARY
   ================================================================ */

.lib-page {
  padding: 2rem 2.5rem;
  min-height: 100%;
  position: relative;
}

/* ── Header ── */
.lib-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
}
.lib-header-left { display: flex; align-items: baseline; gap: 0.75rem; }
.lib-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--ink);
  margin: 0;
}
.lib-count {
  font-size: 0.8rem;
  color: rgba(30,25,20,0.45);
  font-weight: 500;
}
.lib-header-actions { display: flex; gap: 0.75rem; }

/* ── Buttons ── */
.lib-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s, color 0.15s, opacity 0.15s;
  white-space: nowrap;
}
.lib-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.lib-btn--primary { background: var(--ink); color: var(--paper); }
.lib-btn--primary:hover:not(:disabled) { background: #333; }
.lib-btn--ghost { background: transparent; border: 1.5px solid rgba(30,25,20,0.2); color: var(--ink); }
.lib-btn--ghost:hover:not(:disabled) { border-color: var(--ink); background: rgba(30,25,20,0.04); }
.lib-btn--ai { background: #5b3fd4; color: #fff; }
.lib-btn--ai:hover:not(:disabled) { background: #4a34b0; }
.lib-btn--danger { background: transparent; border: 1.5px solid #c0392b; color: #c0392b; }
.lib-btn--danger:hover:not(:disabled) { background: #c0392b; color: #fff; }
.lib-btn--sm { padding: 0.35rem 0.7rem; font-size: 0.8rem; }

/* ── Toolbar ── */
.lib-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.lib-search {
  flex: 1;
  min-width: 200px;
  padding: 0.55rem 0.9rem;
  border: 1.5px solid rgba(30,25,20,0.18);
  border-radius: 4px;
  font-size: 0.88rem;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s;
}
.lib-search:focus { outline: none; border-color: var(--ink); }
.lib-filters { display: flex; gap: 0.4rem; }
.lib-site-picker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
  margin-inline-start: auto;
}
.lib-site-picker-label { white-space: nowrap; }
.lib-site-picker .lib-select { width: auto; min-width: 150px; padding: 0.4rem 0.6rem; font-size: 0.8rem; }
.lib-filter {
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1.5px solid transparent;
  background: rgba(30,25,20,0.07);
  color: rgba(30,25,20,0.6);
  cursor: pointer;
  transition: all 0.15s;
}
.lib-filter:hover { background: rgba(30,25,20,0.12); color: var(--ink); }
.lib-filter.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ── Image grid ── */
.lib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.lib-hidden { display: none !important; }

/* ── Image card ── */
.lib-card {
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: box-shadow 0.15s, transform 0.15s;
}
.lib-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.14); transform: translateY(-2px); }

.lib-card-thumb {
  width: 100%;
  padding-top: 75%;
  background-size: cover;
  background-position: center;
  background-color: #f0ece6;
  position: relative;
}
.lib-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  opacity: 0;
  transition: opacity 0.15s;
}
.lib-card-thumb:hover .lib-card-overlay { opacity: 1; }
.lib-card-action {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.12s, background 0.12s;
}
.lib-card-action:hover { transform: scale(1.15); }
.lib-card-action--view { background: rgba(255,255,255,0.9); color: var(--ink); }
.lib-card-action--ai   { background: #5b3fd4; color: #fff; }
.lib-card-action--webp { background: #2e7d32; color: #fff; font-size: 0.62rem; font-weight: 700; }
.lib-card-action--copy { background: rgba(255,255,255,0.75); color: var(--ink); }
.lib-card-action--del  { background: #c0392b; color: #fff; }

.lib-card-info {
  padding: 0.5rem 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}
.lib-card-name {
  font-size: 0.75rem;
  color: var(--ink);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}
.lib-card-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.lib-card-badge--upload       { background: #e8f5e9; color: #2e7d32; }
.lib-card-badge--ai-generated { background: #ede7f6; color: #4527a0; }
.lib-card-badge--ai-edited    { background: #e3f2fd; color: #1565c0; }

.lib-card-sites {
  padding: 0 0.6rem 0.55rem;
  font-size: 0.68rem;
  color: var(--crimson);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lib-card-sites--unused { color: var(--muted); font-weight: 500; font-style: italic; }

/* ── Empty state ── */
.lib-empty {
  text-align: center;
  padding: 5rem 2rem;
  color: rgba(30,25,20,0.45);
}
.lib-empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.35; }
.lib-empty-title { font-size: 1.1rem; font-weight: 700; color: var(--ink); margin: 0 0 0.4rem; }
.lib-empty-sub { font-size: 0.9rem; margin: 0 0 1.5rem; }
.lib-empty-actions { display: flex; gap: 0.75rem; justify-content: center; }

/* ── Page dropzone overlay ── */
.lib-dropzone-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(30,25,20,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.lib-dropzone-overlay.lib-dropzone--visible { display: flex; }
.lib-dropzone-inner {
  background: #fff;
  border: 3px dashed var(--crimson);
  border-radius: 12px;
  padding: 3rem 5rem;
  text-align: center;
  color: var(--ink);
}
.lib-dropzone-icon { font-size: 3rem; color: var(--crimson); margin-bottom: 0.5rem; }

/* ── Modal system ── */
.lib-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  align-items: center;
  justify-content: center;
}
.lib-modal--open { display: flex; }
.lib-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20,15,10,0.6);
  cursor: pointer;
}
.lib-modal-box {
  position: relative;
  background: #fff;
  border-radius: 8px;
  width: 520px;
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
}
.lib-modal-box--wide { width: 780px; }
.lib-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(30,25,20,0.1);
  flex-shrink: 0;
}
.lib-modal-title { font-size: 1.05rem; font-weight: 800; margin: 0; color: var(--ink); }
.lib-modal-close-btn {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(30,25,20,0.08);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.75rem;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.lib-modal-close-btn:hover { background: rgba(30,25,20,0.18); }
.lib-modal-body { padding: 1.25rem 1.5rem; flex: 1; overflow-y: auto; }
.lib-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(30,25,20,0.1);
  flex-shrink: 0;
}

/* ── Upload zone ── */
.lib-upload-zone {
  display: block;
  border: 2px dashed rgba(30,25,20,0.2);
  border-radius: 6px;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  margin-bottom: 1rem;
}
.lib-upload-zone:hover,
.lib-upload-zone--over { border-color: var(--crimson); background: rgba(180,35,42,0.03); }
.lib-upload-icon { font-size: 2rem; color: var(--crimson); margin-bottom: 0.5rem; }
.lib-upload-label { font-size: 0.9rem; font-weight: 600; color: var(--ink); margin: 0 0 0.25rem; }
.lib-upload-hint  { font-size: 0.78rem; color: rgba(30,25,20,0.5); margin: 0; }
.lib-upload-list { display: flex; flex-direction: column; gap: 0.4rem; }
.lib-upload-item {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0.7rem;
  background: #f8f6f3;
  border-radius: 4px;
  font-size: 0.82rem;
}
.lib-upload-item-name { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-upload-item-size { color: rgba(30,25,20,0.5); flex-shrink: 0; margin-left: 1rem; }

/* ── Form fields ── */
.lib-field { margin-bottom: 1rem; }
.lib-field:last-child { margin-bottom: 0; }
.lib-field-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.75rem; }
.lib-label { display: block; font-size: 0.78rem; font-weight: 700; color: rgba(30,25,20,0.6); margin-bottom: 0.35rem; text-transform: uppercase; letter-spacing: 0.06em; }
.lib-input,
.lib-textarea,
.lib-select {
  width: 100%;
  padding: 0.55rem 0.8rem;
  border: 1.5px solid rgba(30,25,20,0.18);
  border-radius: 4px;
  font-size: 0.88rem;
  color: var(--ink);
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s;
  font-family: var(--font-sans);
}
.lib-input:focus, .lib-textarea:focus, .lib-select:focus { outline: none; border-color: var(--ink); }
.lib-textarea { resize: vertical; min-height: 90px; }

/* ── Status messages ── */
.lib-gen-status { font-size: 0.85rem; margin-top: 0.75rem; min-height: 1.2em; }
.lib-gen-status--info  { color: #5b3fd4; }
.lib-gen-status--ok    { color: #2e7d32; font-weight: 600; }
.lib-gen-status--err   { color: #c0392b; font-weight: 600; }

/* ── Generate results ── */
.lib-gen-results { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.75rem; }
.lib-gen-result-item { border-radius: 4px; overflow: hidden; }
.lib-gen-result-img  { width: 120px; height: 120px; object-fit: cover; display: block; }

/* ── Edit-AI preview ── */
.lib-edit-ai-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.lib-edit-ai-img { width: 160px; height: 160px; object-fit: cover; border-radius: 6px; border: 1px solid rgba(30,25,20,0.1); }
.lib-edit-ai-arrow { font-size: 1.5rem; color: rgba(30,25,20,0.35); flex-shrink: 0; }
.lib-edit-ai-result { flex: 1; }
.lib-edit-ai-placeholder {
  width: 100%;
  height: 160px;
  border: 2px dashed rgba(30,25,20,0.15);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  color: rgba(30,25,20,0.4);
}
.lib-edit-ai-result img { width: 100%; height: 160px; object-fit: cover; border-radius: 6px; }

/* ── View modal ── */
.lib-view-body { display: grid; grid-template-columns: 260px 1fr; gap: 1.5rem; }
.lib-view-left { display: flex; flex-direction: column; gap: 0.75rem; }
.lib-view-img { width: 100%; border-radius: 6px; border: 1px solid rgba(30,25,20,0.1); object-fit: contain; max-height: 240px; }
.lib-view-meta { display: flex; gap: 0.5rem; align-items: center; }
.lib-view-badge { font-size: 0.68rem; font-weight: 700; padding: 0.2rem 0.5rem; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.05em; }
.lib-view-size { font-size: 0.78rem; color: rgba(30,25,20,0.5); }
.lib-view-url-wrap { display: flex; gap: 0.5rem; align-items: center; }
.lib-view-url-input {
  flex: 1;
  padding: 0.4rem 0.6rem;
  border: 1.5px solid rgba(30,25,20,0.15);
  border-radius: 4px;
  font-size: 0.75rem;
  color: rgba(30,25,20,0.7);
  background: #f8f6f3;
  min-width: 0;
}
.lib-view-right { display: flex; flex-direction: column; }
.lib-view-save-row { display: flex; align-items: center; justify-content: flex-end; gap: 0.75rem; margin-top: 0.5rem; }
.lib-save-status { font-size: 0.82rem; }
.lib-save-status.lib-gen-status--ok  { color: #2e7d32; }
.lib-save-status.lib-gen-status--err { color: #c0392b; }
.lib-divider { border: none; border-top: 1px solid rgba(30,25,20,0.1); margin: 1rem 0; }
.lib-view-danger {}
.lib-view-prompt-text { font-size: 0.82rem; color: rgba(30,25,20,0.6); font-style: italic; margin: 0; }

/* ── Toast ── */
.lib-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.65rem 1.1rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  z-index: 9999;
}
.lib-toast--visible { opacity: 1; transform: translateY(0); }
.lib-toast--err { background: #c0392b; }

@media (max-width: 860px) {
  .lib-page { padding: 1.25rem 1rem; }
  .lib-view-body { grid-template-columns: 1fr; }
  .lib-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .lib-field-row { grid-template-columns: 1fr; }
  .lib-edit-ai-preview { flex-direction: column; }
}

/* ── Code Injection ─────────────────────────────────────────────────────── */
.ci-site-picker { display: flex; align-items: center; }
.ci-select {
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(22,19,15,0.18);
  border-radius: 4px;
  font-size: 0.85rem;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.ci-banner {
  padding: 0.65rem 1rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}
.ci-banner--ok { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }

.ci-form { display: flex; flex-direction: column; gap: 1.5rem; }

.ci-zone {
  background: #fff;
  border: 1px solid rgba(22,19,15,0.1);
  border-radius: 6px;
  overflow: hidden;
}
.ci-zone-header {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: #f9f8f6;
  border-bottom: 1px solid rgba(22,19,15,0.08);
}
.ci-zone-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.ci-zone-hint {
  font-size: 0.78rem;
  color: var(--muted);
}
.ci-zone-hint code {
  background: rgba(22,19,15,0.06);
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  font-size: 0.75rem;
}
.ci-textarea {
  display: block;
  width: 100%;
  min-height: 140px;
  padding: 0.85rem 1rem;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--ink);
  background: #fff;
  border: none;
  resize: vertical;
  box-sizing: border-box;
  outline: none;
}
.ci-textarea:focus { background: #fafaf8; }

.ci-actions { display: flex; justify-content: flex-end; }

/* ================================================================
   EDITOR — Visual/Text tabs + media picker
   ================================================================ */

.editor-image-row { display: flex; gap: 0.5rem; align-items: center; }
.editor-image-row .editor-input { flex: 1; }

.editor-section--content { height: 100%; display: flex; flex-direction: column; }
.editor-section--content .editor-body-input { flex: 1; }

.editor-content-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.editor-tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--paper);
  border: 1px solid rgba(22,19,15,0.12);
  border-radius: 4px;
  padding: 2px;
}
.editor-tab {
  border: none;
  background: transparent;
  padding: 0.3rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  border-radius: 3px;
  transition: background 0.15s, color 0.15s;
}
.editor-tab.active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.editor-tab:hover:not(.active) { color: var(--ink); }

.editor-media-btn {
  margin-inline-start: auto;
  border: 1.5px solid rgba(30,25,20,0.2);
  background: transparent;
  color: var(--ink);
  padding: 0.35rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.editor-media-btn:hover { border-color: var(--ink); background: rgba(30,25,20,0.04); }

.media-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.6rem;
}
.media-picker-item {
  cursor: pointer;
  border-radius: 5px;
  overflow: hidden;
  aspect-ratio: 1;
  border: 2px solid transparent;
  transition: border-color 0.15s, transform 0.1s;
}
.media-picker-item:hover { border-color: var(--crimson); transform: scale(1.02); }
.media-picker-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ================================================================
   LOGIN / SETUP
   ================================================================ */

.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  font-family: var(--font-sans);
}
.login-shell { width: 100%; max-width: 400px; padding: 1.5rem; }
.login-card {
  background: #fff;
  border-radius: 8px;
  padding: 2.25rem 2rem;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}
.login-brand { display: flex; align-items: baseline; gap: 0.4rem; margin-bottom: 1.5rem; }
.login-brand-name { font-family: var(--font-display); font-weight: 900; font-size: 1.3rem; color: var(--ink); }
.login-brand-tag { font-size: 0.8rem; color: var(--muted); }
.login-heading { font-size: 1.15rem; font-weight: 800; color: var(--ink); margin-bottom: 0.4rem; }
.login-sub { font-size: 0.85rem; color: var(--muted); line-height: 1.5; margin-bottom: 1.25rem; }
.login-error {
  background: rgba(192,57,43,0.1);
  color: #c0392b;
  border: 1px solid rgba(192,57,43,0.25);
  border-radius: 4px;
  padding: 0.6rem 0.85rem;
  font-size: 0.82rem;
  margin-bottom: 1rem;
}
.login-form .editor-section { margin-bottom: 1rem; }
.login-submit { width: 100%; margin-top: 0.5rem; padding: 0.7rem; font-size: 0.92rem; }

/* ================================================================
   USERS
   ================================================================ */

.users-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
  padding: 1.5rem 2rem;
}
.users-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(22,19,15,0.08);
}
.users-table th, .users-table td {
  padding: 0.7rem 1rem;
  text-align: start;
  font-size: 0.85rem;
  border-bottom: 1px solid rgba(22,19,15,0.06);
}
.users-table th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); background: var(--paper); }
.users-date { color: var(--muted); font-size: 0.78rem; }
.users-actions { display: flex; align-items: flex-start; gap: 0.5rem; }
.users-actions form { margin: 0; }

.users-role-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
}
.users-role-badge--admin    { background: #ede7f6; color: #4527a0; }
.users-role-badge--uploader { background: #e8f5e9; color: #2e7d32; }

.users-reset { position: relative; }
.users-reset summary {
  cursor: pointer;
  list-style: none;
}
.users-reset summary::-webkit-details-marker { display: none; }
.users-reset-form {
  position: absolute;
  top: calc(100% + 4px);
  inset-inline-end: 0;
  z-index: 5;
  display: flex;
  gap: 0.4rem;
  background: #fff;
  border: 1px solid rgba(22,19,15,0.12);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  padding: 0.6rem;
  white-space: nowrap;
}
.users-reset-form input {
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
  border: 1px solid rgba(22,19,15,0.15);
  border-radius: 4px;
  width: 180px;
}
.users-add-card {
  background: #fff;
  border: 1px solid rgba(22,19,15,0.08);
  border-radius: 6px;
  padding: 1.25rem;
}

@media (max-width: 860px) {
  .users-layout { grid-template-columns: 1fr; }
}

/* ================================================================
   ARTICLES — visual gallery ("all posts")
   ================================================================ */

.art-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0 2rem 1.25rem;
}
.art-site-select { width: auto; min-width: 160px; }
.art-search { flex: 1; min-width: 200px; max-width: 320px; }

.art-status-tabs { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.art-status-tab {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.art-status-tab span { opacity: 0.7; margin-inline-start: 0.2rem; }
.art-status-tab:hover { background: rgba(22,19,15,0.05); color: var(--ink); }
.art-status-tab.active { background: var(--ink); color: var(--paper); }
.art-status-tab.active span { opacity: 0.85; }

.art-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  padding: 0 2rem 2rem;
}

.art-card {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(22,19,15,0.08);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: box-shadow 0.15s, transform 0.15s;
}
.art-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.12); transform: translateY(-2px); }

.art-card-thumb {
  display: block;
  width: 100%;
  padding-top: 52%;
  background-size: cover;
  background-position: center;
  background-color: var(--paper);
  position: relative;
}
.art-card-noimg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  opacity: 0.35;
}
.art-status-badge {
  position: absolute;
  top: 0.5rem;
  inset-inline-start: 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  color: #fff;
  background: #6b7280;
}
.art-status-badge--published { background: #16a34a; }
.art-status-badge--draft     { background: #9ca3af; color: #1f2937; }
.art-status-badge--scheduled { background: #a16207; }
.art-featured-badge {
  position: absolute;
  top: 0.5rem;
  inset-inline-end: 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  color: #7c2d12;
  background: rgba(255,255,255,0.9);
}

.art-card-body { padding: 0.85rem 0.95rem 0.5rem; flex: 1; }
.art-card-site {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--crimson);
  margin-bottom: 0.25rem;
}
.art-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.35;
  margin-bottom: 0.35rem;
}
.art-card-title:hover { color: var(--crimson); }
.art-card-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 0.5rem;
}
.art-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--muted);
}
.art-card-cat {
  background: var(--paper);
  border-radius: 3px;
  padding: 0.05rem 0.4rem;
}

.art-card-actions {
  display: flex;
  gap: 0.4rem;
  padding: 0.7rem 0.95rem;
  border-top: 1px solid rgba(22,19,15,0.06);
}
.art-delete-form { margin: 0; margin-inline-start: auto; }
