/* =====================================================================
   GetSparks CMS — admin styles
   Source: ./CMS/*.jsx (Claude Design)
   Stack: vanilla CSS (no framework), IBM Plex Sans webfont, inline SVG icons.
   ===================================================================== */

:root {
  --accent: #1a56db;
  --accent-hover: #1345b0;
  --text: #111111;
  --muted: #666666;
  --border: #E5E5E5;
  --bg: #FAFAFA;
  --danger: #cc3333;
  --danger-bg: #fff5f5;
  --danger-border: #ffd6d6;
  --success: #166534;
  --success-bg: #f0fdf4;
  --success-border: #bbf7d0;
  --row-hover: #f6f6f6;
}

/* =====================================================================
   Skeleton shimmer
   ===================================================================== */
@keyframes cms-shimmer {
  0%   { background-position: -500px 0; }
  100% { background-position:  500px 0; }
}
.cms-skeleton-cell {
  display: block;
  height: 12px;
  border-radius: 4px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e4e4e4 50%, #f0f0f0 75%);
  background-size: 500px 100%;
  animation: cms-shimmer 1.4s ease-in-out infinite;
}
.cms-skeleton-row td { padding-top: 13px; padding-bottom: 13px; }
.cms-skeleton-row td:first-child .cms-skeleton-cell { width: 16px; height: 16px; border-radius: 3px; }
.cms-skeleton-row td:last-child  .cms-skeleton-cell { width: 24px; height: 24px; border-radius: 50%; }

/* Skeleton media cards */
.cms-media-card--skeleton .cms-media-card__thumb {
  background: linear-gradient(90deg, #f0f0f0 25%, #e4e4e4 50%, #f0f0f0 75%) !important;
  background-size: 500px 100% !important;
  animation: cms-shimmer 1.4s ease-in-out infinite;
}
.cms-media-card--skeleton .cms-media-card__stripes,
.cms-media-card--skeleton .cms-media-card__label,
.cms-media-card--skeleton .cms-media-card__badge { display: none; }
.cms-media-card--skeleton .cms-media-card__name,
.cms-media-card--skeleton .cms-media-card__size {
  background: linear-gradient(90deg, #f0f0f0 25%, #e4e4e4 50%, #f0f0f0 75%);
  background-size: 500px 100%;
  animation: cms-shimmer 1.4s ease-in-out infinite;
  color: transparent;
  border-radius: 4px;
}

.cms-table__empty { text-align: center; color: var(--muted); padding: 32px 16px !important; font-size: 13px; }

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.55;
}

select, input, textarea, button { font-family: inherit; }
input[type=radio], input[type=checkbox] { cursor: pointer; accent-color: var(--text); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #bbb; }

[contenteditable]:empty:before {
  content: attr(data-placeholder);
  color: #ccc;
  pointer-events: none;
}
[contenteditable] h2 { font-size: 22px; font-weight: 700; margin: 28px 0 10px; letter-spacing: -0.02em; }
[contenteditable] h3 { font-size: 18px; font-weight: 600; margin: 22px 0 8px; }
[contenteditable] blockquote { border-left: 2px solid var(--border); margin: 0; padding-left: 20px; color: #555; font-style: italic; }
[contenteditable] p { margin: 0 0 1em; }
[contenteditable] code { font-family: 'IBM Plex Mono', monospace; font-size: 0.88em; background: #f5f5f5; padding: 2px 5px; border-radius: 3px; }

/* =====================================================================
   App shell
   ===================================================================== */
.cms-app {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

.cms-main-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.cms-main {
  flex: 1;
  overflow-y: auto;
  padding: 32px 40px;
  width: 100%;
  box-sizing: border-box;
}
.cms-main--fill {
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.cms-main--editor { padding: 24px 32px; }

/* =====================================================================
   Sidebar
   ===================================================================== */
.cms-sidebar {
  width: 220px;
  min-height: 100vh;
  border-right: 1px solid var(--border);
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: width 0.2s;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}
.cms-sidebar--collapsed { width: 56px; }

.cms-sidebar__header {
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  justify-content: space-between;
}
.cms-sidebar--collapsed .cms-sidebar__header { padding: 0 16px; justify-content: center; }
.cms-sidebar__brand {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--text);
}
.cms-sidebar--collapsed .cms-sidebar__brand { display: none; }
.cms-sidebar__toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  border-radius: 3px;
  display: flex;
}

.cms-sidebar__nav {
  padding: 12px 0;
  flex: 1;
}
.cms-sidebar__link {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 20px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-weight: 400;
  font-size: 13.5px;
  transition: color 0.12s;
  outline: none;
  text-decoration: none;
}
.cms-sidebar--collapsed .cms-sidebar__link { padding: 9px 0; justify-content: center; }
.cms-sidebar--collapsed .cms-sidebar__link span { display: none; }
.cms-sidebar__link:hover { color: var(--text); }
.cms-sidebar__link.is-active { color: var(--text); font-weight: 600; }
.cms-sidebar__link.is-active svg { color: var(--text); }

/* =====================================================================
   Top bar
   ===================================================================== */
.cms-topbar {
  height: 56px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.cms-topbar__section {
  font-weight: 500;
  font-size: 13.5px;
  color: var(--text);
  min-width: 120px;
}
.cms-topbar__search-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
}
.cms-topbar__search {
  position: relative;
  width: 100%;
  max-width: 360px;
}
.cms-topbar__search-ico {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}
.cms-topbar__search input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 6px 10px 6px 30px;
  font-size: 13px;
  background: var(--bg);
  outline: none;
  color: var(--text);
}
.cms-topbar__user {
  position: relative;
}
.cms-topbar__user-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 5px;
  color: var(--text);
}
.cms-topbar__user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

/* =====================================================================
   Avatar
   ===================================================================== */
.cms-avatar {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  color: #333;
  flex-shrink: 0;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* =====================================================================
   Buttons
   ===================================================================== */
.cms-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--text);
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  line-height: 1.4;
  letter-spacing: 0.01em;
  background: transparent;
  color: var(--text);
  outline: none;
  user-select: none;
  text-decoration: none;
  font-family: inherit;
}
.cms-btn:hover { background: var(--text); color: #fff; }
.cms-btn--small { padding: 5px 10px; font-size: 12px; }
.cms-btn--ghost { border-color: transparent; }
.cms-btn--ghost:hover { background: var(--bg); color: var(--text); }
.cms-btn--primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.cms-btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.cms-btn--danger { border-color: var(--danger); color: var(--danger); background: transparent; }
.cms-btn--danger:hover { background: var(--danger); color: #fff; }
.cms-btn[disabled] { opacity: 0.45; cursor: default; }
.cms-btn--block { width: 100%; justify-content: center; }

/* =====================================================================
   Forms
   ===================================================================== */
.cms-field { display: flex; flex-direction: column; gap: 4px; }
.cms-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.03em;
}
.cms-helper { font-size: 11.5px; color: #aaa; }

.cms-input,
.cms-textarea,
.cms-select {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 13.5px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 0.12s;
  width: 100%;
  box-sizing: border-box;
  font-family: inherit;
}
.cms-input:focus,
.cms-textarea:focus,
.cms-select:focus { border-color: var(--accent); }
.cms-textarea { resize: vertical; line-height: 1.55; }
.cms-input--mono { font-family: 'IBM Plex Mono', monospace; }

.cms-select-wrap { position: relative; }
.cms-select {
  appearance: none;
  padding-right: 32px;
  cursor: pointer;
}
.cms-select-wrap__chev {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted);
}

/* compact select (for use inside table cells, filters etc.) */
.cms-select--sm { padding: 7px 28px 7px 10px; font-size: 13px; }
.cms-select--xs { padding: 3px 22px 3px 7px; font-size: 12.5px; border-radius: 3px; }

/* Search input (icon-prefixed) */
.cms-search { position: relative; }
.cms-search__ico {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted);
}
.cms-search input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 7px 10px 7px 30px;
  font-size: 13px;
  background: #fff;
  outline: none;
  font-family: inherit;
  color: var(--text);
}
.cms-search input:focus { border-color: var(--accent); }

