/**
 * DeviceNIQ Chargers public docs — light shell aligned with console/onboarding theme.css
 * and marketing emerald palette. See BRAND-GUIDELINES.md.
 */
:root {
  color-scheme: light;

  /* Marketing style.css + console/onboarding theme.css */
  --color-bg: #f8fafc;
  --color-bg-mid: #f4f6f8;
  --color-bg-accent: #e8edf2;
  --color-surface: #ffffff;
  --color-text: #0f172a;
  --color-muted: #64748b;
  --color-navy: #1e293b;
  --color-primary: #059669;
  --color-primary-hover: #047857;
  --color-primary-dim: #ecfdf5;
  --color-border: #e2e8f0;
  --color-border-strong: #cbd5e1;

  --bg-page: var(--color-bg-mid);
  --bg-page-accent: var(--color-bg-accent);
  --bg-card: var(--color-surface);
  --bg-subtle: #f1f5f9;
  --text: var(--color-text);
  --text-muted: var(--color-muted);
  --accent: var(--color-primary);
  --accent-dark: var(--color-primary-hover);
  --accent-light: var(--color-primary-dim);
  --accent-glow: rgb(5 150 105 / 16%);
  --tech-blue: #2563eb;
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --border: var(--color-border);
  --border-strong: var(--color-border-strong);

  --status-available: #059669;
  --status-charging: #059669;
  --status-idle: #d97706;
  --status-offline: #64748b;
  --status-faulted: #dc2626;

  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgb(15 23 42 / 6%), 0 4px 12px rgb(15 23 42 / 4%);
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --sidebar-width: 220px;
  --topbar-height: 56px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: light;
  background-color: var(--color-bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background-color: var(--color-bg-mid);
  background-image: linear-gradient(
    180deg,
    var(--bg-page-accent) 0%,
    var(--color-bg-mid) 45%,
    var(--color-bg) 100%
  );
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.docs-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.docs-sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  height: 100vh;
  max-height: 100vh;
  min-height: 0;
  overflow: hidden;
  background: #ffffff;
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.docs-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 1rem 0.85rem;
  border-bottom: 1px solid var(--border);
  min-height: var(--topbar-height);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.docs-sidebar__brand:hover {
  color: var(--text);
  text-decoration: none;
}

.docs-sidebar__logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.docs-sidebar__brand-text {
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.25;
}

.docs-sidebar__brand-text strong {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.docs-nav {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 0.75rem 0.5rem;
  overflow: hidden;
}

.docs-nav__scroll {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.docs-nav__group {
  margin-bottom: 0.75rem;
}

.docs-nav__section {
  margin: 0.5rem 0.35rem 0.25rem;
  padding: 0;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.docs-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.docs-nav li a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease-in-out, color 0.15s ease-in-out;
}

.docs-nav li a:hover {
  background: var(--bg-subtle);
  color: var(--text);
  text-decoration: none;
}

.docs-nav li a.is-active {
  background: var(--accent-light);
  color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

.docs-nav__icon {
  width: 24px;
  text-align: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  line-height: 1;
}

.docs-sidebar__footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 0.75rem 0.5rem 0.35rem;
  border-top: 1px solid var(--border);
}

.docs-sidebar__surface-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
}

.docs-sidebar__surface-link:hover {
  background: var(--bg-subtle);
  color: var(--text);
  text-decoration: none;
}

.docs-main-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-page);
  background-image: linear-gradient(
    180deg,
    var(--bg-page-accent) 0%,
    var(--bg-page) 40%,
    var(--bg-page) 100%
  );
}

.docs-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--spacing-md);
  min-height: var(--topbar-height);
  padding: 0 var(--spacing-md);
  background: #ffffff;
  background: rgb(255 255 255 / 92%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.docs-topbar__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
}

.docs-topbar__links a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  border: 1px solid transparent;
}

.docs-topbar__links a:hover {
  color: var(--text);
  background: var(--bg-subtle);
  border-color: var(--border);
  text-decoration: none;
}

.docs-main {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: var(--spacing-md);
  padding-bottom: var(--spacing-lg);
}

.docs-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.docs-main h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.6rem, 3vw, 2rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.docs-main h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.docs-main h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.docs-main p,
.docs-main ul {
  color: var(--text);
  font-size: 0.9375rem;
}

.docs-main ul {
  padding-left: 1.25rem;
}

.docs-main li {
  margin-bottom: 0.35rem;
}

.docs-main table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.875rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.docs-main th,
.docs-main td {
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
  text-align: left;
}

.docs-main tbody tr:last-child td {
  border-bottom: none;
}

.docs-main tbody tr:hover {
  background: #fafbfc;
}

.docs-main th {
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.docs-main code {
  font-size: 0.88em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

.docs-callout {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 1.25rem 0;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  line-height: 1.55;
}

.docs-callout__icon {
  flex-shrink: 0;
  font-size: 1.125rem;
  line-height: 1.2;
}

.docs-callout__body p {
  margin: 0;
  font-size: inherit;
}

.docs-callout--info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e3a8a;
}

.docs-callout--warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.docs-callout--success {
  background: var(--accent-light);
  border-color: rgb(5 150 105 / 25%);
  color: var(--accent-dark);
}

.docs-callout--error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.docs-page-footer {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.docs-page-footer__status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
}

.docs-page-footer__status:hover {
  color: var(--text);
}

.docs-page-footer__status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 2px rgb(5 150 105 / 12%);
}

@media (max-width: 860px) {
  .docs-shell {
    flex-direction: column;
  }

  .docs-sidebar {
    position: static;
    width: 100%;
    height: auto;
    max-height: none;
  }

  .docs-nav {
    max-height: 280px;
  }

  .docs-sidebar__footer {
    display: none;
  }

  .docs-topbar {
    justify-content: center;
  }
}
