/* ==========================================================================
   V0.0.1 — Admin dashboard
   ========================================================================== */

.page-admin { background: var(--bg); }
.admin-shell { display: grid; grid-template-columns: 17.5rem minmax(0, 1fr); min-height: 100vh; }

/* Sidebar ----------------------------------------------------------------- */
.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem 0.8rem;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(18px);
  z-index: 100;
  overflow-y: auto;
}
.admin-brand { display: flex; align-items: center; gap: 0.65rem; padding: 0.4rem 0.45rem 1rem; text-decoration: none; color: var(--text); }
.admin-brand .brand-mark { width: 2.4rem; height: 2.4rem; }
.admin-brand-text { display: grid; line-height: 1.1; }
.admin-brand-text strong { font-size: 1rem; font-weight: 800; }
.admin-brand-text span { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); font-weight: 700; }
.admin-nav { display: grid; gap: 0.15rem; }
.admin-nav-heading { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); font-weight: 800; padding: 1rem 0.6rem 0.35rem; }
.admin-nav a, .admin-nav button {
  display: flex; align-items: center; gap: 0.65rem;
  width: 100%; min-height: 2.65rem; padding: 0.5rem 0.65rem;
  border: 0; border-radius: var(--radius-control);
  background: transparent; color: var(--text);
  text-decoration: none; font-weight: 700; font-size: 0.88rem;
  cursor: pointer; text-align: left;
  transition: background var(--transition), color var(--transition);
}
.admin-nav a .fa-solid, .admin-nav button .fa-solid, .admin-nav a .fa-regular, .admin-nav a .fa-brands { width: 1.2rem; text-align: center; color: var(--muted); font-size: 0.95rem; }
.admin-nav a:hover, .admin-nav button:hover { background: var(--surface-2); }
.admin-nav a.is-active, .admin-nav button.is-active { background: var(--accent-soft); color: var(--accent-ink); }
.admin-nav a.is-active .fa-solid, .admin-nav button.is-active .fa-solid { color: var(--accent); }
.admin-nav .nav-badge { margin-left: auto; min-width: 1.5rem; height: 1.4rem; padding: 0 0.35rem; border-radius: 999px; background: var(--danger); color: #fff; font-size: 0.65rem; font-weight: 800; display: grid; place-items: center; }
.admin-sidebar-foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border); display: grid; gap: 0.4rem; }
.admin-sidebar-foot .btn { width: 100%; justify-content: flex-start; }
.admin-sidebar-foot .version { font-size: 0.68rem; color: var(--muted); padding: 0.4rem 0.6rem; }

/* Topbar ------------------------------------------------------------------ */
.admin-main { min-width: 0; display: flex; flex-direction: column; }
.admin-topbar {
  position: sticky; top: 0; z-index: 90;
  display: flex; align-items: center; gap: 0.75rem;
  min-height: 4.25rem; padding: 0.6rem clamp(1rem, 3vw, 2rem);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px) saturate(140%);
}
.admin-topbar-title { display: grid; line-height: 1.15; margin-right: auto; }
.admin-topbar-title strong { font-size: 0.95rem; font-weight: 800; }
.admin-topbar-title span { font-size: 0.74rem; color: var(--muted); }
.admin-topbar .icon-btn { width: 44px; height: 44px; }
.admin-search { position: relative; min-width: 12rem; max-width: 22rem; flex: 1; }
.admin-search .input { min-height: 2.45rem; padding-left: 2.3rem; background: var(--surface); }
.admin-search .fa-solid { position: absolute; left: 0.8rem; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 0.85rem; }
.admin-content { padding: clamp(1rem, 2.6vw, 2rem); flex: 1; }
.admin-view { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }

/* Cards and stats --------------------------------------------------------- */
.admin-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-card); box-shadow: var(--card-shadow);
  overflow: hidden;
}
.admin-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 1rem 1.15rem; border-bottom: 1px solid var(--border); }
.admin-card-head h2, .admin-card-head h3 { margin: 0; font-size: 1rem; }
.admin-card-body { padding: 1.15rem; }
.admin-card-foot { padding: 0.8rem 1.15rem; border-top: 1px solid var(--border); background: var(--surface-2); font-size: 0.8rem; color: var(--muted); }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.stat-card {
  position: relative; overflow: hidden;
  padding: 1.1rem 1.2rem; border-radius: var(--radius-card);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--card-shadow);
  display: grid; gap: 0.5rem;
}
.stat-card::after { content: ""; position: absolute; right: -1.5rem; top: -1.5rem; width: 6rem; height: 6rem; border-radius: 50%; background: var(--accent-soft); opacity: 0.55; }
.stat-card .stat-label { display: flex; align-items: center; gap: 0.45rem; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); position: relative; z-index: 1; }
.stat-card .stat-value { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; position: relative; z-index: 1; }
.stat-card .stat-hint { font-size: 0.75rem; color: var(--muted); position: relative; z-index: 1; }
.stat-card .stat-icon { position: absolute; right: 1rem; bottom: 0.9rem; font-size: 2rem; color: var(--accent); opacity: 0.2; }
.stat-card--accent { background: var(--accent-gradient); color: #fff; border-color: transparent; }
.stat-card--accent .stat-label, .stat-card--accent .stat-hint { color: rgb(255 255 255 / 0.82); }
.stat-card--accent::after { background: rgb(255 255 255 / 0.14); }
.stat-card--accent .stat-icon { color: #fff; opacity: 0.35; }
.stat-card--accent .stat-value { color: #fff; }
@media (max-width: 1100px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .stat-grid { grid-template-columns: 1fr; } }

.chart-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1rem; }
.chart-wrap { position: relative; height: 18rem; min-height: 18rem; }
.chart-wrap canvas { max-height: 22rem; }
@media (max-width: 1000px) { .chart-grid { grid-template-columns: 1fr; } }

/* Tables ------------------------------------------------------------------ */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.data-table th, .data-table td { padding: 0.75rem 0.85rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table th { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 800; background: var(--surface-2); white-space: nowrap; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .cell-title { display: block; font-weight: 800; color: var(--text); }
.data-table .cell-sub { display: block; font-size: 0.75rem; color: var(--muted); }
.data-table .cell-actions { display: flex; gap: 0.35rem; justify-content: flex-end; white-space: nowrap; }
.data-table .cell-actions .btn-icon { width: 2rem; min-width: 2rem; height: 2rem; min-height: 2rem; }
.table-thumb { width: 3.2rem; height: 2.2rem; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; padding: 0.9rem 1.15rem; border-bottom: 1px solid var(--border); background: var(--surface); }
.toolbar .input, .toolbar .select { min-height: 2.45rem; }
.toolbar .grow { flex: 1 1 14rem; }
.toolbar .spacer { margin-left: auto; }
.pagination-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.8rem 1.15rem; border-top: 1px solid var(--border); font-size: 0.78rem; color: var(--muted); }
.pagination-bar .pagination { margin: 0; }
.pagination-bar .pagination a, .pagination-bar .pagination span { min-width: 2.2rem; height: 2.2rem; font-size: 0.8rem; }

/* Editor ------------------------------------------------------------------ */
.editor-head { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between; }
.editor-head-left { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.editor-head-right { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.autosave-status { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.76rem; font-weight: 700; color: var(--muted); padding: 0.35rem 0.6rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); }
.autosave-status .status-dot { background: var(--muted); }
.autosave-status[data-state="saving"] .status-dot { background: var(--warning); animation: pulse 1.2s infinite; }
.autosave-status[data-state="saved"] { color: var(--success); border-color: color-mix(in srgb, var(--success) 40%, var(--border)); }
.autosave-status[data-state="saved"] .status-dot { background: var(--success); }
.autosave-status[data-state="error"], .autosave-status[data-state="conflict"] { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.autosave-status[data-state="error"] .status-dot, .autosave-status[data-state="conflict"] .status-dot { background: var(--danger); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 1.25rem; align-items: start; }
.editor-main { display: grid; gap: 1rem; }
.editor-sidebar { display: grid; gap: 1rem; position: sticky; top: 5.25rem; }
.editor-title-input { width: 100%; border: 0; background: transparent; font-family: var(--font-heading); font-size: clamp(1.6rem, 2.8vw, 2.4rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; padding: 0.25rem 0; resize: none; overflow: hidden; field-sizing: content; }
.editor-title-input:focus-visible { outline: 0; border-bottom: 2px solid var(--accent); }
.editor-excerpt-input { width: 100%; border: 0; background: transparent; color: var(--muted); font-size: 1rem; padding: 0.25rem 0; }
.editor-excerpt-input:focus-visible { outline: 0; border-bottom: 2px solid var(--accent); }
.editor-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--card-shadow); overflow: hidden; }
.editor-section-head { display: flex; align-items: center; gap: 0.5rem; padding: 0.65rem 0.8rem; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.drag-handle { width: 2rem; height: 2rem; display: grid; place-items: center; border: 0; background: transparent; color: var(--faint); cursor: grab; border-radius: 4px; }
.drag-handle:active { cursor: grabbing; }
.drag-handle:hover { background: var(--surface-3); color: var(--text); }
.section-index { font-size: 0.72rem; font-weight: 800; color: var(--accent); min-width: 1.6rem; }
.section-title-input { flex: 1; min-width: 0; border: 0; background: transparent; font-weight: 800; font-size: 1rem; padding: 0.35rem 0.25rem; }
.section-title-input:focus-visible { outline: 0; border-bottom: 2px solid var(--accent); }
.editor-section-actions { display: flex; gap: 0.2rem; margin-left: auto; }
.editor-section-body { padding: 0.9rem; display: grid; gap: 0.7rem; }
.md-toolbar { display: flex; flex-wrap: wrap; gap: 0.2rem; padding: 0.3rem; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface-2); }
.md-toolbar button { min-width: 2rem; height: 2rem; border: 0; background: transparent; border-radius: 4px; color: var(--text); cursor: pointer; display: grid; place-items: center; font-size: 0.85rem; }
.md-toolbar button:hover { background: var(--surface-3); }
.md-toolbar .sep { width: 1px; background: var(--border); margin: 0.2rem 0.25rem; }
.md-editor { width: 100%; min-height: 9rem; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface); padding: 0.75rem; font-family: var(--font-mono); font-size: 0.84rem; line-height: 1.6; resize: vertical; }
.md-editor:focus-visible { outline: var(--focus-ring); outline-offset: 2px; border-color: var(--focus); }
.md-preview { border: 1px dashed var(--border-strong); border-radius: var(--radius-control); padding: 0.9rem; min-height: 6rem; background: var(--surface); }
.md-preview:empty::before { content: attr(data-empty); color: var(--faint); font-size: 0.82rem; }
.editor-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: 0.5rem; }
.gallery-item { position: relative; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); }
.gallery-item img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.gallery-item .gallery-actions { position: absolute; top: 0.25rem; right: 0.25rem; display: flex; gap: 0.2rem; }
.gallery-item .gallery-actions button { width: 1.7rem; height: 1.7rem; border: 0; border-radius: 4px; background: rgb(0 0 0 / 0.65); color: #fff; display: grid; place-items: center; cursor: pointer; font-size: 0.7rem; }
.gallery-item .gallery-caption { padding: 0.25rem 0.35rem; font-size: 0.65rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--radius-control); padding: 1rem; text-align: center; color: var(--muted); font-size: 0.82rem; transition: border-color var(--transition), background var(--transition); }
.dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.editor-cover { aspect-ratio: 16/9; border-radius: var(--radius-control); overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); position: relative; }
.editor-cover img { width: 100%; height: 100%; object-fit: cover; }
.editor-side-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--card-shadow); overflow: hidden; }
.editor-side-panel h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 0; padding: 0.8rem 0.9rem; border-bottom: 1px solid var(--border); }
.editor-side-panel .side-body { padding: 0.9rem; display: grid; gap: 0.7rem; }
.status-list { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.meta-list { display: grid; gap: 0.5rem; font-size: 0.8rem; }
.meta-list div { display: flex; justify-content: space-between; gap: 0.5rem; }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; font-weight: 700; text-align: right; }
.contributor-list { display: grid; gap: 0.4rem; }
.contributor-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem; border-radius: 6px; background: var(--surface-2); font-size: 0.8rem; }
.contributor-item .avatar { --avatar-size: 1.8rem; }
.contributor-item .grow { min-width: 0; }
.contributor-item strong { display: block; font-size: 0.8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contributor-item small { color: var(--muted); font-size: 0.68rem; }
.contributor-item button { border: 0; background: none; color: var(--danger); cursor: pointer; padding: 0.2rem; }
.sortable-ghost { opacity: 0.35; border: 2px dashed var(--accent) !important; }
.sortable-chosen { box-shadow: var(--shadow-lg); }
.sortable-drag { opacity: 0.9; }

@media (max-width: 1200px) { .editor-layout { grid-template-columns: minmax(0, 1fr) 17rem; } }
@media (max-width: 980px) {
  .editor-layout { grid-template-columns: 1fr; }
  .editor-sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) { .editor-sidebar { grid-template-columns: 1fr; } }

/* Media library ----------------------------------------------------------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 0.8rem; }
.media-tile { position: relative; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; background: var(--surface); }
.media-tile img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.media-tile .media-info { padding: 0.5rem 0.6rem; display: grid; gap: 0.15rem; }
.media-tile .media-info strong { font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-tile .media-info span { font-size: 0.66rem; color: var(--muted); }
.media-tile .media-actions { position: absolute; top: 0.35rem; right: 0.35rem; display: flex; gap: 0.25rem; }
.media-tile .media-actions button { width: 1.9rem; height: 1.9rem; border: 0; border-radius: 4px; background: rgb(0 0 0 / 0.65); color: #fff; display: grid; place-items: center; cursor: pointer; font-size: 0.75rem; }
.media-tile .media-badge { position: absolute; top: 0.35rem; left: 0.35rem; background: rgb(0 0 0 / 0.65); color: #fff; padding: 0.15rem 0.4rem; border-radius: 4px; font-size: 0.6rem; font-weight: 800; }
.media-picker-grid { max-height: 26rem; overflow: auto; padding: 0.2rem; }

/* Comments moderation ----------------------------------------------------- */
.comment-mod-card { display: grid; gap: 0.6rem; padding: 1rem 1.15rem; border-bottom: 1px solid var(--border); }
.comment-mod-card:last-child { border-bottom: 0; }
.comment-mod-head { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; font-size: 0.8rem; color: var(--muted); }
.comment-mod-head strong { color: var(--text); }
.comment-mod-body { font-size: 0.9rem; }
.comment-mod-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; }