/* Toggle (custom) */
.cms-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.cms-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.cms-toggle__track {
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: var(--border);
  position: relative;
  transition: background 0.15s;
  flex-shrink: 0;
}
.cms-toggle__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.15s;
}
.cms-toggle.is-on .cms-toggle__track { background: var(--text); }
.cms-toggle.is-on .cms-toggle__thumb { left: 19px; }
.cms-toggle__label { font-size: 13.5px; }

/* Tag/chip list inputs */
.cms-chips {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 8px;
  background: #fff;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  min-height: 38px;
}
.cms-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 7px;
  font-size: 12px;
}
.cms-chip__x {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--muted);
  display: flex;
  line-height: 1;
}
.cms-chips__input {
  border: none;
  outline: none;
  font-size: 12.5px;
  color: var(--text);
  min-width: 60px;
  flex: 1;
  background: transparent;
  font-family: inherit;
}

/* Slug input with hash prefix */
.cms-slug {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}
.cms-slug__prefix {
  padding: 7px 8px;
  font-size: 12px;
  color: #aaa;
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
}
.cms-slug input {
  border: none;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  flex: 1;
  background: #fff;
  font-family: inherit;
}

/* Drop zone (for image uploads) */
.cms-dropzone {
  border: 1px dashed var(--border);
  border-radius: 4px;
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  background: var(--bg);
}
.cms-dropzone--lg { padding: 32px 20px; }
.cms-dropzone__hint { color: var(--accent); }

/* =====================================================================
   Tab bar
   ===================================================================== */
.cms-tabbar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
}
.cms-tabbar__tab {
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 0;
  margin-right: 28px;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.12s;
  outline: none;
  user-select: none;
  white-space: nowrap;
  font-family: inherit;
}
.cms-tabbar__tab:hover { color: var(--text); }
.cms-tabbar__tab.is-active {
  color: var(--text);
  font-weight: 500;
  border-bottom-color: var(--text);
}
.cms-tabbar__count {
  margin-left: 5px;
  color: #aaa;
  font-weight: 400;
  font-size: 12px;
}
.cms-tabbar__tab.is-active .cms-tabbar__count { color: var(--muted); }

/* =====================================================================
   Status dot
   ===================================================================== */
