/* admin_shell.css — chrome + components for every page under /admin.
 *
 * Mirrors the visual language of the original Replit admin (floating
 * action-bar pill, bottom-right toasts, custom nav-guard modal,
 * Pages/Manage sidebar) but uses pure CSS with brand variables —
 * no Tailwind CDN. Per-page CSS layers on top via more specific
 * selectors; please reuse the variables and the named components
 * (.aab, .ng-modal, .admin-card, etc.) for consistency.
 *
 * Sections:
 *   1. Tokens                   2. Reset / base
 *   3. Layout                   4. Sidebar
 *   5. Top header               6. Cards & sections
 *   7. Buttons                  8. Form controls
 *   9. Page list                10. Stat cards
 *  11. Toasts                   12. Action bar (floating pill)
 *  13. Nav-guard modal          14. Spinner / empty
 *  15. admin_editor.js polyfills (Tailwind utility subset)
 *  16. Responsive
 */

/* ── 1. Tokens ─────────────────────────────────────────────────────── */
:root {
  --itjw-blue:        #0093C9;
  --itjw-blue-dark:   #007AA8;
  --itjw-navy:        #051923;
  --itjw-navy-2:      #003554;
  --itjw-paper:       #F4F9FC;
  --itjw-paper-2:     #E6F2F8;
  --itjw-ink:         #0f172a;
  --itjw-ink-soft:    #1e293b;
  --itjw-muted:       #64748b;
  --itjw-muted-2:     #94a3b8;
  --itjw-line:        #e2e8f0;
  --itjw-line-soft:   #f1f5f9;
  --itjw-bg:          #f8fafc;
  --itjw-card:        #ffffff;
  --itjw-danger:      #e11d48;
  --itjw-danger-soft: #fef2f2;
  --itjw-ok:          #059669;
  --itjw-warn:        #b45309;

  --itjw-radius-sm:   8px;
  --itjw-radius:      12px;
  --itjw-radius-lg:   16px;
  --itjw-radius-xl:   20px;

  --itjw-shadow-sm:   0 1px 2px rgba(15, 23, 42, .06);
  --itjw-shadow:      0 1px 2px rgba(15, 23, 42, .06),
                      0 8px 24px -12px rgba(15, 23, 42, .12);
  --itjw-shadow-lg:   0 24px 48px -16px rgba(15, 23, 42, .25);

  --itjw-sidebar-w:   256px;
  --itjw-header-h:    56px;
}

/* ── 2. Reset / base ──────────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--itjw-bg);
  color: var(--itjw-ink);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont,
               'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body { min-height: 100vh; }
a { color: var(--itjw-blue); text-decoration: none; }
a:hover { color: var(--itjw-blue-dark); }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  background: var(--itjw-line-soft);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--itjw-ink-soft);
}

/* ── 3. Layout ────────────────────────────────────────────────────── */
.admin-app {
  display: flex;
  height: 100vh;
  overflow: hidden;
}
.admin-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.admin-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}
.admin-content--bleed { padding: 0; }

/* ── 4. Sidebar ───────────────────────────────────────────────────── */
.admin-sidebar {
  width: var(--itjw-sidebar-w);
  background: var(--itjw-navy);
  color: rgba(255, 255, 255, .85);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .15) transparent;
}
.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-track { background: transparent; }
.admin-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .15);
  border-radius: 4px;
}
.admin-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 20px 18px;
}
.admin-sidebar__brand-name {
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.admin-sidebar__brand-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 147, 201, .20);
  color: var(--itjw-blue);
  border: 1px solid rgba(0, 147, 201, .40);
}
.admin-sidebar__nav {
  flex: 1;
  padding: 0 12px;
}
.admin-sidebar__section {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: rgba(255, 255, 255, .40);
  padding: 12px 12px 4px;
  margin-top: 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--itjw-radius);
  font-size: 13.5px;
  color: rgba(255, 255, 255, .65);
  transition: all .15s ease;
  margin-bottom: 1px;
  width: 100%;
  background: transparent;
  border: 0;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, .06);
}
.nav-item.is-active {
  color: #fff;
  background: rgba(255, 255, 255, .10);
  font-weight: 600;
}
.nav-item.is-active svg { color: var(--itjw-blue); }
.nav-item[aria-disabled="true"] {
  color: rgba(255, 255, 255, .30);
  cursor: not-allowed;
}
.nav-item[aria-disabled="true"]:hover { background: transparent; }
.nav-item__hint {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .40);
  background: rgba(255, 255, 255, .05);
  padding: 2px 7px;
  border-radius: 999px;
}
.nav-item .nav-item__icon { width: 18px; height: 18px; flex-shrink: 0; }

