* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  background: var(--gray-50);
  color: var(--gray-900);
  min-height: 100vh;
  line-height: 1.5;
}
html.dark body { background: var(--dark-950); color: #f3f4f6; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; }
::selection { background: rgba(20, 184, 166, 0.2); color: var(--primary-900); }
html.dark ::selection { color: var(--primary-100); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: transparent; border-radius: 99px; }
*:hover::-webkit-scrollbar-thumb { background: rgba(156, 163, 175, 0.5); }
html.dark *:hover::-webkit-scrollbar-thumb { background: rgba(71, 85, 105, 0.7); }
:focus-visible { outline: 2px solid rgba(20, 184, 166, 0.55); outline-offset: 2px; }
.hidden { display: none !important; }

.mesh {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background:
    radial-gradient(at 40% 20%, rgba(20, 184, 166, 0.12) 0, transparent 50%),
    radial-gradient(at 80% 0%, rgba(6, 182, 212, 0.08) 0, transparent 50%),
    radial-gradient(at 0% 50%, rgba(20, 184, 166, 0.08) 0, transparent 50%);
}

.boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--gray-500);
  gap: var(--space-3);
}

.shell { min-height: 100vh; }
.main {
  position: relative;
  min-height: 100vh;
  margin-left: var(--sidebar);
  min-width: 0;
  overflow-x: clip;
  transition: margin-left 0.3s ease;
}
.shell.is-collapsed { --sidebar: 72px; }
.page { padding: var(--space-4); min-width: 0; max-width: 100%; overflow-x: clip; }
@media (min-width: 768px) { .page { padding: var(--space-6); } }
@media (min-width: 1024px) { .page { padding: var(--space-8); } }
@media (max-width: 1023px) {
  .main, .shell.is-collapsed .main { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Skip link: visible on keyboard focus only */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus,
.skip-link:focus-visible {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 10000;
  width: auto;
  height: auto;
  margin: 0;
  padding: 10px 16px;
  overflow: visible;
  clip: auto;
  white-space: nowrap;
  border-radius: 8px;
  background: var(--primary-700);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  outline: 2px solid #fff;
  outline-offset: 2px;
}
html.dark .skip-link:focus,
html.dark .skip-link:focus-visible {
  background: var(--primary-500);
  color: var(--primary-950);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
/* Keep accessible labels in the document without taking up layout space. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