.cms-status { display: inline-flex; align-items: center; gap: 6px; }
.cms-status__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  background: #ccc;
}
.cms-status__label { font-size: 13px; color: var(--text); }
.cms-status[data-status="Active"] .cms-status__dot,
.cms-status[data-status="Published"] .cms-status__dot,
.cms-status[data-status="Approved"] .cms-status__dot { background: #22c55e; }
.cms-status[data-status="Invited"] .cms-status__dot,
.cms-status[data-status="Pending"] .cms-status__dot { background: #f59e0b; }
.cms-status[data-status="Suspended"] .cms-status__dot,
.cms-status[data-status="Spam"] .cms-status__dot { background: #ef4444; }
.cms-status[data-status="Draft"] .cms-status__dot,
.cms-status[data-status="Trash"] .cms-status__dot { background: #6b7280; }
.cms-status[data-status="Scheduled"] .cms-status__dot { background: #3b82f6; }
.cms-status[data-status="Archived"] .cms-status__dot { background: #9ca3af; }

/* =====================================================================
   Table
   ===================================================================== */
.cms-table-wrap {
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  overflow: hidden;
}
.cms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.cms-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.cms-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.cms-table tbody tr { transition: background 0.1s; }
.cms-table tbody tr:hover { background: var(--row-hover); }
.cms-table tbody tr.is-selected { background: #fafafa; }
.cms-table tbody tr.is-clickable { cursor: pointer; }
.cms-table tbody tr:last-child td { border-bottom: none; }
.cms-table__empty {
  padding: 48px 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.cms-table__muted { color: var(--muted); }
.cms-table__primary { font-weight: 500; }
.cms-table__excerpt { font-size: 12px; color: var(--muted); margin-top: 3px; }
.cms-table__nowrap { white-space: nowrap; }
.cms-table__mono { color: var(--muted); font-family: 'IBM Plex Mono', monospace; font-size: 13px; }
.cms-table__actions { display: flex; gap: 12px; justify-content: flex-end; }

/* =====================================================================
   Dropdown menu (for row actions, user menu)
   ===================================================================== */
.cms-dropdown { position: relative; display: inline-block; }
.cms-dropdown__trigger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 3px;
  color: var(--muted);
  display: flex;
  align-items: center;
}
.cms-dropdown__trigger:hover { color: var(--text); }
.cms-dropdown__menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  width: 160px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px 0;
  z-index: 200;
  display: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.cms-dropdown.is-open .cms-dropdown__menu { display: block; }
.cms-dropdown__item {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 14px;
  text-align: left;
  font-size: 13px;
  color: var(--text);
  display: block;
  font-family: inherit;
}
.cms-dropdown__item:hover { background: var(--bg); }
.cms-dropdown__item--danger { color: var(--danger); }
.cms-dropdown__sep { height: 1px; background: var(--border); margin: 3px 0; }
.cms-dropdown__menu--wide { width: 180px; }

/* =====================================================================
   Drawer (right-side overlay)
   ===================================================================== */
.cms-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.18);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.cms-drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
.cms-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 480px;
  max-width: 100vw;
  background: #fff;
  border-left: 1px solid var(--border);
  z-index: 50;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.cms-drawer.is-open { transform: translateX(0); }
.cms-drawer__header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.cms-drawer__title { font-weight: 600; font-size: 14px; }
.cms-drawer__close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  display: flex;
}
.cms-drawer__body { padding: 24px; flex: 1; }

/* =====================================================================
   Pagination
   ===================================================================== */
.cms-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  font-size: 13px;
}
.cms-pagination__btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  padding: 3px 6px;
  font-size: 13px;
  font-family: inherit;
}
.cms-pagination__btn[disabled] { color: #ccc; cursor: default; }
.cms-pagination__sep { color: var(--muted); }
.cms-pagination__page {
  background: none;
  border: none;
  cursor: pointer;
  padding: 3px 6px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
  font-family: inherit;
}
.cms-pagination__page.is-current { font-weight: 600; text-decoration: underline; }

/* =====================================================================
   Page headers and common layout helpers
   ===================================================================== */
.cms-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.cms-page-head__title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.02em;
}
.cms-page-head__sub {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 0;
  line-height: 1.5;
}

.cms-toolbar {
  display: flex;
  gap: 10px;
  margin: 16px 0;
  align-items: center;
}
.cms-toolbar__search { flex: 1; max-width: 280px; }

.cms-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}
.cms-breadcrumb__link {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  padding: 0;
  font-family: inherit;
  text-decoration: none;
}
.cms-breadcrumb__link:hover { color: var(--text); }
.cms-breadcrumb__current { color: var(--text); font-weight: 500; }

.cms-section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.cms-divider { height: 1px; background: var(--border); margin: 24px 0; }

/* =====================================================================
   Dashboard
   ===================================================================== */
.cms-dash-greeting { margin-bottom: 32px; }
.cms-dash-greeting h1 { font-size: 22px; font-weight: 600; margin: 0 0 4px; letter-spacing: -0.025em; }
.cms-dash-greeting p { font-size: 13px; color: var(--muted); margin: 0; }

.cms-dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-bottom: 40px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--border);
  overflow: hidden;
}
.cms-stat { background: #fff; padding: 20px 22px 16px; }
.cms-stat__label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 8px;
}
.cms-stat__value {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 10px;
}
.cms-stat__spark { margin-bottom: 8px; }
.cms-stat__sub { font-size: 12px; color: var(--muted); }