.nav-sub {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 36px;
  border-radius: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, .55);
  transition: all .15s ease;
  margin-bottom: 1px;
}
.nav-sub:hover {
  color: #fff;
  background: rgba(255, 255, 255, .05);
}
.nav-sub.is-active {
  color: #fff;
  background: rgba(0, 147, 201, .18);
  font-weight: 600;
  box-shadow: inset 2px 0 0 var(--itjw-blue);
}
.nav-sub__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .55;
  flex-shrink: 0;
}

.admin-sidebar__footer {
  padding: 14px 12px 18px;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, .10);
}

/* ── 5. Top header ────────────────────────────────────────────────── */
.admin-header {
  height: var(--itjw-header-h);
  background: var(--itjw-card);
  border-bottom: 1px solid var(--itjw-line);
  display: flex;
  align-items: center;
  padding: 0 24px;
  flex-shrink: 0;
}
.admin-header__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--itjw-navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-header__kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--itjw-muted-2);
  margin-right: 10px;
}
.admin-header__spacer { flex: 1; }
.admin-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.admin-header__link {
  font-size: 12px;
  color: var(--itjw-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.admin-header__link:hover { color: var(--itjw-blue); }
.admin-header__pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--itjw-muted);
}
.admin-header__pulse::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, .6);
  animation: itjw-pulse 1.8s ease-out infinite;
}
@keyframes itjw-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, .55); }
  70%  { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Editor-chrome variant: page editors use a thinner header with a
   kicker label and the page title — see dist/admin/pages/<key>/. */
.admin-header--editor {
  position: sticky;
  top: 0;
  z-index: 20;
}

/* ── 6. Cards & sections ──────────────────────────────────────────── */
.admin-stack > * + * { margin-top: 16px; }
.admin-stack--lg > * + * { margin-top: 24px; }

.admin-card {
  background: var(--itjw-card);
  border: 1px solid var(--itjw-line-soft);
  border-radius: var(--itjw-radius-lg);
  box-shadow: var(--itjw-shadow-sm);
}
.admin-card__head {
  padding: 18px 22px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin-card__head--bordered { border-bottom: 1px solid var(--itjw-line-soft); }
.admin-card__kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--itjw-navy);
  margin: 0;
}
.admin-card__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--itjw-navy);
  margin: 0;
}
.admin-card__hint {
  margin-left: auto;
  font-size: 12px;
  color: var(--itjw-muted);
}
.admin-card__body { padding: 18px 22px 22px; }
.admin-card__body--flush { padding: 0; }

.admin-grid {
  display: grid;
  gap: 16px;
}
.admin-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ── 7. Buttons ───────────────────────────────────────────────────── */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  border: 1px solid var(--itjw-line);
  background: var(--itjw-card);
  color: var(--itjw-ink);
  border-radius: var(--itjw-radius-sm);
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.btn:hover { border-color: var(--itjw-muted-2); }
.btn:focus-visible {
  outline: 2px solid var(--itjw-blue);
  outline-offset: 2px;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--primary {
  background: var(--itjw-blue);
  border-color: var(--itjw-blue);
  color: #fff;
}
.btn--primary:hover:not(:disabled) {
  background: var(--itjw-blue-dark);
  border-color: var(--itjw-blue-dark);
}
.btn--ghost {
  background: transparent;
}
.btn--ghost:hover:not(:disabled) {
  background: var(--itjw-line-soft);
}
.btn--danger-ghost {
  background: transparent;
  color: var(--itjw-danger);
}
.btn--danger-ghost:hover:not(:disabled) {
  background: var(--itjw-danger-soft);
  border-color: #fecaca;
}
.btn--sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }

/* ── 8. Form controls ─────────────────────────────────────────────── */
.field { display: block; margin-bottom: 14px; }
.field__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--itjw-muted);
  margin-bottom: 4px;
  letter-spacing: .01em;
}
.field__hint {
  font-size: 12px;
  color: var(--itjw-muted);
  margin-top: 4px;
}
.input,
.textarea,
.select {
  width: 100%;
  background: #fff;
  border: 1px solid var(--itjw-line);
  border-radius: var(--itjw-radius-sm);
  padding: 8px 11px;
  font: inherit;
  font-size: 13.5px;
  color: var(--itjw-ink);
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--itjw-blue);
  box-shadow: 0 0 0 3px rgba(0, 147, 201, .18);
}
.textarea { resize: vertical; min-height: 80px; line-height: 1.55; }

/* ── 9. Page list (used on /admin/pages) ──────────────────────────── */
.page-card {
  display: block;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--itjw-line-soft);
  border-radius: var(--itjw-radius-lg);
  transition: border-color .15s ease, box-shadow .15s ease;
  text-decoration: none;
  color: inherit;
}
.page-card:hover {
  border-color: rgba(0, 147, 201, .30);
  box-shadow: var(--itjw-shadow-sm);
}
.page-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.page-card__title {
  font-size: 15px;
  font-weight: 600;
  color: var(--itjw-navy);
  margin: 0;
}
.page-card:hover .page-card__title { color: var(--itjw-blue); }
.page-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.page-card__chip {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--itjw-line-soft);
  color: var(--itjw-muted);
}
.page-card__meta {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-card__count {
  font-size: 12px;
  color: var(--itjw-muted);
  white-space: nowrap;
}
.page-card__chev {
  color: #cbd5e1;
  transition: color .15s ease;
}
.page-card:hover .page-card__chev { color: var(--itjw-blue); }

/* ── 10. Stat cards (dashboard) ───────────────────────────────────── */
.stat-card {
  display: block;
  padding: 22px;
  border: 1px solid;
  border-radius: var(--itjw-radius-lg);
  transition: box-shadow .15s ease;
  text-decoration: none;
}
.stat-card:hover { box-shadow: var(--itjw-shadow-sm); }
.stat-card__count {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 6px;
}
.stat-card__label {
  font-size: 13px;
  font-weight: 500;
  opacity: .75;
}
.stat-card--blue   { background: #f0f9ff; border-color: #e0f2fe; color: #075985; }
.stat-card--violet { background: #f5f3ff; border-color: #ede9fe; color: #5b21b6; }
.stat-card--green  { background: #ecfdf5; border-color: #d1fae5; color: #065f46; }

/* Mini-action row (dashboard right column) */
.quick-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--itjw-radius);
  font-size: 13.5px;
  color: var(--itjw-ink-soft);
  transition: background .12s ease, color .12s ease;
}
.quick-action:hover {
  background: var(--itjw-line-soft);
  color: var(--itjw-blue);
}
.quick-action__icon {
  width: 18px; height: 18px;
  color: var(--itjw-muted-2);
  flex-shrink: 0;
}
.quick-action:hover .quick-action__icon { color: var(--itjw-blue); }

/* ── 11. Toasts ───────────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 88px;
  right: 18px;
  z-index: 9000;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  padding: 10px 14px;
  border-radius: var(--itjw-radius);
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: var(--itjw-ink-soft);
  box-shadow: var(--itjw-shadow);
  max-width: 360px;
  cursor: pointer;
  animation: itjw-toast-in .22s ease-out both;
}
.toast--ok  { background: #047857; }
.toast--err { background: #b91c1c; }
.toast--info{ background: var(--itjw-navy-2); }
.toast--leave { animation: itjw-toast-out .22s ease-in both; }
@keyframes itjw-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes itjw-toast-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(8px); }
}

/* ── 12. Action bar (floating pill, centred, slides up) ──────────── */
.aab {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  justify-content: center;
  align-items: end;
  padding: 0 16px 16px;
  pointer-events: none;
  transform: translateY(calc(100% + 1rem));
  transition: transform .22s cubic-bezier(.4, 0, .2, 1);
}
.aab.is-visible {
  transform: translateY(0);
  pointer-events: auto;
}
.aab__pill {
  background: var(--itjw-navy);
  border-radius: var(--itjw-radius-xl);
  box-shadow: 0 24px 48px -16px rgba(0, 0, 0, .35);
  width: 100%;
  max-width: 640px;
}
.aab__row {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
}
.aab__group { display: inline-flex; align-items: center; gap: 2px; }
.aab__icon-btn {
  padding: 8px;
  border-radius: var(--itjw-radius-sm);
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, .5);
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.aab__icon-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, .10);
  color: #fff;
}
.aab__icon-btn:disabled { opacity: .3; cursor: not-allowed; }
.aab__icon-btn svg { width: 16px; height: 16px; }
.aab__label {
  flex: 1;
  font-size: 13.5px;
  color: rgba(255, 255, 255, .75);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aab__discard {
  padding: 7px 14px;
  border-radius: var(--itjw-radius-sm);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .20);
  color: rgba(255, 255, 255, .80);
  font: inherit;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .12s ease, color .12s ease;
}
.aab__discard:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, .50);
  color: #fff;
}
.aab__discard:disabled { opacity: .35; cursor: not-allowed; }
.aab__save {
  padding: 7px 16px;
  border-radius: var(--itjw-radius-sm);
  background: var(--itjw-blue);
  border: 0;
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background .12s ease;
}
.aab__save:hover:not(:disabled) { background: var(--itjw-blue-dark); }
.aab__save:disabled { opacity: .4; cursor: not-allowed; }

