@font-face {
    font-family: Inter;
    src: local("Inter");
    font-display: swap;
}

:root {
    --color-ink: #15223a;
    --color-muted: #65738a;
    --color-subtle: #8b97aa;
    --color-primary: #285bd8;
    --color-primary-dark: #1f49b5;
    --color-primary-soft: #edf3ff;
    --color-border: #dde5f0;
    --color-border-strong: #c7d2e2;
    --color-surface: #ffffff;
    --color-canvas: #f5f8fc;
    --shadow-card: 0 10px 30px rgba(31, 51, 85, .055);
    --shadow-floating: 0 18px 50px rgba(25, 43, 75, .16);
    --radius-small: 9px;
    --radius-medium: 14px;
    --radius-large: 20px;
    --topbar-height: 74px;
    --sidebar-width: 252px;
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
    overflow-x: hidden;
}

body {
    margin: 0;
    background: var(--color-canvas);
    color: var(--color-ink);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.55;
}

button,
input,
select {
    font: inherit;
}

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

a:hover {
    text-decoration: underline;
}

:focus-visible {
    outline: 3px solid rgba(40, 91, 216, .24);
    outline-offset: 2px;
}

/* Authenticated application shell */
.topbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 40;
    display: flex;
    align-items: center;
    min-width: 0;
    height: var(--topbar-height);
    padding: 0 24px;
    border-bottom: 1px solid var(--color-border);
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 1px 8px rgba(25, 43, 75, .035);
}

.brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    color: var(--color-ink);
    text-decoration: none;
}

.brand:hover {
    text-decoration: none;
}

.brand img {
    display: block;
    width: 174px;
    height: auto;
}

.brand-context {
    margin-left: 14px;
    padding-left: 14px;
    border-left: 1px solid var(--color-border-strong);
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .035em;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    margin-left: auto;
}

.menu-button {
    display: none;
    align-items: center;
    gap: 9px;
}

.menu-button-lines,
.menu-button-lines::before,
.menu-button-lines::after {
    display: block;
    width: 17px;
    height: 2px;
    border-radius: 99px;
    background: currentColor;
}

.menu-button-lines {
    position: relative;
}

.menu-button-lines::before,
.menu-button-lines::after {
    position: absolute;
    left: 0;
    content: "";
}

.menu-button-lines::before {
    top: -5px;
}

.menu-button-lines::after {
    top: 5px;
}

.user-menu {
    position: relative;
}

.user-menu summary {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 330px;
    min-height: 46px;
    padding: 5px 9px;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    list-style: none;
}

.user-menu summary::-webkit-details-marker {
    display: none;
}

.user-menu summary:hover,
.user-menu[open] summary {
    border-color: var(--color-border);
    background: #f8faff;
}

.user-avatar {
    position: relative;
    display: block;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    overflow: hidden;
    border: 1px solid #cad8f5;
    border-radius: 50%;
    background: var(--color-primary-soft);
}

.user-avatar::before,
.user-avatar::after {
    position: absolute;
    left: 50%;
    border-radius: 50%;
    background: #5c78bd;
    content: "";
    transform: translateX(-50%);
}

.user-avatar::before {
    top: 7px;
    width: 9px;
    height: 9px;
}

.user-avatar::after {
    bottom: 4px;
    width: 19px;
    height: 11px;
}

.user-summary-copy,
.user-menu-identity {
    display: grid;
    min-width: 0;
    line-height: 1.3;
}

.user-summary-copy strong,
.user-summary-copy small,
.user-menu-identity strong,
.user-menu-identity small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-summary-copy strong {
    font-size: 13px;
}

.user-summary-copy small,
.user-menu-identity small {
    color: var(--color-muted);
    font-size: 11px;
}

.user-menu-chevron {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    margin: 0 3px;
    border-right: 1.5px solid #66738a;
    border-bottom: 1.5px solid #66738a;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .18s ease;
}

.user-menu[open] .user-menu-chevron {
    transform: rotate(225deg) translate(-1px, -1px);
}

.user-menu-panel {
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    z-index: 50;
    display: grid;
    width: min(280px, calc(100vw - 28px));
    padding: 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-medium);
    background: var(--color-surface);
    box-shadow: var(--shadow-floating);
}

.user-menu-identity {
    display: none;
    padding: 9px 10px 12px;
    border-bottom: 1px solid #edf1f6;
    margin-bottom: 5px;
}

.user-menu-panel a,
.user-menu-logout {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--color-ink);
    cursor: pointer;
    text-align: left;
}

.user-menu-panel a:hover,
.user-menu-logout:hover {
    background: #f4f7fb;
    text-decoration: none;
}

.user-menu-panel form {
    margin: 0;
    padding-top: 5px;
    border-top: 1px solid #edf1f6;
}

.user-menu-logout {
    color: #a22f3a;
}

.header-account-link {
    font-weight: 700;
}

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
    padding-top: var(--topbar-height);
}

.sidebar {
    position: fixed;
    top: var(--topbar-height);
    bottom: 0;
    left: 0;
    z-index: 30;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    padding: 22px 16px 18px;
    overflow-y: auto;
    border-right: 1px solid var(--color-border);
    background: #fbfcfe;
}

.sidebar nav {
    display: grid;
    gap: 3px;
}

.sidebar a {
    position: relative;
    display: block;
    padding: 10px 12px;
    border-radius: var(--radius-small);
    color: #46546b;
    font-size: 14px;
    font-weight: 590;
}

.sidebar a:hover {
    background: #f0f4fa;
    color: var(--color-ink);
    text-decoration: none;
}

.sidebar a.active {
    background: var(--color-primary-soft);
    color: #214fbf;
    font-weight: 750;
}

.sidebar a.active::before {
    position: absolute;
    top: 9px;
    bottom: 9px;
    left: -9px;
    width: 3px;
    border-radius: 99px;
    background: var(--color-primary);
    content: "";
}

