:root {
  color-scheme: light;
  font-family: var(--brand-font, Quicksand, system-ui, sans-serif);
  color: var(--ink);
  background: var(--paper);
  font-weight: 500;
  font-synthesis: none;
  --navy: var(--brand-navy, #0b1c31);
  --navy-hover: #152c49;
  --navy-active: var(--brand-navy-soft, #173452);
  --ink: #11243c;
  --muted: var(--brand-muted, #4f6176);
  --line: var(--brand-line, #dce4ec);
  --white: #fff;
  --paper: var(--brand-paper, #f5f8fb);
  --orange: var(--brand-orange, #ff7900);
  --orange-hover: var(--brand-orange-hover, #ed6f00);
  --orange-ink: var(--brand-orange-ink, #a44300);
  --orange-soft: #fff2e2;
  --danger: #9f2c4d;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 290px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button[disabled] { cursor: not-allowed; opacity: .58; }
a { color: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--orange-ink); outline-offset: 3px; }
svg { width: 19px; height: 19px; display: block; }
[data-icon] { display: inline-flex; align-items: center; flex: 0 0 auto; }

.skip-link { position: absolute; left: 16px; top: -80px; z-index: 9; background: var(--orange); color: var(--ink); padding: 12px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.layout { display: grid; min-height: 100dvh; grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100dvh; background: var(--navy); color: #f4f8ff; padding: 29px 17px 20px; display: flex; flex-direction: column; gap: 41px; }
.brand { display: flex; align-items: center; gap: 11px; padding-left: 7px; font-size: 22px; letter-spacing: -.04em; text-decoration: none; font-weight: 700; line-height: 1; }
.brand-q { color: var(--orange); }
.brand small { display: block; color: #b7c7dc; font-weight: 500; font-size: 11px; letter-spacing: .02em; margin-top: 5px; }
.brand-icon { display: block; flex: 0 0 auto; width: 44px; height: 44px; border: 1px solid #ffffff2b; border-radius: 12px; }
.main-nav { display: grid; gap: 5px; }
.main-nav button, .signout { text-align: left; display: flex; align-items: center; gap: 11px; min-height: 44px; background: transparent; color: #d6e2f2; border: 0; padding: 9px 11px; border-radius: 9px; font-weight: 620; font-size: .88rem; }
.main-nav button:hover, .signout:hover { background: var(--navy-hover); color: #fff; }
.main-nav button[aria-current="page"] { background: var(--navy-active); color: #fff; }
.main-nav button[aria-current="page"] [data-icon] { color: var(--orange); }
.main-nav button:focus-visible, .signout:focus-visible, .brand:focus-visible { outline-color: var(--orange); }
.sidebar-end { margin-top: auto; display: grid; gap: 11px; }
.owner-account { display: flex; gap: 9px; align-items: center; padding: 8px 8px 0; min-width: 0; }
.avatar { width: 35px; height: 35px; display: grid; place-items: center; background: #25466a; color: #fff; border-radius: 50%; font-size: 13px; font-weight: 700; flex: 0 0 auto; }
.account-text { min-width: 0; }
.account-text strong, .account-text small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-text strong { font-size: 11px; }
.account-text small { font-size: 11px; margin-top: 4px; color: #b7c7dc; }
.signout { width: 100%; }
.main-shell { min-width: 0; }
.topbar { min-height: 73px; background: var(--white); border-bottom: 1px solid var(--line); padding: 12px max(24px, calc((100% - 1180px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.breadcrumbs { display: flex; gap: 9px; align-items: center; font-size: .84rem; color: var(--muted); min-width: 0; }
#breadcrumb { font-weight: 700; color: var(--ink); }
main { max-width: 1228px; margin: 0 auto; padding: 32px 24px 54px; }
main:focus { outline: 0; }
.page-header { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 24px; }
.page-header h1 { margin: 0; font-size: clamp(1.85rem, 4vw, 2.9rem); letter-spacing: -.043em; line-height: 1.06; }
.page-header p, .panel-header p { margin: 8px 0 0; color: var(--muted); line-height: 1.5; }
.hero { position: relative; overflow: hidden; isolation: isolate; padding: clamp(24px, 4vw, 46px); background: radial-gradient(ellipse at 89% 56%, #193956, transparent 54%), var(--navy); color: #fff; border-radius: 17px; margin-bottom: 22px; }
.hero::after { content: ""; position: absolute; width: 380px; height: 380px; border: 1px solid #ff79004b; border-radius: 50%; right: -76px; top: -101px; box-shadow: 0 0 0 24px #ff790022, 0 0 0 50px #ff790018, 0 0 0 78px #ff790010; z-index: -1; pointer-events: none; }
.hero h1 { margin: 0; font-size: clamp(2.15rem, 5vw, 3.7rem); letter-spacing: -.048em; line-height: 1.01; }
.hero p { color: #dbe8f5; max-width: 450px; margin: 12px 0 24px; line-height: 1.52; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; background: var(--white); color: var(--ink); border: 1px solid var(--line); text-decoration: none; padding: 9px 14px; border-radius: 9px; font-weight: 700; font-size: .85rem; white-space: nowrap; }
.button:hover { border-color: #aabacc; background: #f7f9fc; }
.button-primary { background: var(--orange); border-color: var(--orange); color: var(--navy); }
.button-primary:hover { background: var(--orange-hover); border-color: var(--orange-hover); }
.button-link { background: transparent; border-color: transparent; color: var(--orange-ink); }
.button-link:hover { background: var(--orange-soft); border-color: transparent; }
.icon-button { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--white); color: var(--ink); }
.icon-button:hover { background: var(--paper); }
.hero .button:focus-visible { outline-color: var(--orange); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 22px; }
.metric, .panel { border: 1px solid var(--line); background: var(--white); border-radius: 14px; }
.metric { padding: 15px 17px; min-width: 0; }
.metric-icon { display: grid; place-items: center; width: 33px; height: 33px; background: var(--orange-soft); color: var(--orange-ink); border-radius: 9px; margin-bottom: 12px; }
.metric-icon svg { width: 17px; height: 17px; }
.metric small { color: var(--muted); font-weight: 650; display: block; }
.metric strong { display: block; margin-top: 5px; overflow-wrap: anywhere; font-size: clamp(1.18rem, 2.2vw, 1.75rem); letter-spacing: -.042em; line-height: 1.1; }
.panel { min-width: 0; }
.panel-header { padding: 18px 19px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-header h2 { margin: 0; font-size: 1.15rem; letter-spacing: -.024em; }
.panel-header p { font-size: .84rem; margin-top: 5px; }
.panel-body { padding: 20px; }
.stack { display: grid; gap: 18px; }
.cols { display: grid; grid-template-columns: minmax(235px, .95fr) minmax(0, 2fr); gap: 18px; align-items: start; }
.overview-cols { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.filters > * { min-width: 0; flex: 1 1 150px; }
.control, input, textarea, select { min-height: 43px; width: 100%; padding: 9px 11px; border: 1px solid #bccada; border-radius: 8px; background: var(--white); color: var(--ink); }
textarea { min-height: 95px; resize: vertical; }
.control::placeholder, input::placeholder, textarea::placeholder { color: #596b82; opacity: 1; }
input[type="checkbox"] { width: 19px; height: 19px; min-height: 0; margin: 2px 0 0; accent-color: var(--orange-ink); flex: 0 0 auto; }
.company-list, .activity-list, .steps { list-style: none; margin: 0; padding: 0; }
.company-list li + li, .activity-list li + li { border-top: 1px solid var(--line); }
.company-entry { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 11px 17px; width: 100%; border: 0; background: var(--white); color: var(--ink); text-align: left; }
.company-entry:hover, .company-entry[aria-current="true"] { background: #fff7ed; }
.company-entry strong, .company-entry small { display: block; overflow-wrap: anywhere; }
.company-entry strong { font-size: .91rem; }
.company-entry small { font-size: .76rem; color: var(--muted); margin-top: 3px; }
.company-entry span:last-child { flex-shrink: 0; }
.badge { width: fit-content; display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; background: var(--orange-soft); color: var(--orange-ink); font-size: .72rem; font-weight: 700; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.badge-active { background: #e6f1da; color: #3d6224; }
.badge-suspended { background: #f9e9ec; color: #923c51; }
.activity-entry { display: flex; align-items: start; gap: 10px; padding: 13px 17px; }
.activity-entry strong, .activity-entry small { display: block; overflow-wrap: anywhere; }
.activity-entry strong { font-size: .85rem; }
.activity-entry small { font-size: .75rem; margin-top: 4px; color: var(--muted); }
.activity-entry .metric-icon { flex: 0 0 auto; margin: 0; }
.empty { padding: 22px 19px; color: var(--muted); line-height: 1.55; }
.empty p { margin: 0 0 12px; }
.empty p:last-child { margin-bottom: 0; }
.details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin: 0 0 18px; }
.details div { background: var(--paper); border-radius: 10px; padding: 11px; }
.details dt { color: var(--muted); font-size: .75rem; }
.details dd { margin: 4px 0 0; font-weight: 700; overflow-wrap: anywhere; font-size: .89rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.steps { display: grid; gap: 3px; }
.step-button { width: 100%; min-height: 45px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; padding: 6px 8px; display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 8px; font-weight: 650; font-size: .84rem; }
.step-button:hover, .step-button[aria-current="step"] { background: var(--orange-soft); }
.step-number { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: #eaf0f7; color: var(--navy); font-size: .74rem; }
.step-done .step-number { background: #e6f1da; color: #3b5e23; }
.step-number svg { width: 15px; height: 15px; }
.progress-line { margin: 14px 0; color: var(--muted); font-size: .81rem; }
progress { display: block; width: 100%; height: 8px; margin-top: 7px; border: 0; border-radius: 20px; overflow: hidden; background: #e5edf6; }
progress::-webkit-progress-bar { background: #e5edf6; }
progress::-webkit-progress-value { background: var(--orange); }
progress::-moz-progress-bar { background: var(--orange); }
.form-grid { display: grid; gap: 13px; }
.two-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: grid; gap: 5px; align-content: start; min-width: 0; }
.field > span:first-child { font-weight: 700; font-size: .83rem; }
.field small, .form-note { color: var(--muted); font-size: .78rem; line-height: 1.5; }
.form-note { margin: 2px 0 0; }
.check { display: flex; align-items: start; gap: 8px; line-height: 1.35; min-height: 40px; color: var(--ink); font-size: .86rem; font-weight: 660; cursor: pointer; }
.form-error { color: var(--danger); font-weight: 650; font-size: .85rem; line-height: 1.45; margin: 0; }
.status-banner { margin-bottom: 16px; padding: 12px 14px; background: #edf4de; color: #3d5828; border: 1px solid #dce8c2; border-radius: 10px; font-size: .87rem; }
.status-banner.is-error { background: #faeaee; color: var(--danger); border-color: #f1ced8; }
.dialog-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 17px; }
.dialog-top h2 { margin: 0; letter-spacing: -.035em; font-size: 1.36rem; }
dialog { width: min(520px, calc(100% - 26px)); max-height: calc(100% - 28px); overflow: auto; padding: 20px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); box-shadow: 0 18px 80px #0b1c314c; }
dialog::backdrop { background: #0b1c31a0; }
.dialog-copy { margin: 0 0 15px; color: var(--muted); font-size: .89rem; line-height: 1.5; }
.dialog-submit { justify-content: flex-end; margin-top: 5px; }
.initial-state { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; padding: 20px; }
.initial-state p { margin: 0; color: var(--muted); }
.initial-mark { display: block; width: min(180px, 100%); height: auto; margin-bottom: 8px; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: .75rem; }
tbody tr:last-child td { border-bottom: 0; }
.table-link { border: 0; padding: 4px 0; background: transparent; color: var(--orange-ink); text-align: left; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1060px) {
  .layout { grid-template-columns: 190px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .layout { display: block; }
  .sidebar { position: static; height: auto; gap: 14px; padding: 14px 14px 8px; display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .brand { padding-left: 0; }
  .brand-icon { width: 36px; height: 36px; }
  .main-nav { grid-row: 2; grid-column: 1 / -1; display: flex; gap: 4px; overflow-x: auto; }
  .main-nav button { white-space: nowrap; min-height: 43px; }
  .main-nav svg { width: 16px; height: 16px; }
  .sidebar-end { display: flex; align-items: center; margin: 0; gap: 5px; }
  .owner-account { display: none; }
  .signout { padding-inline: 8px; white-space: nowrap; }
  .topbar { min-height: 58px; padding: 8px 15px; }
  main { padding: 23px 15px 40px; }
}
@media (max-width: 610px) {
  .cols, .two-fields { grid-template-columns: minmax(0, 1fr); }
  .page-header, .panel-header { align-items: start; }
  .metric { padding: 12px; }
  .panel-header, .panel-body { padding: 14px; }
  .hero { border-radius: 13px; }
  .hero::after { right: -231px; }
  .breadcrumb-prefix { display: none; }
  .details { gap: 8px; }
  .panel-header .button { padding-inline: 8px; }
}

.managed-panels { max-width: 980px; }
.managed-details > div:last-child { grid-column: 1 / -1; }
.workspace-link { display: inline; color: var(--orange-ink); text-underline-offset: 3px; }
.workspace-link svg { display: inline-block; width: 15px; height: 15px; vertical-align: middle; }
.workspace-access { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line); padding-top: 16px; }
.workspace-access > div { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: .88rem; }
.badge-inactive { background: #f9e9ec; color: #923c51; }
.badge-unknown { background: #eaf0f7; color: var(--muted); }
.managed-users { list-style: none; padding: 0; margin: 0; }
.managed-users li { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding: 15px 20px; }
.managed-users li + li { border-top: 1px solid var(--line); }
.managed-users li > div:first-child { display: grid; gap: 3px; min-width: 0; overflow-wrap: anywhere; font-size: .91rem; }
.managed-users span, .managed-users small { color: var(--muted); }
.managed-users .actions button { min-height: 42px; }
.managed-note { padding: 0 20px 15px; color: var(--muted); font-size: .83rem; }
.managed-panels h3 { font-size: .98rem; margin: 0; }
@media (max-width: 610px) {
  .managed-users li { padding: 14px; }
  .managed-users li > div:first-child { flex-basis: 100%; }
  .managed-details { grid-template-columns: 1fr; }
  .managed-panels .panel-header { flex-wrap: wrap; }
}
.registry-filters label { flex: 1 1 auto; max-width: 36rem; }
.registry-entries { overflow: hidden; border-radius: 0 0 14px 14px; }
.registry-entries .company-entry { min-height: 66px; text-decoration: none; }
.registry-entries .company-entry:focus-visible { outline-offset: -3px; }
.registry-row-end { display: inline-flex; align-items: center; gap: 12px; }
.registry-row-end svg { width: 18px; height: 18px; }
.registry-back { margin-bottom: 15px; }
.registry-details dd, .registry-back + .page-header h1 { min-width: 0; overflow-wrap: anywhere; }
.managed-panels .workspace-access { padding-top: 0; border: 0; }
.managed-panels .managed-note { margin: 14px 0 0; }
@media (max-width: 610px) {
  .registry-entries .company-entry { gap: 12px; padding: 13px; flex-wrap: wrap; }
  .registry-row-end { margin-inline-start: auto; gap: 6px; }
}
.registry-notice { margin: 0; padding: 14px 17px; background: var(--orange-soft); color: var(--orange-ink); font-size: .86rem; line-height: 1.5; }
