:root {
    color-scheme: light;
    --bg: #f5f7f8;
    --surface: #ffffff;
    --surface-alt: #f9fafb;
    --ink: #111827;
    --muted: #667085;
    --muted-2: #98a2b3;
    --line: #d0d5dd;
    --line-soft: #eaecf0;
    --primary: #0f766e;
    --primary-dark: #115e59;
    --primary-soft: #ecfdf5;
    --nav: #101828;
    --nav-2: #182230;
    --danger: #b42318;
    --success: #067647;
    --warning: #b54708;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
    min-height: 100%;
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--ink);
    font-size: 14px;
}

a { color: inherit; text-decoration: none; }

.shell {
    width: min(1480px, calc(100% - 24px));
    margin: 0 auto;
    padding: 12px 0 32px;
}

.app-layout {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.sidebar {
    position: sticky;
    top: 12px;
    min-height: calc(100vh - 24px);
    padding: 14px;
    background: var(--nav);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    margin-bottom: 16px;
    padding: 0 4px;
    color: #fff;
}

.brand span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 7px;
    background: var(--primary);
    font-size: 13px;
    font-weight: 800;
}

.brand strong { font-size: 15px; }

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

.sidebar nav a {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 9px 10px;
    border-radius: 6px;
    color: #d0d5dd;
    font-weight: 700;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: var(--nav-2);
    color: #fff;
}

.content {
    min-width: 0;
    display: grid;
    gap: 14px;
}

.app-header,
.hero-panel,
.page-head {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.app-header {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
}

.app-header h1,
.hero-panel h1,
.page-head h1 {
    margin: 0;
    font-size: 22px;
    line-height: 1.25;
    letter-spacing: 0;
}

.app-header p,
.hero-panel p,
.page-head p {
    margin: 3px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.eyebrow {
    display: block;
    margin-bottom: 3px;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.hero-panel,
.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
}

.hero-panel span,
.page-head span {
    display: block;
    margin-top: 7px;
    max-width: 820px;
    color: var(--muted);
    line-height: 1.5;
}

.primary-action,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 9px 13px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.primary-action:hover,
button:hover { background: var(--primary-dark); }

.metrics,
.grid,
.integration-grid {
    display: grid;
    gap: 12px;
}

.metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.integration-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

article,
.table-wrap,
.login-panel,
.integration-card {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.metrics article { padding: 15px; }

.metrics span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.metrics strong {
    font-size: 28px;
    line-height: 1;
}

.grid article,
.integration-card { padding: 16px; }

.grid h2,
.integration-card h2 {
    margin: 0 0 6px;
    font-size: 16px;
}

.grid p,
.integration-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.scope-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 14px 0;
}

.scope-row span {
    padding: 4px 8px;
    border: 1px solid #c7d7fe;
    border-radius: 999px;
    background: #eef4ff;
    color: #3538cd;
    font-size: 12px;
    font-weight: 800;
}

.connector-form { display: grid; gap: 11px; }

.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
}

th,
td {
    text-align: left;
    padding: 11px 13px;
    border-bottom: 1px solid var(--line-soft);
    white-space: nowrap;
}

th {
    background: var(--surface-alt);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
}

tbody tr:hover { background: #fcfcfd; }

.status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--success);
    font-size: 12px;
    font-weight: 800;
}

.status-idle {
    background: #f2f4f7;
    color: #475467;
}

.status-ok {
    background: var(--primary-soft);
    color: var(--success);
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: #eef3f2;
}

.login-panel {
    width: min(430px, calc(100% - 32px));
    padding: 24px;
}

.login-panel h1 {
    margin: 0 0 18px;
    font-size: 26px;
}

label {
    display: block;
    margin: 0;
    color: #475467;
    font-size: 13px;
    font-weight: 800;
}

input {
    display: block;
    width: 100%;
    min-height: 38px;
    margin-top: 6px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

input:focus {
    outline: 3px solid rgba(15, 118, 110, .15);
    border-color: var(--primary);
}

input[readonly] { background: var(--surface-alt); }

small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-weight: 400;
}