/* Settings ---------------------------------------------------------------- */
.settings-tabs { display: flex; gap: 0.35rem; overflow-x: auto; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); margin-bottom: 1.25rem; }
.settings-tab { flex: none; display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid transparent; background: transparent; color: var(--muted); border-radius: var(--radius-control); padding: 0.5rem 0.75rem; font-weight: 700; font-size: 0.82rem; cursor: pointer; }
.settings-tab:hover { background: var(--surface-2); color: var(--text); }
.settings-tab.is-active { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent); }
.settings-panel { display: grid; gap: 1.1rem; }
.setting-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(12rem, 22rem); gap: 1rem; align-items: start; padding: 0.9rem 0; border-bottom: 1px solid var(--border); }
.setting-row:last-child { border-bottom: 0; }
.setting-label strong { display: flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; }
.setting-label p { margin: 0.2rem 0 0; font-size: 0.76rem; color: var(--muted); }
.setting-control { display: grid; gap: 0.35rem; justify-items: end; }
.setting-control .input, .setting-control .select, .setting-control .textarea { max-width: 22rem; }
.setting-control .switch { width: 100%; justify-content: flex-end; }
.setting-label label { cursor: pointer; }
.setting-label label:hover strong { text-decoration: underline; }
.setting-control .json-editor { font-family: var(--font-mono); font-size: 0.75rem; min-height: 6rem; }
.setting-saved { font-size: 0.7rem; color: var(--success); font-weight: 700; }
@media (max-width: 760px) { .setting-row { grid-template-columns: 1fr; } .setting-control { justify-items: stretch; } .setting-control .input, .setting-control .select, .setting-control .textarea { max-width: none; } }