.cms-dash-cols {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
}
.cms-activity__item {
  display: flex;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.cms-activity__item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.cms-activity__line { font-size: 13.5px; line-height: 1.5; }
.cms-activity__who { font-weight: 500; }
.cms-activity__verb { color: var(--muted); }
.cms-activity__target { font-style: italic; }
.cms-activity__time { font-size: 11.5px; color: #aaa; margin-top: 3px; }

.cms-drafts__item {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.cms-drafts__item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.cms-drafts__title-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-align: left;
  display: block;
  width: 100%;
  font-family: inherit;
}
.cms-drafts__title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 4px;
  text-wrap: pretty;
}
.cms-drafts__title-btn:hover .cms-drafts__title { text-decoration: underline; }
.cms-drafts__excerpt {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.cms-drafts__time { font-size: 11.5px; color: #aaa; }

/* =====================================================================
   Settings & Pages (secondary side-nav + form)
   ===================================================================== */
.cms-form-shell {
  display: flex;
  gap: 0;
  min-height: 100%;
}
.cms-form-sidenav {
  width: 168px;
  flex-shrink: 0;
  padding-right: 32px;
  padding-top: 4px;
}
.cms-form-sidenav__head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.cms-form-sidenav__nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.cms-form-sidenav__link {
  background: none;
  border: none;
  cursor: pointer;
  padding: 7px 0;
  text-align: left;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--muted);
  outline: none;
  transition: color 0.1s;
  font-family: inherit;
  text-decoration: none;
}
.cms-form-sidenav__link:hover { color: var(--text); }
.cms-form-sidenav__link.is-active { color: var(--text); font-weight: 600; }

.cms-form-area {
  flex: 1;
  border-left: 1px solid var(--border);
  padding-left: 40px;
  min-width: 0;
  padding-bottom: 80px;
  position: relative;
}
.cms-form-area__title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 28px;
  letter-spacing: -0.02em;
}
.cms-form-area__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cms-form-section { margin-bottom: 40px; }
.cms-form-section__title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.cms-form-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 0 32px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.cms-form-row__label {
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 4px;
}
.cms-form-row__helper {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.cms-sticky-save {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 14px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}
.cms-saved-note { font-size: 13px; color: var(--muted); }

/* SEO preview snippet */
.cms-seo-preview {
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  padding: 16px;
}
.cms-seo-preview__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.cms-seo-preview__url { font-size: 12px; color: #202124; }
.cms-seo-preview__title { font-size: 18px; color: #1a0dab; margin-top: 2px; letter-spacing: -0.005em; font-weight: 400; }
.cms-seo-preview__desc { font-size: 13px; color: #4d5156; margin-top: 4px; line-height: 1.5; }

/* =====================================================================
   Editor (Articles / Works)
   ===================================================================== */
.cms-editor {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.cms-editor__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-shrink: 0;
}
.cms-editor__layout {
  display: flex;
  gap: 0;
  flex: 1;
  min-height: 0;
}
.cms-editor__main {
  flex: 0 0 68%;
  overflow-y: auto;
  padding-right: 40px;
  padding-top: 24px;
  position: relative;
}
.cms-editor__side {
  flex: 0 0 32%;
  border-left: 1px solid var(--border);
  padding-left: 28px;
  padding-top: 24px;
  overflow-y: auto;
}
.cms-editor__title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--text);
  outline: none;
  margin-bottom: 12px;
  min-height: 44px;
  word-break: break-word;
}
.cms-editor__excerpt {
  font-size: 16px;
  color: #444;
  outline: none;
  margin-bottom: 32px;
  line-height: 1.6;
  font-style: italic;
  min-height: 24px;
  word-break: break-word;
}
.cms-editor__body {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text);
  outline: none;
  min-height: 400px;
  word-break: break-word;
}
.cms-editor__footer {
  display: flex;
  gap: 20px;
  padding-top: 24px;
  padding-bottom: 8px;
  border-top: 1px solid var(--border);
  margin-top: 32px;
  font-size: 12px;
  color: #aaa;
}
.cms-editor__preview-title { font-size: 32px; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 12px; }
.cms-editor__preview-excerpt { font-size: 16px; color: #444; font-style: italic; margin-bottom: 32px; line-height: 1.6; }
.cms-editor__preview-body { font-size: 15.5px; line-height: 1.7; color: var(--text); }

.cms-floating-toolbar {
  position: absolute;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 5px;
  display: none;
  align-items: center;
  gap: 0;
  padding: 3px 4px;
  z-index: 100;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateX(-50%);
}
.cms-floating-toolbar.is-visible { display: inline-flex; }
.cms-floating-toolbar__btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 7px;
  border-radius: 3px;
  color: var(--muted);
  display: flex;
  align-items: center;
  font-family: inherit;
}
.cms-floating-toolbar__btn:hover { background: var(--bg); color: var(--text); }
.cms-floating-toolbar__sep { width: 1px; height: 16px; background: var(--border); margin: 0 3px; }
.cms-floating-toolbar__btn--text { font-size: 11px; font-weight: 700; padding: 4px 6px; }

/* Revisions list */
.cms-revisions__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.cms-revisions__label { font-size: 13.5px; font-weight: 400; }
.cms-revisions__label.is-current { font-weight: 600; }
.cms-revisions__meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cms-revisions__restore {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--accent);
  padding: 0;
  font-family: inherit;
}

/* Visibility radios */
.cms-visibility-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
}

/* Collapsible block (sidebar SEO) */
.cms-collapse {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.cms-collapse__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  font-family: inherit;
}
.cms-collapse__head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cms-collapse__body {
  margin-top: 14px;
  display: none;
  flex-direction: column;
  gap: 14px;
}
.cms-collapse.is-open .cms-collapse__body { display: flex; }

/* =====================================================================
   Media library
   ===================================================================== */