.notice,
.error {
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.notice.success {
    color: var(--success);
    background: var(--primary-soft);
    border: 1px solid #abefc6;
}

.error,
.notice.error {
    color: var(--danger);
    background: #fef3f2;
    border: 1px solid #fecdca;
}

.mfa-panel { width: min(480px, calc(100% - 32px)); }

.helper-text {
    color: var(--muted);
    line-height: 1.5;
    margin: 0 0 16px;
}

.qr-box {
    display: grid;
    place-items: center;
    padding: 16px;
    margin-bottom: 14px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-alt);
}

.qr-box img {
    width: 220px;
    height: 220px;
}

@media (max-width: 1050px) {
    .app-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; min-height: auto; }
    .sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .metrics,
    .grid,
    .integration-grid { grid-template-columns: 1fr; }
    .hero-panel,
    .page-head,
    .app-header { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 560px) {
    .shell { width: min(100% - 16px, 1480px); }
    .sidebar nav { grid-template-columns: 1fr; }
    .hero-panel,
    .page-head,
    .integration-card,
    .grid article { padding: 14px; }
    .app-header h1,
    .hero-panel h1,
    .page-head h1 { font-size: 20px; }
    .card-head { flex-direction: column; }
}

.app-header span:not(.eyebrow) {
    display: block;
    margin-top: 7px;
    max-width: 820px;
    color: var(--muted);
    line-height: 1.5;
}

.filter-bar,
.result-head {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr .6fr auto;
    gap: 12px;
    align-items: end;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.result-head {
    grid-template-columns: 1fr auto;
    align-items: center;
}

.result-head h2 {
    margin: 0 0 4px;
    font-size: 16px;
}

.result-head p {
    margin: 0;
    color: var(--muted);
}

select {
    display: block;
    width: 100%;
    min-height: 38px;
    margin-top: 6px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

@media (max-width: 1050px) {
    .filter-bar,
    .result-head {
        grid-template-columns: 1fr;
    }
}

.scope-checks {
    display: grid;
    gap: 7px;
    padding: 10px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-alt);
}

.scope-checks label,
.rotate-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.scope-checks input[type="checkbox"],
.connector-form input[type="checkbox"] {
    width: auto;
    min-height: auto;
    margin: 0;
}

.rotate-form {
    margin-top: 12px;
}

/* Enterprise policy UI */
.portal-page { gap: 16px; }

.page-toolbar .primary-action { min-width: 170px; }

.status-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.status-strip article {
    padding: 14px 16px;
    border-left: 3px solid var(--primary);
}

.status-strip span {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.status-strip strong {
    display: block;
    font-size: 24px;
    line-height: 1.1;
}

.management-panel,
.client-card,
.secret-result {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.management-panel { padding: 18px; }

.panel-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line-soft);
}

.panel-title h2,
.client-card h2 {
    margin: 0 0 4px;
    font-size: 18px;
}

.panel-title p,
.client-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.policy-form {
    display: grid;
    gap: 16px;
}

.policy-form.compact { gap: 13px; }

.form-grid {
    display: grid;
    gap: 12px;
}

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

.policy-section {
    display: grid;
    gap: 10px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.section-head h3 {
    margin: 0;
    font-size: 14px;
}

.section-head span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.option-grid {
    display: grid;
    gap: 10px;
}

.option-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.option-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.option-grid.sources { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.option-tile {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    min-height: 76px;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.option-tile:hover {
    border-color: #99c7c1;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .08);
}

.option-tile input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 1px 0 0;
    accent-color: var(--primary);
}

.option-tile strong {
    display: block;
    margin-bottom: 3px;
    color: var(--ink);
    font-size: 13px;
}

.option-tile small {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.35;
}

.option-tile:has(input:checked) {
    border-color: var(--primary);
    background: #f0fdfa;
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, .18);
}

.source-tile { padding-bottom: 34px; }

.source-tile em {
    position: absolute;
    right: 10px;
    bottom: 9px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #475467;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}

.source-tile.is-online em {
    background: var(--primary-soft);
    color: var(--success);
}

.source-tile.is-offline { opacity: .82; }

.compact-section { gap: 8px; }
.compact-options { gap: 8px; }

.compact-tile {
    min-height: 46px;
    padding: 9px 10px;
    align-items: center;
}

.compact-tile small { display: none; }
.compact-tile.source-tile { padding-bottom: 9px; grid-template-columns: auto minmax(0, 1fr) auto; }
.compact-tile.source-tile em { position: static; align-self: center; }

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 2px;
}

.switch-row {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    color: var(--ink);
}

.switch-row input[type="checkbox"] {
    width: 34px;
    height: 20px;
    min-height: 20px;
    margin: 0;
    accent-color: var(--primary);
}

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

.client-card { padding: 16px; }

.client-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line-soft);
}