/* Roles ------------------------------------------------------------------- */
.role-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; }
.role-card { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1rem; background: var(--surface); }
.role-card h3 { margin: 0 0 0.2rem; font-size: 1rem; }
.role-card p { font-size: 0.78rem; color: var(--muted); margin: 0 0 0.7rem; }
.permission-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.3rem; }
.permission-check { display: flex; align-items: center; gap: 0.45rem; font-size: 0.76rem; padding: 0.25rem 0; }
.permission-check input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
@media (max-width: 1000px) { .role-grid { grid-template-columns: 1fr; } }

/* Notifications ----------------------------------------------------------- */
.notification-list { display: grid; }
.notification-item { display: flex; gap: 0.7rem; padding: 0.8rem 1rem; border-bottom: 1px solid var(--border); font-size: 0.82rem; }
.notification-item:last-child { border-bottom: 0; }
.notification-item.is-unread { background: var(--accent-soft); }
.notification-item .icon-circle { width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); flex: none; }
.notification-item strong { display: block; }
.notification-item time { font-size: 0.7rem; color: var(--muted); }
.notification-panel { position: absolute; right: 0; top: calc(100% + 0.5rem); width: min(22rem, calc(100vw - 2rem)); max-height: 26rem; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); z-index: 950; }
.notification-panel-head { display: flex; justify-content: space-between; align-items: center; padding: 0.8rem 1rem; border-bottom: 1px solid var(--border); font-weight: 800; font-size: 0.85rem; }
.notification-empty { padding: 1rem; margin: 0; font-size: 0.82rem; }
.notification-wrap { position: relative; }

