:root {
  --bg: #f3f4f7;
  --bg-soft: #f8f8fb;
  --surface: #ffffff;
  --surface-soft: #f7f7fa;
  --ink: #171820;
  --ink-soft: #343642;
  --muted: #747784;
  --line: #e5e6eb;
  --line-strong: #d7d9e1;
  --sidebar: #12131a;
  --sidebar-soft: #1b1d27;
  --primary: #7357e8;
  --primary-strong: #6046cf;
  --primary-soft: #ede7ff;
  --mint: #2ba887;
  --mint-soft: #e2f6ef;
  --blue: #397ed1;
  --blue-soft: #e5f0fd;
  --coral: #d76572;
  --coral-soft: #fae8ea;
  --amber: #b98221;
  --amber-soft: #fff3d9;
  --danger: #bd4150;
  --danger-soft: #fce7e9;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(18, 19, 26, .04), 0 8px 24px rgba(18, 19, 26, .04);
  --shadow: 0 20px 50px rgba(25, 26, 36, .10);
  --sidebar-width: 248px;
  --sidebar-mini: 84px;
  color-scheme: light;
  font-family: "Open Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
main, section, article, header, footer, nav, div, form, fieldset, label { min-width: 0; }
[hidden] { display: none !important; }
dialog:not([open]) { display: none !important; }

html {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  overflow-x: clip;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% -20%, rgba(115, 87, 232, .09), transparent 30rem),
    var(--bg);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

body.dialog-open { overflow: hidden; }

.app-boot-screen {
  position: fixed;
  z-index: 400;
  inset: 0;
  display: grid;
  grid-template-rows: auto auto;
  place-content: center;
  justify-items: center;
  gap: 18px;
  color: var(--primary);
  background: #f3f4f7;
}

body:not(.admin-booting):not(.superadmin-booting) .app-boot-screen { display: none; }
html.admin-session-resume body.admin-booting .app-boot-screen { display: none; }
html.admin-session-resume body.admin-booting .admin-shell { visibility: visible; }
.admin-booting .admin-shell,
.admin-unauthenticated .admin-shell,
.superadmin-booting .superadmin-shell,
.superadmin-unauthenticated .superadmin-shell { visibility: hidden; }
.boot-spinner { width: 28px; height: 28px; border: 3px solid rgba(115, 87, 232, .18); border-top-color: var(--primary); border-radius: 50%; animation: spin .72s linear infinite; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: not-allowed; }
img { display: block; max-width: 100%; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, strong { letter-spacing: -.025em; }
h1, h2, h3, p, li, dt, dd, label, legend { overflow-wrap: anywhere; }

h1 { font-size: clamp(1.55rem, 2vw, 2rem); line-height: 1.15; }
h2 { font-size: 1.08rem; line-height: 1.25; }
h3 { font-size: .98rem; line-height: 1.3; }

:focus-visible {
  outline: 3px solid rgba(115, 87, 232, .32);
  outline-offset: 2px;
}

::selection { color: #fff; background: var(--primary); }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.muted { color: var(--muted); font-size: .83rem; }

.eyebrow {
  display: none;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.empty-state.compact { padding: 20px 8px; }
.empty-state.large { min-height: 420px; place-content: center; }
.empty-state h2 { margin: 5px 0 0; color: var(--ink); font-size: 1.25rem; }
.empty-state p { max-width: 440px; margin: 0 0 10px; }
.empty-icon { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 18px; color: var(--primary); background: var(--primary-soft); }
.empty-icon svg { width: 27px; height: 27px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