.client-card-head p {
    max-width: 680px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
}

.client-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.client-meta span {
    padding: 4px 8px;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    background: var(--surface-alt);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.secret-result {
    padding: 14px;
    border-color: #abefc6;
    background: #f0fdf4;
}

.secret-result strong { display: block; margin-bottom: 10px; color: var(--success); }
.secret-result dl { display: grid; gap: 7px; margin: 0; }
.secret-result dt { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.secret-result dd {
    margin: 0;
    padding: 8px 10px;
    border: 1px solid #abefc6;
    border-radius: 6px;
    background: #fff;
    font-family: Consolas, "Courier New", monospace;
    overflow-wrap: anywhere;
}

.slim-action {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line-soft);
}

.slim-action button {
    width: 100%;
    background: #344054;
}

.slim-action button:hover { background: #1d2939; }

@media (max-width: 1200px) {
    .option-grid.sources { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .client-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .status-strip,
    .form-grid.two,
    .option-grid.three,
    .option-grid.two,
    .option-grid.sources { grid-template-columns: 1fr; }
    .form-actions,
    .panel-title { align-items: stretch; flex-direction: column; }
    .form-actions button { width: 100%; }
}
.integrations-overview {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.source-status-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 74px;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.source-status-card strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.source-status-card span {
    color: var(--muted);
    font-size: 12px;
}

.source-status-card em {
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #475467;
    font-size: 11px;
    font-style: normal;
    font-weight: 800;
}

.source-status-card.is-online {
    border-color: #abefc6;
    background: #f6fef9;
}

.source-status-card.is-online em {
    background: var(--primary-soft);
    color: var(--success);
}

@media (max-width: 1200px) {
    .integrations-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .integrations-overview { grid-template-columns: 1fr; }
}
/* API documentation */
.docs-filter {
    grid-template-columns: minmax(260px, 1fr) auto;
}

.doc-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 14px;
    align-items: start;
}

.doc-main,
.doc-side article {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.doc-main { padding: 18px; }

.doc-title {
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line-soft);
}

.doc-title h2 {
    margin: 0 0 5px;
    font-size: 22px;
}

.doc-title p { margin: 0; color: var(--muted); }

.doc-block {
    display: grid;
    gap: 10px;
    padding: 16px 0;
    border-top: 1px solid var(--line-soft);
}

.doc-block:first-of-type { border-top: 0; padding-top: 0; }

.doc-block h3 {
    margin: 0;
    font-size: 16px;
}

.doc-block p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.code-panel {
    overflow-x: auto;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #101828;
}

.code-panel pre {
    margin: 0;
    padding: 13px;
    color: #f9fafb;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.55;
}

.doc-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.doc-chip-row span,
.meta-link {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #eef4ff;
    color: #3538cd;
    font-size: 12px;
    font-weight: 800;
}

.meta-link {
    background: var(--primary-soft);
    color: var(--success);
}

.endpoint-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 13px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-alt);
}

.endpoint-card strong { font-size: 14px; }
.endpoint-card p { margin-top: 3px; }
.endpoint-card code {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    background: #fff;
    overflow-x: auto;
    white-space: nowrap;
}
.endpoint-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.doc-side {
    position: sticky;
    top: 12px;
    display: grid;
    gap: 10px;
}

.doc-side article {
    padding: 13px;
}

.doc-side span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.doc-side strong {
    display: block;
    font-size: 17px;
}

@media (max-width: 1050px) {
    .doc-layout,
    .docs-filter { grid-template-columns: 1fr; }
    .doc-side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
    .doc-side { grid-template-columns: 1fr; }
}

@media print {
    .sidebar,
    .page-toolbar .primary-action,
    .docs-filter { display: none; }
    .app-layout,
    .doc-layout { display: block; }
    .shell { width: 100%; padding: 0; }
    .doc-main { border: 0; box-shadow: none; }
    .doc-side { display: none; }
}
/* Lift Exchange high-end dark portal skin based on supplied app.css */
:root {
    color-scheme: dark;
    --bg: #080b12;
    --surface: rgba(16, 23, 37, .88);
    --surface-alt: #0b1220;
    --ink: #eef5ff;
    --muted: #95a3b8;
    --muted-2: #6f7f98;
    --line: #22314a;
    --line-soft: #22314a;
    --primary: #62d4ff;
    --primary-dark: #36b8ec;
    --primary-soft: rgba(98, 212, 255, .12);
    --nav: rgba(7, 10, 17, .78);
    --nav-2: #172136;
    --danger: #ff6b7a;
    --success: #62d4ff;
    --warning: #ffbf69;
    --shadow: 0 18px 70px rgba(0, 0, 0, .34);
    --brand2: #7c5cff;
}

html { background: #080b12; }

body {
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(23, 54, 93, .96), rgba(8, 11, 18, .98) 42%),
        linear-gradient(180deg, #080b12, #050914);
    color: var(--ink);
}

.shell {
    width: min(1540px, calc(100% - 40px));
    padding: 18px 0 40px;
}

.app-layout {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 20px;
}

.sidebar {
    top: 18px;
    min-height: calc(100vh - 36px);
    padding: 22px;
    background: var(--nav);
    border-color: var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.brand {
    height: auto;
    margin-bottom: 28px;
    padding: 0;
    gap: 12px;
}

.brand span {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--brand2));
    color: #06111f;
    box-shadow: 0 10px 30px rgba(98, 212, 255, .22);
}

.brand strong {
    color: #fff;
    font-size: 16px;
}

.sidebar nav { gap: 7px; }

.sidebar nav a {
    min-height: 43px;
    padding: 11px 13px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: #c4d0e2;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: #172136;
    border-color: var(--line);
    color: var(--ink);
}

.content { gap: 18px; }

.app-header,
.hero-panel,
.page-head,
article,
.table-wrap,
.login-panel,
.integration-card,
.management-panel,
.client-card,
.secret-result,
.doc-main,
.doc-side article,
.filter-bar,
.result-head,
.source-status-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.app-header {
    min-height: 82px;
    padding: 20px 22px;
}

.app-header h1,
.hero-panel h1,
.page-head h1 {
    color: var(--ink);
    font-size: 28px;
}

.app-header p,
.hero-panel p,
.page-head p,
.grid p,
.integration-card p,
.panel-title p,
.client-card p,
.doc-block p,
.result-head p {
    color: var(--muted);
}

.eyebrow {
    color: var(--primary);
    letter-spacing: .08em;
}

.metrics,
.grid,
.integration-grid,
.status-strip,
.client-grid {
    gap: 16px;
}

.metrics article,
.grid article,
.integration-card,
.management-panel,
.client-card,
.status-strip article,
.doc-main {
    padding: 20px;
}

.metrics strong,
.status-strip strong {
    color: var(--ink);
    font-size: 34px;
}

.grid h2,
.integration-card h2,
.panel-title h2,
.client-card h2,
.result-head h2,
.doc-title h2 {
    color: var(--ink);
}

button,
.primary-action,
.btn {
    min-height: 42px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), #b4efff);
    color: #05111f;
    font-weight: 900;
    box-shadow: 0 10px 30px rgba(98, 212, 255, .18);
}