.nav-group {
    margin: 22px 12px 7px;
    color: var(--color-subtle);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.nav-group:first-child {
    margin-top: 0;
}

.sidebar-footnote {
    margin: auto 10px 0;
    padding-top: 24px;
    color: #9aa5b5;
    font-size: 11px;
}

.navigation-backdrop {
    display: none;
}

.content {
    grid-column: 2;
    width: 100%;
    max-width: 1270px;
    min-width: 0;
    margin: 0 auto;
    padding: 42px 38px 64px;
}

/* Typography and page hierarchy */
.page-header {
    max-width: 820px;
    margin-bottom: 28px;
}

.page-header h1,
.error-state h1 {
    margin: 4px 0 9px;
    color: #101c32;
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.16;
    letter-spacing: -.028em;
}

.page-header > p:last-child,
.error-state > p {
    max-width: 760px;
    margin: 0;
    color: var(--color-muted);
    font-size: 16px;
}

.eyebrow,
.card-kicker {
    margin: 0;
    color: #3159c5 !important;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .105em;
    text-transform: uppercase;
}

.card-kicker {
    color: #718098 !important;
}

.muted {
    color: var(--color-muted);
}

/* Cards and shared content */
.panel,
.metric {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-medium);
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
}

.panel {
    padding: 24px;
}

.metric {
    display: grid;
    gap: 3px;
    padding: 21px;
}

.metric strong {
    font-size: 30px;
    letter-spacing: -.03em;
}

.metric span {
    color: var(--color-muted);
}

.narrow {
    max-width: 720px;
}

.card-grid,
.metric-grid,
.session-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 17px;
}

.card-heading h2,
.panel h2 {
    margin: 3px 0 8px;
    color: #17233a;
    font-size: 19px;
    line-height: 1.3;
}

.status {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 3px 9px;
    border-radius: 999px;
    background: #edf1f7;
    color: #4c5a70;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.status.active {
    background: #e7f7ef;
    color: #17613c;
}

.status.blocked,
.status.revoked,
.status.removed,
.status.deactivated,
.status.canceled {
    background: #fcebed;
    color: #902e39;
}

.status.suspended,
.status.pending,
.status.pending_confirmation,
.status.draft,
.status.inactive,
.status.expired {
    background: #fff3d9;
    color: #7a5712;
}

.two-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
}

.entity {
    display: grid;
    gap: 4px;
    padding: 15px 0;
    border-bottom: 1px solid #e8edf4;
}

.entity:last-child {
    border-bottom: 0;
}

.list-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-top: 1px solid #e7ecf3;
}

.detail-list {
    display: grid;
    gap: 0;
    margin: 0 0 20px;
}

.detail-list div {
    display: grid;
    grid-template-columns: minmax(110px, .7fr) minmax(0, 1.3fr);
    gap: 14px;
    padding: 10px 0;
    border-top: 1px solid #edf1f6;
}

.detail-list dt {
    color: var(--color-muted);
    font-size: 13px;
}

.detail-list dd {
    margin: 0;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.organization-card {
    display: flex;
    min-height: 310px;
    flex-direction: column;
}

.organization-card .secondary-button {
    align-self: flex-start;
    margin-top: auto;
}

.organization-choice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 90px;
    color: var(--color-ink);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.organization-choice:hover {
    border-color: #b9c9ec;
    box-shadow: 0 13px 32px rgba(31, 61, 121, .10);
    text-decoration: none;
    transform: translateY(-1px);
}

.organization-switcher {
    display: flex;
    align-items: end;
    gap: 10px;
    max-width: 720px;
    margin-bottom: 25px;
    padding: 13px 15px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface);
}

.organization-switcher label {
    color: #536077;
    font-size: 12px;
    font-weight: 750;
}

.organization-switcher select {
    width: min(360px, 50vw);
}

/* Forms and buttons */
.stack-form {
    display: grid;
    gap: 14px;
}

.field-group {
    display: grid;
    gap: 6px;
}

.stack-form > label,
.field-group > label {
    margin: 0;
    color: #253149;
    font-size: 13px;
    font-weight: 750;
}

.stack-form input,
.stack-form select,
select {
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-small);
    background: #fff;
    color: var(--color-ink);
    transition: border-color .16s ease, box-shadow .16s ease;
}

.stack-form input:hover,
.stack-form select:hover,
select:hover {
    border-color: #aebbd0;
}

.stack-form input:focus,
.stack-form select:focus,
select:focus {
    border-color: var(--color-primary);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(40, 91, 216, .14);
}

.stack-form input[readonly] {
    border-color: #d8e0eb;
    background: #f3f6fa;
    color: #5e6b7f;
}

.stack-form input:disabled,
.stack-form select:disabled,
select:disabled {
    cursor: not-allowed;
    opacity: .65;
}

.stack-form small,
.field-hint {
    color: var(--color-muted);
    font-size: 12px;
    line-height: 1.45;
}

.field-error {
    display: block;
    min-height: 0;
    color: #a72f3a !important;
    font-size: 13px;
}

.field-error:empty {
    display: none;
}

button,
.primary-button,
.secondary-button,
.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 15px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-small);
    background: #fff;
    color: #26354f;
    cursor: pointer;
    font-weight: 680;
    line-height: 1.2;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

button:hover,
.secondary-button:hover {
    border-color: #aab8cd;
    background: #f7f9fc;
    text-decoration: none;
}

.primary-button {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
}

.primary-button:hover {
    border-color: var(--color-primary-dark);
    background: var(--color-primary-dark);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 7px 18px rgba(40, 91, 216, .18);
}

.danger-button {
    border-color: #df9da4;
    background: #fff;
    color: #a32935;
}

.danger-button:hover {
    border-color: #c84f5a;
    background: #fff5f6;
}

button:active,
.primary-button:active,
.secondary-button:active,
.danger-button:active {
    transform: translateY(1px);
}

button:disabled,
.primary-button[disabled],
.secondary-button:disabled,
.signup-submit:disabled {
    cursor: not-allowed;
    opacity: .52;
    transform: none;
}

.stack-form .primary-button {
    justify-self: start;
    margin-top: 5px;
}

.link-button {
    border: 0;
    background: transparent;
    color: var(--color-primary);
    padding: 8px;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.action-row form {
    margin: 0;
}

.form-card {
    padding: 28px;
}

.form-card-heading {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 21px;
    border-bottom: 1px solid #e8edf4;
}

.form-card-heading h2 {
    margin-bottom: 4px;
}

.form-card-heading p:last-child {
    margin: 0;
    color: var(--color-muted);
}

.form-step {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 50%;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 800;
}

/* Account overview */
.account-heading {
    max-width: 760px;
}

.account-overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, .88fr);
    align-items: stretch;
    gap: 20px;
}

