/* ==========================================================================
   ADMIN KIT — Cream · Sage · Brown (from design-kit/tokens.json).
   Loaded last in layouts/admin.blade.php; applies only under html.admin-kit.
   Re-maps the shared --d-* tokens so every admin page picks up the identity,
   then restyles radii, panel headings (//), sidebar and controls.
   ========================================================================== */
/* Small kit radii: card 10, button 7, tag 5, input 8 */
html.admin-kit {
  --kit-accent: var(--d-primary); --kit-accent2: var(--d-primary-2);
  --radius-xs: 5px; --radius-sm: 7px; --radius-md: 10px; --radius-lg: 10px; --radius-xl: 10px;
  --shadow-card: var(--d-shadow-2); --shadow-md: var(--d-shadow-2); --shadow-lg: var(--d-shadow-3);
}
html.admin-kit :root .panel, html.admin-kit .panel { border-color: var(--d-line); box-shadow: var(--d-shadow-2); }
html.admin-kit .stat-card:hover { transform: none; }

/* Section headings carry the // mark in mono + accent colour */
html.admin-kit .panel-head h2, html.admin-kit .panel-head h3,
html.admin-kit .dashboard-panel-head h2, html.admin-kit .dashboard-panel-head h3,
html.admin-kit .hub-section-head h2 {
  display: flex; align-items: center; gap: 8px;
}
html.admin-kit .panel-head h2::before, html.admin-kit .panel-head h3::before,
html.admin-kit .dashboard-panel-head h2::before, html.admin-kit .dashboard-panel-head h3::before,
html.admin-kit .hub-section-head h2::before {
  content: "//"; font: 700 .8rem Menlo, ui-monospace, monospace; color: var(--kit-accent); direction: ltr;
}
/* the numbered index chip is replaced by the // mark */
html.admin-kit .hub-section-index { display: none; }

/* Sidebar: dark sage, selected item in gold */
html.admin-kit .snav-link.is-active { border-radius: 10px; }
html.admin-kit[data-palette="cream"] .snav-link.is-active .snav-icon { background: #3a2418; color: var(--kit-accent2, #d9b88a); box-shadow: none; }

/* Controls */
html.admin-kit .btn, html.admin-kit button.btn, html.admin-kit a.btn { border-radius: 7px; }
html.admin-kit input:not([type="checkbox"]):not([type="radio"]), html.admin-kit select, html.admin-kit textarea { border-radius: 8px; }
html.admin-kit [class*="badge"], html.admin-kit [class*="pill"]:not(.hub-live) { border-radius: 5px; }
html.admin-kit .notice { border-radius: 10px; }

/* Two-factor challenge page (login has its own admin-login.css) */
html.admin-kit .login-page { background: var(--d-surface-2); }
html.admin-kit .auth-portal-card, html.admin-kit .auth-console { border-radius: 10px; box-shadow: var(--d-shadow-3); }

/* Smooth page-to-page navigation: the shell (sidebar, topbar) stays put and only the content cross-fades. */
@view-transition { navigation: auto; }
html.admin-kit .sidebar { view-transition-name: admin-sidebar; }
html.admin-kit .topbar { view-transition-name: admin-topbar; }
html.admin-kit .page-wrap { view-transition-name: admin-page; }
::view-transition-group(admin-sidebar), ::view-transition-group(admin-topbar) { animation: none; }
::view-transition-old(admin-sidebar), ::view-transition-new(admin-sidebar),
::view-transition-old(admin-topbar), ::view-transition-new(admin-topbar) { animation: none; mix-blend-mode: normal; }
::view-transition-old(admin-page) { animation: kit-page-out .12s ease both; }
::view-transition-new(admin-page) { animation: kit-page-in .2s ease .04s both; }
@keyframes kit-page-out { to { opacity: 0; } }
@keyframes kit-page-in { from { opacity: 0; transform: translateY(4px); } }
/* No replayed entrance animations or colour fades on every load: they read as a flash. */
html.admin-kit body, html.admin-kit .sidebar, html.admin-kit .snav-link { transition: none; }
html.admin-kit .organization-directory-hero, html.admin-kit .directory-profile-hero { animation: none; }
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }
