:root {
  --ink: #153038;
  --muted: #52686d;
  --line: #d7e1de;
  --canvas: #f4f7f6;
  --nav: #10282d;
  --brand: #176b4f;
  --focus-ring: #176b4f;
  --type-body: 1rem;
  --type-label: 0.875rem;
  --type-meta: 0.75rem;
  --type-heading-lg: 1.5rem;
  --type-heading-md: 1.25rem;
  --type-heading-sm: 1rem;
}

body { font-size: var(--type-body); line-height: 1.5; font-family: Inter, ui-sans-serif, system-ui, "Segoe UI", Arial, sans-serif; }
 .workspace h1, .intro h2 { font-size: var(--type-heading-lg); line-height: 1.25; }
 .panel-head h3, .integration h3, .settings-card h3 { font-size: var(--type-heading-sm); line-height: 1.35; }
button, input, select, textarea { font: inherit; }
nav button { min-height: 42px; }
.primary, .secondary { min-height: 42px; }
.sidebar nav button svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
small, .metrics p, .panel-head p, .template > p, .template > small,
.list > article > div small, .list > article > span:not(.icon),
.integration li, .integration label, .integration input, .security,
.error, .badge, th, td small, .tag, .company small, .channel small,
.channel span, .logout, .logo small, .workspace header small {
  font-size: var(--type-meta);
}
.login-card label, dialog label, .platform-grid label { font-size: var(--type-label); }
.intro p, .panel > p, .settings-card > p, .login-card > p,
.login-card label, dialog label, .metrics small, .metrics p,
.panel-head p, .workspace header small, th, td small,
.template > p, .template > small, .list > article > div small,
.list > article > span:not(.icon), .integration li, .integration label,
.integration input, .security, .platform-grid label, .empty {
  color: var(--muted);
}
.primary { background: var(--brand); color: #fff; }
.secondary { border-color: #b7c7c2; }
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}
.sidebar button:focus-visible { outline-color: #fff; }
button:disabled { cursor: not-allowed; opacity: .62; }

.mobile-nav-toggle { display: none; }
.nav-backdrop { display: none; }

.integration-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.integration-steps a {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 700;
}
.integration-steps a:hover { text-decoration: underline; }
.integration-steps a > b {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  background: #e5f6ef;
  color: #176b4f;
}
.integration-steps small { display: block; margin-top: 3px; color: var(--muted); font-weight: 400; }
.integration-anchor { scroll-margin-top: 96px; }
.dashboard-shortcuts { display: flex; flex-wrap: wrap; gap: 10px; margin: -4px 0 20px; }
.dashboard-shortcuts button { min-height: 42px; }
.integration-advanced {
  margin: 16px 0;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfc;
}
.integration-advanced summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 700; color: var(--ink); }
.integration-advanced[open] summary { border-bottom: 1px solid var(--line); }
.integration-advanced > :not(summary) { margin-top: 14px; }
.integration-advanced > :last-child { margin-bottom: 14px; }

@media (max-width: 760px) {
  .sidebar {
    z-index: 1002;
    width: min(290px, calc(100vw - 56px));
    padding: 20px 14px 18px;
    transform: translateX(-105%);
    transition: transform 180ms ease-out;
    overflow-y: auto;
    box-shadow: 14px 0 32px rgba(5, 25, 29, .22);
  }
  .sidebar.mobile-open { transform: translateX(0); }
  .sidebar .logo div, .sidebar .company div, .sidebar nav > small,
  .sidebar nav button:not(.active) { display: initial; }
  .sidebar .logo div, .sidebar .company div { display: flex; }
  .sidebar nav > small { display: block; }
  .sidebar nav button { display: flex; font-size: 15px; }
  .sidebar nav button.active { font-size: 15px; justify-content: flex-start; }
  .sidebar nav button { min-height: 46px; }
  .sidebar .channel, .sidebar .logout { display: flex; }
  .workspace { margin-left: 0; }
  .mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    flex: none;
  }
  .mobile-nav-toggle svg { width: 21px; height: 21px; }
  .header-actions { display: flex; align-items: center; gap: 8px; }
  .nav-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1001;
    border: 0;
    background: rgba(8, 28, 32, .52);
  }
  .integration-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .integration-steps { grid-template-columns: 1fr; }
  .workspace > header { grid-template-columns: minmax(0, 1fr); }
  .header-actions { grid-column: 1 / -1; grid-row: 3; justify-content: space-between; }
  .header-heading { grid-column: 1 / -1; grid-row: 2; }
  .content { padding: 16px 12px 32px; }
}

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