.profile-card,
.product-overview-card {
    min-height: 100%;
}

.profile-card {
    padding: 27px;
}

.product-overview-card {
    position: relative;
    display: flex;
    min-height: 390px;
    flex-direction: column;
    overflow: hidden;
    padding: 28px;
    background: linear-gradient(145deg, #ffffff 0%, #f7f9ff 100%);
}

.product-overview-card::after {
    position: absolute;
    right: -65px;
    bottom: -80px;
    width: 210px;
    height: 210px;
    border: 34px solid rgba(40, 91, 216, .045);
    border-radius: 50%;
    content: "";
}

.product-overview-card.state-success {
    background: linear-gradient(145deg, #ffffff 0%, #f1fbf6 100%);
}

.product-overview-card.state-error {
    background: linear-gradient(145deg, #ffffff 0%, #fff6f6 100%);
}

.product-card-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 28px;
}

.product-symbol {
    position: relative;
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #e9f0ff;
    box-shadow: inset 0 0 0 1px #cfdbf7;
}

.product-symbol::before,
.product-symbol::after {
    position: absolute;
    border: 2px solid #486dcc;
    border-radius: 5px;
    content: "";
}

.product-symbol::before {
    top: 12px;
    left: 12px;
    width: 14px;
    height: 14px;
}

.product-symbol::after {
    right: 10px;
    bottom: 10px;
    width: 14px;
    height: 14px;
    background: #e9f0ff;
}

.product-symbol.ready {
    background: #e8f8f0;
    box-shadow: inset 0 0 0 1px #c5ead6;
}

.product-symbol.ready::before {
    top: 14px;
    left: 13px;
    width: 20px;
    height: 11px;
    border: 0;
    border-bottom: 3px solid #248158;
    border-left: 3px solid #248158;
    border-radius: 0;
    transform: rotate(-45deg);
}

.product-symbol.ready::after {
    display: none;
}

.product-overview-card h2 {
    max-width: 390px;
    margin-top: 7px;
    font-size: 24px;
    letter-spacing: -.02em;
}

.product-overview-card > p:not(.card-kicker) {
    position: relative;
    z-index: 1;
    max-width: 420px;
    margin: 4px 0 25px;
    color: var(--color-muted);
}

.product-overview-card .primary-button {
    position: relative;
    z-index: 1;
    align-self: flex-start;
    margin-top: auto;
}

.account-shortcuts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.shortcut-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 88px;
    padding: 17px;
    color: var(--color-ink);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.shortcut-card:hover {
    border-color: #bdcae2;
    box-shadow: 0 12px 28px rgba(31, 61, 121, .09);
    text-decoration: none;
    transform: translateY(-1px);
}

.shortcut-card > span:nth-child(2) {
    display: grid;
    min-width: 0;
}

.shortcut-card small {
    color: var(--color-muted);
    font-size: 11px;
}

.shortcut-icon {
    position: relative;
    display: block;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--color-primary-soft);
}

.shortcut-icon::before,
.shortcut-icon::after {
    position: absolute;
    content: "";
}

.organization-icon::before {
    inset: 10px 8px 8px;
    border: 2px solid #4e6fbe;
    border-radius: 3px;
}

.organization-icon::after {
    top: 15px;
    left: 13px;
    width: 12px;
    height: 2px;
    background: #4e6fbe;
    box-shadow: 0 5px 0 #4e6fbe;
}

.security-icon::before {
    top: 8px;
    left: 11px;
    width: 16px;
    height: 19px;
    border: 2px solid #4e6fbe;
    border-radius: 9px 9px 7px 7px;
}

.sessions-icon::before {
    inset: 9px;
    border: 2px solid #4e6fbe;
    border-radius: 50%;
}

.sessions-icon::after {
    top: 13px;
    left: 18px;
    width: 6px;
    height: 7px;
    border-bottom: 2px solid #4e6fbe;
    border-left: 2px solid #4e6fbe;
}

.shortcut-arrow {
    color: #8a98ae;
    font-size: 18px;
}

/* Tables and sessions */
.table-wrap {
    width: 100%;
    overflow-x:auto;
}

.table-wrap.panel {
    padding: 0;
}

table {
    width: 100%;
    min-width: 780px;
    border-collapse: collapse;
}

th,
td {
    padding: 15px;
    border-bottom: 1px solid #e5eaf2;
    text-align: left;
    vertical-align: top;
}

th {
    background: #f8fafc;
    color: #66738a;
    font-size: 11px;
    letter-spacing: .055em;
    text-transform: uppercase;
}

tbody tr:last-child td {
    border-bottom: 0;
}

td small {
    display: block;
    margin: 2px 0 6px;
    color: var(--color-muted);
}

.actions-cell {
    min-width: 360px;
}

.actions-cell form,
td form {
    display: flex;
    gap: 7px;
    margin-bottom: 8px;
}

.actions-cell select,
td form select {
    min-width: 110px;
}

.session-card dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

.session-card dl div {
    display: grid;
    grid-template-columns: 105px minmax(0, 1fr);
    gap: 10px;
}

.session-card dt {
    color: var(--color-muted);
}

.session-card dd {
    margin: 0;
    overflow-wrap: anywhere;
}

/* Empty and error states */
.empty-state,
.error-state {
    display: grid;
    max-width: 720px;
    justify-items: center;
    padding: 48px 30px;
    text-align: center;
}

.empty-state h2 {
    margin: 18px 0 6px;
    font-size: 22px;
}

.empty-state p {
    max-width: 520px;
    margin: 0 0 22px;
    color: var(--color-muted);
}

.empty-state.compact {
    max-width: none;
    padding: 28px 16px 18px;
    border-top: 1px solid #e8edf4;
}

.empty-state.compact .empty-state-visual {
    width: 48px;
    height: 48px;
    border-radius: 14px;
}

.empty-state.compact .empty-state-visual::before {
    inset: 13px 10px 10px;
}

.empty-state.compact .empty-state-visual::after {
    top: 20px;
    left: 17px;
    width: 14px;
    box-shadow: 0 5px 0 #5976ba;
}

.empty-state.compact h2 {
    margin-top: 13px;
    font-size: 18px;
}

.empty-state-visual {
    position: relative;
    width: 62px;
    height: 62px;
    border: 1px solid #cad7ee;
    border-radius: 18px;
    background: var(--color-primary-soft);
}

.empty-state-visual::before,
.empty-state-visual::after {
    position: absolute;
    content: "";
}

.empty-state-visual::before {
    inset: 17px 13px 13px;
    border: 2px solid #5976ba;
    border-radius: 4px;
}

.empty-state-visual::after {
    top: 25px;
    left: 22px;
    width: 18px;
    height: 2px;
    background: #5976ba;
    box-shadow: 0 7px 0 #5976ba;
}

.error-state {
    margin: 45px auto;
}

.error-state-visual {
    display: grid;
    width: 62px;
    height: 62px;
    margin-bottom: 19px;
    place-items: center;
    border: 1px solid #f1c2c7;
    border-radius: 18px;
    background: #fff0f1;
    color: #b53642;
    font-size: 25px;
    font-weight: 850;
}

.error-state .primary-button {
    margin-top: 25px;
}

.error-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: radial-gradient(circle at top, #eaf1ff, transparent 42%), var(--color-canvas);
}

.error-shell {
    width: min(100%, 620px);
}

.error-shell-logo {
    display: block;
    width: 190px;
    height: auto;
    margin: 0 auto 24px;
}

.error-shell .error-state {
    margin: 0;
}

/* Sales channel catalog */
.onboarding-header {
    max-width: 760px;
}

.channel-section {
    margin: 0 0 32px;
}

.channel-section > h2 {
    margin: 0 0 14px;
    color: #536078;
    font-size: 12px;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
    gap: 13px;
}

.channel-card {
    display: grid;
    gap: 14px;
    margin: 0;
    min-height: 176px;
    padding: 17px;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.channel-card.available:hover {
    border-color: #b9c8e7;
    box-shadow: 0 15px 36px rgba(31, 61, 121, .10);
    transform: translateY(-2px);
}

.channel-card.coming-soon {
    background: #fbfcfe;
    box-shadow: none;
}

.channel-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.channel-logo-frame {
    display: grid;
    width: 88px;
    height: 52px;
    place-items: center;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.channel-logo-frame.dark {
    background: #15358c;
}

.channel-logo-frame img {
    width: 100%;
    max-width: 82px;
    max-height: 46px;
    height: 100%;
    object-fit: contain;
}

.channel-card h3 {
    margin: 0;
    align-self: center;
    color: #17233a;
    font-size: 16px;
}

.status.neutral {
    background: #edf1f7;
    color: #59667b;
}

.channel-card .primary-button {
    align-self: end;
    justify-self: stretch;
    margin-top: auto;
    padding: 9px 12px;
    font-size: 13px;
}

.onboarding-progress {
    position: relative;
    display: grid;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 5px 20px;
    overflow: hidden;
    padding: 30px;
}

.onboarding-visual {
    position: relative;
    grid-row: 1 / span 2;
    width: 68px;
    height: 68px;
    border-radius: 20px;
    background: #eaf1ff;
}

.onboarding-visual::before,
.onboarding-visual::after,
.onboarding-visual span {
    position: absolute;
    border-radius: 50%;
    content: "";
}

.onboarding-visual::before {
    inset: 15px;
    border: 3px solid #a9bce9;
}

.onboarding-visual::after {
    inset: 15px;
    border: 3px solid transparent;
    border-top-color: var(--color-primary);
}

.onboarding-working .onboarding-visual::after {
    animation: onboarding-spin 1.15s linear infinite;
}

.onboarding-success .onboarding-visual {
    background: #e9f8f0;
}

.onboarding-success .onboarding-visual::before {
    top: 23px;
    left: 21px;
    width: 26px;
    height: 14px;
    border: 0;
    border-bottom: 4px solid #25815a;
    border-left: 4px solid #25815a;
    border-radius: 0;
    transform: rotate(-45deg);
}

.onboarding-success .onboarding-visual::after {
    display: none;
}

.onboarding-failed .onboarding-visual {
    background: #fff0f1;
}

.onboarding-failed .onboarding-visual::before,
.onboarding-failed .onboarding-visual::after {
    top: 32px;
    left: 20px;
    width: 28px;
    height: 3px;
    border: 0;
    border-radius: 99px;
    background: #b83b47;
    transform: rotate(45deg);
}

.onboarding-failed .onboarding-visual::after {
    display: block;
    transform: rotate(-45deg);
}

.onboarding-summary h2 {
    margin: 3px 0 0;
}

.onboarding-steps {
    grid-column: 1 / -1;
    display: grid;
    gap: 14px;
    margin: 24px 0 0;
    padding: 22px 0 0;
    border-top: 1px solid #e7ecf3;
    list-style: none;
    counter-reset: onboarding-step;
}

.onboarding-steps li {
    position: relative;
    min-height: 36px;
    padding: 7px 8px 7px 46px;
    color: #7a8699;
}

.onboarding-steps li::before {
    position: absolute;
    top: 2px;
    left: 0;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid #cad4e2;
    border-radius: 50%;
    background: #fff;
    color: #68758b;
    content: counter(onboarding-step);
    counter-increment: onboarding-step;
    font-size: 12px;
    font-weight: 800;
}

.onboarding-steps li.complete,
.onboarding-steps li.current,
.onboarding-steps li.failed {
    color: var(--color-ink);
    font-weight: 680;
}

.onboarding-steps li.complete::before {
    border-color: #a8dec3;
    background: #e8f8f0;
    color: #17633f;
    content: "✓";
}

.onboarding-steps li.current::before {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #fff;
}

.onboarding-steps li.failed::before {
    border-color: #eab5ba;
    background: #fff0f1;
    color: #a72f3a;
    content: "!";
}

.onboarding-status-action {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 11px;
}

.activity-message {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: var(--color-muted);
}

.activity-message span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 0 0 rgba(40, 91, 216, .3);
    animation: activity-pulse 1.7s ease-out infinite;
}

@keyframes onboarding-spin {
    to { transform: rotate(360deg); }
}

@keyframes activity-pulse {
    70% { box-shadow: 0 0 0 8px rgba(40, 91, 216, 0); }
    100% { box-shadow: 0 0 0 0 rgba(40, 91, 216, 0); }
}

/* Toast notifications */
.site-toast-region {
    position: fixed;
    top: max(16px, env(safe-area-inset-top));
    right: max(16px, env(safe-area-inset-right));
    z-index: 10000;
    width: min(440px, calc(100vw - 32px));
    pointer-events: none;
}

.site-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    padding: 13px 13px 13px 14px;
    border: 1px solid #fecdd3;
    border-radius: 10px;
    background: #fff1f2;
    color: #881337;
    box-shadow: 0 18px 38px rgba(15, 23, 42, .18);
    pointer-events: auto;
}

.site-toast::before {
    display: inline-flex;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e11d48;
    color: #fff;
    content: "!";
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

.site-toast-message {
    flex: 1;
    min-width: 0;
    color: inherit;
    font-size: 14px;
    font-weight: 760;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.site-toast-countdown {
    align-self: center;
    min-width: 34px;
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(225, 29, 72, .1);
    color: #9f1239;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
}

.site-toast-close {
    display: inline-flex;
    width: 28px;
    height: 28px;
    min-height: 28px;
    flex: 0 0 28px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: currentColor;
    cursor: pointer;
    font-size: 21px;
    font-weight: 400;
    line-height: 1;
}

.site-toast-close:hover,
.site-toast-close:focus {
    border: 0;
    background: rgba(225, 29, 72, .1);
    outline: none;
}

.site-toast-close:focus-visible {
    outline: 3px solid rgba(225, 29, 72, .22);
}

.site-toast-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #14532d;
}

.site-toast-success::before {
    background: #16a34a;
    content: "✓";
}

.site-toast-success .site-toast-countdown {
    background: rgba(22, 163, 74, .12);
    color: #166534;
}

.site-toast-warning {
    border-color: #fde68a;
    background: #fffbeb;
    color: #78350f;
}

.site-toast-warning::before {
    background: #d97706;
}

.site-toast-warning .site-toast-countdown {
    background: rgba(217, 119, 6, .13);
    color: #92400e;
}

.site-toast-info {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1e3a8a;
}

.site-toast-info::before {
    background: #2563eb;
    content: "i";
}

.site-toast-info .site-toast-countdown {
    background: rgba(37, 99, 235, .12);
    color: #1d4ed8;
}

/* Login and signup keep their distinct approved compositions */
.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: linear-gradient(145deg, #2459da, #5237b9);
    color: #fff;
    font-size: 13px;
    letter-spacing: .03em;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: radial-gradient(circle at 15% 10%, rgba(74, 126, 222, .13), transparent 34%), linear-gradient(145deg, #edf4fc, #f8fbff 58%, #eef5fd);
}

.login-shell {
    display: grid;
    width: 100%;
    min-height: calc(100vh - 48px);
    place-items: center;
}

.login-card {
    width: min(100%, 460px);
    padding: 42px 44px;
    border: 1px solid #d8e3f0;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 65px rgba(30, 58, 98, .14);
}

.login-brand {
    margin-bottom: 30px;
}

.login-logo {
    display: block;
    width: min(260px, 76%);
    height: auto;
    margin: 0 auto 34px;
}

.login-heading {
    margin-bottom: 25px;
    text-align: center;
}

.login-heading .eyebrow {
    margin: 0 0 7px;
}

.login-card h1 {
    margin: 3px 0 8px;
    font-size: 30px;
    letter-spacing: -.025em;
}

.login-card .muted {
    margin: 0 0 20px;
}

.login-form {
    gap: 10px;
}

.login-form label {
    margin-top: 8px;
}

.login-form input {
    min-height: 46px;
    border-radius: 10px;
}

.login-forgot-link {
    justify-self: end;
    font-size: 13px;
    font-weight: 700;
}

.form-notice {
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid #d5dfec;
    border-radius: 9px;
    font-size: 14px;
    line-height: 1.45;
}

.form-notice.success {
    border-color: #b7e3cb;
    background: #edfaf3;
    color: #17613c;
}

.form-notice.error {
    border-color: #f1bfc3;
    background: #fff3f4;
    color: #9f2832;
}

.login-captcha {
    display: grid;
    min-height: 68px;
    margin: 11px 0 1px;
    place-items: center;
}

.login-submit {
    width: 100%;
    min-height: 48px;
    justify-self: stretch !important;
    margin-top: 16px !important;
    font-weight: 750;
}

.login-signup-link {
    margin: 25px 0 0 !important;
    text-align: center;
}

.login-signup-link a {
    font-weight: 700;
}

.signup-page {
    min-height: 100vh;
    background: #f7f9fc;
}

.signup-shell {
    display: grid;
    grid-template-columns: minmax(340px, 46%) minmax(420px, 54%);
    min-height: 100vh;
}

.signup-institutional {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 48px;
    padding: 52px clamp(36px, 6vw, 88px);
    overflow: hidden;
    background: radial-gradient(circle at 18% 8%, rgba(39, 194, 170, .18), transparent 34%), linear-gradient(145deg, #0b1325, #152747);
    color: #eef4ff;
}

.signup-brand {
    width: min(290px, 75%);
    height: auto;
}

.signup-institutional-copy {
    max-width: 520px;
    margin: auto 0;
}

.signup-institutional .eyebrow {
    color: #62dac8 !important;
}

.signup-institutional h2 {
    max-width: 520px;
    margin: 8px 0 18px;
    font-size: clamp(34px, 4.4vw, 62px);
    line-height: 1.04;
    letter-spacing: -.035em;
}

.signup-institutional p {
    color: #c4d1e6;
    font-size: 17px;
}

.signup-institutional ul {
    display: grid;
    gap: 13px;
    margin: 30px 0 0;
    padding: 0;
    list-style: none;
}

.signup-institutional li {
    position: relative;
    padding-left: 29px;
    color: #e3ebf7;
}

.signup-institutional li::before {
    position: absolute;
    top: 0;
    left: 0;
    color: #43ceb9;
    content: "✓";
    font-weight: 900;
}

.signup-form-panel {
    display: grid;
    padding: 40px clamp(24px, 6vw, 86px);
    place-items: center;
    background: #fff;
}

.signup-form-card {
    width: min(100%, 520px);
}

.signup-brand-mobile {
    display: none;
    width: 220px;
    height: auto;
    margin-bottom: 34px;
}

.signup-form-card h1 {
    margin: 5px 0 7px;
    font-size: 36px;
    line-height: 1.12;
    letter-spacing: -.025em;
}

.signup-form-card > .muted {
    margin: 0 0 27px;
}

.signup-form {
    gap: 15px;
}

.signup-code-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.secondary-button {
    white-space: nowrap;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 84px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    min-height: 32px;
    padding: 4px 8px;
    border: 0;
    background: transparent;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 700;
    transform: translateY(-50%);
}

.password-toggle:hover {
    border: 0;
    background: transparent;
}

.signup-captcha {
    display: grid;
    gap: 4px;
    min-height: 68px;
}

.signup-captcha[hidden] {
    display: none;
}

.signup-submit {
    width: 100%;
    min-height: 46px;
    justify-self: stretch !important;
    margin-top: 5px !important;
}

.signup-form-card .account-link {
    margin-top: 22px !important;
    text-align: center;
}

.alert {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 10px;
}

.alert.error {
    border: 1px solid #ffcbd0;
    background: #fff0f1;
    color: #8e2630;
}

.alert.success {
    border: 1px solid #bce8d1;
    background: #eaf8f1;
    color: #216644;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    border: 0;
    margin: -1px;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

/* Responsive behavior */
@media(max-width:1024px) {
    :root {
        --sidebar-width: 224px;
    }

    .content {
        padding: 34px 28px 54px;
    }

    .account-overview-grid {
        grid-template-columns: 1fr;
    }

    .product-overview-card {
        min-height: 320px;
    }

    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .two-columns {
        grid-template-columns: 1fr;
    }

    .account-shortcuts {
        grid-template-columns: 1fr 1fr;
    }
}

@media(max-width:900px) {
    .signup-shell {
        grid-template-columns: 1fr;
    }

    .signup-institutional {
        display: none;
    }

    .signup-form-panel {
        min-height: 100vh;
        padding: 32px 22px;
    }

    .signup-brand-mobile {
        display: block;
    }

    .signup-form-card h1 {
        font-size: 31px;
    }
}

@media(max-width:820px) {
    :root {
        --topbar-height: 64px;
    }

    .topbar {
        padding: 0 16px;
    }

    .brand img {
        width: 148px;
    }

    .brand-context {
        margin-left: 10px;
        padding-left: 10px;
    }

    .menu-button {
        display: inline-flex;
        min-height: 40px;
        margin-left: auto;
    }

    .app-shell {
        display: block;
    }

    .sidebar {
        top: var(--topbar-height);
        width: min(84vw, 300px);
        transform: translateX(-104%);
        transition: transform .22s ease;
        box-shadow: 14px 0 35px rgba(18, 34, 63, .14);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .navigation-backdrop {
        position: fixed;
        inset: var(--topbar-height) 0 0;
        z-index: 25;
        display: block;
        width: 100%;
        height: auto;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: rgba(12, 23, 42, .35);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }

    body.menu-open {
        overflow: hidden;
    }

    body.menu-open .navigation-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .content {
        width: 100%;
        max-width: none;
        padding: 28px 20px 48px;
    }
}

@media(max-width:720px) {
    .user-summary-copy {
        display: none;
    }

    .user-menu-identity {
        display: grid;
    }

    .page-header {
        margin-bottom: 23px;
    }

    .page-header h1,
    .error-state h1 {
        font-size: 28px;
    }

    .page-header > p:last-child {
        font-size: 15px;
    }

    .panel,
    .metric {
        padding: 20px;
    }

    .organization-switcher {
        align-items: stretch;
        flex-direction: column;
    }

    .organization-switcher select {
        width: 100%;
    }

    .account-shortcuts,
    .metric-grid {
        grid-template-columns: 1fr;
    }

    .product-overview-card,
    .organization-card {
        min-height: 0;
    }

    .product-overview-card .primary-button,
    .provider-card .primary-button {
        width: 100%;
    }

    .list-row {
        grid-template-columns: 1fr;
    }

    .action-row {
        align-items: stretch;
        flex-direction: column;
    }

    .action-row form,
    .action-row button {
        width: 100%;
    }

    .onboarding-progress {
        grid-template-columns: 56px minmax(0, 1fr);
        padding: 22px;
    }

    .onboarding-visual {
        width: 54px;
        height: 54px;
        border-radius: 16px;
    }

    .onboarding-visual::before,
    .onboarding-visual::after {
        inset: 12px;
    }

    .onboarding-success .onboarding-visual::before {
        top: 18px;
        left: 17px;
        width: 21px;
        height: 11px;
    }

    .onboarding-failed .onboarding-visual::before,
    .onboarding-failed .onboarding-visual::after {
        top: 25px;
        left: 14px;
        width: 26px;
    }

    .site-toast-region {
        top: max(12px, env(safe-area-inset-top));
        right: 12px;
        left: 12px;
        width: auto;
    }

    .site-toast {
        gap: 10px;
        padding: 12px;
    }

    .site-toast-countdown {
        min-width: 32px;
        padding: 4px 7px;
    }
}

@media(max-width:640px) {
    .signup-code-row {
        grid-template-columns: 1fr;
    }

    .signup-code-row .secondary-button {
        width: 100%;
    }
}

@media(max-width:520px) {
    .login-page {
        padding: 16px;
    }

    .login-shell {
        min-height: calc(100vh - 32px);
    }

    .login-card {
        padding: 32px 24px;
        border-radius: 18px;
    }

    .login-logo {
        margin-bottom: 28px;
    }

    .login-card h1 {
        font-size: 27px;
    }

    .channel-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .channel-card {
        gap: 11px;
        min-height: 158px;
        padding: 13px;
    }

    .channel-card-top {
        align-items: flex-start;
        gap: 6px;
    }

    .channel-logo-frame {
        width: 66px;
        height: 44px;
    }

    .channel-logo-frame img {
        max-width: 62px;
        max-height: 38px;
    }

    .channel-card .status {
        padding: 5px 7px;
        font-size: 10px;
    }

    .channel-card h3 {
        font-size: 15px;
    }

    .channel-card .primary-button {
        min-height: 42px;
        padding: 8px;
        font-size: 12px;
    }
}

@media(max-width:350px) {
    .channel-grid {
        grid-template-columns: 1fr;
    }
}

@media(max-width:430px) {
    .topbar {
        gap: 8px;
        padding: 0 12px;
    }

    .brand img {
        width: 132px;
    }

    .brand-context,
    .menu-button > span:last-child,
    .user-menu-chevron {
        display: none;
    }

    .topbar-actions {
        gap: 7px;
    }

    .menu-button {
        width: 40px;
        padding: 8px;
    }

    .user-menu summary {
        padding: 3px;
    }

    .content {
        padding: 24px 14px 42px;
    }

    .panel,
    .metric,
    .profile-card,
    .product-overview-card,
    .form-card {
        padding: 18px;
    }

    .detail-list div {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .provider-card {
        min-height: 300px;
    }

    .form-card-heading {
        gap: 11px;
    }

    .onboarding-progress {
        grid-template-columns: 1fr;
    }

    .onboarding-visual {
        grid-row: auto;
    }

    .onboarding-steps,
    .onboarding-status-action {
        grid-column: 1;
    }

    .onboarding-status-action .primary-button {
        width: 100%;
    }

    .session-card dl div {
        grid-template-columns: 1fr;
        gap: 1px;
    }
}

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

.account-secondary-card {
    margin-top: 22px;
}

.internal-primary-card {
    max-width: 760px;
}

.button-row,
.support-pagination {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.instance-health-summary,
.instance-health-check-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.instance-health-summary h2,
.instance-health-check h2 {
    margin: 0;
    font-size: 18px;
}

.instance-health-summary p,
.instance-health-check p {
    margin: 5px 0 0;
}

.instance-health-correlation {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.instance-health-correlation span,
.instance-health-requirement {
    color: var(--color-muted);
    font-size: 13px;
}

.operational-instance-grid {
    display: grid;
    gap: 1rem;
}

.operational-summary-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: .65rem;
    margin: 1rem 0;
}

.operational-summary-list div,
.configuration-health-item {
    border: 1px solid var(--color-border);
    border-radius: .65rem;
    padding: .75rem;
}

.operational-summary-list dt {
    color: var(--color-muted);
    font-size: .8rem;
}

.operational-summary-list dd {
    font-weight: 700;
    margin: .25rem 0 0;
}

.configuration-health-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: .75rem;
    margin-top: 1rem;
}

.configuration-health-item {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.health-category-heading {
    margin-top: 1.5rem;
}

.instance-health-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.instance-health-check {
    padding: 18px 20px;
}

.instance-health-check.fail {
    border-color: #efb8b8;
    box-shadow: inset 4px 0 0 #c93f3f;
}

.instance-health-check code,
.instance-health-correlation code {
    overflow-wrap: anywhere;
}

.operational-overview {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
    padding: 24px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-large);
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
}

.operational-overview.active { border-color: #8acda4; background: #f0fbf4; }
.operational-overview.blocked { border-color: #e4a3a3; background: #fff4f4; }
.operational-overview.pending { border-color: #e6c575; background: #fffaf0; }
.operational-overview h2,
.platform-health-card h2 { margin: 0; }
.operational-overview p { margin: 3px 0; }

.operational-overview-icon,
.health-card-icon {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e8edf5;
    color: var(--color-muted);
    font-size: 24px;
    font-weight: 800;
}

.active > .health-card-icon,
.health-card-icon.active,
.health-modal-state.active span,
.health-chain-icon.active { background: #dff5e7; color: #19723b; }
.blocked > .health-card-icon,
.health-modal-state.blocked span,
.health-chain-icon.blocked { background: #fde1e1; color: #a92d2d; }
.pending > .health-card-icon,
.health-modal-state.pending span,
.health-chain-icon.pending { background: #fff0c8; color: #8b6100; }

.all-operational { display: inline-block; margin-top: 6px; color: #19723b; font-size: 18px; }

.platform-health-card {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 16px 0;
}
.platform-health-card .status { margin-left: auto; }

.operational-instance-card.blocked { border-color: #efb8b8; }
.operational-instance-card.pending { border-color: #ead18c; }

.operational-component-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px;
    margin: 18px 0;
}

.operational-component-card,
.configuration-health-item,
.instance-health-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface);
    color: var(--color-ink);
    text-align: left;
    cursor: pointer;
    box-shadow: none;
}

.operational-component-card { padding: 14px; }
.operational-component-card:hover,
.configuration-health-item:hover,
.instance-health-check:hover { border-color: var(--color-primary); transform: translateY(-1px); }
.operational-component-card.blocked,
.configuration-health-item.blocked,
.instance-health-check.blocked { border-color: #efb8b8; box-shadow: inset 4px 0 0 #c93f3f; }
.operational-component-card.pending,
.instance-health-check.pending { border-color: #ead18c; box-shadow: inset 4px 0 0 #c6921d; }

.health-card-copy,
.configuration-health-item > span:last-child {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 3px;
}
.health-card-copy strong,
.configuration-health-item strong { font-size: 15px; }
.health-card-copy small,
.configuration-health-item small { color: var(--color-muted); line-height: 1.4; }
.status-text { color: var(--color-muted); font-size: 13px; font-weight: 800; }

.health-modal {
    width: min(720px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    padding: 0;
    border: 0;
    border-radius: var(--radius-large);
    background: var(--color-surface);
    color: var(--color-ink);
    box-shadow: var(--shadow-floating);
}
.health-modal::backdrop { background: rgba(16, 29, 52, .62); }
.health-modal[open] { display: flex; flex-direction: column; }
.health-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--color-border);
}
.health-modal-header h2 { margin: 0; }
.health-modal-close {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: var(--color-canvas);
    color: var(--color-ink);
    font-size: 24px;
    cursor: pointer;
}
.health-modal-body { flex: 1 1 auto; padding: 22px; overflow-y: auto; }
.health-modal-footer {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 22px;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
}
.health-modal-state { display: flex; align-items: center; gap: 9px; margin-top: 0; }
.health-modal-state span,
.health-chain-icon { display: inline-grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; font-weight: 800; }

.health-human-details,
.health-technical-details dl { display: grid; gap: 12px; margin: 18px 0 0; }
.health-human-details div,
.health-technical-details dl div { padding: 12px 14px; border-radius: 10px; background: var(--color-canvas); }
.health-human-details dt,
.health-technical-details dt { color: var(--color-muted); font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.health-human-details dd,
.health-technical-details dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.health-human-details .health-action { border-left: 4px solid var(--color-primary); background: var(--color-primary-soft); }
.health-chain { margin-top: 20px; }
.health-chain h3 { margin-bottom: 8px; }
.health-chain p { display: flex; align-items: center; gap: 8px; margin: 7px 0; }
.health-chain small { margin-left: auto; color: var(--color-muted); }
.health-chain-check {
    margin: 8px 0;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: #fff;
}
.health-chain-check.blocked { border-color: #efb8b8; }
.health-chain-check > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}
.health-chain-check > summary small { margin-left: auto; }
.health-chain-check-body { padding: 0 14px 14px; }
.health-chain-check-body pre,
.health-action pre {
    margin: 10px 0;
    padding: 11px 13px;
    overflow-x: auto;
    border-radius: 8px;
    background: #132039;
    color: #f5f8ff;
    white-space: pre-wrap;
}
.health-location,
.health-problem-list,
.health-worker-list { margin-top: 22px; }
.health-worker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px 16px;
    margin: 10px 0;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    background: var(--color-canvas);
}
.health-worker.blocked { border-color: #efb8b8; box-shadow: inset 4px 0 0 #c93f3f; }
.health-worker.pending { border-color: #ead18c; box-shadow: inset 4px 0 0 #c6921d; }
.health-worker > div { display: grid; gap: 3px; }
.health-worker > div small { color: var(--color-muted); }
.health-worker dl {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}
.health-worker dl div { padding: 9px 10px; border-radius: 8px; background: #fff; }
.health-worker dt,
.health-inline-location dt { color: var(--color-muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.health-worker dd,
.health-inline-location dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.health-inline-location { display: grid; gap: 8px; margin: 0 0 12px; }
.platform-component-grid { margin: 14px 0 24px; }
.health-stage-list,
.health-remediation { margin-top: 22px; }
.health-stage {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    margin: 8px 0;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-canvas);
}
.health-stage.blocked { border-color: #efb8b8; }
.health-stage.pending { border-color: #ead18c; }
.health-stage small { display: block; margin-top: 2px; color: var(--color-muted); }
.health-stage p { margin: 6px 0 0; }
.health-remediation-blocked {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid #efb8b8;
    border-radius: 10px;
    background: #fff4f4;
    color: #742323;
}
.health-remediation-blocked p { margin: 7px 0 0; }
.health-validation-step {
    margin-top: 12px;
    padding-top: 4px;
    border-top: 1px solid var(--color-border);
}
.health-validation-step p { margin: 8px 0; }
.health-remediation pre {
    padding: 11px 13px;
    overflow-x: auto;
    border-radius: 8px;
    background: #132039;
    color: #f5f8ff;
    white-space: pre-wrap;
}
.health-technical-details { margin-top: 20px; border-top: 1px solid var(--color-border); padding-top: 14px; }
.health-technical-details summary { color: var(--color-primary); cursor: pointer; font-weight: 800; }

.support-search-panel {
    margin-bottom: 20px;
}

.support-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, .3fr) auto;
    align-items: end;
    gap: 14px;
}

.support-status-field {
    min-width: 180px;
}

.support-client-list {
    display: grid;
    gap: 12px;
}

.support-client-card {
    display: grid;
    gap: 12px;
    padding: 18px 20px;
}

.support-client-card.has-error {
    border-color: #efb8b8;
    box-shadow: inset 4px 0 0 #c93f3f;
}

.support-client-main,
.support-client-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.support-client-identity h2 {
    margin: 0 0 3px;
    font-size: 18px;
}

.support-client-identity p {
    margin: 0;
    color: var(--color-muted);
    font-size: 13px;
}

.support-client-identity .support-client-alert {
    margin-bottom: 4px;
    color: #a62f2f;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.support-progress {
    display: grid;
    width: min(430px, 55vw);
    grid-template-columns: auto minmax(140px, 1fr);
    align-items: center;
    gap: 8px;
}

.support-progress strong {
    font-size: 12px;
    white-space: nowrap;
}

.support-progress-bar {
    overflow: hidden;
    height: 9px;
    border-radius: 999px;
    background: #e6ebf3;
}

.support-progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--color-primary);
}

.support-step-details {
    color: var(--color-muted);
    font-size: 13px;
}

.support-step-details summary {
    width: max-content;
    cursor: pointer;
    font-weight: 700;
}

.support-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 18px;
    margin: 0;
    padding: 0;
    list-style: none;
    margin-top: 10px;
    color: var(--color-muted);
}

.support-steps li {
    display: flex;
    gap: 8px;
}

.support-steps li.complete {
    color: var(--color-ink);
}

.support-steps li.complete span {
    color: #248158;
}

.support-pagination {
    justify-content: center;
    margin-top: 22px;
}

@media(max-width:680px) {
    .support-search-form,
    .support-steps {
        grid-template-columns: 1fr;
    }

    .support-client-main,
    .support-client-actions,
    .instance-health-summary,
    .instance-health-check-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .instance-health-list {
        grid-template-columns: 1fr;
    }

    .support-progress {
        width: 100%;
        grid-template-columns: 1fr;
    }
}

.marketplace-action-grid {
    display: grid;
    grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
    gap: 18px;
}

.marketplace-action-card {
    display: flex;
    min-height: 285px;
    flex-direction: column;
    padding: 24px;
}

.marketplace-action-card .product-card-heading {
    margin-bottom: 20px;
}

.marketplace-action-card h2 {
    margin: 6px 0 8px;
    font-size: 22px;
}

.marketplace-action-card > p:not(.card-kicker) {
    margin: 0 0 22px;
    color: var(--color-muted);
}

.marketplace-action-card .primary-button,
.marketplace-action-card .secondary-button {
    align-self: flex-start;
    margin-top: auto;
}

.marketplace-admin-card {
    background: linear-gradient(145deg, #ffffff 0%, #f1fbf6 100%);
}

@media(max-width:800px) {
    .marketplace-action-grid {
        grid-template-columns: 1fr;
    }

    .marketplace-action-card {
        min-height: 250px;
    }
}
