:root {
  --black: #0b0b0c;
  --ink: #101820;
  --panel: #111114;
  --panel-raised: #17171b;
  --panel-soft: #1d1d22;
  --line: #2b2b31;
  --line-soft: #222227;
  --white: #ffffff;
  --text: #f5f5f2;
  --muted: #b0b0b0;
  --muted-dark: #74747c;
  --violet: #b08bff;
  --violet-deep: #7e59cd;
  --violet-soft: rgba(176, 139, 255, 0.13);
  --green: #53d29a;
  --red: #ff7a88;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; background: var(--black); }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--black);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.ambient {
  position: fixed;
  z-index: 0;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  opacity: 0.14;
}
.ambient-one { top: -220px; right: 12%; background: var(--violet); }
.ambient-two { bottom: -300px; left: 20%; background: #4b287b; }

.brand-logo { display: block; width: 145px; height: auto; }
.brand-logo-light { filter: brightness(0) invert(1); }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 17px;
  color: #8f8f98;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.16em;
}
.eyebrow > span { width: 22px; height: 2px; background: var(--violet); transform: skewX(-35deg); }

.login-view { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: 1.04fr 0.96fr; }
.login-brand {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(36px, 6vw, 78px);
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255,255,255,.07), transparent 35%),
    var(--violet);
  color: var(--black);
}
.login-brand h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(52px, 6.7vw, 94px);
  line-height: 0.92;
  letter-spacing: -0.068em;
}
.login-brand h1 em { color: var(--white); font-style: normal; }
.login-brand .eyebrow { color: rgba(11,11,12,.56); }
.login-brand .eyebrow span { background: var(--black); }
.login-copy { max-width: 580px; margin: 34px 0 0; font-size: 14px; line-height: 1.75; }
.login-brand small { font-size: 9px; font-weight: 740; letter-spacing: 0.13em; }
.login-panel { display: grid; place-items: center; padding: 32px; background: rgba(11,11,12,.94); }
.login-card { width: min(100%, 420px); }
.login-card h2 { margin: 0; font-size: 42px; letter-spacing: -0.05em; }
.login-card > p:not(.eyebrow):not(.form-message) { margin: 17px 0 31px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.login-card label, .form-field label {
  display: block;
  margin-bottom: 9px;
  color: #93939a;
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
input, select, textarea {
  width: 100%;
  padding: 0 16px;
  color: var(--white);
  background: var(--panel-raised);
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
}
input, select { height: 52px; }
textarea { min-height: 185px; padding: 16px; resize: vertical; font-family: "SFMono-Regular", Consolas, monospace; font-size: 11px; line-height: 1.6; }
input:focus, select:focus, textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.login-card input { margin-bottom: 13px; }
.button {
  min-height: 47px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 21px;
  border: 1px solid transparent;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.02em;
  transition: transform .18s ease, background .18s ease, opacity .18s ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .42; }
.button-primary { color: var(--black); background: var(--violet); }
.button-primary span { font-size: 16px; }
.button-secondary { color: var(--white); background: transparent; border-color: var(--line); }
.button-secondary:hover:not(:disabled) { background: var(--panel-soft); }
.button-danger { color: var(--red); border-color: rgba(255,122,136,.28); }
.button-wide { width: 100%; }
.form-message { min-height: 18px; margin: 12px 0 0; color: var(--red); font-size: 10px; line-height: 1.5; }

.app-view { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: 245px minmax(0, 1fr); }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 4;
  width: 245px;
  display: flex;
  flex-direction: column;
  padding: 34px 26px 25px;
  background: rgba(13,13,15,.95);
  border-right: 1px solid var(--line-soft);
  backdrop-filter: blur(24px);
}
.sidebar-brand { color: var(--white); text-decoration: none; }
.sidebar-brand .brand-logo { width: 130px; }
.sidebar-brand span { display: block; margin-top: 10px; color: var(--muted-dark); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.main-nav { display: grid; gap: 7px; margin-top: 68px; }
.main-nav a {
  min-height: 46px;
  display: grid;
  grid-template-columns: 27px 1fr;
  align-items: center;
  gap: 8px;
  padding: 0 13px;
  color: #85858d;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 11px;
  text-decoration: none;
  transition: color .18s ease, background .18s ease;
}
.main-nav a i { color: #53535b; font-size: 8px; font-style: normal; }
.main-nav a:hover, .main-nav a.active { color: var(--white); background: var(--panel-raised); border-color: var(--line-soft); }
.main-nav a.active i { color: var(--violet); }
.sidebar-foot { margin-top: auto; }
.environment-chip { display: flex; align-items: center; gap: 8px; color: #77777f; font-size: 8px; line-height: 1.4; }
.environment-chip span { width: 7px; height: 7px; background: var(--green); border-radius: 50%; box-shadow: 0 0 12px rgba(83,210,154,.7); }
.text-button { margin-top: 17px; padding: 0; color: var(--muted); background: none; border: 0; font-size: 9px; text-decoration: underline; text-underline-offset: 4px; }

.workspace { grid-column: 2; min-width: 0; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  padding: 0 clamp(25px, 4vw, 60px);
  background: rgba(11,11,12,.8);
  border-bottom: 1px solid var(--line-soft);
  backdrop-filter: blur(20px);
}
.organization-switcher { min-width: 210px; margin-right: auto; }
.organization-switcher span, .user-chip small { display: block; margin-bottom: 4px; color: #66666f; font-size: 8px; letter-spacing: .1em; }
.organization-switcher select { height: 32px; padding: 0 30px 0 0; background: transparent; border: 0; border-radius: 0; font-size: 11px; font-weight: 700; }
.organization-switcher select:focus { box-shadow: none; }
.topbar-refresh { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; color: #8b8b94; background: transparent; border: 1px solid var(--line); border-radius: 10px; font-size: 8px; text-transform: uppercase; letter-spacing: .07em; }
.topbar-refresh:hover:not(:disabled) { color: var(--white); background: var(--panel-raised); }
.topbar-refresh.loading span { display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.user-chip { display: flex; align-items: center; gap: 11px; }
.user-chip strong { display: block; font-size: 10px; }
.user-chip small { margin: 4px 0 0; letter-spacing: 0; }
.user-avatar { width: 34px; height: 34px; display: grid; place-items: center; color: var(--black); background: var(--violet); border-radius: 50%; font-size: 10px; font-weight: 800; }
.mobile-menu { display: none; color: var(--white); background: none; border: 0; font-size: 20px; }
.content { width: min(1220px, calc(100% - clamp(40px, 8vw, 112px))); margin: 0 auto; padding: 73px 0 46px; }

.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 45px; padding-bottom: 62px; }
.hero h1 { margin: 0; font-size: clamp(48px, 6vw, 82px); line-height: .94; letter-spacing: -.068em; }
.hero h1 em { color: var(--violet); font-style: normal; }
.hero > div:first-child > p:last-child { max-width: 660px; margin: 27px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.hero-status { min-width: 185px; display: flex; align-items: center; gap: 13px; padding: 15px 17px; background: var(--panel); border: 1px solid var(--line); border-radius: 15px; }
.status-orb { width: 34px; height: 34px; display: grid; place-items: center; background: rgba(83,210,154,.1); border-radius: 50%; }
.status-orb i { width: 8px; height: 8px; background: var(--green); border-radius: 50%; box-shadow: 0 0 14px var(--green); }
.hero-status small, .package-footer small { display: block; margin-bottom: 5px; color: #686870; font-size: 7px; letter-spacing: .09em; }
.hero-status strong { font-size: 11px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 19px; overflow: hidden; }
.stat-card { min-height: 145px; padding: 24px; background: rgba(17,17,20,.76); }
.stat-card + .stat-card { border-left: 1px solid var(--line); }
.stat-card > span { display: block; color: #6d6d75; font-size: 8px; font-weight: 760; letter-spacing: .1em; }
.stat-card strong { display: block; margin: 18px 0 7px; font-size: 40px; line-height: 1; letter-spacing: -.06em; }
.stat-card strong.stat-word { overflow: hidden; font-size: clamp(23px, 2.7vw, 38px); text-overflow: ellipsis; white-space: nowrap; }
.stat-card small { color: #85858e; font-size: 9px; }
.accent-stat { background: var(--violet); color: var(--black); }
.accent-stat > span, .accent-stat small { color: rgba(11,11,12,.58); }
.danger-text { color: var(--red); }
.status-orb.unhealthy { background: rgba(255,122,136,.1); }
.status-orb.unhealthy i { background: var(--red); box-shadow: 0 0 14px var(--red); }

.section { padding-top: 105px; scroll-margin-top: 70px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 31px; }
.section-heading .eyebrow { margin-bottom: 13px; }
.section-heading h2 { margin: 0; font-size: clamp(33px, 4vw, 50px); letter-spacing: -.052em; }
.section-copy { max-width: 760px; margin: -12px 0 27px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.section-heading-actions { display: flex; align-items: center; gap: 16px; }
.safety-badge { display: inline-flex; padding: 8px 11px; color: var(--green); background: rgba(83,210,154,.08); border: 1px solid rgba(83,210,154,.18); border-radius: 100px; font-size: 7px; font-weight: 800; letter-spacing: .09em; }
.package-layout { display: grid; grid-template-columns: .82fr 1.18fr; gap: 18px; }
.package-card, .connection-map, .automation-form, .workflow-result, .activity-table { background: var(--panel); border: 1px solid var(--line); border-radius: 21px; }
.package-card { padding: 30px; }
.package-topline { display: flex; align-items: center; justify-content: space-between; }
.package-number { color: #595961; font-size: 10px; font-weight: 760; letter-spacing: .12em; }
.status-badge, .soon-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; color: var(--green); background: rgba(83,210,154,.08); border: 1px solid rgba(83,210,154,.16); border-radius: 100px; font-size: 7px; font-weight: 760; letter-spacing: .08em; }
.status-badge i { width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.status-badge.inactive { color: #8f8f98; background: rgba(255,255,255,.03); border-color: var(--line); }
.package-card h3 { max-width: 480px; margin: 52px 0 18px; font-size: clamp(27px, 3vw, 39px); line-height: 1.03; letter-spacing: -.05em; }
.package-card > p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.benefit-list { display: grid; gap: 11px; margin: 30px 0; padding: 25px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); list-style: none; }
.benefit-list li { color: #c8c8cd; font-size: 10px; }
.benefit-list span { margin-right: 10px; color: var(--violet); }
.package-footer { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.package-footer strong { font-size: 10px; }

.connection-map { position: relative; padding: 30px; overflow: hidden; }
.connection-map::after { content: ""; position: absolute; top: -130px; right: -100px; width: 330px; height: 330px; background: var(--violet); border-radius: 50%; filter: blur(150px); opacity: .09; pointer-events: none; }
.map-label { margin-bottom: 25px; color: #62626b; font-size: 8px; font-weight: 760; letter-spacing: .1em; }
.product-node { position: relative; z-index: 1; min-height: 97px; display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 15px; padding: 17px; background: var(--panel-raised); border: 1px solid var(--line); border-radius: 15px; }
.node-mark { width: 45px; height: 45px; display: grid; place-items: center; color: var(--black); background: var(--violet); border-radius: 13px; font-size: 17px; font-weight: 850; }
.product-node small, .product-node strong, .product-node span { display: block; }
.product-node small { margin-bottom: 6px; color: #64646d; font-size: 7px; letter-spacing: .09em; }
.product-node strong { font-size: 13px; }
.product-node div > span { margin-top: 5px; color: #8e8e96; font-size: 9px; }
.connection-dot { width: 8px; height: 8px; margin-right: 5px; background: var(--green); border: 2px solid var(--panel-raised); border-radius: 50%; box-shadow: 0 0 0 4px rgba(83,210,154,.08), 0 0 12px rgba(83,210,154,.45); }
.connector { height: 48px; display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px; padding: 0 20px; }
.connector span { display: grid; place-items: center; width: 20px; height: 20px; color: var(--black); background: var(--violet); border-radius: 50%; font-size: 7px; font-weight: 800; }
.connector i { height: 1px; background: linear-gradient(90deg, var(--violet), transparent); }
.connector b { color: #56565e; font-size: 7px; letter-spacing: .08em; }
.connector.muted span { color: #8d8d95; background: var(--panel-soft); }
.connector.muted i { background: linear-gradient(90deg, var(--line), transparent); }
.optional-node { opacity: .57; border-style: dashed; }
.optional-node .node-mark { color: var(--muted); background: var(--panel-soft); }
.soon-badge { color: var(--violet); background: var(--violet-soft); border-color: rgba(176,139,255,.18); }

.adapter-note, .activity-count { color: #74747d; font-size: 9px; }
.automation-layout { display: grid; grid-template-columns: .78fr 1.22fr; gap: 18px; }
.automation-form { padding: 27px; }
.form-field + .form-field { margin-top: 18px; }
.amount-grid { display: grid; grid-template-columns: 1fr 110px; gap: 12px; margin-top: 18px; }
.amount-grid .form-field { margin: 0; }
.automation-form .button { margin-top: 20px; }
.workflow-result { min-height: 337px; display: grid; place-items: center; padding: 27px; }
.empty-result { max-width: 280px; text-align: center; }
.empty-result > span { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 18px; color: var(--violet); background: var(--violet-soft); border-radius: 50%; font-size: 18px; }
.empty-result strong { font-size: 14px; }
.empty-result p { margin: 10px 0 0; color: #777780; font-size: 9px; line-height: 1.6; }
.result-content { width: 100%; }
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.result-head div { display: flex; align-items: center; gap: 11px; }
.result-check { width: 31px; height: 31px; display: grid; place-items: center; color: var(--black); background: var(--green); border-radius: 50%; font-size: 12px; font-weight: 850; }
.result-head strong { font-size: 13px; }
.result-head small { color: #6d6d75; font-size: 8px; }
.result-company { padding: 24px 0; }
.result-label { display: block; margin-bottom: 9px; color: #66666e; font-size: 7px; letter-spacing: .1em; }
.result-company h3 { margin: 0; font-size: 27px; letter-spacing: -.04em; }
.result-company p { margin: 8px 0 0; color: var(--muted); font-size: 10px; }
.result-invoice { display: grid; grid-template-columns: 1fr 1fr 1fr; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.result-invoice > div { padding: 16px; background: var(--panel-raised); }
.result-invoice > div + div { border-left: 1px solid var(--line); }
.result-invoice small, .result-invoice strong { display: block; }
.result-invoice small { margin-bottom: 7px; color: #66666e; font-size: 7px; }
.result-invoice strong { font-size: 10px; }

.activity-table { overflow: hidden; }
.activity-row { display: grid; grid-template-columns: 42px minmax(170px, 1.1fr) minmax(130px, .8fr) 90px 85px; align-items: center; gap: 15px; min-height: 68px; padding: 0 22px; }
.activity-row + .activity-row { border-top: 1px solid var(--line-soft); }
.activity-icon { width: 32px; height: 32px; display: grid; place-items: center; color: var(--violet); background: var(--violet-soft); border-radius: 10px; font-size: 11px; }
.activity-main strong, .activity-main small { display: block; }
.activity-main strong { font-size: 10px; }
.activity-main small, .activity-product, .activity-time { margin-top: 5px; color: #6f6f77; font-size: 8px; }
.activity-product { margin: 0; }
.activity-outcome { display: inline-flex; align-items: center; gap: 6px; color: var(--green); font-size: 8px; }
.activity-outcome.failure { color: var(--red); }
.activity-outcome::before { content: ""; width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.activity-latency { color: #777780; font-size: 8px; text-align: right; }
.activity-empty { padding: 32px; color: #777780; font-size: 10px; text-align: center; }

.integration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.seat-counter { padding: 9px 13px; color: var(--violet); background: var(--violet-soft); border: 1px solid rgba(176,139,255,.2); border-radius: 100px; font-size: 8px; font-weight: 760; letter-spacing: .05em; }
.access-panel { overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; }
.access-product-head { display: grid; grid-template-columns: 45px 1fr auto; align-items: center; gap: 13px; padding: 24px 25px; border-bottom: 1px solid var(--line); }
.access-product-head small { display: block; margin-bottom: 5px; color: #696972; font-size: 7px; letter-spacing: .08em; }
.access-product-head h3 { margin: 0; font-size: 18px; }
.access-steps { display: grid; grid-template-columns: 1fr 28px 1fr 28px 1fr; align-items: center; gap: 8px; padding: 19px 25px; background: var(--panel-raised); border-bottom: 1px solid var(--line); }
.access-steps > div { display: grid; grid-template-columns: 27px 1fr; column-gap: 10px; align-items: center; }
.access-steps > div i { grid-row: 1 / 3; width: 27px; height: 27px; display: grid; place-items: center; color: var(--black); background: var(--violet); border-radius: 50%; font-size: 8px; font-style: normal; font-weight: 850; }
.access-steps > div strong, .access-steps > div small { display: block; }
.access-steps > div strong { font-size: 9px; }
.access-steps > div small { margin-top: 4px; color: #73737b; font-size: 7px; }
.access-steps > span { color: #55555e; text-align: center; }
.member-access-row { min-height: 76px; display: grid; grid-template-columns: 38px minmax(190px, 1fr) minmax(145px, .55fr) 145px; align-items: center; gap: 14px; padding: 0 25px; }
.member-access-row + .member-access-row { border-top: 1px solid var(--line-soft); }
.member-avatar { width: 34px; height: 34px; display: grid; place-items: center; color: var(--white); background: #27272d; border: 1px solid #34343b; border-radius: 50%; font-size: 9px; font-weight: 800; }
.member-identity strong, .member-identity small { display: block; }
.member-identity strong { font-size: 10px; }
.member-identity small { margin-top: 5px; color: #6f6f77; font-size: 8px; }
.member-access-state { display: inline-flex; align-items: center; gap: 7px; color: var(--red); font-size: 8px; }
.member-access-state::before { content: ""; width: 6px; height: 6px; flex: 0 0 auto; background: currentColor; border-radius: 50%; }
.member-access-state.allowed { color: var(--green); }
.access-toggle { min-height: 35px; padding: 0 12px; color: var(--black); background: var(--violet); border: 1px solid transparent; border-radius: 100px; font-size: 8px; font-weight: 760; }
.access-toggle.assigned { color: #b6b6bd; background: transparent; border-color: var(--line); }
.access-toggle:disabled { cursor: not-allowed; opacity: .38; }
.integration-card { min-width: 0; padding: 25px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; }
.integration-head { display: grid; grid-template-columns: 45px 1fr auto; align-items: center; gap: 13px; }
.integration-mark { width: 43px; height: 43px; display: grid; place-items: center; color: var(--black); background: var(--violet); border-radius: 12px; font-size: 15px; font-weight: 850; }
.integration-head small { display: block; margin-bottom: 4px; color: #696972; font-size: 7px; letter-spacing: .08em; text-transform: uppercase; }
.integration-head h3 { margin: 0; font-size: 17px; letter-spacing: -.025em; }
.integration-status { display: inline-flex; align-items: center; gap: 6px; padding: 7px 9px; color: #8d8d95; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 100px; font-size: 7px; font-weight: 760; letter-spacing: .06em; text-transform: uppercase; }
.integration-status::before { content: ""; width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.integration-status.active { color: var(--green); background: rgba(83,210,154,.07); border-color: rgba(83,210,154,.16); }
.integration-card > p { min-height: 36px; margin: 19px 0; color: #8a8a92; font-size: 9px; line-height: 1.7; }
.integration-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line-soft); border-radius: 13px; overflow: hidden; }
.integration-meta > div { min-width: 0; padding: 13px; background: var(--panel-raised); }
.integration-meta > div:nth-child(even) { border-left: 1px solid var(--line-soft); }
.integration-meta > div:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
.integration-meta small, .integration-meta strong { display: block; }
.integration-meta small { margin-bottom: 6px; color: #62626b; font-size: 6px; letter-spacing: .08em; }
.integration-meta strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.capability-list { display: flex; flex-wrap: wrap; gap: 6px; min-height: 29px; margin: 19px 0; }
.capability-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 9px; color: #777780; background: var(--panel-raised); border: 1px solid var(--line-soft); border-radius: 9px; font-family: "SFMono-Regular", Consolas, monospace; font-size: 8px; }
.capability-chip i { color: #686870; font-family: Inter, "Segoe UI", sans-serif; font-size: 6px; font-style: normal; text-transform: uppercase; }
.capability-chip.granted { color: #d8d8dc; border-color: rgba(176,139,255,.28); }
.capability-chip.granted i { color: var(--violet); }
.capability-chip.write i { color: var(--red); }
.connection-list { border-top: 1px solid var(--line); }
.connection-row { min-height: 58px; display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 11px; }
.connection-row + .connection-row { border-top: 1px solid var(--line-soft); }
.connection-state { width: 6px; height: 6px; background: #6b6b73; border-radius: 50%; }
.connection-state.active { background: var(--green); box-shadow: 0 0 10px rgba(83,210,154,.55); }
.connection-row strong, .connection-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.connection-row strong { font-size: 9px; }
.connection-row small { margin-top: 5px; color: #676770; font-size: 7px; }
.connection-actions { display: flex; gap: 6px; }
.mini-button { padding: 6px 8px; color: #9b9ba3; background: transparent; border: 1px solid var(--line); border-radius: 8px; font-size: 7px; }
.mini-button:hover:not(:disabled) { color: var(--white); background: var(--panel-soft); }
.connection-empty, .muted-copy { padding: 19px 0 0; color: #686870; font-size: 8px; }
.integration-onboard { margin-top: 18px; }

.onboarding-panel { margin-top: 20px; padding: 28px; background: linear-gradient(145deg, rgba(176,139,255,.07), transparent 38%), var(--panel); border: 1px solid rgba(176,139,255,.28); border-radius: 21px; scroll-margin-top: 90px; }
.onboarding-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 25px; padding-bottom: 23px; border-bottom: 1px solid var(--line); }
.onboarding-head .eyebrow { margin-bottom: 10px; }
.onboarding-head h3 { margin: 0; font-size: clamp(27px, 3vw, 39px); letter-spacing: -.045em; }
.panel-close { width: 35px; height: 35px; flex: 0 0 auto; color: #9999a1; background: var(--panel-raised); border: 1px solid var(--line); border-radius: 50%; font-size: 19px; }
.panel-close:hover { color: var(--white); }
.onboarding-content { padding-top: 24px; }
.onboarding-warning { margin-bottom: 20px; padding: 13px 15px; color: #d1c1f2; background: var(--violet-soft); border: 1px solid rgba(176,139,255,.18); border-radius: 11px; font-size: 8px; line-height: 1.6; }
.onboarding-start-form .button, .profile-form .button { margin-top: 18px; }
.onboarding-state { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: 13px; }
.onboarding-state > div { min-width: 0; padding: 14px; background: var(--panel-raised); }
.onboarding-state > div + div { border-left: 1px solid var(--line); }
.onboarding-state small, .onboarding-state strong { display: block; }
.onboarding-state small { margin-bottom: 7px; color: #64646c; font-size: 6px; letter-spacing: .08em; }
.onboarding-state strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.onboarding-step-copy { margin: 25px 0 18px; }
.onboarding-step-copy strong { font-size: 14px; }
.onboarding-step-copy p { margin: 8px 0 0; color: #85858d; font-size: 9px; line-height: 1.65; }
.candidate-list { display: grid; gap: 9px; }
.candidate-card { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px; color: var(--text); background: var(--panel-raised); border: 1px solid var(--line); border-radius: 12px; text-align: left; }
.candidate-card:hover { border-color: rgba(176,139,255,.45); background: var(--panel-soft); }
.candidate-card strong, .candidate-card small { display: block; }
.candidate-card strong { font-size: 10px; }
.candidate-card small { margin-top: 6px; color: #73737b; font-size: 8px; }
.candidate-card i { color: var(--violet); font-size: 7px; font-style: normal; }
.onboarding-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.onboarding-actions .button { text-decoration: none; }
.profile-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 12px; }
.profile-fields .form-field + .form-field { margin-top: 0; }
.field-help { display: block; margin-top: 7px; color: #686870; font-size: 7px; line-height: 1.5; }

.lab-layout { display: grid; grid-template-columns: .78fr 1.22fr; gap: 18px; }
.lab-form, .lab-result, .billing-summary, .ledger-card { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; }
.lab-form { padding: 25px; }
.lab-select-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 12px; }
.lab-select-grid .form-field + .form-field { margin-top: 0; }
.lab-policy { margin: 15px 0; padding: 12px 14px; color: var(--green); background: rgba(83,210,154,.06); border: 1px solid rgba(83,210,154,.13); border-radius: 11px; font-size: 8px; line-height: 1.55; }
.lab-policy.blocked { color: var(--red); background: rgba(255,122,136,.05); border-color: rgba(255,122,136,.14); }
.lab-form .button { margin-top: 18px; }
.lab-result { min-height: 430px; display: grid; place-items: center; min-width: 0; padding: 25px; }
.lab-result-content { width: 100%; min-width: 0; align-self: stretch; }
.result-head.error-head .result-check { color: var(--white); background: var(--red); }
.result-meta { display: grid; grid-template-columns: 1fr 120px; gap: 1px; margin: 18px 0; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; }
.result-meta > div { min-width: 0; padding: 12px; background: var(--panel-raised); }
.result-meta small, .result-meta strong { display: block; }
.result-meta small { margin-bottom: 6px; color: #62626a; font-size: 6px; letter-spacing: .08em; }
.result-meta strong { overflow: hidden; font-family: "SFMono-Regular", Consolas, monospace; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.lab-result pre { max-height: 330px; margin: 0; padding: 17px; overflow: auto; color: #c8c8cd; background: #0c0c0e; border: 1px solid var(--line-soft); border-radius: 12px; font-family: "SFMono-Regular", Consolas, monospace; font-size: 9px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }

.billing-layout { display: grid; grid-template-columns: .82fr 1.18fr; gap: 18px; }
.billing-summary { padding: 25px; }
.billing-title { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.billing-title > div { text-align: right; }
.billing-title small, .billing-title strong { display: block; }
.billing-title small { margin-bottom: 6px; color: #66666e; font-size: 7px; letter-spacing: .08em; }
.billing-title strong { font-size: 10px; }
.billing-metrics { display: grid; grid-template-columns: repeat(2, 1fr); margin: 22px 0; border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.billing-metrics > div { padding: 16px; background: var(--panel-raised); }
.billing-metrics > div:nth-child(even) { border-left: 1px solid var(--line); }
.billing-metrics > div:nth-child(n+3) { border-top: 1px solid var(--line); }
.billing-metrics small, .billing-metrics strong, .billing-period small, .billing-period strong { display: block; }
.billing-metrics small, .billing-period small { margin-bottom: 7px; color: #66666e; font-size: 6px; letter-spacing: .08em; }
.billing-metrics strong { font-size: 22px; letter-spacing: -.04em; }
.billing-period { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.billing-period strong { font-size: 9px; }
.ledger-card { overflow: hidden; }
.ledger-head { display: flex; justify-content: space-between; gap: 20px; padding: 20px; border-bottom: 1px solid var(--line); }
.ledger-head span { color: #8a8a92; font-size: 7px; font-weight: 760; letter-spacing: .09em; }
.ledger-head small { color: #62626b; font-size: 7px; }
.ledger-row { min-height: 62px; display: grid; grid-template-columns: 1fr 80px 115px; align-items: center; gap: 14px; padding: 0 20px; }
.ledger-row + .ledger-row { border-top: 1px solid var(--line-soft); }
.ledger-row strong, .ledger-row small { display: block; }
.ledger-row strong { font-size: 9px; }
.ledger-row small { margin-top: 5px; color: #66666e; font-size: 7px; }
.ledger-amount { color: var(--green); font-size: 10px; font-weight: 760; text-align: right; }
.ledger-amount.negative { color: var(--red); }
.ledger-row time { color: #73737b; font-size: 7px; text-align: right; }
.workflow-warning { margin: -10px 0 20px; padding: 12px 14px; color: #b8a6e4; background: var(--violet-soft); border: 1px solid rgba(176,139,255,.14); border-radius: 11px; font-size: 8px; line-height: 1.6; }

.workspace-footer { display: flex; justify-content: space-between; gap: 25px; margin-top: 90px; padding-top: 25px; color: #505058; border-top: 1px solid var(--line-soft); font-size: 8px; letter-spacing: .06em; }
.toast { position: fixed; z-index: 20; right: 25px; bottom: 25px; max-width: 360px; padding: 14px 17px; color: var(--black); background: var(--violet); border-radius: 12px; box-shadow: var(--shadow); font-size: 10px; line-height: 1.5; transform: translateY(20px); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.visible { transform: translateY(0); opacity: 1; }

.platform-auth-card { width: min(100%, 520px); }
.platform-auth-card > p:not(.eyebrow):not(.form-message) { margin-bottom: 22px; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 24px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 13px; }
.auth-tabs button { min-height: 38px; color: #81818a; background: transparent; border: 0; border-radius: 9px; font-size: 9px; font-weight: 760; }
.auth-tabs button.active { color: var(--white); background: var(--panel-soft); }
.platform-auth-card form .button { margin-top: 9px; }
.auth-link { display: block; margin: 12px 0 5px auto; padding: 0; color: var(--violet); background: none; border: 0; font-size: 9px; text-decoration: underline; text-underline-offset: 4px; }
.auth-link:hover { color: #cbb7f7; }
.auth-link-centered { margin: 15px auto 0; }
.platform-auth-card label small, .create-organization-panel label small { color: #63636c; font-size: 7px; text-transform: none; }
.auth-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.field-note { display: block; margin: -5px 0 14px; color: #74747d; font-size: 8px; line-height: 1.5; }
.auth-message { color: var(--violet); }
.registration-confirmation {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 10px 0 0;
  text-align: center;
}
.registration-confirmation[hidden] { display: none; }
.confirmation-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: var(--black);
  background: var(--violet);
  border-radius: 50%;
  font-size: 24px;
  font-weight: 800;
}
.registration-confirmation p { margin: 3px 0 -5px; color: var(--muted); font-size: 12px; }
.registration-confirmation strong { max-width: 100%; overflow-wrap: anywhere; color: var(--white); font-size: 14px; }
.registration-confirmation ol {
  width: 100%;
  margin: 8px 0 0;
  padding: 15px 18px 15px 38px;
  color: #b9b9c1;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
  text-align: left;
  font-size: 11px;
  line-height: 1.8;
}
.registration-confirmation small { color: #777780; font-size: 9px; line-height: 1.55; }
.registration-confirmation .button { margin-top: 5px; }

.central-hero { align-items: flex-start; }
.central-hero > div { max-width: 790px; }
.create-organization-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .8fr); gap: 60px; margin-bottom: 38px; padding: 32px; background: var(--panel); border: 1px solid var(--line); border-radius: 21px; }
.create-organization-panel h2 { margin: 0 0 13px; font-size: 32px; letter-spacing: -.045em; }
.create-organization-panel > div > p:last-child { max-width: 520px; color: var(--muted-dark); font-size: 11px; line-height: 1.7; }
.create-organization-panel label { display: block; margin: 0 0 8px; color: #93939a; font-size: 8px; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.create-organization-panel input { margin-bottom: 13px; }
.central-empty { padding: 44px; color: #85858e; background: var(--panel); border: 1px dashed var(--line); border-radius: 21px; text-align: center; }
.central-empty strong { display: block; margin-bottom: 10px; color: var(--white); font-size: 18px; }
.central-empty p { margin: 0 auto; max-width: 540px; font-size: 10px; line-height: 1.7; }
.central-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.central-card { min-height: 185px; padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; }
.central-card-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.central-card-head > span { color: #6e6e77; font-size: 7px; font-weight: 800; letter-spacing: .11em; }
.central-card h3 { margin: 34px 0 10px; font-size: 20px; letter-spacing: -.035em; }
.central-card p { margin: 0 0 17px; color: #898992; font-size: 9px; }
.central-card small { color: #696971; font-size: 8px; }
.product-connections { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.product-connection-heading, .product-connection-state { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.product-connection-heading strong { color: #aaaab2; font-size: 8px; letter-spacing: .055em; text-transform: uppercase; }
.product-connection-heading small { color: #62626a; font-size: 7px; text-align: right; }
.product-connection { margin-top: 11px; padding: 12px; background: var(--panel-soft); border: 1px solid var(--line); border-radius: 12px; }
.product-connection-state > span { color: #a5a5ad; font-size: 8px; font-weight: 720; }
.product-connection > small { display: block; margin-top: 7px; color: #62626b; }
.product-company360-read-smoke-result:empty,
.product-availability-smoke-result:empty,
.product-invoice-read-smoke-result:empty { display: none; }
.product-company360-read-smoke-result:not(:empty),
.product-availability-smoke-result:not(:empty),
.product-invoice-read-smoke-result:not(:empty) { padding-top: 3px; color: var(--green); }
.product-connection-note { margin-top: 11px; padding: 11px 12px; color: #777780; background: var(--panel-soft); border: 1px dashed var(--line); border-radius: 11px; font-size: 8px; line-height: 1.5; }
.product-connection-controls { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.product-connection-controls .button, .product-required-action .button { min-height: 34px; padding: 0 12px; font-size: 7px; text-decoration: none; }
.product-connect-button { flex: 1 1 150px; }
.product-connect-scope { flex: 1 1 250px; display: flex; align-items: end; gap: 7px; }
.product-country-control { flex: 0 0 76px; display: grid; gap: 5px; }
.product-country-control span { color: #696971; font-size: 7px; font-weight: 720; }
.product-country-control input { width: 100%; min-height: 34px; padding: 0 10px; color: var(--white); background: var(--panel-soft); border: 1px solid var(--line); border-radius: 9px; font: inherit; font-size: 8px; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.product-country-control input:focus { border-color: var(--violet); outline: 0; box-shadow: 0 0 0 3px var(--violet-soft); }
.product-connect-scope .product-connect-button { flex: 1 1 auto; }
.product-required-action { display: grid; gap: 8px; margin-top: 11px; padding: 11px; background: var(--violet-soft); border: 1px solid rgba(176,139,255,.15); border-radius: 10px; }
.product-required-action > strong { color: #c9b9ec; font-size: 8px; }
.product-required-action > small { color: #9889b9; font-size: 7px; line-height: 1.5; overflow-wrap: anywhere; }
.product-account-candidate { display: grid; gap: 4px; width: 100%; padding: 10px; color: #c7c7ce; background: #111115; border: 1px solid #34343c; border-radius: 9px; text-align: left; cursor: pointer; }
.product-account-candidate:hover { border-color: var(--violet); }
.product-account-candidate span { font-size: 8px; font-weight: 700; }
.product-account-candidate small { color: #777780; font-size: 7px; }
.central-card-grid[aria-busy="true"] { opacity: .62; pointer-events: none; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; color: #8c8c95; background: var(--panel-soft); border: 1px solid var(--line); border-radius: 100px; font-size: 7px; font-style: normal; white-space: nowrap; }
.status-pill.active { color: var(--green); background: rgba(83,210,154,.08); border-color: rgba(83,210,154,.2); }
.status-pill::before { content: ""; width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.central-row { min-height: 70px; display: grid; grid-template-columns: 38px minmax(180px, 1fr) minmax(100px, .45fr) minmax(140px, .8fr); align-items: center; gap: 15px; padding: 0 22px; }
.central-row + .central-row { border-top: 1px solid var(--line-soft); }
.central-row strong, .central-row small { display: block; }
.central-row strong { font-size: 10px; }
.central-row small { margin-top: 5px; color: #6f6f77; font-size: 8px; }
.central-row > span:not(.user-avatar):not(.activity-icon):not(.status-pill) { color: #81818a; font-size: 8px; }
.user-avatar.small { width: 30px; height: 30px; font-size: 8px; }
.subscription-row { grid-template-columns: 38px minmax(210px, 1fr) 110px minmax(150px, .7fr); }
.member-workflow-note { display: grid; grid-template-columns: 32px 1fr; gap: 13px; margin: -8px 0 18px; padding: 15px 17px; color: #b9a5e7; background: var(--violet-soft); border: 1px solid rgba(176,139,255,.17); border-radius: 14px; }
.member-workflow-note > span { display: grid; width: 28px; height: 28px; place-items: center; color: var(--black); background: var(--violet); border-radius: 50%; font-size: 13px; font-weight: 800; }
.member-workflow-note strong, .member-workflow-note small { display: block; }
.member-workflow-note strong { color: #d6c7f8; font-size: 9px; }
.member-workflow-note small { margin-top: 5px; color: #9b8dbb; font-size: 8px; line-height: 1.5; }
.invitation-panel { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(210px, 1.2fr) 160px auto; align-items: end; gap: 13px; margin: -8px 0 18px; padding: 17px; background: var(--panel-soft); border: 1px solid var(--line); border-radius: 14px; }
.invitation-panel > div strong, .invitation-panel > div small, .invitation-panel label > span { display: block; }
.invitation-panel > div strong { font-size: 10px; }
.invitation-panel > div small { margin-top: 5px; color: #686871; font-size: 7px; }
.invitation-panel label > span { margin-bottom: 6px; color: #72727b; font-size: 7px; font-weight: 760; letter-spacing: .07em; text-transform: uppercase; }
.invitation-panel input, .invitation-panel select { height: 39px; padding: 0 12px; font-size: 8px; }
.invitation-panel .button { min-height: 39px; }
.invitation-panel .form-message { grid-column: 2 / -1; min-height: 0; margin: 0; }
.invitation-list { margin: -7px 0 18px; overflow: hidden; background: rgba(255,255,255,.012); border: 1px solid var(--line-soft); border-radius: 14px; }
.invitation-row { display: grid; grid-template-columns: minmax(180px, 1fr) 110px 130px auto; align-items: center; gap: 12px; padding: 13px 17px; }
.invitation-row + .invitation-row { border-top: 1px solid var(--line-soft); }
.invitation-row strong, .invitation-row small { display: block; }
.invitation-row strong { font-size: 8px; overflow-wrap: anywhere; }
.invitation-row small { margin-top: 4px; color: #676770; font-size: 7px; }
.invitation-actions { display: flex; justify-content: flex-end; gap: 7px; }
.invitation-actions .button { min-height: 32px; padding: 0 10px; font-size: 7px; }
.member-management-row + .member-management-row { border-top: 1px solid var(--line-soft); }
.member-management-head { min-height: 76px; display: grid; grid-template-columns: 38px minmax(180px, 1fr) auto; align-items: center; gap: 14px; padding: 14px 22px; }
.member-identity strong, .member-identity small { display: block; }
.member-identity strong { font-size: 11px; }
.member-identity small { margin-top: 5px; color: #6f6f77; font-size: 8px; overflow-wrap: anywhere; }
.member-meta { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.member-role-label { min-width: 92px; color: #a0a0a9; font-size: 8px; text-align: right; }
.member-role-control { display: grid; grid-template-columns: auto 142px; align-items: center; gap: 9px; }
.member-role-control > span { color: #686871; font-size: 7px; font-weight: 760; letter-spacing: .08em; text-transform: uppercase; }
.member-role-control select { height: 38px; padding: 0 31px 0 12px; border-radius: 10px; font-size: 8px; }
.member-management-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px; padding: 17px 22px 22px 74px; background: rgba(255,255,255,.012); border-top: 1px solid rgba(255,255,255,.025); }
.member-control-heading { display: flex; align-items: baseline; gap: 10px; margin-bottom: 11px; }
.member-control-heading strong { color: #a3a3ac; font-size: 8px; letter-spacing: .055em; text-transform: uppercase; }
.member-control-heading small { color: #57575f; font-size: 7px; }
.member-product-toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.member-product-toggle { min-width: 145px; display: grid; grid-template-columns: 18px 1fr; align-items: center; gap: 9px; padding: 9px 11px; background: var(--panel-raised); border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.member-product-toggle:hover { border-color: #45454d; }
.member-product-toggle.unavailable { border-color: rgba(255,122,136,.16); }
.member-product-toggle.unavailable small { color: #a96d75; }
.member-product-toggle input { width: 17px; height: 17px; margin: 0; padding: 0; appearance: none; background: #0d0d0f; border: 1px solid #4a4a53; border-radius: 5px; }
.member-product-toggle input:checked { background: var(--violet); border-color: var(--violet); box-shadow: inset 0 0 0 4px var(--panel-raised); }
.member-product-toggle input:focus { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
.member-product-toggle strong, .member-product-toggle small { display: block; }
.member-product-toggle strong { font-size: 8px; }
.member-product-toggle small { margin-top: 3px; color: #66666f; font-size: 6px; letter-spacing: .08em; }
.member-product-chips, .member-product-unavailable { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.member-product-chips span, .member-product-unavailable span { padding: 6px 8px; color: #b6a4df; background: var(--violet-soft); border: 1px solid rgba(176,139,255,.14); border-radius: 100px; font-size: 7px; font-weight: 760; }
.member-product-unavailable { margin-top: 10px; }
.member-product-unavailable > small { color: #6c6c74; font-size: 7px; }
.member-product-unavailable span { color: #8b8b93; background: var(--panel-soft); border-color: var(--line); }
.member-product-empty { color: #686871; font-size: 8px; }
.member-remove-button { min-height: 36px; padding: 0 14px; font-size: 8px; }
.central-table[aria-busy="true"] { opacity: .62; pointer-events: none; }

/* Customer Platform: light-first workspace with a dark navigation anchor. */
#platform-view.platform-light {
  --black: #17131f;
  --text: #1b1722;
  --muted: #65606c;
  --muted-dark: #7a7480;
  --panel: #ffffff;
  --panel-raised: #f8f6fa;
  --panel-soft: #f1eef5;
  --line: #ded9e5;
  --line-soft: #ece8f0;
  --violet: #895cf5;
  --violet-deep: #6840c4;
  --violet-soft: rgba(137, 92, 245, 0.1);
  --green: #16865f;
  --red: #cf3f53;
  color: var(--text);
  background: #f5f3ef;
  color-scheme: light;
}
#platform-view .workspace {
  min-height: 100vh;
  background:
    radial-gradient(circle at 72% 8%, rgba(137,92,245,.08), transparent 28%),
    #f5f3ef;
}
#platform-view .sidebar {
  color: #f8f7fa;
  background: rgba(20,17,24,.98);
  border-right-color: #2c2632;
}
#platform-view .sidebar-brand span { color: #8f8998; }
#platform-view .main-nav a { color: #aaa4b2; }
#platform-view .main-nav a i { color: #6e6876; }
#platform-view .main-nav a:hover,
#platform-view .main-nav a.active {
  color: #ffffff;
  background: #26212b;
  border-color: #342d3b;
}
#platform-view .environment-chip { color: #8f8998; }
#platform-view .text-button { color: #c3bdca; }
#platform-view .topbar {
  background: rgba(250,249,247,.9);
  border-bottom-color: #e6e1e9;
  box-shadow: 0 8px 28px rgba(31,23,39,.04);
}
#platform-view .organization-switcher span,
#platform-view .user-chip small { color: #716b78; }
#platform-view .organization-switcher select {
  min-width: 230px;
  height: 40px;
  padding: 0 34px 0 12px;
  color: #1b1722;
  background: #ffffff;
  border: 1px solid #d8d2de;
  border-radius: 11px;
  box-shadow: 0 3px 12px rgba(36,27,45,.04);
  color-scheme: light;
}
#platform-view .organization-switcher select:hover:not(:disabled) { border-color: #a98aef; }
#platform-view .organization-switcher select:focus { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-soft); }
#platform-view .organization-switcher select[aria-busy="true"] { color: #766e7d; }
#platform-view .organization-switcher option {
  color: #1b1722;
  background: #ffffff;
}
#platform-view input,
#platform-view select,
#platform-view textarea {
  color: var(--text);
  background: #ffffff;
  border-color: var(--line);
}
#platform-view .topbar-refresh {
  color: #635d69;
  background: rgba(255,255,255,.56);
  border-color: #dcd6e2;
}
#platform-view .topbar-refresh:hover:not(:disabled) {
  color: #1b1722;
  background: #ffffff;
  border-color: #b9a6df;
}
#platform-view .user-chip strong { color: #211c29; }
#platform-view .mobile-menu { color: #211c29; }
#platform-view .button-secondary { color: #393141; background: #ffffff; border-color: #d8d2de; }
#platform-view .button-secondary:hover:not(:disabled) { color: #17131f; background: #f4f1f7; }
#platform-view .eyebrow { color: #6f6877; }
#platform-view .central-hero { align-items: stretch; }
#platform-view .central-hero > div { display: flex; flex-direction: column; justify-content: center; }
#platform-view .central-hero h1 {
  max-width: 790px;
  color: #17131f;
  overflow-wrap: anywhere;
}
#platform-view .central-hero > div:first-child > p:last-child { color: #625c68; }
#platform-view .organization-context-card {
  width: min(310px, 100%);
  flex: 0 0 310px;
  align-self: flex-end;
  padding: 22px;
  background: rgba(255,255,255,.86);
  border: 1px solid #ddd7e3;
  border-radius: 18px;
  box-shadow: 0 18px 46px rgba(42,31,53,.08);
}
#platform-view .organization-context-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
#platform-view .organization-context-head > span { color: #77707e; font-size: 7px; font-weight: 800; letter-spacing: .11em; }
#platform-view .organization-context-card > strong { display: block; margin: 28px 0 8px; color: #241e2c; font-size: 19px; letter-spacing: -.025em; }
#platform-view .organization-context-card > small { display: block; color: #77707e; font-size: 9px; line-height: 1.55; }
#platform-view .stat-grid { border-color: #dcd6e2; box-shadow: 0 16px 42px rgba(39,29,49,.06); }
#platform-view .stat-card { background: rgba(255,255,255,.9); }
#platform-view .stat-card + .stat-card { border-color: #e2dde6; }
#platform-view .stat-card > span { color: #746d7a; }
#platform-view .stat-card strong { color: #1b1722; }
#platform-view .stat-card small { color: #77707e; }
#platform-view .accent-stat { color: #231b2e; background: #d8c4ff; }
#platform-view .accent-stat > span,
#platform-view .accent-stat small { color: #55446d; }
#platform-view .section-heading h2 { color: #1b1722; }
#platform-view .section-copy { color: #6b6571; }
#platform-view .central-card,
#platform-view .activity-table,
#platform-view .create-organization-panel,
#platform-view .central-empty {
  box-shadow: 0 12px 34px rgba(39,29,49,.045);
}
#platform-view .central-empty strong { color: #211c29; }
#platform-view .central-card-head > span,
#platform-view .central-card small,
#platform-view .central-row small,
#platform-view .central-row > span:not(.user-avatar):not(.activity-icon):not(.status-pill) { color: #716a77; }
#platform-view .central-card p { color: #68616f; }
#platform-view .product-connection-heading strong,
#platform-view .product-connection-state > span { color: #514958; }
#platform-view .product-connection-heading small,
#platform-view .product-connection > small,
#platform-view .product-connection-note { color: #756e7b; }
#platform-view .product-country-control span { color: #716a77; }
#platform-view .product-country-control input { color: #211c29; background: #ffffff; border-color: #d8d2de; }
#platform-view .product-account-candidate {
  color: #292231;
  background: #ffffff;
  border-color: #d8d2de;
}
#platform-view .product-account-candidate small { color: #716a77; }
#platform-view .member-workflow-note { color: #4d386f; background: #eee6ff; border-color: #d8c5ff; }
#platform-view .member-workflow-note strong { color: #4a306e; }
#platform-view .member-workflow-note small { color: #69557f; }
#platform-view .invitation-panel { background: #f4f1f7; }
#platform-view .invitation-panel > div small,
#platform-view .invitation-panel label > span { color: #716a77; }
#platform-view .invitation-list { background: #ffffff; }
#platform-view .invitation-row small,
#platform-view .member-identity small { color: #716a77; }
#platform-view .member-avatar { color: #ffffff; background: #655073; border-color: #655073; }
#platform-view .member-role-label { color: #5f5865; }
#platform-view .member-role-control > span,
#platform-view .member-control-heading small,
#platform-view .member-product-empty { color: #716a77; }
#platform-view .member-management-body { background: #faf8fb; border-top-color: #ece7ef; }
#platform-view .member-control-heading strong { color: #554e5c; }
#platform-view .member-product-toggle:hover { border-color: #a98aef; }
#platform-view .member-product-toggle input { background: #ffffff; border-color: #a9a2af; }
#platform-view .member-product-toggle input:checked {
  background: var(--violet);
  border-color: var(--violet);
  box-shadow: inset 0 0 0 4px #ffffff;
}
#platform-view .member-product-toggle small { color: #716a77; }
#platform-view .member-product-chips span { color: #593d87; border-color: #d9c7f9; }
#platform-view .member-product-unavailable > small,
#platform-view .member-product-unavailable span { color: #716a77; }
#platform-view .workspace-footer { color: #817a87; }

@media (max-width: 1050px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .stat-card:nth-child(4) { border-top: 1px solid var(--line); }
  .package-layout, .automation-layout, .lab-layout, .billing-layout { grid-template-columns: 1fr; }
  .integration-grid { grid-template-columns: 1fr; }
  .access-steps { grid-template-columns: 1fr; }
  .access-steps > span { display: none; }
  .onboarding-state { grid-template-columns: repeat(2, 1fr); }
  .onboarding-state > div:nth-child(3) { border-left: 0; }
  .onboarding-state > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .central-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .create-organization-panel { grid-template-columns: 1fr; gap: 28px; }
  .member-management-body { grid-template-columns: 1fr; }
  .invitation-panel { grid-template-columns: 1fr 1fr; }
  .invitation-panel > div { grid-column: 1 / -1; }
  .invitation-panel .form-message { grid-column: 1 / -1; }
  .invitation-row { grid-template-columns: 1fr auto; }
  .invitation-row > :nth-child(3) { grid-column: 1; }
  .member-remove-button { justify-self: start; }
}

@media (max-width: 760px) {
  .login-view { grid-template-columns: 1fr; }
  .login-brand { min-height: 360px; padding: 30px 24px; }
  .login-brand h1 { font-size: 52px; }
  .login-brand small, .login-copy { display: none; }
  .login-panel { min-height: calc(100vh - 360px); padding: 38px 22px; align-items: start; }
  .app-view { display: block; }
  .sidebar { width: min(82vw, 280px); transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .workspace { width: 100%; }
  .topbar { min-height: 70px; padding: 0 17px; }
  .mobile-menu { display: block; margin-right: 4px; }
  .organization-switcher { min-width: 0; }
  .organization-switcher select { max-width: 145px; }
  .topbar-refresh { width: 34px; height: 34px; justify-content: center; padding: 0; }
  .topbar-refresh:not(.loading) span { display: inline; }
  .topbar-refresh { font-size: 0; }
  .topbar-refresh span { font-size: 13px; }
  .user-chip > div { display: none; }
  .content { width: min(100% - 28px, 1220px); padding-top: 47px; }
  .hero { align-items: stretch; flex-direction: column; padding-bottom: 42px; }
  .hero h1 { font-size: 50px; }
  .hero-status { width: 100%; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .stat-card { min-height: 130px; padding: 20px; }
  .stat-card strong { font-size: 34px; }
  .section { padding-top: 78px; }
  .section-heading { align-items: stretch; flex-direction: column; }
  .section-heading .button { width: 100%; }
  .package-card, .connection-map, .automation-form, .workflow-result, .integration-card, .lab-form, .lab-result, .billing-summary { padding: 21px; border-radius: 17px; }
  .section-heading-actions { align-items: stretch; flex-direction: column; }
  .lab-select-grid { grid-template-columns: 1fr; }
  .lab-select-grid .form-field + .form-field { margin-top: 18px; }
  .integration-head { grid-template-columns: 43px 1fr; }
  .integration-head .integration-status { grid-column: 2; justify-self: start; }
  .onboarding-panel { padding: 21px; border-radius: 17px; }
  .onboarding-state, .profile-fields { grid-template-columns: 1fr; }
  .onboarding-state > div + div { border-top: 1px solid var(--line); border-left: 0; }
  .candidate-card { align-items: flex-start; flex-direction: column; }
  .access-product-head { grid-template-columns: 43px 1fr; padding: 21px; }
  .access-product-head .integration-status { grid-column: 2; justify-self: start; }
  .access-steps { padding: 18px 21px; }
  .member-access-row { grid-template-columns: 38px 1fr; gap: 10px; padding: 15px 21px; }
  .member-access-state, .access-toggle { grid-column: 2; justify-self: start; }
  .onboarding-actions { flex-direction: column; }
  .onboarding-actions .button { width: 100%; }
  .result-meta { grid-template-columns: 1fr; }
  .ledger-row { grid-template-columns: 1fr auto; padding: 12px 16px; }
  .ledger-row time { display: none; }
  .package-card h3 { margin-top: 38px; }
  .product-node { grid-template-columns: 43px 1fr; }
  .product-node > :last-child { grid-column: 2; justify-self: start; }
  .result-invoice { grid-template-columns: 1fr; }
  .result-invoice > div + div { border-top: 1px solid var(--line); border-left: 0; }
  .activity-row { grid-template-columns: 38px 1fr auto; gap: 10px; padding: 14px 16px; }
  .activity-product, .activity-latency { display: none; }
  .workspace-footer { align-items: flex-start; flex-direction: column; }
  .auth-field-grid { grid-template-columns: 1fr; gap: 0; }
  .platform-auth-card h2 { font-size: 34px; }
  #platform-view .organization-context-card { width: 100%; flex-basis: auto; align-self: stretch; }
  .central-card-grid { grid-template-columns: 1fr; }
  .central-row, .subscription-row { grid-template-columns: 36px 1fr; gap: 10px; padding: 15px 16px; }
  .central-row > span:nth-child(n+3) { grid-column: 2; }
  .create-organization-panel { padding: 22px; }
  .member-management-head { grid-template-columns: 36px 1fr; padding: 16px; }
  .member-meta { grid-column: 2; align-items: flex-start; justify-content: flex-start; flex-direction: column; }
  .member-role-label { min-width: 0; text-align: left; }
  .member-role-control { width: 100%; grid-template-columns: 1fr; align-items: stretch; }
  .member-role-control select { width: 100%; }
  .member-management-body { padding: 17px 16px 21px 62px; }
  .member-control-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .member-product-toggles { flex-direction: column; }
  .member-product-toggle { width: 100%; }
  .invitation-panel { grid-template-columns: 1fr; }
  .invitation-panel > div, .invitation-panel .form-message { grid-column: 1; }
  .invitation-row { grid-template-columns: 1fr; }
  .invitation-row > :nth-child(3) { grid-column: 1; }
  .invitation-actions { justify-content: flex-start; }
}