/* Admin shell responsive -------------------------------------------------- */
.admin-sidebar-backdrop { display: none; }
.admin-menu-toggle { display: none; }
@media (max-width: 1080px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(19rem, 86vw); transform: translateX(-105%); transition: transform 240ms ease; box-shadow: var(--shadow-lg); }
  .admin-shell.is-sidebar-open .admin-sidebar { transform: none; }
  .admin-sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgb(0 0 0 / 0.45); z-index: 99; opacity: 0; pointer-events: none; transition: opacity 240ms ease; }
  .admin-shell.is-sidebar-open .admin-sidebar-backdrop { opacity: 1; pointer-events: auto; }
  .admin-menu-toggle { display: inline-grid; }
}
@media (max-width: 700px) {
  .admin-search { display: none; }
  .admin-topbar-title span { display: none; }
  .admin-content { padding: 0.9rem; }
  .role-grid { grid-template-columns: 1fr; }
  .permission-grid { grid-template-columns: 1fr; }
}

/* Loading / empty --------------------------------------------------------- */
.admin-loading { display: grid; gap: 1rem; }
.admin-loading .skeleton { height: 8rem; }
.admin-empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.admin-empty .fa-solid { font-size: 2rem; color: var(--accent); margin-bottom: 0.6rem; }
.admin-error { padding: 1.2rem; border: 1px solid var(--danger); background: var(--danger-soft); border-radius: var(--radius-md); }
.inline-spinner { width: 1rem; height: 1rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Admin dialog tweaks ----------------------------------------------------- */
.admin-dialog .dialog-panel { max-height: 92vh; }
.admin-dialog .dialog-panel--wide { width: min(72rem, 100%); }
.modal-help { font-size: 0.78rem; color: var(--muted); }
.confirm-icon { width: 3.5rem; height: 3.5rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 1.4rem; margin-bottom: 1rem; }

/* Chart legend */
.chart-legend { display: flex; flex-wrap: wrap; gap: 0.75rem; font-size: 0.75rem; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.chart-legend i { width: 0.7rem; height: 0.7rem; border-radius: 2px; display: inline-block; }