button:hover,
.primary-action:hover,
.btn:hover {
    background: linear-gradient(135deg, #8be2ff, #ffffff);
    color: #05111f;
}

.slim-action button,
.btn.secondary {
    background: #172136;
    color: var(--ink);
    border: 1px solid var(--line);
    box-shadow: none;
}

.slim-action button:hover,
.btn.secondary:hover {
    background: #1d2a42;
}

input,
select,
textarea {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #0b1220;
    color: var(--ink);
    padding: 12px 14px;
}

input::placeholder { color: #708199; }

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(98, 212, 255, .18);
    border-color: var(--primary);
}

input[readonly] { background: #0d1525; }

label { color: #c2cee0; }

small,
.helper-text { color: var(--muted); }

.scope-row span,
.status,
.doc-chip-row span,
.meta-link,
.client-meta span,
.pill {
    border: 1px solid #315076;
    background: #132035;
    color: #bfefff;
    border-radius: 999px;
}

.status-ok,
.source-status-card.is-online em,
.source-tile.is-online em,
.meta-link {
    background: rgba(98, 212, 255, .12);
    color: #bfefff;
}

.status-idle,
.source-status-card em,
.source-tile em,
.client-meta span {
    background: #172136;
    color: #b8c5d8;
}

.source-status-card.is-online,
.option-tile:has(input:checked),
.secret-result {
    border-color: rgba(98, 212, 255, .45);
    background: rgba(19, 32, 53, .88);
}

.option-tile,
.endpoint-card,
.scope-checks,
.qr-box {
    border-color: var(--line);
    border-radius: 16px;
    background: #0b1220;
    color: var(--ink);
}

.option-tile:hover {
    border-color: rgba(98, 212, 255, .75);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .26);
}

.option-tile strong,
.endpoint-card strong,
.doc-side strong {
    color: var(--ink);
}

.option-tile small,
.endpoint-card span,
.doc-side span,
.section-head span {
    color: var(--muted);
}

.option-tile input[type="checkbox"],
.switch-row input[type="checkbox"],
.scope-checks input[type="checkbox"],
.connector-form input[type="checkbox"] {
    accent-color: var(--primary);
}

.table-wrap,
table {
    background: var(--surface);
}

th {
    background: #0b1220;
    color: #b8c5d8;
    border-bottom-color: var(--line);
}

td {
    color: var(--ink);
    border-bottom-color: var(--line);
}

tbody tr:hover { background: rgba(98, 212, 255, .06); }

.notice.success {
    color: #bfefff;
    background: rgba(98, 212, 255, .12);
    border-color: rgba(98, 212, 255, .42);
}

.error,
.notice.error {
    color: #ffd4d9;
    background: rgba(255, 107, 122, .1);
    border-color: rgba(255, 107, 122, .42);
}

.login-panel,
.login-card {
    width: min(500px, calc(100% - 32px));
    padding: 32px;
    border-radius: 28px;
}

.auth-page {
    background:
        radial-gradient(circle at top left, rgba(23, 54, 93, .96), rgba(8, 11, 18, .98) 42%),
        #080b12;
}

.code-panel {
    border-color: var(--line);
    background: #050914;
}

.code-panel pre,
.endpoint-card code,
.secret-result dd {
    color: var(--ink);
    background: #050914;
    border-color: var(--line);
}

.doc-side { top: 18px; }

@media (max-width: 1050px) {
    .shell { width: min(100% - 24px, 1540px); }
    .app-layout { grid-template-columns: 1fr; }
    .sidebar { min-height: auto; position: static; }
}

@media (max-width: 560px) {
    .shell { width: min(100% - 16px, 1540px); }
    .app-header h1,
    .hero-panel h1,
    .page-head h1 { font-size: 23px; }
}
/* Full portal completion layer */
.command-header {
    align-items: flex-start;
    overflow: hidden;
    position: relative;
}

.command-header::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -90px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(98, 212, 255, .18), transparent 62%);
    pointer-events: none;
}