.cms-media-shell {
  display: flex;
  gap: 0;
  height: 100%;
}
.cms-media-main { flex: 1; min-width: 0; }
.cms-media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 20px;
}
.cms-media-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.12s;
}
.cms-media-card:hover { border-color: #bbb; }
.cms-media-card.is-selected { border-color: var(--text); }
.cms-media-card__thumb {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: #d6d6d6;
}
.cms-media-card__stripes {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.18) 0 4px, transparent 4px 8px);
}
.cms-media-card__label {
  font-size: 10px;
  color: rgba(0,0,0,0.3);
  font-family: monospace;
  text-align: center;
  padding: 0 8px;
  position: relative;
  z-index: 1;
  letter-spacing: 0.02em;
}
.cms-media-card__badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  font-size: 14px;
  z-index: 1;
}
.cms-media-card__meta { padding: 7px 8px; }
.cms-media-card__name {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cms-media-card__size {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.cms-media-detail {
  width: 280px;
  border-left: 1px solid var(--border);
  padding-left: 28px;
  margin-left: 32px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  align-self: flex-start;
}
.cms-media-detail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.cms-media-detail__title { font-size: 13px; font-weight: 600; }
.cms-media-detail__preview {
  aspect-ratio: 4/3;
  border-radius: 4px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
  background: #d6d6d6;
}
.cms-media-detail__row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.cms-media-detail__row span:first-child { color: var(--muted); }
.cms-media-detail__row span:last-child {
  font-weight: 400;
  text-align: right;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =====================================================================
   Profile / Login
   ===================================================================== */
.cms-auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.cms-auth-card {
  width: 100%;
  max-width: 380px;
  padding: 0 20px;
}
.cms-auth-logo {
  text-align: center;
  margin-bottom: 36px;
}
.cms-auth-logo__monogram {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.cms-auth-logo__box {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--text);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cms-auth-logo__letter { font-size: 16px; font-weight: 700; letter-spacing: -0.04em; }
.cms-auth-logo__brand { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }
.cms-auth-title { font-size: 22px; font-weight: 600; margin: 0; letter-spacing: -0.025em; }
.cms-auth-sub { font-size: 13.5px; color: var(--muted); margin: 6px 0 0; line-height: 1.5; }
.cms-auth-form { display: flex; flex-direction: column; gap: 16px; }
.cms-auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}
.cms-auth-divider__line { flex: 1; height: 1px; background: var(--border); }
.cms-auth-divider__text { font-size: 12px; color: var(--muted); }
.cms-auth-oauth { display: flex; flex-direction: column; gap: 10px; }
.cms-auth-oauth__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text);
  font-family: inherit;
  transition: background 0.12s;
}
.cms-auth-oauth__btn:hover { background: var(--bg); }
.cms-auth-foot {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 28px;
  line-height: 1.6;
}
.cms-auth-foot__link {
  color: var(--accent);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
}
.cms-auth-foot__link:hover { text-decoration: underline; }
.cms-auth-error {
  font-size: 13px;
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: 4px;
  padding: 9px 12px;
}
.cms-auth-success {
  font-size: 13px;
  color: var(--success);
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  border-radius: 4px;
  padding: 9px 12px;
}
.cms-password-input { position: relative; }
.cms-password-input input { padding-right: 40px; }
.cms-password-input__eye {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--muted);
  display: flex;
  align-items: center;
}
.cms-pw-rules {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
}
.cms-pw-rule {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  transition: color 0.15s;
}
.cms-pw-rule__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.cms-pw-rule--met { color: var(--success); }
.cms-pw-rule--met .cms-pw-rule__dot {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

/* Profile page-specific bits */
.cms-profile { max-width: 640px; }
.cms-profile-section { margin-bottom: 48px; }
.cms-profile-section__head { margin-bottom: 20px; }
.cms-profile-section__title { font-size: 16px; font-weight: 600; margin: 0 0 4px; letter-spacing: -0.02em; }
.cms-profile-section__sub { font-size: 13px; color: var(--muted); margin: 0; }
.cms-profile-avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.cms-profile-avatar-row__name { font-size: 13.5px; font-weight: 500; margin-bottom: 6px; }
.cms-profile-avatar-row__actions { display: flex; gap: 10px; }
.cms-profile-avatar-row__hint { font-size: 11.5px; color: #aaa; margin-top: 5px; }
.cms-text-link {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--muted);
  padding: 0;
  font-family: inherit;
  text-decoration: none;
}
.cms-text-link:hover { color: var(--text); }
.cms-text-link--danger:hover { color: var(--danger); }
.cms-pw-strength {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.cms-pw-strength__bars { display: flex; gap: 3px; }
.cms-pw-strength__bar {
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  transition: background 0.2s;
}
.cms-pw-strength__label { font-size: 12px; font-weight: 500; }

/* =====================================================================
   Users detail
   ===================================================================== */
.cms-user-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.cms-user-head__main { display: flex; align-items: center; gap: 14px; }
.cms-user-head__name { font-size: 18px; font-weight: 600; margin: 0; letter-spacing: -0.02em; }
.cms-user-head__meta { font-size: 13px; color: var(--muted); margin: 3px 0 0; }
.cms-user-head__actions { display: flex; gap: 8px; }

.cms-perm-row,
.cms-session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.cms-perm-row__title,
.cms-session-row__title { font-size: 13.5px; font-weight: 500; }
.cms-perm-row__desc,
.cms-session-row__desc { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cms-session-row__time { font-size: 11.5px; color: #aaa; margin-top: 2px; }
.cms-session-row__main { display: flex; gap: 12px; align-items: flex-start; }
.cms-session-tag {
  font-size: 11px;
  background: #f0f7ff;
  color: var(--accent);
  border: 1px solid #c3daff;
  border-radius: 3px;
  padding: 1px 6px;
  margin-left: 8px;
}

.cms-activity-row {
  display: flex;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.cms-activity-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.cms-activity-row__ico {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cms-activity-row__title { font-size: 13.5px; font-weight: 500; }
.cms-activity-row__detail { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cms-activity-row__time { font-size: 11.5px; color: #aaa; margin-top: 4px; }

.cms-danger-zone {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.cms-danger-zone__head {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

/* =====================================================================
   Bulk action bar (Articles)
   ===================================================================== */
.cms-bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  transition: height 0.15s, margin 0.15s;
  height: 0;
  margin-top: 0;
  margin-bottom: 0;
}
.cms-bulk-bar.is-active {
  height: 44px;
  margin-top: 14px;
  margin-bottom: -4px;
}
.cms-bulk-bar__count { font-size: 13px; color: var(--muted); }

/* =====================================================================
   Brands manager & news article manager (embedded in Pages → Home / News)
   ===================================================================== */
.cms-brands { display: flex; flex-direction: column; gap: 24px; }
.cms-brands-cols {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 14px;
  background: #fff;
}
.cms-brands-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.cms-brands-col__label { font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
.cms-brands-col__range { font-size: 10.5px; color: var(--muted); font-family: 'IBM Plex Mono', monospace; }

.cms-stepper {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}
.cms-stepper__btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 13px;
  color: var(--muted);
  font-family: inherit;
  line-height: 1;
}
.cms-stepper__btn:hover { color: var(--text); }
.cms-stepper__btn[disabled] { color: #ccc; cursor: default; }
.cms-stepper__minus { border-right: 1px solid var(--border); }
.cms-stepper__plus { border-left: 1px solid var(--border); }
.cms-stepper input {
  width: 36px;
  border: none;
  text-align: center;
  font-size: 13px;
  color: var(--text);
  outline: none;
  padding: 4px 0;
  background: #fff;
  font-family: inherit;
  -moz-appearance: textfield;
}
.cms-stepper input::-webkit-outer-spin-button,
.cms-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.cms-brands-preview {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
  background: #fff;
}
.cms-brands-preview__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.cms-brands-preview__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.cms-brands-preview__bps { display: flex; gap: 2px; }
.cms-brands-preview__bp-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  padding: 3px 8px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  font-family: inherit;
}
.cms-brands-preview__bp-btn.is-active {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
  font-weight: 600;
}
.cms-brands-preview__body { padding: 16px; background: #fdfdfd; }
.cms-brands-preview__grid { display: grid; gap: 10px; }
.cms-brands-preview__cell {
  aspect-ratio: 3/1;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, hsl(220 35% 92%), hsl(250 30% 84%));
}
.cms-brands-preview__caption {
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
  font-family: 'IBM Plex Mono', monospace;
}

.cms-brands-list {
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  overflow: hidden;
}
.cms-brands-row {
  display: grid;
  grid-template-columns: 20px 64px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
}
.cms-brands-row:first-child { border-top: none; }
.cms-brands-row__handle {
  cursor: grab;
  color: #bbb;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cms-brands-row__thumb {
  width: 64px;
  height: 36px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, hsl(220 35% 92%), hsl(250 30% 84%));
}
.cms-brands-row__main { min-width: 0; }
.cms-brands-row__name { font-size: 13px; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cms-brands-row__meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; display: flex; gap: 10px; }
.cms-brands-row__missing-alt { color: #cc8888; }
.cms-brands-row__nudge {
  display: flex;
  flex-direction: column;
}
.cms-brands-row__nudge button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  color: var(--muted);
  line-height: 0;
}
.cms-brands-row__nudge button[disabled] { color: #ddd; cursor: default; }
.cms-brands-row__actions {
  display: flex;
  gap: 4px;
}
.cms-brands-row__actions button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  color: var(--muted);
  display: flex;
  align-items: center;
}
.cms-brands-row__actions button:hover { color: var(--text); }
.cms-brands-row__actions .is-danger:hover { color: var(--danger); }

/* News article manager */
.cms-news-row {
  display: grid;
  grid-template-columns: 24px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: #fff;
}
.cms-news-row:first-child { border-top: none; }
.cms-news-row__nudge {
  display: flex;
  flex-direction: column;
}
.cms-news-row__nudge button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 1px 4px;
  color: var(--muted);
  line-height: 0;
}
.cms-news-row__title-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-align: left;
  min-width: 0;
  font-family: inherit;
}
.cms-news-row__num { font-size: 11px; font-family: 'IBM Plex Mono', monospace; color: #aaa; width: 18px; text-align: right; }
.cms-news-row__title { font-size: 13.5px; font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cms-news-row__class { font-size: 11.5px; color: var(--muted); margin-top: 2px; font-family: 'IBM Plex Mono', monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Cell size picker */
.cms-cell-picker {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cms-cell-picker__grid {
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.cms-cell-picker__col { display: flex; flex-direction: column; gap: 5px; }
.cms-cell-picker__col-label { font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
.cms-cell-picker__col-range { font-size: 10.5px; color: var(--muted); font-family: 'IBM Plex Mono', monospace; }
.cms-cell-picker__output {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
  background: var(--bg);
}
.cms-cell-picker__output-label {
  padding: 8px 12px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  white-space: nowrap;
}
.cms-cell-picker__output-code {
  flex: 1;
  padding: 9px 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--text);
  background: #fff;
  overflow-x: auto;
  white-space: nowrap;
}
.cms-cell-picker__copy {
  background: #fff;
  border: none;
  border-left: 1px solid var(--border);
  cursor: pointer;
  padding: 0 14px;
  font-size: 12px;
  color: var(--muted);
  font-family: inherit;
  white-space: nowrap;
}
.cms-cell-picker__copy:hover { color: var(--text); }
.cms-cell-picker__copy.is-copied { color: var(--success); }

/* =====================================================================
   Pages editor — left page list + right per-page editor
   ===================================================================== */
.cms-pages-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 0;
  flex: 1;        /* fills .cms-main--fill */
  min-height: 0;  /* allows grid rows to shrink below content size */
  overflow: hidden;
}
.cms-pages-list {
  border-right: 1px solid var(--border);
  overflow-y: auto;
  background: #fafafa;
  min-height: 0;
}
.cms-pages-list__head {
  padding: 16px 16px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.cms-pages-list__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 16px;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: background .1s;
}
.cms-pages-list__item:hover { background: #f0f0f0; }
.cms-pages-list__item.is-active {
  background: #fff;
  border-left-color: var(--accent);
}
.cms-pages-list__item-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.cms-pages-list__item-slug {
  font-size: 11px;
  color: var(--muted);
  font-family: 'IBM Plex Mono', monospace;
}
.cms-pages-editor {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
.cms-pages-editor__body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* Per-page editor form */
.cms-page-editor {
  max-width: 720px;
}
.cms-page-editor__group {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.cms-page-editor__group:last-of-type { border-bottom: none; }
.cms-page-editor__group-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin: 0 0 16px;
}
.cms-page-editor__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 640px) {
  .cms-page-editor__row { grid-template-columns: 1fr; }
}

/* Repeatable rows (hero messages, locations) */
.cms-repeat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.cms-repeat-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}
.cms-repeat-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cms-repeat-row .cms-input { flex: 1; }
.cms-repeat-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafafa;
}
.cms-repeat-card__fields {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 12px;
}
@media (max-width: 640px) {
  .cms-repeat-card__fields { grid-template-columns: 1fr; }
}
.cms-repeat-remove {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: border-color .12s, color .12s;
}
.cms-repeat-remove:hover { border-color: #c0392b; color: #c0392b; }

/* =====================================================================
   Settings
   ===================================================================== */
.cms-settings-shell {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  align-items: start;
}
.cms-settings-nav__head {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 8px;
}
.cms-settings-nav__item {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
  margin-bottom: 2px;
}
.cms-settings-nav__item:hover { background: var(--border); }
.cms-settings-nav__item.is-active { background: var(--border); font-weight: 500; }

/* =====================================================================
   Profile
   ===================================================================== */
.cms-profile-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  max-width: 860px;
}

/* =====================================================================
   Article / Work editor
   ===================================================================== */
.cms-editor-shell {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 0;
  margin: -24px;
  min-height: calc(100vh - 56px);
}
.cms-editor-main {
  padding: 28px 32px;
  overflow-y: auto;
  border-right: 1px solid var(--border);
}
.cms-editor-main__head { margin-bottom: 20px; }
.cms-editor-title {
  width: 100%;
  font-size: 24px;
  font-weight: 700;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  padding: 0;
  margin-bottom: 12px;
  font-family: inherit;
}
.cms-editor-title::placeholder { color: #ccc; }
.cms-editor-subtitle {
  width: 100%;
  font-size: 15px;
  font-weight: 400;
  border: none;
  outline: none;
  background: transparent;
  color: var(--muted);
  padding: 0;
  margin-bottom: 12px;
  font-family: inherit;
}
.cms-editor-subtitle::placeholder { color: #ccc; }
.cms-editor-meta-row {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.cms-editor-body { }
.cms-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  background: #fafafa;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
}
.cms-editor-toolbar__btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--muted);
  font-family: inherit;
}
.cms-editor-toolbar__btn:hover { background: var(--border); color: var(--text); }
.cms-editor-toolbar__sep {
  width: 1px;
  height: 16px;
  background: var(--border);
  margin: 0 4px;
}

.cms-editor-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 280px;
  background: #fafafa;
  border: 1px solid var(--border);
  border-radius: 0 0 6px 6px;
  color: var(--muted);
  font-size: 13px;
}

/* Generic modal (media picker) */
.cms-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* display:flex above would override the UA's [hidden] rule — restore it */
.cms-modal[hidden] {
  display: none;
}
.cms-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}
.cms-modal__panel {
  position: relative;
  background: #fff;
  border-radius: 8px;
  width: min(680px, calc(100vw - 48px));
  max-height: min(560px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}
.cms-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 14px;
}
.cms-modal__body {
  padding: 16px 18px;
  overflow-y: auto;
  flex: 1;
}
.cms-modal__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
}
.cms-media-grid--picker {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}
.cms-media-grid--picker .cms-media-card { cursor: pointer; }

/* In-editor media */
.cms-editor-body .ql-editor img,
.cms-editor-body .ql-editor video {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
.cms-editor-body .ql-editor iframe {
  display: block;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  border-radius: 4px;
}

/* Toolbar: mode switch (Edit / HTML / Preview) pushed to the right */
.cms-editor-toolbar__spacer { flex: 1 1 auto; }
.cms-editor-toolbar__modes { display: inline-flex; gap: 2px; }
.cms-editor-toolbar__mode {
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--muted);
  font-family: inherit;
}
.cms-editor-toolbar__mode:hover { background: var(--border); }
.cms-editor-toolbar__mode.is-active {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
  font-weight: 600;
}

/* Image / video / embed properties strip (width, height, alt) */
.cms-editor-props {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-bottom: none;
  font-size: 12px;
}
.cms-editor-props[hidden] { display: none; }
.cms-editor-props__label,
.cms-editor-props__x { color: var(--muted); }
.cms-editor-props__input {
  width: 64px;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 12px;
}
.cms-editor-props__input:focus { border-color: var(--accent); outline: none; }
.cms-editor-props__altrow { display: inline-flex; align-items: center; gap: 6px; }
.cms-editor-props__input--alt { width: 220px; }
.cms-editor-props__hint { color: var(--muted); margin-left: auto; }
.cms-editor-props__widths { display: inline-flex; align-items: center; gap: 4px; }
.cms-editor-props__preset {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  padding: 3px 8px;
  font-size: 11px;
  color: var(--muted);
  font-family: inherit;
}
.cms-editor-props__preset:hover { background: var(--border); }
.cms-editor-props__preset.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Fractional image width (editor + preview) — mirrors public rich-body.css */
.cms-editor-body .ql-editor img.ql-w-25, .cms-preview img.ql-w-25 { width: 25%; }
.cms-editor-body .ql-editor img.ql-w-50, .cms-preview img.ql-w-50 { width: 50%; }
.cms-editor-body .ql-editor img.ql-w-75, .cms-preview img.ql-w-75 { width: 75%; }
.cms-editor-body .ql-editor img.ql-w-100, .cms-preview img.ql-w-100 { width: 100%; }

/* HTML source view */
.cms-editor-html {
  width: 100%;
  min-height: 360px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 0 0 6px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  box-sizing: border-box;
}
.cms-editor-html:focus { border-color: var(--accent); outline: none; }

/* Preview pane — approximates the public .blog-body */
.cms-preview {
  min-height: 360px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 0 0 6px 6px;
  font-size: 15px;
  line-height: 1.7;
  overflow-wrap: break-word;
}
.cms-preview[hidden] { display: none; }
.cms-preview img,
.cms-preview video {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  margin: 0 auto 1rem;
}
.cms-preview iframe {
  display: block;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  border-radius: 4px;
  margin: 0 auto 1rem;
}
.cms-preview table { width: 100%; border-collapse: collapse; margin: 0 0 1rem; }
.cms-preview th,
.cms-preview td { border: 1px solid var(--border); padding: 6px 10px; }
.cms-preview .ql-align-center  { text-align: center; }
.cms-preview .ql-align-right   { text-align: right; }
.cms-preview .ql-align-justify { text-align: justify; }

/* Insert-from-URL / YouTube rows in the media picker */
.cms-media-source {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.cms-media-source .cms-input { flex: 1; }

/* Cover image preview (article editor sidebar) */
.cms-cover-preview img {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.cms-cover-preview__actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

/* Quill integration — keep the CMS toolbar look over the snow theme */
.cms-editor-toolbar.ql-toolbar.ql-snow {
  border: 1px solid var(--border);
  border-bottom: none;
  padding: 6px 8px;
  font-family: inherit;
}
.cms-editor-toolbar.ql-toolbar.ql-snow .cms-editor-toolbar__btn {
  width: auto;
  height: 24px;
  padding: 4px 8px;
  float: none;
  font-size: 12px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* Quill replaces ql-* button content with bundled inline SVGs sized height:100% —
   give them an explicit size or they collapse inside auto/flex buttons */
.cms-editor-toolbar.ql-toolbar.ql-snow .cms-editor-toolbar__btn svg {
  width: 15px;
  height: 15px;
}
.cms-editor-toolbar.ql-toolbar.ql-snow .cms-editor-toolbar__btn:hover {
  background: var(--border);
  color: var(--text);
}
.cms-editor-toolbar.ql-toolbar.ql-snow .cms-editor-toolbar__btn.ql-active {
  background: var(--border);
  color: var(--text);
}
.cms-editor-body .ql-container.ql-snow {
  border: 1px solid var(--border);
  border-radius: 0 0 6px 6px;
  font-family: inherit;
  font-size: 14px;
  background: #fff;
}
.cms-editor-body .ql-editor {
  min-height: 320px;
}
/* Snow heading picker — inherit the CMS font, align with the small toolbar */
.cms-editor-toolbar.ql-toolbar.ql-snow .ql-picker {
  font-family: inherit;
  font-size: 12px;
  height: 24px;
}
.cms-editor-toolbar.ql-toolbar.ql-snow .ql-picker-label {
  padding-top: 0;
  display: inline-flex;
  align-items: center;
}
/* Editor-side table visibility (the public site styles these in news-detail.css) */
.cms-editor-body .ql-editor table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1em;
}
.cms-editor-body .ql-editor td {
  border: 1px solid var(--border);
  padding: 6px 10px;
}

.cms-editor-sidebar {
  background: #fafafa;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.cms-editor-sidebar__section {
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.cms-editor-sidebar__section:last-child { border-bottom: none; margin-bottom: 0; }
.cms-editor-sidebar__label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 8px;
}

/* =====================================================================
   Media upload area (used in Settings, editor sidebar)
   ===================================================================== */
.cms-media-upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 24px 16px;
  border: 2px dashed var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  transition: border-color .15s;
}
.cms-media-upload-area:hover { border-color: var(--accent); }
.cms-media-upload-area--small { padding: 16px; }

/* =====================================================================
   Input addon (prefix)
   ===================================================================== */
.cms-input-addon { display: flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.cms-input-addon .cms-input { border: none; border-radius: 0; }
.cms-input-addon__pre {
  padding: 0 12px;
  font-size: 12px;
  color: var(--muted);
  background: #f5f5f5;
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  white-space: nowrap;
  font-family: 'IBM Plex Mono', monospace;
}

/* =====================================================================
   Users
   ===================================================================== */
.cms-user-detail-shell { display: flex; flex-direction: column; gap: 20px; }

.cms-user-profile-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
}
.cms-user-profile-card__name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.cms-user-profile-card__email {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.cms-user-detail-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.cms-role-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid transparent;
}
.cms-role-badge--admin    { background: #e8effe; color: #3b5bdb; border-color: #c5d2fb; }
.cms-role-badge--editor   { background: #e6faf1; color: #1a7f4e; border-color: #b2e9cf; }
.cms-role-badge--viewer   { background: #f2f2f2; color: var(--muted); border-color: var(--border); }

.cms-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
}

/* =====================================================================
   Form panel (create / edit for Industries, Tags, etc.)
   ===================================================================== */
@keyframes cms-form-fadein {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cms-form-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 24px;
  margin-bottom: 16px;
  animation: cms-form-fadein 0.15s ease;
}
.cms-form-panel__fields { display: flex; flex-direction: column; gap: 16px; }
.cms-form-panel__divider {
  border: none; border-top: 1px solid var(--border); margin: 20px 0;
}
.cms-form-panel__preview {
  display: flex; align-items: center; gap: 12px; min-height: 32px; margin-bottom: 20px;
}
.cms-form-panel__footer { display: flex; gap: 8px; }

/* Field & label */
.cms-field { display: flex; flex-direction: column; gap: 6px; }
.cms-label {
  font-size: 11px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}

/* Radio group */
.cms-radio-group { display: flex; gap: 20px; align-items: center; }
.cms-radio-label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; }
.cms-radio-label input[type="radio"] { cursor: pointer; width: 14px; height: 14px; }

/* Secondary / ghost button variant */
.cms-btn--secondary {
  background: transparent; color: var(--muted); border: 1px solid var(--border);
}
.cms-btn--secondary:hover { background: #f5f5f5; color: var(--text); }

/* Highlight for the table row currently being edited */
.cms-table tr.is-editing > td { background: #f0f7ff; }

/* =====================================================================
   Utility
   ===================================================================== */
.cms-flex { display: flex; }
.cms-flex--between { justify-content: space-between; align-items: center; }
.cms-flex--gap-6 { gap: 6px; }
.cms-flex--gap-8 { gap: 8px; }
.cms-flex--gap-10 { gap: 10px; }
.cms-flex--gap-12 { gap: 12px; }
.cms-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cms-mb-4 { margin-bottom: 4px; }
.cms-mb-8 { margin-bottom: 8px; }
.cms-mb-16 { margin-bottom: 16px; }
.cms-mb-20 { margin-bottom: 20px; }
.cms-mb-24 { margin-bottom: 24px; }
.cms-mb-32 { margin-bottom: 32px; }
.cms-mt-16 { margin-top: 16px; }
.cms-mt-24 { margin-top: 24px; }
.cms-text-muted { color: var(--muted); }
.cms-text-mono { font-family: 'IBM Plex Mono', monospace; }

/* Base badge shape — used in table rows and toolbar preview */
.cms-tag-badge {
  display: inline-flex; align-items: center;
  padding: 2px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 500; white-space: nowrap;
}

/* Toolbar live-preview badge — same shape, hidden until name is typed */
.cms-tag-preview {
  display: inline-flex; align-items: center;
  padding: 3px 12px; border-radius: 20px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
  min-height: 24px; visibility: hidden;
}
.cms-tag-preview.is-visible { visibility: visible; }

/* Palette color-swatch row */
.cms-palette { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.cms-palette__swatch {
  width: 22px; height: 22px; border-radius: 50%;
  border: none; cursor: pointer; padding: 0; flex-shrink: 0;
  transition: transform 0.1s;
}
.cms-palette__swatch:hover { transform: scale(1.2); }
.cms-palette__swatch.is-selected {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #111;
}