/* ── 13. Nav-guard modal ──────────────────────────────────────────── */
.ng-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, .55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ng-modal.is-open { display: flex; }
.ng-modal__card {
  background: #fff;
  border-radius: var(--itjw-radius-lg);
  box-shadow: var(--itjw-shadow-lg);
  max-width: 380px;
  width: 100%;
  padding: 22px;
}
.ng-modal__kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--itjw-navy);
  margin-bottom: 6px;
}
.ng-modal__body {
  font-size: 13.5px;
  color: var(--itjw-muted);
  margin-bottom: 16px;
}
.ng-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ng-modal__btn {
  padding: 10px 14px;
  font: inherit;
  font-weight: 600;
  font-size: 13px;
  border-radius: var(--itjw-radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.ng-modal__btn--primary {
  background: var(--itjw-blue);
  color: #fff;
}
.ng-modal__btn--primary:hover { background: var(--itjw-blue-dark); }
.ng-modal__btn--discard {
  background: #fff;
  color: var(--itjw-danger);
  border-color: var(--itjw-line);
}
.ng-modal__btn--discard:hover {
  background: var(--itjw-danger-soft);
  border-color: #fecaca;
}
.ng-modal__btn--cancel {
  background: transparent;
  color: var(--itjw-muted);
}
.ng-modal__btn--cancel:hover {
  background: var(--itjw-line-soft);
  color: var(--itjw-ink-soft);
}

/* ── 14. Spinner / empty ──────────────────────────────────────────── */
.empty {
  text-align: center;
  padding: 28px 18px;
  color: var(--itjw-muted);
  font-size: 13px;
}
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(0, 147, 201, .25);
  border-top-color: var(--itjw-blue);
  border-radius: 50%;
  animation: itjw-spin .8s linear infinite;
  display: inline-block;
  vertical-align: -3px;
  margin-right: 6px;
}
@keyframes itjw-spin { to { transform: rotate(360deg); } }

/* ── 15. admin_editor.js polyfills ────────────────────────────────────
 * admin_editor.js emits markup with Tailwind utility classes (it was
 * ported from the old Replit admin where Tailwind was loaded via CDN).
 * Rather than rewrite the JS, we polyfill the exact subset it uses so
 * the markup renders correctly under our pure-CSS stylesheet.
 * Keep this list in sync with admin_editor.js as it evolves.
 */

/* Display / layout */
.block       { display: block; }
.hidden      { display: none !important; }
.inline-flex { display: inline-flex; }
.items-center{ align-items: center; }
.flex        { display: flex; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-x-4 { column-gap: 16px; }
.gap-y-0 { row-gap: 0; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: 1fr 1fr; }
  .sm\:col-span-2  { grid-column: span 2 / span 2; }
}

/* Spacing */
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.ml-1 { margin-left: 4px; }
.px-2 { padding-left: 8px; padding-right: 8px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.py-0\.5 { padding-top: 2px; padding-bottom: 2px; }
.py-1\.5 { padding-top: 6px; padding-bottom: 6px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.p-1  { padding: 4px; }
.p-3  { padding: 12px; }

/* Sizes */
.w-full { width: 100%; }
.w-4    { width: 16px; }
.h-4    { height: 16px; }

/* Type */
.text-xs        { font-size: 11.5px; }
.text-sm        { font-size: 13px; }
.font-bold      { font-weight: 700; }
.font-semibold  { font-weight: 600; }
.uppercase      { text-transform: uppercase; }
.tracking-wide  { letter-spacing: .04em; }
.italic         { font-style: italic; }

/* Colours */
.text-slate-300    { color: #cbd5e1; }
.text-slate-400    { color: var(--itjw-muted-2); }
.text-slate-500    { color: var(--itjw-muted); }
.text-slate-600    { color: #475569; }
.text-itjw-blue    { color: var(--itjw-blue); }
.bg-white          { background: #fff; }
.bg-slate-50\/50   { background: rgba(248, 250, 252, .60); }
.bg-slate-100      { background: var(--itjw-line-soft); }
.bg-itjw-blue\/10  { background: rgba(0, 147, 201, .10); }
.border            { border-width: 1px; border-style: solid; }
.border-slate-100  { border-color: var(--itjw-line-soft); }
.border-slate-200  { border-color: var(--itjw-line); }
.border-slate-300  { border-color: #cbd5e1; }

/* Radius */
.rounded     { border-radius: 4px; }
.rounded-md  { border-radius: 6px; }
.rounded-lg  { border-radius: 8px; }
.rounded-xl  { border-radius: 12px; }

/* Misc */
.outline-none  { outline: none; }
.resize-y      { resize: vertical; }
.invisible     { visibility: hidden; }
.cursor-grab   { cursor: grab; }
.cursor-pointer{ cursor: pointer; }
.overflow-hidden { overflow: hidden; }
.transition    { transition: background .12s ease, border-color .12s ease, color .12s ease, box-shadow .12s ease; }
.chevron-icon  { transition: transform .15s ease; }

/* Pseudo-class variants */
.focus\:border-itjw-blue:focus  { border-color: var(--itjw-blue); }
.focus\:ring-2:focus            { box-shadow: 0 0 0 3px rgba(0, 147, 201, .18); }
.focus\:ring-itjw-blue\/20:focus{ box-shadow: 0 0 0 3px rgba(0, 147, 201, .20); }
.focus\:ring-itjw-blue\/40:focus{ box-shadow: 0 0 0 3px rgba(0, 147, 201, .40); }
.hover\:bg-slate-50:hover       { background: #f8fafc; }
.hover\:bg-slate-100:hover      { background: var(--itjw-line-soft); }
.hover\:border-itjw-blue\/20:hover { border-color: rgba(0, 147, 201, .20); }
.hover\:text-itjw-blue:hover    { color: var(--itjw-blue); }

/* Block editor card scaffolding (emitted by admin_editor.js) */
.block-card {
  background: #fff;
  border: 1px solid var(--itjw-line-soft);
  border-radius: var(--itjw-radius);
  overflow: hidden;
  margin-bottom: 10px;
}
.block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
  gap: 10px;
  transition: background .12s ease;
}
.block-header:hover { background: var(--itjw-line-soft); }
.block-body {
  padding: 14px;
  border-top: 1px solid var(--itjw-line-soft);
  background: var(--itjw-bg);
}
.block-body.hidden { display: none; }
.drag-handle { color: #cbd5e1; }
.move-up, .move-down {
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--itjw-muted-2);
  padding: 4px;
  border-radius: 4px;
}
.move-up:hover, .move-down:hover { background: var(--itjw-line-soft); color: var(--itjw-blue); }

/* ── 16. Responsive ───────────────────────────────────────────────── */
.sidebar-toggle {
  display: none;
  padding: 8px;
  margin: 0 8px 0 -8px;
  border-radius: 8px;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--itjw-muted);
}
.sidebar-toggle:hover { background: var(--itjw-line-soft); }

@media (max-width: 980px) {
  .admin-grid--2,
  .admin-grid--3 { grid-template-columns: 1fr; }
}

@media (max-width: 880px) {
  .sidebar-toggle { display: inline-flex; }
  .admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 80;
    transform: translateX(-100%);
    transition: transform .22s ease;
  }
  .admin-sidebar.is-open { transform: translateX(0); }
  .admin-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .50);
    z-index: 70;
    display: none;
  }
  .admin-sidebar-overlay.is-open { display: block; }
  .toast-container { bottom: 84px; right: 12px; }
}