.header-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.secondary-action {
    background: #172136;
    border: 1px solid var(--line);
    color: var(--ink);
    box-shadow: none;
}

.secondary-action:hover { background: #1d2a42; color: var(--ink); }

.command-metrics article {
    position: relative;
    min-height: 128px;
    overflow: hidden;
}

.command-metrics article::after {
    content: "";
    position: absolute;
    right: 16px;
    bottom: 16px;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(98, 212, 255, .2), rgba(124, 92, 255, .18));
}

.command-metrics small {
    display: block;
    margin-top: 10px;
    color: var(--muted);
    font-weight: 700;
}

.operations-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, .75fr);
    gap: 16px;
    align-items: stretch;
}

.operation-panel {
    padding: 20px;
    min-width: 0;
}

.compact-title {
    margin-bottom: 14px;
    padding-bottom: 14px;
}

.source-board {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.source-board-item {
    display: grid;
    gap: 6px;
    min-height: 112px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #0b1220;
    transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.source-board-item:hover {
    transform: translateY(-1px);
    border-color: rgba(98, 212, 255, .65);
    background: #101a2d;
}

.source-board-item strong { color: var(--ink); font-size: 14px; }
.source-board-item span { color: var(--muted); font-size: 12px; font-weight: 800; }
.source-board-item em {
    align-self: end;
    justify-self: start;
    padding: 4px 8px;
    border-radius: 999px;
    background: #172136;
    color: #b8c5d8;
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
}

.source-board-item.is-online {
    border-color: rgba(98, 212, 255, .42);
    background: rgba(19, 32, 53, .9);
}

.source-board-item.is-online em {
    background: rgba(98, 212, 255, .12);
    color: #bfefff;
}

.quick-actions {
    display: grid;
    gap: 10px;
}

.quick-actions a {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #0b1220;
}

.quick-actions a:hover { border-color: rgba(98, 212, 255, .65); background: #101a2d; }
.quick-actions strong {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--brand2));
    color: #06111f;
}
.quick-actions span { color: var(--ink); font-weight: 900; }

.lower-grid { align-items: start; }

.activity-list {
    display: grid;
    gap: 8px;
}

.activity-row {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr) auto 150px;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.activity-row:last-child { border-bottom: 0; }
.activity-row span,
.activity-row em {
    padding: 4px 8px;
    border-radius: 999px;
    background: #132035;
    color: #bfefff;
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
    text-align: center;
}
.activity-row strong {
    overflow: hidden;
    color: var(--ink);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.activity-row small { color: var(--muted); text-align: right; }
.empty-state { margin: 0; color: var(--muted); }

.security-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.security-stack span {
    padding: 8px 10px;
    border: 1px solid #315076;
    border-radius: 999px;
    background: #132035;
    color: #bfefff;
    font-size: 12px;
    font-weight: 900;
}

.connector-form,
.policy-form,
form:not(.filter-bar):not(.rotate-form):not(.slim-action) {
    gap: 14px;
}

.connector-form button,
.policy-form button {
    justify-self: start;
    min-width: 180px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #080b12; }
::-webkit-scrollbar-thumb { background: #22314a; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #315076; }

@media (max-width: 1300px) {
    .source-board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .operations-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .header-actions { width: 100%; justify-content: stretch; }
    .header-actions a { flex: 1 1 180px; }
    .source-board { grid-template-columns: 1fr; }
    .activity-row { grid-template-columns: 1fr; align-items: start; }
    .activity-row span,
    .activity-row em { justify-self: start; }
    .activity-row small { text-align: left; }
}
/* Auth polish */
.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.auth-brand span {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--primary), var(--brand2));
    color: #06111f;
    font-weight: 900;
    box-shadow: 0 10px 30px rgba(98, 212, 255, .22);
}

.auth-brand strong,
.auth-brand small {
    display: block;
}

.auth-brand strong { color: var(--ink); font-size: 16px; }
.auth-brand small { color: var(--muted); margin-top: 2px; }

.login-panel form {
    display: grid;
    gap: 14px;
}

.login-panel button { margin-top: 4px; width: 100%; }
/* Data preview filter repair */
.filter-bar {
    grid-template-columns: minmax(260px, 1.3fr) repeat(4, minmax(170px, .8fr)) auto;
    align-items: end;
}

.filter-bar label {
    min-width: 0;
}

.filter-bar button {
    align-self: end;
    min-width: 150px;
    width: 100%;
}

.filter-bar input,
.filter-bar select {
    min-width: 0;
}

@media (max-width: 1400px) {
    .filter-bar {
        grid-template-columns: repeat(3, minmax(220px, 1fr));
    }
    .filter-bar button {
        width: auto;
        min-width: 190px;
    }
}

@media (max-width: 820px) {
    .filter-bar {
        grid-template-columns: 1fr;
    }
    .filter-bar button {
        width: 100%;
    }
}
/* Data preview definitive flex layout */
.preview-filter {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-end !important;
    gap: 12px !important;
}

.preview-filter label {
    flex: 1 1 190px !important;
    min-width: 190px !important;
}

.preview-filter label:first-child {
    flex-basis: 330px !important;
}

.preview-filter input,
.preview-filter select {
    width: 100% !important;
}

.preview-filter button {
    flex: 0 0 190px !important;
    width: 190px !important;
    min-width: 190px !important;
}

@media (max-width: 760px) {
    .preview-filter label,
    .preview-filter label:first-child,
    .preview-filter button {
        flex: 1 1 100% !important;
        width: 100% !important;
        min-width: 0 !important;
    }
}
/* Enterprise finish layer */
:root {
    color-scheme: dark;
    --bg: #050810;
    --surface: #0d1422;
    --surface-alt: #111b2d;
    --surface-strong: #172238;
    --ink: #eef5ff;
    --muted: #9eabc0;
    --muted-2: #76849a;
    --line: #263751;
    --line-soft: #1c2a40;
    --primary: #38c6f4;
    --primary-dark: #1598c7;
    --primary-soft: rgba(56, 198, 244, .12);
    --nav: #070c15;
    --nav-2: #142035;
    --danger: #ff6b7a;
    --success: #54d69b;
    --warning: #ffc46b;
    --shadow: 0 22px 70px rgba(0, 0, 0, .34);
}

html { background: var(--bg); }

body {
    min-height: 100vh;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    background: linear-gradient(135deg, rgba(18, 49, 82, .95) 0, rgba(5, 8, 16, .96) 290px, #050810 100%), var(--bg);
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
}

.shell {
    width: min(1540px, calc(100% - 48px));
    padding: 8px 0 36px;
}

.app-layout {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 20px;
}

.sidebar {
    top: 8px;
    min-height: calc(100vh - 16px);
    padding: 22px;
    background: rgba(6, 11, 20, .92);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.brand {
    height: 54px;
    margin-bottom: 26px;
    gap: 14px;
    padding: 0;
}

.brand span,
.auth-brand span {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #62d4ff, #7c5cff);
    color: #06111f;
    box-shadow: 0 12px 34px rgba(98, 212, 255, .22);
}

.brand strong { color: #fff; font-size: 16px; }
.sidebar nav { gap: 8px; }

.sidebar nav a {
    min-height: 42px;
    padding: 11px 14px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: #c8d3e3;
    font-weight: 800;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: #172238;
    border-color: #293d5d;
    color: #fff;
}

.content { gap: 18px; }

.app-header,
.hero-panel,
.page-head,
article,
.table-wrap,
.login-panel,
.integration-card,
.filter-bar,
.result-head,
.api-doc-card,
.client-card,
.policy-panel,
.connector-card,
.health-card,
.source-card,
.operation-card {
    background: rgba(13, 20, 34, .94);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .25);
}

.app-header,
.hero-panel,
.page-head {
    min-height: 118px;
    padding: 22px 24px;
}

.app-header h1,
.hero-panel h1,
.page-head h1 {
    color: #f4f8ff;
    font-size: 28px;
    font-weight: 900;
    line-height: 1.12;
}

.app-header p,
.hero-panel p,
.page-head p,
.hero-panel span,
.page-head span { color: var(--muted); }
.eyebrow { color: #62d4ff; letter-spacing: .08em; }

.filter-bar { padding: 16px; }

.filter-bar label,
label {
    color: #cbd6e6;
    font-size: 13px;
    font-weight: 900;
}

input,
select,
textarea {
    min-height: 46px;
    border: 1px solid #2c4161;
    border-radius: 12px;
    background: #0a111d;
    color: #f3f7ff;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03);
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(98, 212, 255, .24);
    border-color: #62d4ff;
}

button,
.primary-action,
.btn {
    min-height: 46px;
    border-radius: 12px;
    background: linear-gradient(135deg, #38c6f4, #7ee7ff);
    color: #04111d;
    font-weight: 900;
    box-shadow: 0 12px 28px rgba(56, 198, 244, .18);
}

button:hover,
.primary-action:hover,
.btn:hover { background: linear-gradient(135deg, #62d4ff, #a6efff); }

.btn.secondary,
.secondary-action,
.rotate-form button,
.slim-action button {
    background: #172238;
    border: 1px solid #314967;
    color: #ecf4ff;
    box-shadow: none;
}

.result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
}

.result-head h2 { margin: 0; color: #f4f8ff; font-size: 18px; }
.result-head p { margin: 5px 0 0; color: var(--muted); }

.status,
.pill,
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 6px 10px;
    border: 1px solid #315076;
    border-radius: 999px;
    background: #132035;
    color: #bfefff;
    font-size: 12px;
    font-weight: 900;
}

.notice,
.alert,
.toast {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    max-width: none;
    padding: 14px 16px;
    border: 1px solid #2b405f;
    border-left: 4px solid #62d4ff;
    border-radius: 14px;
    background: #101a2d;
    color: #eef5ff;
    box-shadow: 0 14px 36px rgba(0, 0, 0, .24);
    line-height: 1.45;
}

.notice::before,
.alert::before,
.toast::before {
    content: "";
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border-radius: 999px;
    background: radial-gradient(circle at center, #54d69b 0 31%, transparent 33%), rgba(84, 214, 155, .16);
    border: 1px solid rgba(84, 214, 155, .35);
}

.notice.success,
.alert.success,
.toast.success {
    border-left-color: var(--success);
    background: rgba(11, 49, 39, .72);
}

.notice.error,
.alert.error,
.toast.error {
    border-color: rgba(255, 107, 122, .35);
    border-left-color: var(--danger);
    background: rgba(58, 18, 27, .82);
    color: #ffdce1;
}

.notice.error::before,
.alert.error::before,
.toast.error::before {
    background: radial-gradient(circle at center, #ff6b7a 0 31%, transparent 33%), rgba(255, 107, 122, .14);
    border-color: rgba(255, 107, 122, .42);
}

.table-wrap { overflow: hidden; }
table { width: 100%; border-collapse: collapse; }

th,
td {
    border-bottom: 1px solid var(--line-soft);
    padding: 13px 14px;
    text-align: left;
    vertical-align: top;
}

th {
    background: #0a111d;
    color: #b9c7da;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

td { color: #e7eef9; font-weight: 650; }
tbody tr:hover td { background: rgba(98, 212, 255, .045); }

.metrics,
.grid,
.integration-grid,
.source-board,
.operations-grid { gap: 16px; }

.metrics article,
.grid article,
.integration-card,
.connector-card,
.client-card,
.api-doc-card,
.source-card,
.operation-card { padding: 18px; }

.metrics span,
.grid p,
.integration-card p,
.muted { color: var(--muted); }
.metrics strong { color: #f8fbff; font-weight: 950; }

.preview-filter { padding: 16px !important; gap: 12px !important; }
.preview-filter button { flex-basis: 210px !important; width: 210px !important; }

@media (max-width: 980px) {
    .shell { width: min(100% - 24px, 1540px); }
    .app-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; min-height: auto; }
}

@media (max-width: 760px) {
    .app-header,
    .hero-panel,
    .page-head,
    .result-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .app-header h1,
    .hero-panel h1,
    .page-head h1 { font-size: 24px; }
}

.notice.warning,
.alert.warning,
.toast.warning {
    border-color: rgba(255, 196, 107, .36);
    border-left-color: var(--warning);
    background: rgba(64, 44, 17, .78);
    color: #fff0cf;
}

.notice.warning::before,
.alert.warning::before,
.toast.warning::before {
    background: radial-gradient(circle at center, #ffc46b 0 31%, transparent 33%), rgba(255, 196, 107, .14);
    border-color: rgba(255, 196, 107, .42);
}
