/* Dedicated network operations map */
.network-map-page { display: grid; gap: 18px; min-width: 0; }
.network-map-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid #dce6ef; }
.network-map-header h2 { margin: 4px 0 6px; }
.network-map-header p { margin: 0; color: #70809a; }
.network-map-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.network-map-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid #dce6ef; }
.network-map-stats > div { padding: 15px 18px; border-right: 1px solid #dce6ef; min-width: 0; }
.network-map-stats > div:last-child { border-right: 0; }
.network-map-stats span { display: block; color: #70809a; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.network-map-stats strong { display: block; margin-top: 5px; color: #111c32; overflow-wrap: anywhere; }
.network-map-stage { min-width: 0; }
.network-map-stage .network-graph { min-height: calc(100vh - 330px); height: calc(100vh - 330px); max-height: 880px; }
.network-map-stage .legend { margin-top: 12px; }
@media (max-width: 900px) {
    .network-map-header { align-items: stretch; flex-direction: column; }
    .network-map-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .network-map-stats > div:nth-child(2) { border-right: 0; }
    .network-map-stage .network-graph { min-height: 64vh; height: 64vh; }
}

:root {
    --p: #00a4d3;
    --p-d: #008bb3;
    --p-soft: #f0fbff;
    --p-mid: #b3e4f0;
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #fbfdff;
    --border: #e2e8f0;
    --border2: #f1f5f9;
    --text: #334155;
    --text-strong: #0f172a;
    --muted: #64748b;
    --light: #94a3b8;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --critical: #b91c1c;
    --gray: #64748b;
    --font: "DM Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    --r: 8px;
    --r-sm: 6px;
    --sh: 0 1px 3px rgba(15, 23, 42, .04), 0 1px 2px rgba(15, 23, 42, .02);
    --sh-md: 0 8px 22px rgba(15, 23, 42, .07);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 11.5px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--p);
    text-decoration: none;
    transition: color .15s ease;
}

a:hover { color: var(--p-d); text-decoration: underline; }

h1, h2, h3, p { margin-top: 0; }

h1 {
    margin-bottom: 0;
    color: var(--text-strong);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 6px;
    color: var(--text-strong);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0;
}

h3 {
    margin: 18px 0 8px;
    color: var(--text-strong);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
}

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

.shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    width: 248px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 18px 14px;
    background: var(--surface);
    border-right: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 2px 4px 12px;
    border-bottom: 1px solid var(--border2);
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: var(--r);
    background: var(--p);
    color: #ffffff;
    font-size: 16px;
    font-weight: 900;
    box-shadow: 0 2px 7px rgba(0, 164, 211, .20);
}

.brand strong {
    display: block;
    color: var(--text-strong);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.15;
}

.brand span,
.muted {
    color: var(--muted);
    font-size: 11px;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar nav a,
.logout-form button {
    width: 100%;
    min-height: 32px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 11.5px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
}

.sidebar nav a:hover,
.logout-form button:hover {
    background: var(--bg);
    color: var(--text-strong);
    text-decoration: none;
}

.sidebar nav a.active {
    background: var(--p-soft);
    border-color: var(--p-mid);
    color: var(--p-d);
}

.logout-form { margin-top: auto; }

.content {
    flex: 1;
    min-width: 0;
    padding: 24px 32px 32px;
    overflow-x: hidden;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.eyebrow {
    margin: 0 0 5px;
    color: var(--p-d);
    font-size: 9.5px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.card,
.status-banner,
.tenant-hero {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r);
    box-shadow: var(--sh);
}

.card { padding: 16px; }

.content > .card,
.content > details.card {
    margin-bottom: 14px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.card-header p { margin-bottom: 0; }

.status-banner,
.tenant-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
    padding: 14px 16px;
}

.status-banner span,
.tenant-hero .eyebrow {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.status-banner strong {
    display: block;
    margin-top: 3px;
    color: var(--text-strong);
    font-size: 22px;
    font-weight: 900;
}

.status-ok { border-left: 4px solid var(--success); }
.status-info { border-left: 4px solid var(--p); }
.status-warning { border-left: 4px solid var(--warning); }
.status-error,
.status-critical { border-left: 4px solid var(--error); }
.status-offline,
.status-unverified { border-left: 4px solid var(--gray); }

.primary-link,
.btn {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    background: var(--p);
    color: #ffffff;
    font-family: var(--font);
    font-size: 11.5px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 164, 211, .22);
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
}

.primary-link:hover,
.btn:hover {
    background: var(--p-d);
    color: #ffffff;
    text-decoration: none;
}

.btn.secondary {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
    box-shadow: var(--sh);
}

.btn.secondary:hover {
    background: var(--bg);
    border-color: #cbd5e1;
    color: var(--text-strong);
}

.btn.danger {
    background: #fee2e2;
    border-color: #fecaca;
    color: #b91c1c;
    box-shadow: none;
}

.btn.danger:hover {
    background: #fecaca;
    border-color: #fca5a5;
    color: #991b1b;
}

.btn.small {
    min-height: 26px;
    padding: 0 10px;
    font-size: 11px;
}

.btn.full {
    width: 100%;
    margin-top: 12px;
}

.alert {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: var(--r);
    font-size: 11.5px;
    font-weight: 700;
}

.alert.success {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #15803d;
}

.alert.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.stat {
    min-height: 82px;
    padding: 13px 14px;
}

.stat span {
    display: block;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 800;
}

.stat strong {
    display: block;
    margin-top: 6px;
    color: var(--text-strong);
    font-size: 22px;
    font-weight: 900;
    line-height: 1.1;
}

.deployment-stat strong {
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.grid-2 {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
    gap: 16px;
    margin-bottom: 16px;
}

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

.network-scene-panel {
    margin-bottom: 16px;
    padding: 0;
}

.network-scene-panel > .card-header {
    margin: 0 0 10px;
}

.network-scene-panel > .card-header h2 {
    margin-bottom: 3px;
}

.network-scene-panel > .card-header p {
    color: var(--muted);
    font-size: 11.5px;
}

.network-graph {
    position: relative;
    height: 500px;
    overflow: hidden;
    border: 1px solid #1e293b;
    border-radius: var(--r);
    background:
        linear-gradient(rgba(148, 163, 184, .065) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, .065) 1px, transparent 1px),
        linear-gradient(180deg, #111827 0%, #0b1220 100%);
    background-size: 48px 48px, 48px 48px, auto;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 10px 30px rgba(15, 23, 42, .11);
    user-select: none;
    touch-action: none;
}

.network-graph canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
}

.network-graph.is-panning canvas,
.network-graph canvas:active { cursor: grabbing; }
.network-graph.is-hovering-node canvas { cursor: pointer; }

.network-graph:fullscreen {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    border: 0;
}

.network-graph.is-expanded {
    position: fixed;
    inset: 14px;
    z-index: 3000;
    width: auto;
    height: auto;
    border-radius: var(--r);
}

body.map-expanded { overflow: hidden; }

.map-tools {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px;
    border: 1px solid rgba(148, 163, 184, .26);
    border-radius: var(--r);
    background: rgba(15, 23, 42, .68);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
    backdrop-filter: blur(10px);
}

.map-tool-btn {
    min-width: 32px;
    height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: var(--r-sm);
    background: rgba(248, 250, 252, .07);
    color: #f8fafc;
    font-family: var(--font);
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.map-tool-btn:hover {
    border-color: rgba(103, 232, 249, .58);
    background: rgba(0, 164, 211, .22);
}

.graph-label-layer {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
}

.graph-layer-label {
    position: absolute;
    width: max-content;
    max-width: 190px;
    color: #e2e8f0;
    font-family: var(--font);
    pointer-events: none;
    transform: translate(0, -50%);
    text-shadow: 0 2px 10px rgba(0, 0, 0, .72);
}

.graph-layer-label strong,
.graph-layer-label span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.graph-layer-label strong {
    color: #f8fafc;
    font-size: 10.5px;
    font-weight: 900;
    line-height: 1.1;
    text-transform: uppercase;
}

.graph-layer-label span {
    margin-top: 2px;
    color: #94a3b8;
    font-size: 8.8px;
    font-weight: 800;
    line-height: 1.15;
}

.graph-layer-label[data-layer="firewall"] strong {
    color: #fbbf24;
}

.graph-layer-label[data-layer="main-system"] strong {
    color: #7dd3fc;
}

.graph-node-label {
    position: absolute;
    width: max-content;
    max-width: 142px;
    min-width: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #e2e8f0;
    box-shadow: none;
    font-family: var(--font);
    pointer-events: auto;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transform: translate(-50%, -50%);
    text-shadow: 0 2px 10px rgba(0, 0, 0, .72);
    backdrop-filter: none;
}

.graph-node-label:hover {
    color: #f8fafc;
    text-decoration: none;
}

.graph-node-label[data-anchor="top"] { transform: translate(-50%, calc(-100% - 25px)); }
.graph-node-label[data-anchor="bottom"] { transform: translate(-50%, 30px); }
.graph-node-label[data-anchor="left"] { transform: translate(calc(-100% - 25px), -50%); text-align: right; }
.graph-node-label[data-anchor="right"] { transform: translate(25px, -50%); text-align: left; }

.graph-node-label[data-type="core"] {
    min-width: 0;
    text-align: center;
}

.graph-node-alert {
    position: absolute;
    z-index: 5;
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border: 2px solid rgba(15, 23, 42, .92);
    border-radius: 999px;
    background: #f59e0b;
    color: #111827;
    font-family: var(--font);
    font-size: 11px;
    font-weight: 950;
    line-height: 1;
    pointer-events: none;
    transform: translate(-50%, -50%);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .32);
}

.graph-node-alert[data-status="error"],
.graph-node-alert[data-status="critical"] {
    background: #ef4444;
    color: #ffffff;
}

.graph-node-alert[data-status="offline"] {
    background: #64748b;
    color: #ffffff;
}

.graph-node-check {
    position: absolute;
    z-index: 6;
    display: grid;
    width: 19px;
    height: 19px;
    place-items: center;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(15, 23, 42, .92);
    border-radius: 999px;
    background: #10b981;
    color: #ffffff;
    font-family: var(--font);
    font-size: 11px;
    font-weight: 950;
    line-height: 1;
    pointer-events: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .16), 0 8px 20px rgba(0, 0, 0, .30);
    animation: graph-check-in .28s ease-out both;
}

.graph-node-check[hidden] { display: none; }
.graph-node-check[data-severity="warning"] { background: #f59e0b; }
.graph-node-check[data-severity="error"],
.graph-node-check[data-severity="critical"] { background: #ef4444; }

@keyframes graph-check-in {
    from { opacity: 0; transform: translate(-50%, -50%) scale(.55); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.graph-node-title {
    display: block;
    overflow: hidden;
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.graph-node-meta {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: #b6c2d3;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.graph-node-status {
    display: inline-flex;
    margin-top: 4px;
    padding: 2px 5px;
    border-radius: 999px;
    background: rgba(100, 116, 139, .24);
    color: #cbd5e1;
    font-size: 9px;
    font-weight: 900;
    line-height: 1.2;
}

.graph-node-label[data-status="ok"] .graph-node-status {
    background: rgba(16, 185, 129, .17);
    color: #86efac;
}

.graph-node-label[data-status="warning"] .graph-node-status {
    background: rgba(245, 158, 11, .18);
    color: #fcd34d;
}

.graph-node-label[data-status="error"] .graph-node-status,
.graph-node-label[data-status="critical"] .graph-node-status {
    background: rgba(239, 68, 68, .20);
    color: #fca5a5;
}

.map-node-modal {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 7;
    width: min(330px, calc(100% - 28px));
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: var(--r);
    background: rgba(15, 23, 42, .92);
    color: #e2e8f0;
    box-shadow: 0 22px 50px rgba(0, 0, 0, .34);
    backdrop-filter: blur(12px);
}

.map-node-modal[hidden] { display: none; }

.map-node-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.map-node-modal-title {
    display: block;
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.2;
}

.map-node-modal-subtitle {
    display: block;
    margin-top: 2px;
    color: #94a3b8;
    font-size: 10.5px;
    font-weight: 800;
}

.map-node-modal-close {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: var(--r-sm);
    background: transparent;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.map-node-modal-close:hover {
    background: rgba(239, 68, 68, .16);
    border-color: rgba(248, 113, 113, .34);
    color: #fecaca;
}

.map-node-modal-status {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(100, 116, 139, .24);
    color: #cbd5e1;
    font-size: 10px;
    font-weight: 900;
}

.map-node-modal-status[data-status="ok"] {
    background: rgba(16, 185, 129, .18);
    color: #86efac;
}

.map-node-modal-status[data-status="warning"] {
    background: rgba(245, 158, 11, .18);
    color: #fcd34d;
}

.map-node-modal-status[data-status="error"],
.map-node-modal-status[data-status="critical"] {
    background: rgba(239, 68, 68, .20);
    color: #fca5a5;
}

.map-node-modal-data {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px 12px;
    margin: 0;
    padding: 10px 0;
    border-top: 1px solid rgba(148, 163, 184, .16);
    border-bottom: 1px solid rgba(148, 163, 184, .16);
}

.map-node-modal-data dt {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 800;
}

.map-node-modal-data dd {
    margin: 0;
    color: #f8fafc;
    font-size: 10.5px;
    font-weight: 800;
    text-align: right;
}

.map-node-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 12px;
}

.map-node-modal-actions .btn {
    box-shadow: none;
}

.map-node-modal-actions .btn.ghost {
    background: rgba(148, 163, 184, .12);
    border-color: rgba(148, 163, 184, .22);
    color: #dbeafe;
}

.map-node-modal-actions .btn.ghost:hover {
    background: rgba(125, 211, 252, .13);
    border-color: rgba(125, 211, 252, .34);
    color: #ffffff;
}

.map-node-modal.has-live-telemetry {
    width: min(430px, calc(100% - 28px));
}

.map-node-live {
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid rgba(148, 163, 184, .18);
}

.map-node-live-header,
.map-node-live-chart-caption {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.map-node-live-header strong,
.map-node-live-chart-caption span {
    color: #e0f2fe;
    font-size: 10.5px;
    font-weight: 900;
    text-transform: uppercase;
}

.map-node-live-header span,
.map-node-live-chart-caption small {
    color: #94a3b8;
    font-size: 9.5px;
    font-weight: 800;
    text-align: right;
}

.map-node-live-data {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
    margin: 9px 0 0;
}

.map-node-live-data dt {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #94a3b8;
    font-size: 9.5px;
    font-weight: 800;
}

.map-node-live-data dd {
    margin: 0;
    color: #f8fafc;
    font-size: 10px;
    font-weight: 850;
    text-align: right;
}

.map-disk-breakdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.map-disk-breakdown-trigger {
    display: inline-grid;
    width: 15px;
    height: 15px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(125, 211, 252, .62);
    border-radius: 999px;
    background: rgba(14, 165, 233, .12);
    color: #bae6fd;
    cursor: help;
    font: 900 9px/1 ui-sans-serif, system-ui, sans-serif;
}

.map-disk-breakdown-trigger:hover,
.map-disk-breakdown-trigger:focus-visible,
.map-disk-breakdown.is-open .map-disk-breakdown-trigger {
    border-color: #7dd3fc;
    background: rgba(14, 165, 233, .24);
    color: #ffffff;
    outline: none;
}

.map-disk-breakdown-trigger:focus-visible {
    box-shadow: 0 0 0 3px rgba(56, 189, 248, .2);
}

.map-disk-breakdown-panel {
    position: absolute;
    z-index: 18;
    top: calc(100% + 8px);
    left: -8px;
    display: grid;
    width: min(310px, calc(100vw - 64px));
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(125, 211, 252, .3);
    border-radius: 12px;
    background: rgba(9, 19, 38, .98);
    box-shadow: 0 18px 48px rgba(2, 6, 23, .48);
    color: #e2e8f0;
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
    visibility: hidden;
}

.map-disk-breakdown:not(.is-dismissed):hover .map-disk-breakdown-panel,
.map-disk-breakdown:not(.is-dismissed):focus-within .map-disk-breakdown-panel,
.map-disk-breakdown.is-open .map-disk-breakdown-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
}

.map-disk-breakdown-heading,
.map-disk-breakdown-summary,
.map-disk-breakdown-row,
.map-disk-breakdown-meter,
.map-disk-breakdown-note {
    display: block;
}

.map-disk-breakdown-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.map-disk-breakdown-heading strong {
    color: #f8fafc;
    font-size: 11px;
    font-weight: 900;
}

.map-disk-breakdown-heading small,
.map-disk-breakdown-note {
    color: #94a3b8;
    font-size: 8.5px;
    font-weight: 750;
    line-height: 1.35;
}

.map-disk-breakdown-heading small {
    white-space: nowrap;
}

.map-disk-breakdown-summary {
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(148, 163, 184, .16);
    color: #bae6fd;
    font-size: 9.5px;
    font-weight: 850;
}

.map-disk-breakdown-list {
    display: grid;
    gap: 7px;
}

.map-disk-breakdown-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 10px;
    color: #cbd5e1;
    font-size: 8.5px;
    font-weight: 750;
}

.map-disk-breakdown-row > strong {
    color: #f8fafc;
    font-size: 8.5px;
    text-align: right;
    white-space: nowrap;
}

.map-disk-breakdown-meter {
    grid-column: 1 / -1;
    height: 3px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, .16);
}

.map-disk-breakdown-meter i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #38bdf8, #a78bfa);
}

.map-node-live-chart {
    min-height: 52px;
    margin-top: 10px;
    color: #94a3b8;
    font-size: 9.5px;
    font-weight: 800;
}

.map-node-live-chart svg {
    display: block;
    width: 100%;
    height: 58px;
    margin-top: 5px;
    overflow: visible;
}

.map-node-live-maintenance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, .16);
}

.map-node-live-maintenance .map-node-clear-cache {
    flex: 0 0 auto;
    color: #bae6fd;
    font-size: 9.5px;
}

.map-node-live-maintenance .map-node-clear-cache:disabled {
    cursor: wait;
    opacity: .68;
}

.map-node-live-maintenance-result {
    color: #94a3b8;
    font-size: 9.5px;
    font-weight: 800;
    line-height: 1.35;
    text-align: right;
}

.map-node-live-maintenance-result[data-status="ok"] { color: #86efac; }
.map-node-live-maintenance-result[data-status="error"] { color: #fca5a5; }

@media (max-width: 520px) {
    .map-node-live-data { grid-template-columns: 1fr; gap: 4px; }
    .map-node-live-data dd { text-align: left; }
    .map-disk-breakdown-panel { left: -4px; }
    .map-node-live-maintenance { align-items: flex-start; flex-direction: column; }
    .map-node-live-maintenance-result { text-align: left; }
}

.legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 700;
}

.legend-note {
    color: #475569;
    font-size: 10.5px;
    font-weight: 800;
}

.graph-legend-check {
    display: inline-grid;
    width: 16px;
    height: 16px;
    margin-right: 3px;
    place-items: center;
    border-radius: 999px;
    background: #10b981;
    color: #ffffff;
    font-size: 9px;
    font-style: normal;
    font-weight: 950;
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    transform: translateY(-1px);
}

.ok { background: var(--success); }
.warning { background: var(--warning); }
.error,
.critical { background: var(--error); }
.unverified,
.offline { background: var(--gray); }

.graph-tooltip {
    position: absolute;
    z-index: 8;
    width: 260px;
    max-width: calc(100% - 24px);
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, .26);
    border-radius: var(--r);
    background: rgba(15, 23, 42, .92);
    color: #e2e8f0;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .25);
    pointer-events: none;
}

.graph-tooltip strong,
.graph-tooltip span,
.graph-tooltip small { display: block; }

.graph-tooltip strong {
    margin-bottom: 3px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.2;
}

.graph-tooltip span {
    color: #7dd3fc;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
}

.graph-tooltip small {
    color: #94a3b8;
    font-size: 9.5px;
    font-weight: 800;
    line-height: 1.2;
}

.graph-tooltip b {
    color: #f8fafc;
    font-size: 10.5px;
    font-weight: 900;
    line-height: 1.2;
}

.graph-tooltip-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px 12px;
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, .16);
}

.graph-tooltip-grid div,
.graph-tooltip-load div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.graph-tooltip-grid b {
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.graph-tooltip-load {
    margin-top: 11px;
}

.graph-tooltip-load i {
    display: block;
    height: 7px;
    margin-top: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, .20);
}

.graph-tooltip-load em {
    display: block;
    height: 100%;
    min-width: 4px;
    border-radius: inherit;
    background: #10b981;
}

.graph-tooltip-load[data-status="warning"] em {
    background: #f59e0b;
}

.graph-tooltip-load[data-status="error"] em,
.graph-tooltip-load[data-status="critical"] em {
    background: #ef4444;
}

.graph-fallback {
    height: 100%;
    display: grid;
    place-items: center;
    padding: 24px;
    color: #cbd5e1;
    text-align: center;
}

.pill {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 10.5px;
    font-weight: 900;
    line-height: 1.1;
    white-space: nowrap;
}

.pill.ok,
.pill.success,
.pill.resolved {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #15803d;
}

.pill.warning,
.pill.medium,
.pill.draft,
.pill.ready,
.pill.in_progress {
    background: #fef9c3;
    border-color: #fef08a;
    color: #ca8a04;
}

.pill.error,
.pill.high,
.pill.critical,
.pill.failed,
.pill.new {
    background: #fee2e2;
    border-color: #fecaca;
    color: #dc2626;
}

.pill.info,
.pill.low,
.pill.applied {
    background: var(--p-soft);
    border-color: var(--p-mid);
    color: var(--p-d);
}

.pill.offline,
.pill.unverified {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

.ai-box {
    margin: 10px 0 0;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    background: var(--bg);
    color: var(--text);
    font-size: 11.5px;
    white-space: pre-line;
}

.mini-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mini-list a,
.mini-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border2);
    color: var(--text);
}

.mini-list a:hover {
    color: var(--text-strong);
    text-decoration: none;
}

.mini-row small {
    flex-basis: 100%;
    color: var(--muted);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th,
td {
    padding: 10px 9px;
    border-bottom: 1px solid var(--border2);
    color: var(--text);
    text-align: left;
    vertical-align: top;
}

th {
    background: var(--bg);
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

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

.form-card { max-width: 900px; }

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

.compact-form {
    gap: 10px;
}

.form-actions,
.form-wide { grid-column: 1 / -1; }

label {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 800;
}

input,
select,
textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--p-mid);
    box-shadow: 0 0 0 2px var(--p-soft);
}

textarea {
    min-height: 96px;
    resize: vertical;
}

.inline-form {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 210px;
}

.inline-form select { min-width: 120px; }

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.hero-actions,
.table-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.table-actions {
    min-width: 330px;
}

.table-actions form,
.hero-actions form {
    margin: 0;
}

.database-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(112px, 1fr));
    gap: 6px;
    min-width: 0;
}

.database-actions form {
    margin: 0;
}

.database-actions .btn,
.database-actions button {
    width: 100%;
}

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

.actions-cell.compact {
    min-width: 230px;
}

.database-overview-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.overview-tile {
    min-width: 0;
    padding: 12px 13px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    background: var(--surface);
    box-shadow: var(--sh);
}

.overview-tile span,
.overview-tile small {
    display: block;
    overflow: hidden;
    color: var(--muted);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-tile span {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.overview-tile strong {
    display: block;
    margin: 4px 0 2px;
    overflow: hidden;
    color: var(--text-strong);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-tile small {
    font-size: 10.5px;
    font-weight: 700;
}

.admin-drawer {
    padding: 0;
}

.admin-drawer > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
    list-style: none;
    cursor: pointer;
}

.admin-drawer > summary::-webkit-details-marker {
    display: none;
}

.admin-drawer > summary h2 {
    margin-bottom: 4px;
}

.admin-drawer > summary p {
    margin-bottom: 0;
}

.admin-drawer[open] > summary {
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border2);
}

.admin-drawer > :not(summary) {
    margin-right: 16px;
    margin-left: 16px;
}

.admin-drawer > :last-child {
    margin-bottom: 16px;
}

.database-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.backup-filter-form,
.database-search-form,
.crm-user-search-form {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid var(--border2);
    border-radius: var(--r);
    background: var(--surface-soft);
}

.database-search-form {
    grid-template-columns: minmax(160px, .9fr) minmax(220px, 1.4fr) minmax(90px, .4fr) auto;
}

.crm-user-search-form {
    grid-template-columns: minmax(260px, 1fr) auto;
}

.search-result-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
    color: var(--muted);
    font-weight: 800;
}

.crm-user-search-results {
    min-width: 980px;
}

.crm-user-search-results td {
    background: var(--surface);
}

tr[id^="crm-user-"]:target td {
    background: var(--p-soft);
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.database-browser-layout {
    grid-template-columns: minmax(260px, .45fr) minmax(0, 1fr);
}

.table-picker {
    display: grid;
    gap: 6px;
    max-height: 520px;
    overflow: auto;
    padding-right: 4px;
}

.table-picker a {
    display: block;
    padding: 9px 10px;
    border: 1px solid var(--border2);
    border-radius: var(--r-sm);
    background: var(--surface-soft);
    color: var(--text);
}

.table-picker a:hover,
.table-picker a.active {
    border-color: var(--p-mid);
    background: var(--p-soft);
    color: var(--text-strong);
    text-decoration: none;
}

.table-picker strong,
.table-picker span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-picker span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10.5px;
}

.browser-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 12px 0 8px;
    color: var(--muted);
    font-weight: 800;
}

.browser-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 10px 0;
}

.browser-metrics span {
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid var(--border2);
    border-radius: var(--r-sm);
    background: var(--surface-soft);
}

.browser-metrics small {
    display: block;
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.browser-metrics strong {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: var(--text-strong);
    font-size: 15px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-scroll {
    width: 100%;
    overflow: auto;
    border: 1px solid var(--border2);
    border-radius: var(--r);
    background: var(--surface);
}

.table-scroll table {
    min-width: 900px;
}

.database-table-scroll table {
    min-width: 1280px;
}

.backup-table-scroll table {
    min-width: 920px;
}

.database-list-table th:last-child,
.backup-list-table th:last-child {
    min-width: 230px;
}

.database-list-table td,
.backup-list-table td {
    background: var(--surface);
}

.database-list-table tr.restore-copy-row td {
    background: #fffdf4;
}

.database-name-cell {
    min-width: 250px;
}

.database-name-cell strong,
.backup-cell strong,
.backup-cell a {
    overflow-wrap: anywhere;
}

.database-name-cell small,
.notes-cell small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 700;
}

.row-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 7px 0 3px;
}

.notes-cell {
    min-width: 270px;
    max-width: 360px;
}

.backup-cell {
    min-width: 230px;
    max-width: 330px;
}

.data-preview-table th,
.data-preview-table td {
    min-width: 150px;
    max-width: 380px;
    font-family: var(--mono);
    font-size: 10.5px;
    line-height: 1.45;
}

.data-preview-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    white-space: nowrap;
}

.data-preview-table td {
    white-space: pre-wrap;
}

.data-preview-table .preview-cell-value {
    display: block;
    max-height: 150px;
    overflow: auto;
    overflow-wrap: anywhere;
}

.data-preview-table .null-value {
    color: var(--light);
    font-style: italic;
}

.migration-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 10px;
}

.migration-actions form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
}

.check-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.database-password-form {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) minmax(120px, 1fr) auto;
    gap: 6px;
    margin-top: 8px;
}

.database-password-form input {
    min-height: 26px;
    padding: 5px 7px;
    font-size: 10.5px;
}

.inline-admin-details {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border2);
}

.inline-admin-details > summary {
    width: max-content;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 900;
    cursor: pointer;
}

.inline-admin-details > summary:hover {
    color: var(--text-strong);
}

.db-access-panel {
    display: grid;
    grid-template-columns: minmax(190px, 0.75fr) minmax(320px, 1.45fr);
    gap: 18px;
    align-items: center;
    padding: 16px;
    margin: 4px 0 22px;
    border: 1px solid var(--border2);
    border-radius: 8px;
    background: #f8fbff;
}

.db-access-panel strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-strong);
}

.db-access-panel p {
    margin: 0;
}

.db-access-panel > .muted {
    grid-column: 1 / -1;
    padding-top: 10px;
    border-top: 1px solid var(--border2);
}

.db-access-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(110px, 1fr));
    gap: 8px;
}

.db-access-grid span {
    display: grid;
    gap: 4px;
    padding: 10px 11px;
    border: 1px solid var(--border2);
    border-radius: 8px;
    background: #fff;
}

.db-access-grid small {
    color: var(--muted);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.db-access-grid code,
.db-access-panel code {
    font-family: "DM Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.inline-reset-form {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) auto;
    gap: 6px;
    min-width: 220px;
}

.inline-reset-form input,
td > input,
td > select {
    min-height: 26px;
    padding: 5px 7px;
    font-size: 10.5px;
}

td > input + input,
td > input + .muted {
    margin-top: 6px;
}

.mono {
    font-family: var(--mono);
}

.danger-zone {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border2);
}

.danger-zone p {
    margin-bottom: 12px;
}

code {
    color: var(--text-strong);
    font-family: var(--mono);
    font-size: 10.5px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tags span {
    padding: 5px 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg);
    color: var(--text);
    font-size: 10.5px;
    font-weight: 700;
}

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

.roadmap-column {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    background: var(--surface-soft);
}

.roadmap-column h3 {
    margin: 0 0 10px;
}

.roadmap-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
    border-top: 1px solid var(--border2);
    color: var(--text);
    font-size: 11px;
    font-weight: 700;
}

.roadmap-item:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.roadmap-item span {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    margin-top: 4px;
    border-radius: 999px;
    background: var(--gray);
}

.roadmap-item.ready span { background: var(--success); }
.roadmap-item.partial span { background: var(--warning); }
.roadmap-item.next span { background: var(--p); }

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

.download-tile {
    min-height: 142px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--sh);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.download-tile:hover {
    border-color: var(--p-mid);
    box-shadow: var(--sh-md);
    text-decoration: none;
}

.download-tile span {
    width: max-content;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--p-soft);
    color: var(--p-d);
    font-size: 10px;
    font-weight: 900;
}

.download-tile strong {
    color: var(--text-strong);
    font-size: 15px;
    font-weight: 800;
}

.download-tile small {
    color: var(--muted);
    line-height: 1.5;
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background: var(--bg);
}

.login-card {
    width: min(440px, 100%);
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    background: var(--surface);
    box-shadow: var(--sh-md);
}

.register-card {
    width: min(720px, 100%);
}

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

.auth-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-bottom: 18px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    background: var(--bg);
}

.auth-switch a {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-sm);
    color: var(--muted);
    font-size: 11.5px;
    font-weight: 900;
}

.auth-switch a:hover {
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
}

.auth-switch a.active {
    background: var(--surface);
    color: var(--p-d);
    box-shadow: var(--sh);
}

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

.tenant-portal {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
    padding: 26px 0 36px;
}

.tenant-portal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.tenant-portal-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: var(--sh);
}

.tenant-portal-hero h1 {
    margin-bottom: 6px;
    font-size: 24px;
}

.tenant-portal-hero p:last-child {
    max-width: 640px;
    margin-bottom: 0;
}

.tenant-portal .stat strong {
    font-size: 16px;
    overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
    .stats-grid { grid-template-columns: repeat(3, 1fr); }
    .database-overview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-2,
    .grid-3,
    .download-grid,
    .roadmap-grid { grid-template-columns: 1fr; }
    .backup-filter-form,
    .database-search-form,
    .crm-user-search-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .db-access-panel,
    .db-access-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .network-graph { height: 500px; }
}

@media (max-width: 760px) {
    .shell { display: block; }
    .sidebar {
        position: relative;
        width: auto;
        height: auto;
    }
    .content { padding: 18px; }
    .topbar,
    .status-banner,
    .tenant-hero,
    .card-header {
        align-items: flex-start;
        flex-direction: column;
    }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .database-overview-grid,
    .browser-metrics { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .backup-filter-form,
    .database-search-form,
    .crm-user-search-form { grid-template-columns: 1fr; }
    .auth-form-grid { grid-template-columns: 1fr; }
    .tenant-portal-header,
    .tenant-portal-hero {
        align-items: flex-start;
        flex-direction: column;
    }
    .table-actions {
        min-width: 0;
    }
    .database-actions,
    .database-password-form {
        min-width: 0;
        grid-template-columns: 1fr;
    }
    .actions-cell {
        min-width: 240px;
    }
    .admin-drawer > summary {
        align-items: flex-start;
        flex-direction: column;
    }
    .db-access-panel,
    .db-access-grid {
        grid-template-columns: 1fr;
    }
    .network-graph {
        height: 430px;
        border-radius: var(--r);
    }
    .inline-form {
        flex-direction: column;
        align-items: stretch;
        min-width: 0;
    }
}

/* CRM-aligned security modals */
.login-security-lock {
    padding: 18px;
    background: radial-gradient(circle at 50% 34%, rgba(0,164,211,.16), transparent 34%), rgba(15,23,42,.36);
    backdrop-filter: blur(8px) saturate(1.08);
    -webkit-backdrop-filter: blur(8px) saturate(1.08);
}
.login-security-lock[hidden], .login-security-chip[hidden] { display: none; }
.login-security-modal {
    position: relative;
    width: min(100%, 468px);
    border: 1px solid rgba(213,226,238,.92);
    border-radius: 24px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 28px 90px rgba(15,23,42,.22);
    animation: conexoSecurityModalIn .28s cubic-bezier(.2,.8,.2,1);
}
.login-security-modal header { align-items: flex-start; gap: 14px; padding: 24px 24px 18px; border-bottom: 1px solid rgba(226,232,240,.82); }
.login-security-modal h2 { margin: 0; color: #0f172a; font-size: 18px; font-weight: 900; line-height: 1.18; }
.login-security-modal p { margin-top: 7px; color: #64748b; font-size: 13px; font-weight: 650; line-height: 1.55; }
.login-security-icon { position: relative; display: grid; flex: 0 0 44px; place-items: center; width: 44px; height: 44px; border-radius: 16px; background: linear-gradient(135deg, #00a4d3, #12b8cf); box-shadow: 0 14px 28px rgba(0,164,211,.22); }
.login-security-icon::before { position: absolute; top: 12px; width: 12px; height: 11px; border: 2px solid #fff; border-bottom: 0; border-radius: 8px 8px 0 0; content: ''; }
.login-security-icon i { position: relative; top: 4px; display: block; width: 16px; height: 13px; border-radius: 3px; background: #fff; }
.login-security-close { display: grid; flex: 0 0 32px; place-items: center; width: 32px; height: 32px; margin-left: auto; border: 0; border-radius: 50%; background: transparent; color: #94a3b8; cursor: pointer; font-size: 22px; line-height: 1; }
.login-security-close:hover { background: rgba(0,164,211,.08); color: #0f172a; }
.login-security-timer { padding: 20px 24px 12px; border-top: 0; }
.login-security-timer span { color: #64748b; font-size: 11px; letter-spacing: .9px; }
.login-security-timer strong { color: #0f172a; font-family: var(--mono); font-size: 25px; font-weight: 600; }
.login-security-progress { height: 7px; margin: 0 24px 24px; border: 1px solid #fed7aa; border-radius: 999px; background: #ffedd5; }
.login-security-progress i { border-radius: inherit; background: linear-gradient(90deg, #f59e0b, #fb923c); transition: width .35s linear; }
.login-security-chip { position: fixed; bottom: 18px; left: 50%; z-index: 140; display: inline-flex; align-items: center; gap: 8px; padding: 9px 13px; transform: translateX(-50%); border: 1px solid #fed7aa; border-radius: 999px; background: #fff7ed; color: #9a3412; box-shadow: 0 8px 25px rgba(15,23,42,.14); cursor: pointer; font-size: 11px; font-weight: 800; }
.login-security-chip strong { color: #c2410c; font-family: var(--mono); font-weight: 500; }

.session-timeout { z-index: 2147483647; padding: 22px; background: rgba(15,23,42,.42); backdrop-filter: blur(3px); }
.session-timeout > div { position: relative; width: min(100%, 420px); overflow: hidden; padding: 26px 26px 22px; border: 1px solid var(--border); border-top: 1px solid var(--border); border-radius: 16px; background: rgba(255,255,255,.98); box-shadow: 0 22px 55px rgba(15,23,42,.18); animation: conexoSessionLockIn .18s ease-out; }
.session-timeout-accent { position: absolute; top: 0; right: 0; left: 0; height: 3px; background: linear-gradient(90deg, #00a4d3, #38bdf8, #10b981); }
.session-timeout .eyebrow { margin: 0 0 3px; color: #00a4d3; font-size: 10px; font-weight: 800; }
.session-timeout h2 { margin: 0; color: #334155; font-size: 17px; font-weight: 800; line-height: 1.18; }
.session-timeout section > p:not(.eyebrow):not(.session-reauth-error) { margin: 14px 0 18px; color: #64748b; font-size: 12px; font-weight: 600; line-height: 1.5; }
.session-reauth-form label { display: block; margin: 0 0 6px; color: #64748b; font-size: 11px; font-weight: 800; }
.session-input-wrap { position: relative; display: block; margin: 6px 0 13px; }
.session-input-wrap > i { position: absolute; top: 50%; left: 13px; z-index: 1; transform: translateY(-50%); color: #94a3b8; font-size: 12px; font-style: normal; pointer-events: none; }
.session-input-wrap > i.session-input-lock { top: 22px; width: 11px; height: 9px; border-radius: 2px; background: #94a3b8; }
.session-input-wrap > i.session-input-lock::before { position: absolute; top: -6px; left: 2px; width: 7px; height: 7px; border: 2px solid #94a3b8; border-bottom: 0; border-radius: 5px 5px 0 0; content: ''; }
.session-input-wrap input { width: 100%; height: 43px; padding: 0 13px 0 39px; border: 1px solid #e2e8f0; border-radius: 10px; outline: none; background: #f8fafc; color: #334155; font: 700 13px var(--font); transition: border-color .15s, box-shadow .15s, background .15s; }
.session-input-wrap input:focus { border-color: #b3e4f0; background: #fff; box-shadow: 0 0 0 3px #f0fbff; }
.session-input-wrap input[readonly] { color: #64748b; cursor: default; }
.session-reauth-error { min-height: 18px; margin: -2px 0 10px; color: #ef4444; font-size: 11.5px; font-weight: 700; }
.session-timeout-actions { justify-content: flex-end; gap: 8px; margin-top: 4px; }
.session-timeout-actions .btn { min-height: 34px; height: 34px; padding: 0 15px; border-radius: 8px; font-size: 12px; }
body.conexo-session-locked { overflow: hidden !important; }

@keyframes conexoSecurityModalIn { from { opacity: 0; transform: translateY(14px) scale(.982); } to { opacity: 1; transform: none; } }
@keyframes conexoSessionLockIn { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }

@media (max-width: 480px) {
    .login-security-lock { padding: 14px; }
    .login-security-modal { width: min(100%, 390px); }
    .login-security-modal header { padding: 20px 18px 15px; }
    .login-security-timer { padding: 16px 18px 12px; }
    .login-security-progress { margin: 0 18px 20px; }
    .login-security-chip { right: 16px; bottom: 14px; left: 16px; justify-content: center; width: auto; transform: none; }
    .session-timeout { padding: 14px; }
    .session-timeout > div { padding: 22px 18px 18px; border-radius: 14px; }
    .session-timeout h2 { font-size: 15.5px; }
    .session-timeout-actions { flex-direction: column-reverse; }
    .session-timeout-actions .btn, .session-timeout-actions form { width: 100%; }
}

/* CRM release center */
.release-center { display: grid; gap: 18px; min-width: 0; }
.release-title-actions,
.release-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.release-operation-pulse { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--warning); box-shadow: 0 0 0 0 rgba(245,158,11,.35); animation: release-pulse 1.7s infinite; }
.release-operation-pulse.is-error { background: var(--error); animation: none; box-shadow: 0 0 0 5px rgba(239,68,68,.1); }
@keyframes release-pulse { 70% { box-shadow: 0 0 0 9px rgba(245,158,11,0); } 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0); } }
.release-progress-monitor {
    --release-progress-color: var(--p);
    --release-progress-soft: #eaf9fd;
    --release-progress-angle: 0deg;
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 95;
    color: var(--text-strong);
}
.release-progress-monitor[hidden] { display: none !important; }
.release-progress-monitor .sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.release-progress-trigger {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 132px;
    min-height: 50px;
    padding: 6px 11px 6px 7px;
    border: 1px solid var(--border);
    border-color: color-mix(in srgb, var(--release-progress-color) 38%, var(--border));
    border-radius: 999px;
    outline: none;
    background: rgba(255,255,255,.98);
    color: inherit;
    box-shadow: 0 12px 30px rgba(15,23,42,.16);
    cursor: pointer;
    font-family: var(--font);
    text-align: left;
    transition: border-color .18s, box-shadow .18s, transform .18s;
}
.release-progress-trigger:hover,
.release-progress-trigger:focus-visible { border-color: var(--release-progress-color); box-shadow: 0 15px 36px rgba(15,23,42,.2), 0 0 0 3px var(--release-progress-soft); transform: translateY(-1px); }
.release-progress-ring {
    position: relative;
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(from -90deg, var(--release-progress-color) 0 var(--release-progress-angle), var(--release-progress-soft) var(--release-progress-angle) 360deg);
}
.release-progress-ring::after { position: absolute; inset: 4px; border-radius: inherit; background: #fff; content: ''; }
.release-progress-ring > span { position: relative; z-index: 1; color: var(--release-progress-color); font: 900 8.5px/1 var(--font); letter-spacing: -.02em; }
.release-progress-compact-copy { min-width: 0; }
.release-progress-compact-copy strong,
.release-progress-compact-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.release-progress-compact-copy strong { color: var(--release-progress-color); font-size: 11px; font-weight: 900; }
.release-progress-compact-copy small { max-width: 70px; margin-top: 2px; color: var(--muted); font-size: 8.5px; font-weight: 700; }
.release-progress-detail {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    width: min(350px, calc(100vw - 32px));
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-color: color-mix(in srgb, var(--release-progress-color) 35%, var(--border));
    border-radius: 14px;
    background: rgba(255,255,255,.99);
    box-shadow: 0 20px 52px rgba(15,23,42,.22);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(7px) scale(.985);
    transform-origin: bottom right;
    transition: opacity .16s, visibility .16s, transform .16s;
}
.release-progress-monitor:hover .release-progress-detail,
.release-progress-monitor:focus-within .release-progress-detail,
.release-progress-monitor.is-open .release-progress-detail { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
.release-progress-monitor.is-focus-collapsed .release-progress-detail { opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(7px) scale(.985); }
.release-progress-detail header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 13px 14px 11px; border-bottom: 1px solid var(--border2); }
.release-progress-detail header span,
.release-progress-detail header strong { display: block; }
.release-progress-detail header span { color: var(--release-progress-color); font-size: 9px; font-weight: 900; letter-spacing: .035em; text-transform: uppercase; }
.release-progress-detail header strong { margin-top: 3px; font-size: 12px; line-height: 1.4; }
.release-progress-detail header button { width: 28px; height: 28px; flex: 0 0 28px; border: 0; border-radius: 8px; background: var(--surface-soft); color: var(--muted); cursor: pointer; font-size: 19px; line-height: 1; }
.release-progress-detail header button:hover,
.release-progress-detail header button:focus-visible { outline: 2px solid var(--release-progress-color); outline-offset: 1px; color: var(--text-strong); }
.release-progress-track { height: 5px; background: var(--release-progress-soft); }
.release-progress-track i { display: block; width: 0; height: 100%; border-radius: 0 999px 999px 0; background: var(--release-progress-color); transition: width .28s ease; }
.release-progress-detail dl { display: grid; gap: 0; margin: 0; padding: 4px 14px 11px; }
.release-progress-detail dl > div { display: grid; grid-template-columns: 82px minmax(0,1fr); gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border2); }
.release-progress-detail dl > div:last-child { border-bottom: 0; }
.release-progress-detail dt { color: var(--muted); font-size: 8.5px; font-weight: 900; letter-spacing: .025em; text-transform: uppercase; }
.release-progress-detail dd { min-width: 0; margin: 0; color: var(--text); font-size: 10px; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.release-progress-detail code { font-size: 8.5px; }
.release-progress-monitor.is-success { --release-progress-color: var(--success); --release-progress-soft: #e7f8ef; }
.release-progress-monitor.is-failed { --release-progress-color: var(--error); --release-progress-soft: #fff0f1; }
.release-progress-monitor.is-failed .release-progress-trigger { border-width: 2px; }
body.release-progress-visible .agent-dock-trigger { bottom: 88px; }
body.release-progress-visible .agent-dock { bottom: 148px; height: min(620px, calc(100vh - 184px)); }
@media (prefers-reduced-motion: reduce) {
    .release-progress-trigger,
    .release-progress-detail,
    .release-progress-track i { transition: none; }
}
.release-launch-banner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 66px; padding: 13px 16px; border: 1px solid #9edcf0; border-left: 4px solid var(--p); border-radius: var(--r); background: #f1fbfe; }
.release-launch-banner.is-error { border-color: #fecaca; border-left-color: var(--error); background: #fff7f7; }
.release-launch-banner > div { min-width: 0; }
.release-launch-banner strong,
.release-launch-banner small { display: block; }
.release-launch-banner small { margin-top: 3px; color: var(--muted); }

.release-active-band { display: grid; grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr); align-items: stretch; min-height: 150px; overflow: hidden; border: 1px solid var(--border); border-left: 4px solid var(--success); border-radius: var(--r); background: var(--surface); box-shadow: var(--sh); }
.release-active-band > div { display: flex; flex-direction: column; justify-content: center; padding: 24px 26px; }
.release-active-band h2 { margin: 3px 0 6px; font-size: 22px; }
.release-active-band p { margin: 0; }
.release-active-band > dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border-left: 1px solid var(--border); }
.release-active-band > dl > div { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 18px 22px; border-right: 1px solid var(--border2); border-bottom: 1px solid var(--border2); }
.release-active-band > dl > div:nth-child(even) { border-right: 0; }
.release-active-band > dl > div:nth-last-child(-n + 2) { border-bottom: 0; }
.release-active-band dt,
.release-row-meta dt,
.release-overview-side dt { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: 0; text-transform: uppercase; }
.release-active-band dd { margin: 5px 0 0; color: var(--text-strong); font-size: 13px; font-weight: 800; overflow-wrap: anywhere; }

.release-overview-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(250px, .45fr); gap: 26px; align-items: start; }
.release-overview-main { min-width: 0; }
.release-overview-side { padding-left: 24px; border-left: 1px solid var(--border); }
.release-overview-side h3 { margin: 5px 0 8px; }
.release-overview-side > p:not(.eyebrow) { line-height: 1.65; }
.release-overview-side dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--border2); }
.release-overview-side dd { min-width: 0; margin: 0; color: var(--text-strong); font-weight: 700; overflow-wrap: anywhere; }
.release-compact-list article { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; min-height: 62px; padding: 10px 0; border-bottom: 1px solid var(--border2); }
.release-compact-list article > div { min-width: 0; }
.release-compact-list strong,
.release-compact-list small { display: block; }
.release-compact-list small { margin-top: 2px; color: var(--muted); overflow-wrap: anywhere; }
.release-date-line { color: var(--muted); font-size: 9px; }
.release-compact-actions,
.release-test-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.release-compact-actions form,
.release-test-actions form { margin: 0; }
.release-channel { color: var(--p-d); font-size: 8.5px; font-weight: 900; letter-spacing: 0; }

.release-list-section,
.release-test-workspace,
.release-history-section { min-width: 0; }
.release-list { border-top: 1px solid var(--border); }
.release-row { position: relative; display: grid; grid-template-columns: 112px minmax(200px, .9fr) minmax(290px, 1fr) auto; align-items: center; gap: 16px; min-height: 108px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.release-row.is-active { margin-inline: -12px; padding-inline: 12px; border-left: 3px solid var(--success); background: linear-gradient(90deg, rgba(16,185,129,.045), transparent 35%); }
.release-row.is-archived { opacity: .68; }
.release-row-status { display: flex; align-items: center; gap: 8px; }
.release-status-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--light); }
.release-status-dot.active { background: var(--success); }
.release-status-dot.ready { background: var(--p); }
.release-status-dot.failed { background: var(--error); }
.release-row-identity { min-width: 0; }
.release-row-identity h3 { margin: 4px 0 2px; font-size: 14px; }
.release-row-identity code { display: block; color: var(--muted); font-size: 9.5px; overflow-wrap: anywhere; }
.release-row-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; margin: 0; }
.release-row-meta > div { min-width: 0; }
.release-row-meta dd { margin: 4px 0 0; color: var(--text-strong); font-weight: 700; overflow-wrap: anywhere; }
.release-row-message { grid-column: 2 / -1; margin: -7px 0 0; color: var(--muted); font-size: 10px; }
.release-row-actions { flex-wrap: nowrap; }
.release-row-actions form { margin: 0; }
.release-icon-action { width: 32px; height: 32px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); color: var(--muted); cursor: pointer; font: 800 15px/1 var(--font); }
.release-icon-action:hover { border-color: var(--p-mid); color: var(--p-d); }
.release-actions-menu { position: relative; }
.release-actions-menu > summary { display: grid; width: 30px; height: 30px; place-items: center; border: 0; background: transparent; color: var(--muted); cursor: pointer; font: 900 20px/1 var(--font); list-style: none; }
.release-actions-menu > summary::-webkit-details-marker { display: none; }
.release-actions-menu > summary:hover { color: var(--p-d); }
.release-actions-popover { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; display: grid; width: 284px; padding: 7px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); box-shadow: var(--sh-md); }
.release-actions-popover > a,
.release-actions-popover > form > button,
.release-action-disclosure > summary { display: flex; width: 100%; min-height: 34px; align-items: center; padding: 8px 10px; border: 0; border-radius: 5px; background: transparent; color: var(--text); cursor: pointer; font: 700 11px/1.25 var(--font); text-align: left; text-decoration: none; }
.release-actions-popover > a:hover,
.release-actions-popover > form > button:hover,
.release-action-disclosure > summary:hover { background: var(--surface-soft); color: var(--p-d); }
.release-actions-popover > form > button.text-danger { color: var(--error); }
.release-action-disclosure { border-top: 1px solid var(--border2); }
.release-action-disclosure > summary { list-style: none; }
.release-action-disclosure > summary::-webkit-details-marker { display: none; }
.release-action-disclosure[open] > summary { color: var(--p-d); }
.release-action-disclosure form { display: grid; gap: 8px; padding: 8px 10px 12px; }
.release-action-disclosure label { display: grid; gap: 5px; color: var(--text); font-size: 10px; font-weight: 700; }
.release-action-disclosure input { width: 100%; }
.release-action-disclosure button { min-height: 32px; border: 0; border-radius: 5px; background: var(--p); color: #fff; cursor: pointer; font: 800 10px/1 var(--font); }
.release-action-disclosure button:hover { background: var(--p-d); }
.release-activate-control { position: relative; }
.release-activate-control > summary { list-style: none; cursor: pointer; }
.release-activate-control > summary::-webkit-details-marker { display: none; }
.release-activate-control[open] > form { position: absolute; z-index: 15; top: calc(100% + 8px); right: 0; width: 280px; padding: 14px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); box-shadow: var(--sh-md); }
.release-activate-control label { display: grid; gap: 6px; margin-bottom: 10px; color: var(--text); font-weight: 700; }
.release-activate-control input { width: 100%; }

.release-test-state { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--border); }
.release-test-state > div { min-width: 0; padding: 16px 18px; border-right: 1px solid var(--border); }
.release-test-state > div:last-child { border-right: 0; }
.release-test-state span,
.release-test-state strong { display: block; }
.release-test-state span { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: 0; text-transform: uppercase; }
.release-test-state strong { margin-top: 5px; color: var(--text-strong); overflow-wrap: anywhere; }
.release-staging-hero { display: grid; grid-template-columns: minmax(220px, .72fr) minmax(0, 1.65fr) auto; align-items: center; gap: 20px; min-height: 96px; padding: 16px 0; border-block: 1px solid var(--border); }
.release-staging-hero > div:first-child { display: flex; align-items: center; gap: 12px; min-width: 0; }
.release-staging-hero > div:first-child small,
.release-staging-hero > div:first-child strong { display: block; }
.release-staging-hero > div:first-child small { color: var(--muted); }
.release-staging-hero > div:first-child strong { margin-top: 2px; color: var(--text-strong); font-size: 13px; }
.release-staging-indicator { width: 11px; height: 11px; flex: 0 0 auto; border-radius: 50%; background: var(--light); }
.release-staging-indicator.running { background: var(--success); box-shadow: 0 0 0 5px rgba(16,185,129,.11); }
.release-staging-indicator.failed { background: var(--error); box-shadow: 0 0 0 5px rgba(239,68,68,.1); }
.release-staging-hero dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; }
.release-staging-hero dl > div { min-width: 0; padding-left: 12px; border-left: 1px solid var(--border2); }
.release-staging-hero dt { color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.release-staging-hero dd { margin: 4px 0 0; color: var(--text-strong); font-weight: 700; overflow-wrap: anywhere; }
.release-staging-message { margin: 10px 0 0; padding: 10px 12px; border-left: 3px solid var(--p); background: var(--p-soft); color: var(--text); }
.release-staging-message.is-error { border-left-color: var(--error); background: rgba(239,68,68,.06); }
.release-staging-columns { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(330px, .85fr); gap: 28px; margin-top: 22px; }
.release-staging-columns > section { min-width: 0; }
.release-staging-columns > section + section { padding-left: 24px; border-left: 1px solid var(--border); }
.release-test-candidates { margin-top: 16px; }
.release-test-candidates article { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; min-height: 58px; border-bottom: 1px solid var(--border2); }
.release-test-candidates article > div { min-width: 0; }
.release-test-candidates strong,
.release-test-candidates small { display: block; }
.release-test-candidates small { color: var(--muted); overflow-wrap: anywhere; }
.release-test-candidates article.is-selected { margin-inline: -10px; padding-inline: 10px; border-left: 3px solid var(--p); background: var(--p-soft); }
.release-workspace-list article { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 70px; padding: 10px 0; border-bottom: 1px solid var(--border2); }
.release-workspace-list article > div { min-width: 0; }
.release-workspace-list strong,
.release-workspace-list small,
.release-workspace-list code { display: block; }
.release-workspace-list small { margin-top: 2px; color: var(--muted); }
.release-workspace-list code { margin-top: 5px; color: var(--p-d); font-size: 9px; overflow-wrap: anywhere; }
.release-path-detail { margin-top: 6px; }
.release-path-detail summary { width: fit-content; color: var(--p-d); cursor: pointer; font-size: 10px; font-weight: 800; }
.release-path-detail code { max-width: 100%; padding-top: 4px; }

.release-history-list { border-top: 1px solid var(--border); }
.release-history-list article { display: grid; grid-template-columns: 105px minmax(0, 1fr) 120px minmax(130px, .3fr); align-items: center; gap: 18px; min-height: 76px; border-bottom: 1px solid var(--border2); }
.release-history-list time,
.release-history-list time strong,
.release-history-list article > div > span,
.release-history-list article > div > strong,
.release-history-list article > div > small { display: block; }
.release-history-list time { color: var(--muted); font-size: 10px; }
.release-history-list time strong { margin-top: 3px; color: var(--text-strong); font-size: 12px; }
.release-history-list article > div { min-width: 0; }
.release-history-list article > div > span { color: var(--p-d); font-size: 8.5px; font-weight: 900; letter-spacing: 0; }
.release-history-list article > div > strong { margin-top: 3px; color: var(--text-strong); }
.release-history-list article > div > small { margin-top: 3px; color: var(--muted); overflow-wrap: anywhere; }

.release-upload-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: start; }
.release-upload-form { min-width: 0; }
.release-upload-checks { padding-left: 24px; border-left: 1px solid var(--border); }
.release-upload-checks h3 { margin: 5px 0 10px; }
.release-upload-checks ul { display: grid; gap: 9px; margin: 0; padding-left: 18px; color: var(--muted); }
.release-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.release-form-grid > label { display: grid; align-content: start; gap: 6px; color: var(--text); font-weight: 700; }
.release-form-grid small { color: var(--muted); font-weight: 500; }
.release-file-field { grid-column: 1 / -1; min-height: 98px; padding: 16px; border: 1px dashed #b9cedc; border-radius: var(--r); background: var(--surface-soft); }
.release-file-field input { width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); }

@media (max-width: 1260px) {
    .release-row { grid-template-columns: 105px minmax(180px, .75fr) minmax(280px, 1.25fr) auto; }
    .release-row-actions { grid-column: 2 / -1; justify-content: flex-start; }
    .release-row-message { grid-column: 2 / -1; }
}

@media (max-width: 900px) {
    .release-active-band { grid-template-columns: 1fr; }
    .release-active-band > dl { border-top: 1px solid var(--border); border-left: 0; }
    .release-overview-grid,
    .release-upload-layout,
    .release-staging-columns { grid-template-columns: 1fr; }
    .release-overview-side,
    .release-upload-checks,
    .release-staging-columns > section + section { padding: 18px 0 0; border-top: 1px solid var(--border); border-left: 0; }
    .release-staging-hero { grid-template-columns: 1fr; align-items: start; }
    .release-staging-hero dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .release-row { grid-template-columns: 90px minmax(0, 1fr); }
    .release-row-meta,
    .release-row-actions,
    .release-row-message { grid-column: 2; }
    .release-history-list article { grid-template-columns: 90px minmax(0, 1fr) auto; }
    .release-history-list article > div:last-child { grid-column: 2 / -1; }
}

@media (max-width: 620px) {
    .release-title-actions { justify-content: flex-start; }
    .release-progress-monitor { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); }
    .release-progress-trigger { width: 116px; min-height: 46px; }
    .release-progress-ring { width: 32px; height: 32px; flex-basis: 32px; }
    .release-progress-compact-copy small { max-width: 58px; }
    .release-progress-detail { right: 0; width: min(340px, calc(100vw - 24px)); }
    body.release-progress-visible .agent-dock-trigger { bottom: max(76px, calc(env(safe-area-inset-bottom) + 68px)); }
    body.release-progress-visible .agent-dock { bottom: max(136px, calc(env(safe-area-inset-bottom) + 128px)); height: min(620px, calc(100dvh - 170px)); }
    .release-active-band > dl,
    .release-row-meta,
    .release-test-state,
    .release-form-grid,
    .release-staging-hero dl { grid-template-columns: 1fr; }
    .release-active-band > dl > div,
    .release-test-state > div { border-right: 0; border-bottom: 1px solid var(--border2); }
    .release-active-band > dl > div:last-child,
    .release-test-state > div:last-child { border-bottom: 0; }
    .release-staging-hero dl > div { padding: 8px 0; border-left: 0; border-bottom: 1px solid var(--border2); }
    .release-workspace-list article { grid-template-columns: 1fr; }
    .release-compact-list article,
    .release-test-candidates article { grid-template-columns: minmax(0, 1fr) auto; padding-block: 12px; }
    .release-compact-list .btn,
    .release-test-candidates form { grid-column: 1 / -1; justify-self: start; }
    .release-launch-banner { grid-template-columns: auto minmax(0, 1fr); }
    .release-launch-banner .btn { grid-column: 2; justify-self: start; }
    .release-row { grid-template-columns: 1fr; gap: 10px; }
    .release-row-meta,
    .release-row-actions,
    .release-row-message { grid-column: 1; }
    .release-row-meta { padding-block: 8px; border-block: 1px solid var(--border2); }
    .release-history-list article { grid-template-columns: 80px minmax(0, 1fr); padding-block: 12px; }
    .release-history-list article > .pill,
    .release-history-list article > div:last-child { grid-column: 2; }
    .release-file-field { grid-column: 1; }
}

/* Unified incident workspace */
.error-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 22px; }
.error-title { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 5px; }
.error-title strong { color: var(--text-strong); }
.source-chip { display: inline-flex; align-items: center; min-height: 21px; padding: 0 8px; border-radius: 999px; background: var(--p-soft); color: var(--p-d); font-size: 9px; font-weight: 900; }
.error-context > summary { margin-top: 8px; color: var(--p-d); font-size: 9.5px; font-weight: 800; cursor: pointer; }
.context-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; margin: 12px 0; color: var(--muted); font-size: 10px; }
.context-grid b { display: block; margin-bottom: 3px; color: var(--light); font-size: 8px; text-transform: uppercase; }
.stack-box { max-height: 240px; margin-top: 10px; padding: 12px; overflow: auto; border-radius: var(--r-sm); background: #0f172a; color: #e2e8f0; font-size: 10px; white-space: pre-wrap; }
.advanced-notes input, .advanced-notes select, .advanced-notes textarea { width: 100%; }
.tenant-detail-metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tenant-recommendation { padding: 18px 0 4px; }
.tenant-recommendation h2 { font-size: 13px; }

@media (max-width: 720px) {
    .error-metrics, .context-grid { grid-template-columns: 1fr 1fr; }
    .tenant-detail-metrics { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .error-metrics, .context-grid { grid-template-columns: 1fr; }
}

/* Database operations workspace */
.database-command-bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    padding: 10px 0 22px;
    border-bottom: 1px solid var(--border);
}
.database-command-bar h2 { margin: 4px 0 5px; font-size: 19px; }
.database-command-bar p:not(.eyebrow) { max-width: 720px; margin: 0; font-size: 11px; }
.database-list-search { display: flex; width: min(100%, 340px); flex-direction: column; gap: 6px; color: var(--muted); font-size: 9.5px; font-weight: 800; }
.database-list-search input { width: 100%; }
.database-health-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--border); }
.database-health-strip > div { min-height: 74px; padding: 16px 18px; border-right: 1px solid var(--border2); }
.database-health-strip > div:first-child { padding-left: 0; }
.database-health-strip > div:last-child { border-right: 0; }
.database-health-strip span { display: block; color: var(--muted); font-size: 9.5px; font-weight: 800; }
.database-health-strip strong { display: block; margin-top: 5px; color: var(--text-strong); font-size: 20px; }
.database-groups { padding-bottom: 28px; }
.database-group { padding-top: 28px; }
.database-group > header { display: flex; align-items: end; justify-content: space-between; margin-bottom: 8px; }
.database-group > header h3 { margin: 0; font-size: 14px; }
.database-group > header h3 span { margin-left: 6px; color: var(--p); font: 800 10px var(--mono); }
.database-group > header p { margin: 4px 0 0; font-size: 10px; }
.database-record-list { border-top: 2px solid var(--text-strong); }
.database-record {
    position: relative;
    display: grid;
    grid-template-columns: minmax(300px, .9fr) minmax(430px, 1.35fr);
    gap: 16px 24px;
    padding: 20px 0 16px;
    border-bottom: 1px solid var(--border);
}
.database-record[hidden] { display: none; }
.database-record.is-restore-copy { background: linear-gradient(90deg, rgba(245,158,11,.055), transparent 65%); }
.database-record-identity { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: start; gap: 12px; }
.database-role-mark { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid #bae6f3; border-radius: 6px; background: #eef9fc; color: #04799a; font-size: 11px; font-weight: 900; }
.database-role-mark.tenant { border-color: #bbf7d0; background: #effdf4; color: #15803d; }
.database-role-mark.external, .database-role-mark.custom { border-color: #dbe3ec; background: #f8fafc; color: #64748b; }
.database-record-identity .pill { margin-right: 4px; }
.database-record-identity h3 { margin: 8px 0 3px; font-size: 13px; }
.database-record-identity code { display: block; overflow: hidden; color: var(--text); font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.database-record-identity small { display: block; margin-top: 7px; color: var(--muted); font-size: 9px; }
.database-record-facts { display: grid; grid-template-columns: .7fr .7fr 1.25fr; min-width: 0; border-left: 1px solid var(--border2); }
.database-record-facts > div { min-width: 0; padding: 2px 14px; border-right: 1px solid var(--border2); }
.database-record-facts span, .database-record-note > span { display: block; color: var(--muted); font-size: 8.5px; font-weight: 900; text-transform: uppercase; }
.database-record-facts strong { display: block; overflow: hidden; margin-top: 7px; color: var(--text-strong); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.database-record-facts small { display: block; overflow: hidden; margin-top: 4px; color: var(--muted); font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.database-record-facts .database-backup-state { background: transparent; }
.database-backup-state.ok strong { color: #15803d; }
.database-backup-state.warning strong { color: #b45309; }
.database-backup-state.error strong { color: var(--danger); }
.database-record-note { min-width: 0; padding-left: 4px; }
.database-record-note p { display: -webkit-box; margin: 7px 0 0; overflow: hidden; font-size: 9.5px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.database-record-note small { display: block; overflow: hidden; margin-top: 5px; color: var(--muted); font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.database-record-actions { grid-column: 2; display: flex; align-items: center; justify-content: flex-end; gap: 7px; min-width: 0; }
.database-record-actions form { margin: 0; }
.database-more-actions { position: relative; }
.database-more-actions > summary { list-style: none; cursor: pointer; }
.database-more-actions > summary::-webkit-details-marker { display: none; }
.database-more-actions > div { position: absolute; right: 0; z-index: 40; width: 300px; margin-top: 7px; padding: 8px; border: 1px solid var(--border); border-radius: 6px; background: #fff; box-shadow: 0 16px 40px rgba(15,23,42,.14); }
.database-more-actions > div > a,
.database-more-actions > div > form > button,
.database-more-actions > div > details > summary { display: flex; width: 100%; min-height: 34px; padding: 8px 10px; align-items: center; border: 0; border-radius: 4px; background: transparent; color: var(--text); font: 700 10px var(--font); text-align: left; text-decoration: none; cursor: pointer; }
.database-more-actions > div > a:hover,
.database-more-actions > div > form > button:hover,
.database-more-actions > div > details > summary:hover { background: #f4f9fb; }
.database-password-form { display: grid; gap: 7px; padding: 8px 10px 12px; }
.database-password-form input { width: 100%; }
.database-action-note { padding: 8px 10px 12px; }
.database-action-note p { margin: 0; color: var(--text); font-size: 9.5px; line-height: 1.55; }
.database-action-note small { display: block; margin-top: 6px; color: var(--muted); font-size: 8.5px; overflow-wrap: anywhere; }
.backup-handoff { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 24px 0; border-top: 2px solid var(--p); border-bottom: 1px solid var(--border); }
.backup-handoff h2 { margin: 5px 0; font-size: 17px; }
.backup-handoff p:not(.eyebrow) { max-width: 760px; margin: 0; font-size: 10.5px; }
.recent-backup-list { margin-top: 28px; border-top: 1px solid var(--border); }
.recent-backup-list > header { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 8px; }
.recent-backup-list > header h3 { margin: 0; font-size: 13px; }
.recent-backup-list > header span { color: var(--muted); font-size: 9.5px; }
.recent-backup-list article { display: grid; grid-template-columns: 95px minmax(260px, 1fr) 80px 80px auto; align-items: center; gap: 14px; min-height: 60px; border-bottom: 1px solid var(--border2); }
.recent-backup-list time { color: var(--muted); font-size: 9px; }
.recent-backup-list time strong { display: block; margin-top: 3px; color: var(--text); font-size: 11px; }
.recent-backup-list article > div { min-width: 0; }
.recent-backup-list article > div strong, .recent-backup-list article > div code { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-backup-list article > div strong { font-size: 10.5px; }
.recent-backup-list article > div code { margin-top: 3px; color: var(--muted); font-size: 8.5px; }

.database-explorer { display: flex; flex-direction: column; gap: 20px; }
.db-explorer-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 20px; border-bottom: 2px solid var(--text-strong); }
.db-explorer-header h1 { margin: 5px 0; font-size: 22px; }
.db-explorer-header p:not(.eyebrow) { margin: 0; font-size: 10.5px; }
.db-explorer-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--border); }
.db-explorer-stats > div { min-width: 0; padding: 13px 16px; border-right: 1px solid var(--border2); }
.db-explorer-stats > div:first-child { padding-left: 0; }
.db-explorer-stats > div:last-child { border-right: 0; }
.db-explorer-stats span { display: block; color: var(--muted); font-size: 8.5px; font-weight: 900; text-transform: uppercase; }
.db-explorer-stats strong, .db-explorer-stats small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-explorer-stats strong { margin-top: 5px; color: var(--text-strong); font-size: 12px; }
.db-explorer-stats small { margin-top: 3px; color: var(--muted); font-size: 8.5px; }
.db-explorer-layout { display: grid; grid-template-columns: 285px minmax(0, 1fr); align-items: start; min-height: 620px; border-top: 1px solid var(--border); }
.db-table-sidebar { position: sticky; top: 14px; min-width: 0; padding: 16px 18px 0 0; border-right: 1px solid var(--border); }
.db-table-sidebar-head { padding-bottom: 10px; }
.db-table-sidebar-head > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.db-table-sidebar-head h2 { margin: 0; font-size: 13px; }
.db-table-sidebar-head span { color: var(--muted); font-size: 9px; }
.db-table-sidebar-head input { width: 100%; margin-top: 10px; }
.db-table-catalog { max-height: calc(100vh - 190px); overflow: auto; padding-right: 5px; overscroll-behavior: contain; }
.db-table-catalog > details { border-top: 1px solid var(--border2); }
.db-table-catalog > details > summary { display: flex; min-height: 37px; align-items: center; justify-content: space-between; color: var(--muted); font-size: 9px; font-weight: 900; text-transform: uppercase; cursor: pointer; }
.db-table-catalog > details > summary span { font-family: var(--mono); }
.db-table-catalog a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 50px; padding: 7px 8px; border-top: 1px solid #f1f5f9; color: inherit; text-decoration: none; }
.db-table-catalog a:hover { background: #f6fbfd; }
.db-table-catalog a.active { border-left: 3px solid var(--p); background: #edf9fc; }
.db-table-catalog a > span { min-width: 0; }
.db-table-catalog a strong, .db-table-catalog a code { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-table-catalog a strong { font-size: 10px; }
.db-table-catalog a code { margin-top: 3px; color: var(--muted); font-size: 8px; }
.db-table-catalog a small { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 8.5px; }
.db-table-catalog a small b { display: grid; width: 17px; height: 17px; place-items: center; border: 1px solid var(--border); border-radius: 50%; color: var(--p); font-size: 7px; }
.db-data-workspace { min-width: 0; padding: 16px 0 30px 24px; }
.db-data-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding-bottom: 14px; }
.db-data-heading h2 { display: inline; margin: 0 8px 0 0; font-size: 16px; }
.db-data-heading code { color: var(--p); font-size: 9px; }
.db-data-heading > span { color: var(--muted); font-size: 9.5px; }
.db-primary-search { display: grid; grid-template-columns: minmax(240px, 1fr) 125px auto; align-items: end; gap: 10px; padding: 14px; background: #f7fafc; }
.db-primary-search label { display: flex; min-width: 0; flex-direction: column; gap: 5px; color: var(--muted); font-size: 9px; font-weight: 800; }
.db-primary-search label input, .db-primary-search label select { width: 100%; }
.db-primary-search > div { display: flex; gap: 6px; }
.db-search-context { display: flex; flex-wrap: wrap; gap: 18px; padding: 10px 0; border-bottom: 1px solid var(--border2); color: var(--muted); font-size: 9px; }
.db-search-context strong { color: var(--text-strong); }
.db-backup-search { border-bottom: 1px solid var(--border); }
.db-backup-search > summary { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 18px; list-style: none; cursor: pointer; }
.db-backup-search > summary::-webkit-details-marker { display: none; }
.db-backup-search > summary span { display: flex; flex-direction: column; gap: 3px; }
.db-backup-search > summary strong { font-size: 10.5px; }
.db-backup-search > summary small { color: var(--muted); font-size: 8.5px; }
.db-backup-search > summary b { color: var(--p); font-size: 9.5px; }
.db-backup-search form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 0 0 14px; }
.db-backup-results { padding: 18px 0; border-bottom: 1px solid var(--border); }
.db-backup-results > header, .db-current-results > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 9px; }
.db-backup-results > header h3, .db-current-results > header h3 { margin: 0; font-size: 13px; }
.db-backup-results > header span, .db-current-results > header p { margin: 3px 0 0; color: var(--muted); font-size: 8.5px; }
.db-backup-results article { display: grid; grid-template-columns: 105px minmax(0, 1fr) auto; align-items: center; gap: 13px; min-height: 62px; border-top: 1px solid var(--border2); }
.db-backup-results time { color: var(--muted); font-size: 9px; }
.db-backup-results article > div { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.db-backup-results article > div strong { font-size: 10px; }
.db-backup-results article > div small { overflow: hidden; color: var(--muted); font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.db-backup-results article > div span { color: var(--p); font-size: 8px; }
.db-current-results { padding-top: 20px; }
.db-result-table-wrap { max-width: 100%; max-height: 680px; overflow: auto; border: 1px solid var(--border); }
.db-result-table { min-width: 100%; border-collapse: separate; border-spacing: 0; }
.db-result-table th { position: sticky; top: 0; z-index: 4; min-width: 145px; padding: 10px 12px; background: #f5f8fb; font-size: 8.5px; white-space: nowrap; }
.db-result-table th code { display: block; margin-top: 3px; color: var(--muted); font-size: 7.5px; }
.db-result-table td { max-width: 260px; min-height: 48px; padding: 11px 12px; border-top: 1px solid var(--border2); font-size: 9px; vertical-align: top; }
.db-result-table .sticky-action { position: sticky; left: 0; z-index: 3; min-width: 88px; background: #fff; box-shadow: 1px 0 var(--border); }
.db-result-table th.sticky-action { z-index: 5; background: #f5f8fb; }
.db-result-table tr:hover td { background: #f7fbfd; }
.db-result-table tr:hover td.sticky-action { background: #f7fbfd; }
.preview-cell-value { display: -webkit-box; overflow: hidden; overflow-wrap: anywhere; font-family: var(--mono); line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }

.record-recovery-stats small { display: block; margin-top: 4px; color: var(--muted); font-size: 8.5px; }
.record-field-grid-primary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.record-current-details { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border2); }
.record-snapshot.technical > summary { background: linear-gradient(90deg, #f6fbfd, transparent 70%); }
.record-no-diff.technical { background: #eff8fb; color: #0e7490; }
.record-technical-diff { margin-top: 10px; border-top: 1px solid var(--border2); }
.record-technical-diff > summary { padding: 10px 0; color: var(--muted); font-size: 9.5px; font-weight: 800; cursor: pointer; }
.record-diff-list.compact { padding: 6px 14px 12px; background: #f8fafc; }
.record-diff-list.compact > div { padding: 7px 0; }
.record-field-grid > div.is-technical { background: #f5fafc; }
.record-restore-form > div { max-width: 360px; margin-right: auto; }
.record-restore-form > div strong, .record-restore-form > div small { display: block; }
.record-restore-form > div strong { font-size: 10.5px; }
.record-restore-form > div small { margin-top: 4px; color: var(--muted); font-size: 8.5px; line-height: 1.5; }

@media (max-width: 1250px) {
    .database-record { grid-template-columns: minmax(260px, 1fr) minmax(340px, 1.25fr); }
    .database-record-note { grid-column: 1 / -1; padding: 0 0 0 48px; }
    .database-record-actions { grid-column: 1 / -1; }
}
@media (max-width: 940px) {
    .database-command-bar, .backup-handoff, .db-explorer-header { align-items: flex-start; flex-direction: column; }
    .database-list-search { width: 100%; }
    .database-health-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .database-health-strip > div:nth-child(3) { border-right: 0; }
    .database-health-strip > div:nth-child(n + 4) { border-top: 1px solid var(--border2); }
    .database-record { grid-template-columns: 1fr; }
    .database-record-facts, .database-record-note, .database-record-actions { grid-column: 1; }
    .database-record-note { padding-left: 48px; }
    .database-record-actions { justify-content: flex-start; padding-left: 48px; flex-wrap: wrap; }
    .db-explorer-layout { grid-template-columns: 240px minmax(0, 1fr); }
    .db-explorer-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .db-explorer-stats > div:nth-child(2) { border-right: 0; }
    .db-explorer-stats > div:nth-child(n + 3) { border-top: 1px solid var(--border2); }
    .db-primary-search { grid-template-columns: 1fr 110px; }
    .db-primary-search > div { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
    .database-health-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .database-health-strip > div { border-top: 1px solid var(--border2); }
    .database-health-strip > div:nth-child(even) { border-right: 0; }
    .database-record-facts { grid-template-columns: 1fr 1fr; border-left: 0; }
    .database-record-facts > div { padding: 10px 12px; border-bottom: 1px solid var(--border2); }
    .database-record-facts > div:last-child { grid-column: 1 / -1; }
    .database-record-note, .database-record-actions { padding-left: 0; }
    .database-record-actions .btn, .database-record-actions form { flex: 1 1 145px; }
    .database-record-actions form .btn { width: 100%; }
    .database-more-actions { flex: 1 1 145px; }
    .database-more-actions > summary { width: 100%; }
    .database-more-actions > div { position: fixed; right: 12px; bottom: 12px; left: 12px; width: auto; }
    .recent-backup-list article { grid-template-columns: 75px minmax(0, 1fr) auto; padding: 8px 0; }
    .recent-backup-list article > span:not(.pill) { display: none; }
    .recent-backup-list article > .pill { display: none; }
    .db-explorer-layout { grid-template-columns: 1fr; }
    .db-table-sidebar { position: static; padding: 14px 0; border-right: 0; border-bottom: 1px solid var(--border); }
    .db-table-catalog { max-height: 320px; }
    .db-data-workspace { padding: 18px 0 28px; }
    .db-primary-search { grid-template-columns: 1fr; }
    .db-primary-search > div { grid-column: auto; }
    .db-backup-results article { grid-template-columns: 82px minmax(0, 1fr); padding: 9px 0; }
    .db-backup-results article .btn { grid-column: 2; justify-self: start; }
    .record-field-grid-primary { grid-template-columns: 1fr; }
}

/* Core administration information architecture */
.sidebar { gap: 14px; }
.sidebar nav { gap: 2px; overflow-y: auto; padding-right: 2px; }
.nav-section-label { display: block; margin: 11px 10px 4px; color: var(--light); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.nav-section-label:first-child { margin-top: 0; }
.sidebar-tools { margin-top: 2px; }
.sidebar-tools > summary { display: flex; min-height: 32px; padding: 7px 10px; align-items: center; justify-content: space-between; border: 1px solid transparent; border-radius: var(--r-sm); color: var(--text); font-size: 11px; font-weight: 700; list-style: none; cursor: pointer; }
.sidebar-tools > summary::-webkit-details-marker { display: none; }
.sidebar-tools > summary::after { color: var(--light); content: '+'; font-family: var(--mono); }
.sidebar-tools[open] > summary::after { content: '−'; }
.sidebar-tools > summary:hover { background: var(--bg); color: var(--text-strong); }
.sidebar-tools > div { margin: 3px 0 4px 12px; padding-left: 8px; border-left: 1px solid var(--border); }
.sidebar-tools > div a { min-height: 28px; padding: 5px 8px; color: var(--muted); font-size: 10px; }
.sidebar-account { margin-top: auto; padding: 12px 5px 0; border-top: 1px solid var(--border2); }
.sidebar-account > div { min-width: 0; padding: 0 5px 8px; }
.sidebar-account strong, .sidebar-account span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account strong { color: var(--text-strong); font-size: 10.5px; }
.sidebar-account span { margin-top: 2px; color: var(--muted); font-size: 8.5px; }
.sidebar-account .logout-form { margin: 0; }
.sidebar-account .logout-form button { min-height: 28px; padding: 5px; color: var(--muted); font-size: 10px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.context-layer { position: fixed; inset: 0; z-index: 4500; }
.context-layer[hidden] { display: none; }
.context-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(15,23,42,.28); backdrop-filter: blur(2px); }
.context-drawer { position: absolute; top: 0; right: 0; width: min(430px, 100%); height: 100%; overflow: auto; border-left: 1px solid var(--border); background: #fff; box-shadow: -20px 0 60px rgba(15,23,42,.14); animation: contextDrawerIn .18s ease-out; }
.context-drawer > header { position: sticky; top: 0; z-index: 2; display: flex; min-height: 76px; padding: 18px 22px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
.context-drawer > header span, .context-drawer > header strong { display: block; }
.context-drawer > header span { color: var(--p-d); font-size: 8.5px; font-weight: 900; text-transform: uppercase; }
.context-drawer > header strong { margin-top: 3px; color: var(--text-strong); font-size: 15px; }
.context-drawer > header button { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--border); border-radius: 50%; background: #fff; color: var(--muted); font-size: 17px; cursor: pointer; }
.context-drawer-content { padding: 22px; }
.context-drawer-content section { padding: 18px 0; border-bottom: 1px solid var(--border2); }
.context-drawer-content section:first-child { padding-top: 0; }
.context-drawer-content section:last-child { border-bottom: 0; }
.context-drawer-content h2, .context-drawer-content h3 { margin: 0 0 8px; font-size: 13px; }
.context-drawer-content p { margin: 0; font-size: 10.5px; line-height: 1.65; }
.context-drawer-content ul, .context-drawer-content ol { margin: 9px 0 0; padding-left: 18px; color: var(--text); font-size: 10.5px; line-height: 1.7; }
.context-drawer-content code { overflow-wrap: anywhere; color: var(--p-d); font-size: 9px; }
.context-drawer-content dl { display: grid; grid-template-columns: minmax(120px,.7fr) minmax(0,1fr); gap: 8px 12px; margin: 12px 0 0; }
.context-drawer-content dt { color: var(--muted); font-size: 9.5px; }
.context-drawer-content dd { margin: 0; color: var(--text-strong); font-size: 9.5px; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
body.context-open { overflow: hidden; }
@keyframes contextDrawerIn { from { transform: translateX(24px); opacity: .3; } to { transform: none; opacity: 1; } }

.advanced-notes { margin-top: 14px; border-top: 1px solid var(--border2); }
.advanced-notes > summary { display: flex; min-height: 40px; align-items: center; justify-content: space-between; color: var(--muted); font-size: 9.5px; font-weight: 800; list-style: none; cursor: pointer; }
.advanced-notes > summary::-webkit-details-marker { display: none; }
.advanced-notes > summary::after { color: var(--p); content: 'Zobraziť'; }
.advanced-notes[open] > summary::after { content: 'Skryť'; }
.advanced-notes > div { padding: 12px 14px; background: #f8fafc; }
.advanced-notes > div p { margin: 0; font-size: 10px; line-height: 1.6; }

.professional-form { border-top: 2px solid var(--text-strong); }
.professional-form > section { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; padding: 24px 0; border-bottom: 1px solid var(--border); }
.professional-form > section > header { display: flex; align-items: flex-start; gap: 12px; }
.professional-form > section > header > span { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border: 1px solid var(--p-mid); border-radius: 50%; color: var(--p-d); font: 800 9px var(--mono); }
.professional-form > section > header h3 { margin: 2px 0 4px; font-size: 13px; }
.professional-form > section > header p { margin: 0; font-size: 9.5px; line-height: 1.5; }
.professional-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.professional-form-grid label { display: flex; min-width: 0; flex-direction: column; gap: 6px; color: var(--muted); font-size: 9.5px; font-weight: 800; }
.professional-form-grid label input, .professional-form-grid label textarea, .professional-form-grid label select { width: 100%; }
.professional-form-grid label small { color: var(--muted); font-size: 8.5px; font-weight: 500; }
.professional-form > .advanced-notes { margin-top: 0; padding: 0; }
.professional-form > .advanced-notes > summary { min-height: 54px; }
.professional-form > .advanced-notes > div { padding: 18px; }
.professional-form > footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 18px 0; }
.compact-definition-list { display: grid; grid-template-columns: minmax(100px,.65fr) minmax(0,1fr); gap: 9px 14px; margin: 0; }
.compact-definition-list dt { color: var(--muted); font-size: 9px; }
.compact-definition-list dd { margin: 0; color: var(--text-strong); font-size: 9.5px; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.compact-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.danger-notes > summary { color: #b91c1c; }
.danger-notes > div { background: #fff7f7; }
.danger-notes form { margin-top: 12px; }
.professional-actions { justify-content: flex-end; flex-wrap: nowrap; }

.documentation-hub { border-top: 2px solid var(--text-strong); }
.documentation-hub > header { display: flex; min-height: 92px; padding: 20px 0; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--border); }
.documentation-hub > header h2 { margin: 4px 0 0; font-size: 18px; }
.documentation-hub > details { border-bottom: 1px solid var(--border); }
.documentation-hub > details > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-height: 62px; padding: 14px 0; align-items: center; gap: 16px; list-style: none; cursor: pointer; }
.documentation-hub > details > summary::-webkit-details-marker { display: none; }
.documentation-hub > details > summary span { color: var(--text-strong); font-size: 12px; font-weight: 800; }
.documentation-hub > details > summary strong { color: var(--muted); font-size: 9px; }
.documentation-list { padding: 0 0 20px 18px; }
.documentation-list p { position: relative; margin: 0; padding: 9px 0 9px 18px; border-top: 1px solid var(--border2); color: var(--text); font-size: 10px; line-height: 1.55; }
.documentation-list p::before { position: absolute; top: 15px; left: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--p); content: ''; }
.documentation-list.ordered { margin: 0; padding-left: 36px; color: var(--text); font-size: 10px; line-height: 1.6; }
.documentation-list.ordered li { padding: 7px 0; border-top: 1px solid var(--border2); }

@media (max-width: 760px) {
    .nav-section-label { display: none; }
    .sidebar-tools { display: none; }
    .sidebar-account { position: absolute; top: 13px; right: 14px; margin: 0; padding: 0; border: 0; }
    .sidebar-account > div { display: none; }
    .sidebar-account .logout-form { position: static; }
    .topbar-actions { width: 100%; flex-wrap: wrap; }
    .context-drawer { width: min(390px, 100%); }
    .professional-form > section { grid-template-columns: 1fr; gap: 14px; }
    .professional-form-grid { grid-template-columns: 1fr; }
    .documentation-hub > header { align-items: flex-start; flex-direction: column; }
}

/* CONEXO Recovery Center and migration authoring */
.recovery-center,
.record-recovery { display: flex; flex-direction: column; gap: 22px; }
.recovery-center .section-tabs,
.record-recovery .section-tabs { margin-bottom: 0; }
.recovery-status-line,
.record-recovery-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.recovery-status-line > div,
.record-recovery-stats > div { min-height: 78px; padding: 16px 20px; border-right: 1px solid var(--border); }
.recovery-status-line > div:first-child,
.record-recovery-stats > div:first-child { padding-left: 0; }
.recovery-status-line > div:last-child,
.record-recovery-stats > div:last-child { border-right: 0; }
.recovery-status-line span,
.record-recovery-stats span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; }
.recovery-status-line strong,
.record-recovery-stats strong { display: block; margin-top: 7px; color: var(--text-strong); font-size: 20px; }
.recovery-workflow { padding: 8px 0 22px; }
.recovery-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--border); }
.recovery-choice-grid a { position: relative; display: flex; min-height: 150px; padding: 22px 24px; flex-direction: column; border-right: 1px solid var(--border); color: inherit; text-decoration: none; transition: background .15s ease; }
.recovery-choice-grid a:last-child { border-right: 0; }
.recovery-choice-grid a:hover { background: #f6fbfd; }
.recovery-choice-grid a > span { color: var(--p); font-family: var(--mono); font-size: 11px; font-weight: 800; }
.recovery-choice-grid a > strong { margin-top: 22px; color: var(--text-strong); font-size: 15px; }
.recovery-choice-grid a > small { max-width: 330px; margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.recovery-safety-band,
.recovery-prune-panel { display: flex; align-items: center; justify-content: space-between; gap: 26px; padding: 18px 20px; border-left: 3px solid var(--p); background: #eef9fc; }
.recovery-safety-band strong { flex: 0 0 160px; color: var(--text-strong); font-size: 12px; }
.recovery-safety-band p,
.recovery-prune-panel p { margin: 0; font-size: 11px; line-height: 1.55; }
.retention-form { border-top: 1px solid var(--border); }
.retention-default { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.retention-default label { color: var(--text-strong); font-size: 13px; font-weight: 800; }
.retention-default label span { display: inline-flex; align-items: center; gap: 7px; margin-left: 12px; font-weight: 600; }
.retention-default input { width: 84px; }
.retention-default p { max-width: 540px; margin: 0; font-size: 10.5px; }
.retention-list { border-bottom: 1px solid var(--border); }
.retention-row { display: grid; grid-template-columns: minmax(260px, 1.1fr) 130px 82px minmax(180px, .8fr) auto; align-items: center; gap: 16px; min-height: 74px; border-bottom: 1px solid var(--border2); }
.retention-row:last-child { border-bottom: 0; }
.retention-row > div { display: flex; flex-direction: column; gap: 4px; }
.retention-row > div strong { font-size: 12px; }
.retention-row > div small { color: var(--muted); font-size: 9.5px; }
.retention-row label { color: var(--muted); font-size: 9.5px; font-weight: 800; }
.retention-row input[type="number"],
.retention-row input[type="text"] { width: 100%; min-height: 32px; margin-top: 4px; }
.retention-override { display: flex; align-items: center; gap: 7px; color: var(--text) !important; }
.retention-override input { width: 15px; height: 15px; }
.retention-form > .form-actions { padding-top: 16px; }
.recovery-prune-panel { border-left-color: var(--danger); background: #fff7f7; }
.recovery-prune-panel h3 { margin: 0 0 5px; font-size: 13px; }
.recovery-filter { display: grid; grid-template-columns: minmax(230px, 1fr) 150px 150px minmax(180px, .8fr) auto; align-items: end; gap: 12px; padding: 16px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.recovery-filter label,
.record-database-picker label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 800; }
.backup-timeline article { display: grid; grid-template-columns: 90px minmax(260px, 1fr) 90px 90px auto; align-items: center; gap: 16px; min-height: 72px; border-bottom: 1px solid var(--border2); }
.backup-timeline time { color: var(--muted); font-size: 10px; }
.backup-timeline time strong { display: block; margin-top: 3px; color: var(--text-strong); font-size: 13px; }
.backup-timeline article > div:nth-child(2) { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.backup-timeline article > div:nth-child(2) strong { font-size: 11.5px; }
.backup-timeline article > div:nth-child(2) code { overflow: hidden; color: var(--muted); font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.backup-timeline article > span:not(.pill) { color: var(--muted); font-size: 10px; }
.record-database-picker { max-width: 720px; padding: 16px 0 22px; border-top: 1px solid var(--border); }
.record-table-catalog > section { padding: 18px 0; border-top: 1px solid var(--border); }
.record-table-catalog > section h3 { margin: 0 0 10px; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.record-table-catalog > section > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border2); }
.record-table-catalog a { display: flex; min-height: 88px; padding: 16px; flex-direction: column; background: var(--surface); color: inherit; text-decoration: none; }
.record-table-catalog a:hover { background: #f6fbfd; }
.record-table-catalog a strong { font-size: 12px; }
.record-table-catalog a small { margin-top: 5px; color: var(--muted); font-size: 9.5px; }
.record-table-catalog a code { margin-top: auto; padding-top: 8px; color: var(--p); font-size: 9px; }
.table-picker a code { display: block; margin-top: 4px; color: var(--p); font-size: 9px; }

.record-recovery-guide { display: grid; grid-template-columns: 150px 1fr minmax(260px, .7fr); align-items: center; gap: 22px; padding: 16px 18px; border-left: 3px solid var(--p); background: #eef9fc; }
.record-recovery-guide > strong { font-size: 12px; }
.record-recovery-guide ol { display: flex; gap: 24px; margin: 0; padding-left: 18px; font-size: 10.5px; font-weight: 700; }
.record-recovery-guide p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.record-recovery-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); align-items: start; gap: 30px; }
.record-version-nav { position: sticky; top: 18px; border-top: 2px solid var(--p); }
.record-version-nav h2 { margin: 0; padding: 14px 0 10px; font-size: 13px; }
.record-version-nav a { display: grid; grid-template-columns: 70px 1fr; gap: 3px 10px; padding: 11px 8px; border-top: 1px solid var(--border2); color: inherit; text-decoration: none; }
.record-version-nav a:hover,
.record-version-nav a.is-current { background: #f4fafc; }
.record-version-nav a span { color: var(--muted); font-size: 9.5px; }
.record-version-nav a strong { font-size: 11px; }
.record-version-nav a small { grid-column: 1 / -1; color: var(--muted); font-size: 9px; }
.record-version-content { min-width: 0; }
.record-current-version { padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.record-version-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.record-version-heading h2 { margin: 3px 0 0; font-size: 16px; }
.record-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--border2); border-left: 1px solid var(--border2); }
.record-field-grid > div { display: grid; grid-template-columns: minmax(130px, .45fr) minmax(0, 1fr); gap: 12px; min-height: 58px; padding: 11px 12px; border-right: 1px solid var(--border2); border-bottom: 1px solid var(--border2); }
.record-field-grid > div.is-changed { background: #fff9e8; }
.record-field-grid > div > span { color: var(--muted); font-size: 9.5px; font-weight: 800; }
.record-field-grid > div > span code { display: block; margin-top: 4px; color: var(--p); font-size: 8.5px; }
.record-field-grid > div > strong { overflow-wrap: anywhere; color: var(--text); font-family: var(--mono); font-size: 9.5px; font-weight: 500; white-space: pre-wrap; }
.record-history-list { padding-top: 28px; }
.record-snapshot { border-top: 1px solid var(--border); }
.record-snapshot > summary { display: grid; grid-template-columns: 100px minmax(0, 1fr) auto; align-items: center; gap: 16px; min-height: 68px; cursor: pointer; list-style: none; }
.record-snapshot > summary::-webkit-details-marker { display: none; }
.record-snapshot > summary time { color: var(--muted); font-size: 9.5px; }
.record-snapshot > summary time strong { display: block; margin-top: 4px; color: var(--text-strong); font-size: 12px; }
.record-snapshot > summary > div { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.record-snapshot > summary > div strong { font-size: 11.5px; }
.record-snapshot > summary > div small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.record-snapshot[open] { padding-bottom: 22px; }
.record-diff-list { padding: 16px 18px; background: #f8fafc; }
.record-diff-list h3 { margin: 0 0 12px; font-size: 12px; }
.record-diff-list > div { display: grid; grid-template-columns: minmax(150px, .45fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; padding: 10px 0; border-top: 1px solid var(--border2); }
.record-diff-list > div > strong { font-size: 10px; }
.record-diff-list > div > strong code { display: block; margin-top: 4px; color: var(--p); font-size: 8.5px; }
.record-diff-list > div > span { overflow-wrap: anywhere; font-family: var(--mono); font-size: 9.5px; white-space: pre-wrap; }
.record-diff-list > div > span small { display: block; margin-bottom: 4px; color: var(--muted); font-family: var(--sans); font-size: 8.5px; font-weight: 800; text-transform: uppercase; }
.record-no-diff { padding: 14px 16px; background: #ecfdf5; color: #166534; font-size: 10.5px; }
.record-full-row { margin-top: 12px; }
.record-full-row > summary { color: var(--p); font-size: 10.5px; font-weight: 800; cursor: pointer; }
.record-full-row .record-field-grid { margin-top: 12px; }
.record-restore-form { display: flex; align-items: end; justify-content: flex-end; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border2); }
.record-restore-form label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 9.5px; }
.record-restore-form input { width: 180px; min-height: 32px; }

.migration-wizard > header { max-width: 780px; margin-bottom: 20px; }
.migration-wizard > header h2 { margin: 5px 0; font-size: 20px; }
.migration-wizard > header p:not(.eyebrow) { margin: 0; }
.migration-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 28px; padding: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); list-style: none; }
.migration-steps li { display: flex; align-items: center; gap: 9px; min-height: 54px; padding: 10px 16px; border-right: 1px solid var(--border); color: var(--muted); font-size: 10px; font-weight: 800; }
.migration-steps li:last-child { border-right: 0; }
.migration-steps li span { display: grid; width: 23px; height: 23px; place-items: center; border: 1px solid var(--border); border-radius: 50%; font-size: 9px; }
.migration-steps li.active { color: var(--text-strong); }
.migration-steps li.active span { border-color: var(--p); background: var(--p); color: #fff; }
.migration-author-form { border-top: 2px solid var(--p); }
.migration-author-basics { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.migration-author-form label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 800; }
.migration-author-form input,
.migration-author-form select,
.migration-author-form textarea { width: 100%; }
.migration-operation-fields { padding: 24px 0; border-bottom: 1px solid var(--border); }
.migration-operation-fields h3 { margin: 0 0 5px; font-size: 15px; }
.migration-operation-fields > p { margin: 0 0 18px; font-size: 10.5px; }
.migration-operation-fields .form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.migration-operation-fields .check-row { flex-direction: row; align-items: center; align-self: end; min-height: 36px; color: var(--text); }
.migration-operation-fields .check-row input { width: 16px; }
.migration-columns { margin: 16px 0; border-top: 1px solid var(--border2); }
.migration-columns > div { display: grid; grid-template-columns: 80px minmax(180px, 1fr) minmax(180px, 1fr) 120px; align-items: center; gap: 12px; min-height: 56px; border-bottom: 1px solid var(--border2); }
.migration-columns > div > span { color: var(--muted); font-size: 9px; font-weight: 800; }
.code-input { padding: 14px; background: #0f172a; color: #dbeafe; font-family: var(--mono); font-size: 10.5px; line-height: 1.6; }
.danger-check { margin-top: 12px; color: var(--danger) !important; }
.migration-author-form > footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 0; }
.migration-author-form > footer strong { font-size: 11px; }
.migration-author-form > footer p { margin: 4px 0 0; font-size: 9.5px; }

@media (max-width: 1100px) {
    .retention-row { grid-template-columns: minmax(240px, 1fr) 130px 80px auto; }
    .retention-note { grid-column: 1 / -1; padding-bottom: 12px; }
    .backup-timeline article { grid-template-columns: 80px minmax(220px, 1fr) 80px auto; }
    .backup-timeline article > .database-toolbar { grid-column: 2 / -1; padding-bottom: 12px; justify-content: flex-start; }
    .record-table-catalog > section > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .migration-author-basics { grid-template-columns: 1fr 1fr; }
    .migration-author-basics label:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 760px) {
    .recovery-status-line,
    .record-recovery-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .recovery-status-line > div:nth-child(2),
    .record-recovery-stats > div:nth-child(2) { border-right: 0; }
    .recovery-status-line > div:nth-child(n + 3),
    .record-recovery-stats > div:nth-child(n + 3) { border-top: 1px solid var(--border); }
    .recovery-choice-grid { grid-template-columns: 1fr; }
    .recovery-choice-grid a { min-height: 120px; border-right: 0; border-bottom: 1px solid var(--border); }
    .recovery-safety-band,
    .recovery-prune-panel,
    .retention-default { align-items: flex-start; flex-direction: column; }
    .retention-row { grid-template-columns: 1fr 100px; padding: 14px 0; }
    .retention-row > div,
    .retention-note { grid-column: 1 / -1; }
    .recovery-filter { grid-template-columns: 1fr 1fr; }
    .recovery-filter label:first-of-type,
    .recovery-filter label:last-of-type { grid-column: 1 / -1; }
    .backup-timeline article { grid-template-columns: 68px minmax(0, 1fr) auto; padding: 10px 0; }
    .backup-timeline article > span:not(.pill) { display: none; }
    .record-table-catalog > section > div { grid-template-columns: 1fr; }
    .record-recovery-guide { grid-template-columns: 1fr; }
    .record-recovery-guide ol { flex-direction: column; gap: 6px; }
    .record-recovery-layout { grid-template-columns: 1fr; }
    .record-version-nav { position: static; display: flex; overflow-x: auto; }
    .record-version-nav h2 { display: none; }
    .record-version-nav a { min-width: 150px; border-right: 1px solid var(--border2); }
    .record-field-grid { grid-template-columns: 1fr; }
    .record-diff-list > div { grid-template-columns: 1fr; }
    .record-restore-form { align-items: stretch; flex-direction: column; }
    .record-restore-form input { width: 100%; }
    .migration-steps { grid-template-columns: 1fr 1fr; }
    .migration-steps li:nth-child(2) { border-right: 0; }
    .migration-steps li:nth-child(n + 3) { border-top: 1px solid var(--border); }
    .migration-author-basics,
    .migration-operation-fields .form-grid { grid-template-columns: 1fr; }
    .migration-author-basics label:nth-child(2) { grid-column: auto; grid-row: auto; }
    .migration-columns > div { grid-template-columns: 58px 1fr; padding: 10px 0; }
    .migration-columns > div select,
    .migration-columns > div label { grid-column: 2; }
    .migration-author-form > footer { align-items: stretch; flex-direction: column; }
}

/* Shared administration workspace */
.section-workspace {
    display: grid;
    gap: 22px;
}

.section-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    min-height: 78px;
    padding: 4px 0 20px;
    border-bottom: 1px solid var(--border);
}

.section-intro h2 {
    margin-bottom: 7px;
    font-size: 22px;
}

.section-intro p:not(.eyebrow) {
    max-width: 760px;
    margin-bottom: 0;
    font-size: 12.5px;
}

.section-intro-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-tabs {
    display: flex;
    gap: 28px;
    min-height: 50px;
    margin-top: -10px;
    overflow-x: auto;
    border-bottom: 1px solid var(--border);
    scrollbar-width: none;
}

.section-tabs::-webkit-scrollbar { display: none; }

.section-tabs a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 50px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.section-tabs a:hover { color: var(--text-strong); text-decoration: none; }
.section-tabs a::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; background: transparent; content: ''; }
.section-tabs a.active { color: var(--text-strong); }
.section-tabs a.active::after { background: var(--p); }
.section-tabs a.has-alert:not(.active) { color: #b45309; }
.section-tabs a span {
    min-width: 22px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #eaf7fb;
    color: var(--p-d);
    font-size: 9px;
    text-align: center;
}
.section-tabs a.has-alert span { background: #fff7ed; color: #c2410c; }

.section-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-metrics > div {
    min-width: 0;
    padding: 18px 20px;
    border-right: 1px solid var(--border);
}

.section-metrics > div:first-child { padding-left: 0; }
.section-metrics > div:last-child { border-right: 0; }
.section-metrics span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.section-metrics strong { display: block; margin-top: 5px; color: var(--text-strong); font-size: 23px; line-height: 1; }

.workspace-panel {
    min-width: 0;
    padding-top: 4px;
}

.workspace-panel.compact-panel {
    padding: 18px 0 4px;
    border-top: 2px solid var(--p-mid);
}

.workspace-panel-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.workspace-panel-heading h3 { margin: 0 0 4px; font-size: 16px; }
.workspace-panel-heading p { max-width: 780px; margin: 0; }

.settings-directory {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
}

.settings-directory a {
    display: grid;
    gap: 4px;
    min-height: 112px;
    padding: 20px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: rgba(255,255,255,.48);
}

.settings-directory a:hover { background: var(--surface); text-decoration: none; }
.settings-directory span { color: var(--p-d); font-size: 9px; font-weight: 900; text-transform: uppercase; }
.settings-directory strong { color: var(--text-strong); font-size: 14px; }
.settings-directory small { color: var(--muted); font-size: 11px; }
.automation-create-panel .automation-create { display: block; }
.automation-create-panel .automation-create > summary { display: none; }
.automation-create-panel .automation-create .automation-form { position: static; width: 100%; margin: 0; box-shadow: none; }

@media (max-width: 900px) {
    .section-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .section-metrics > div:nth-child(2) { border-right: 0; }
    .section-metrics > div:nth-child(n + 3) { border-top: 1px solid var(--border); }
    .settings-directory { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
    .section-workspace { gap: 17px; }
    .section-intro { align-items: flex-start; flex-direction: column; gap: 14px; }
    .section-intro h2 { font-size: 19px; }
    .section-intro-actions { width: 100%; flex-wrap: wrap; }
    .section-tabs { gap: 20px; }
    .section-metrics { grid-template-columns: 1fr; }
    .section-metrics > div, .section-metrics > div:first-child { padding: 14px 0; border-right: 0; border-top: 1px solid var(--border); }
    .section-metrics > div:first-child { border-top: 0; }
    .workspace-panel-heading { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 760px) {
    .sidebar {
        position: sticky;
        top: 0;
        z-index: 80;
        width: 100%;
        padding: 10px 14px 8px;
        gap: 8px;
        border-right: 0;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 6px 18px rgba(15,23,42,.05);
    }

    .brand {
        min-height: 42px;
        padding: 0 84px 8px 0;
    }

    .brand-mark { width: 32px; height: 32px; }

    .sidebar nav {
        display: flex;
        flex-direction: row;
        gap: 4px;
        width: 100%;
        padding-bottom: 2px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .sidebar nav::-webkit-scrollbar { display: none; }

    .sidebar nav a {
        width: auto;
        min-height: 34px;
        flex: 0 0 auto;
        padding: 7px 10px;
        white-space: nowrap;
    }

    .logout-form {
        position: absolute;
        top: 13px;
        right: 14px;
        margin: 0;
    }

    .logout-form button {
        width: auto;
        min-height: 31px;
        padding: 6px 9px;
        color: var(--muted);
        font-size: 10px;
    }
}

/* Core identity, Google login and security records */
.login-provider-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0 16px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.login-provider-divider::before, .login-provider-divider::after { flex: 1; height: 1px; background: var(--border); content: ''; }
.google-login-button { position: relative; display: flex; align-items: center; justify-content: center; gap: 11px; width: 100%; min-height: 46px; padding: 10px 44px; border: 1px solid #cbd5e1; border-radius: var(--r-sm); background: #fff; color: var(--text-strong); box-shadow: var(--sh); font-size: 12px; font-weight: 800; text-decoration: none; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease; }
.google-login-button:hover, .google-login-button:focus-visible { border-color: #9bd8e8; background: #f8fdff; box-shadow: var(--sh-md); text-decoration: none; transform: translateY(-1px); outline: none; }
.google-login-icon { position: absolute; left: 16px; width: 22px; height: 22px; flex: 0 0 auto; }
.google-login-label { min-width: 0; line-height: 1.3; text-align: center; }
.google-login-button.is-pending { border-style: solid; color: #475569; box-shadow: none; cursor: default; }
.google-login-button.is-pending:hover, .google-login-button.is-pending:focus-visible { border-color: #cbd5e1; background: #fff; box-shadow: none; }
.login-provider-note { margin: 9px 0 0 !important; color: var(--muted) !important; font-size: 9.5px !important; line-height: 1.45; text-align: center; }
.access-security-form { margin-top: 8px; }
.security-test-form { display: flex; align-items: center; gap: 12px; padding: 14px 0 24px; border-bottom: 1px solid var(--border); }
.security-test-form span { color: var(--muted); font-size: 10.5px; }
.security-records-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin-top: 30px; }
.security-record-list { border-top: 1px solid var(--border); }
.security-record-list article { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; min-height: 54px; padding: 8px 0; border-bottom: 1px solid var(--border2); }
.security-record-list article > i { width: 7px; height: 7px; border-radius: 50%; background: var(--light); }
.security-record-list article > i.ok { background: var(--success); }
.security-record-list article > i.warning { background: var(--warning); }
.security-record-list article > i.error { background: var(--danger); }
.security-record-list strong, .security-record-list small { display: block; }
.security-record-list strong { color: var(--text); font-size: 11px; }
.security-record-list small { max-width: 540px; overflow: hidden; color: var(--muted); font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.security-record-list time { color: var(--muted); font-family: var(--mono); font-size: 9px; white-space: nowrap; }
@media (max-width: 980px) { .security-records-grid { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .security-record-list article { grid-template-columns: 8px minmax(0, 1fr) auto; } .security-record-list article form, .security-record-list article > .pill { grid-column: 2 / -1; justify-self: start; } }
/* CONEXO row restore UI */
.backup-row-search-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 10px;
    align-items: end;
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--border2);
    border-radius: var(--r);
    background: var(--surface-soft);
}

.backup-match-list,
.row-history-list {
    display: grid;
    gap: 10px;
}

.backup-match-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--border2);
    border-radius: var(--r);
    background: var(--surface-soft);
}

.backup-match-item div {
    min-width: 0;
}

.backup-match-item strong,
.backup-match-item span,
.backup-match-item small {
    display: block;
}

.backup-match-item strong,
.backup-match-item small {
    overflow-wrap: anywhere;
}

.backup-match-item span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 800;
}

.backup-match-item small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 10.5px;
}

.row-history-item {
    border: 1px solid var(--border2);
    border-radius: var(--r);
    background: var(--surface);
}

.row-history-item > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    cursor: pointer;
    list-style: none;
}

.row-history-item > summary::-webkit-details-marker {
    display: none;
}

.row-history-item > summary strong,
.row-history-item > summary span {
    display: block;
}

.row-history-item > summary strong {
    color: var(--text-strong);
    font-size: 12px;
}

.row-history-item > summary div > span {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 800;
}

.row-history-item[open] > summary {
    border-bottom: 1px solid var(--border2);
}

.row-history-item > .table-scroll,
.row-history-item > p,
.row-history-actions {
    margin: 12px;
}

.row-detail-table,
.diff-table {
    min-width: 760px;
}

.row-detail-table td:first-child,
.diff-table td:first-child {
    width: 210px;
}

.diff-table td {
    max-width: 420px;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.row-history-actions {
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 1180px) {
    .backup-row-search-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .backup-row-search-form {
        grid-template-columns: 1fr;
    }

    .backup-match-item,
    .row-history-item > summary {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* CONEXO roadmap 2026 update */
.roadmap-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.roadmap-process {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    background: var(--surface-soft);
}

.roadmap-process h3 {
    margin: 0 0 10px;
}

.roadmap-step {
    align-items: flex-start;
}

.roadmap-step span {
    color: var(--text);
    font-weight: 700;
}

.roadmap-note {
    margin-top: 12px;
}

@media (max-width: 900px) {
    .roadmap-actions {
        justify-content: flex-start;
        width: 100%;
    }
}

/* CONEXO automation center */
.automation-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--p);
    border-radius: var(--r);
    background: var(--surface);
    box-shadow: var(--sh);
}

.automation-hero .eyebrow,
.automation-section-heading .eyebrow { margin-bottom: 5px; }
.automation-hero h2 { margin-bottom: 4px; font-size: 18px; }
.automation-hero p:not(.eyebrow) { margin: 0; }
.automation-create,
.automation-editor { position: relative; }

.automation-create > summary,
.automation-editor > summary {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid var(--p);
    border-radius: var(--r-sm);
    background: var(--p);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.automation-create > summary::-webkit-details-marker,
.automation-editor > summary::-webkit-details-marker,
.automation-run > summary::-webkit-details-marker { display: none; }
.automation-create[open] > summary { margin-bottom: 12px; }

.automation-create .automation-form,
.automation-editor .automation-form {
    position: absolute;
    z-index: 20;
    right: 0;
    width: min(820px, calc(100vw - 84px));
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    background: var(--surface);
    box-shadow: var(--sh-md);
}

.automation-create .automation-form { top: 42px; }
.automation-editor .automation-form { top: 36px; }

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

.automation-form label,
.automation-script-upload label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 800;
}

.automation-form input,
.automation-form select,
.automation-script-upload input {
    width: 100%;
    min-height: 33px;
    padding: 0 9px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 11px;
}

.automation-form select { padding: 0 7px; }
.automation-form .checkbox-field {
    flex-direction: row;
    align-items: center;
    gap: 7px;
    color: var(--text);
}
.automation-form .checkbox-field input { width: 15px; min-height: 15px; }
.automation-form-actions { display: flex; align-items: end; }
.automation-form.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.automation-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 30px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.automation-stats > div {
    min-height: 70px;
    padding: 13px 18px;
    border-right: 1px solid var(--border);
}

.automation-stats > div:first-child { padding-left: 0; }
.automation-stats > div:last-child { border-right: 0; }
.automation-stats span { color: var(--muted); font-size: 10px; font-weight: 800; }
.automation-stats strong { display: block; margin-top: 5px; color: var(--text-strong); font-size: 21px; }

.automation-script-library,
.automation-list-section,
.automation-history-section { margin-bottom: 32px; }

.automation-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.automation-section-heading h2 { margin: 0; font-size: 16px; }
.automation-section-heading .muted { max-width: 650px; margin: 5px 0 0; font-size: 11px; }
.automation-section-heading > span { color: var(--muted); font-size: 10.5px; font-weight: 800; }

.automation-script-library-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, .38fr);
    gap: 20px;
    padding-top: 13px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.automation-script-list { min-width: 0; }
.automation-script-row {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) 74px 150px;
    gap: 12px;
    align-items: center;
    min-height: 40px;
    border-bottom: 1px solid var(--border2);
    color: var(--muted);
    font-size: 10.5px;
}

.automation-script-row:first-child { border-top: 1px solid var(--border2); }
.automation-script-row code { overflow: hidden; color: var(--text-strong); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.automation-script-upload {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 9px;
    min-height: 126px;
    padding-left: 20px;
    border-left: 1px solid var(--border);
}

.automation-script-upload input[type="file"] { padding: 6px 8px; }
.automation-script-upload .btn { align-self: flex-start; }
.form-error { margin: 0; color: var(--danger); font-size: 10.5px; }

.automation-list,
.automation-history { border-top: 1px solid var(--border); }

.automation-row {
    display: grid;
    grid-template-columns: 8px minmax(205px, 1.15fr) minmax(150px, .75fr) minmax(160px, .8fr) minmax(110px, .45fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border2);
}

.automation-row-state { width: 7px; height: 7px; border-radius: 50%; background: var(--gray); }
.automation-row.is-active .automation-row-state { background: var(--success); }
.automation-row.is-paused .automation-row-state { background: var(--light); }
.automation-row-main > div { display: flex; align-items: center; gap: 6px; }
.automation-row-main h3 { margin: 6px 0 3px; font-size: 13px; }
.automation-row-main p { margin: 0; font-size: 10.5px; }
.automation-system-label { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }

.automation-row-schedule,
.automation-row-scope,
.automation-row-result { display: flex; flex-direction: column; gap: 3px; }

.automation-row-schedule > span,
.automation-row-scope > span,
.automation-row-result > span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.automation-row-schedule strong,
.automation-row-scope strong { color: var(--text-strong); font-size: 11px; }
.automation-row-schedule code { color: var(--muted); font-size: 9.5px; }
.automation-row-scope small,
.automation-row-result small { color: var(--muted); font-size: 10px; }
.automation-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.automation-row-actions form { margin: 0; }

.automation-editor > summary {
    border-color: var(--border);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--sh);
}

.automation-run { border-bottom: 1px solid var(--border2); }
.automation-run > summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(220px, .8fr);
    align-items: center;
    gap: 14px;
    min-height: 46px;
    cursor: pointer;
    list-style: none;
}

.automation-run > summary small { color: var(--muted); text-align: right; }
.automation-run pre {
    max-height: 240px;
    margin: 0 0 12px;
    padding: 12px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: #0f172a;
    color: #dbeafe;
    font-family: var(--mono);
    font-size: 10px;
    white-space: pre-wrap;
}

@media (max-width: 1180px) {
    .automation-row { grid-template-columns: 8px minmax(200px, 1fr) minmax(150px, .75fr) minmax(145px, .7fr) auto; }
    .automation-row-result { display: none; }
}

@media (max-width: 820px) {
    .automation-hero { align-items: flex-start; flex-direction: column; }
    .automation-create .automation-form,
    .automation-editor .automation-form { position: static; width: 100%; margin-top: 10px; }
    .automation-form,
    .automation-form.compact { grid-template-columns: 1fr; }
    .automation-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .automation-stats > div:nth-child(2) { border-right: 0; }
    .automation-stats > div:nth-child(n + 3) { border-top: 1px solid var(--border); }
    .automation-script-library-body { grid-template-columns: 1fr; }
    .automation-script-upload { min-height: 0; padding: 14px 0; border-top: 1px solid var(--border2); border-left: 0; }
    .automation-row { grid-template-columns: 8px minmax(0, 1fr) auto; align-items: start; }
    .automation-row-schedule,
    .automation-row-scope { grid-column: 2; }
    .automation-row-actions { grid-column: 3; grid-row: 1 / span 3; }
}

@media (max-width: 560px) {
    .automation-script-row { grid-template-columns: minmax(0, 1fr) auto; }
    .automation-script-row span:last-child { grid-column: 1 / -1; }
    .automation-run > summary { grid-template-columns: minmax(0, 1fr) auto; padding: 8px 0; }
    .automation-run > summary small { grid-column: 1 / -1; text-align: left; }
}

/* Final CRM security parity overrides */
.login-security-lock {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: grid;
    place-items: center;
    padding: 18px;
    background: radial-gradient(circle at 50% 34%, rgba(0,164,211,.16), transparent 34%), rgba(15,23,42,.36);
    backdrop-filter: blur(8px) saturate(1.08);
    -webkit-backdrop-filter: blur(8px) saturate(1.08);
}
.login-security-modal {
    position: relative;
    width: min(100%, 468px);
    overflow: hidden;
    border: 1px solid rgba(213,226,238,.92);
    border-radius: 24px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 28px 90px rgba(15,23,42,.22);
}
.login-security-modal header { display: flex; align-items: flex-start; gap: 14px; padding: 24px 24px 18px; border-bottom: 1px solid rgba(226,232,240,.82); }
.login-security-modal h2 { margin: 0; color: #0f172a; font-size: 18px; font-weight: 900; line-height: 1.18; }
.login-security-modal p { margin: 7px 0 0; color: #64748b; font-size: 13px; font-weight: 650; line-height: 1.55; }
.login-security-icon { position: relative; display: grid; flex: 0 0 44px; place-items: center; width: 44px; height: 44px; border-radius: 16px; background: linear-gradient(135deg, #00a4d3, #12b8cf); box-shadow: 0 14px 28px rgba(0,164,211,.22); }
.login-security-timer { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 12px; border-top: 0; }
.login-security-timer span { color: #64748b; font-size: 11px; font-weight: 900; letter-spacing: .9px; text-transform: uppercase; }
.login-security-timer strong { color: #0f172a; font-family: var(--mono); font-size: 25px; font-weight: 600; }
.login-security-progress { height: 7px; margin: 0 24px 24px; border: 1px solid #fed7aa; border-radius: 999px; background: #ffedd5; }
.login-security-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f59e0b, #fb923c); transition: width .35s linear; }

.session-timeout {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(15,23,42,.42);
    backdrop-filter: blur(3px);
}
.session-timeout[hidden] { display: none; }
.session-timeout > div { position: relative; width: min(100%, 420px); overflow: hidden; padding: 26px 26px 22px; border: 1px solid var(--border); border-top: 1px solid var(--border); border-radius: 16px; background: rgba(255,255,255,.98); box-shadow: 0 22px 55px rgba(15,23,42,.18); }
.session-timeout h2 { margin: 0; color: #334155; font-size: 17px; font-weight: 800; line-height: 1.18; }
.session-timeout section > p:not(.eyebrow):not(.session-reauth-error) { margin: 14px 0 18px; color: #64748b; font-size: 12px; font-weight: 600; line-height: 1.5; }
.session-reauth-form label { display: block; margin: 0 0 6px; color: #64748b; font-size: 11px; font-weight: 800; }
.session-timeout-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.session-reauth-error { min-height: 18px; margin: -2px 0 10px; color: #ef4444; font-size: 11.5px; font-weight: 700; }

@media (max-width: 480px) {
    .login-security-lock, .session-timeout { padding: 14px; }
    .login-security-modal { width: min(100%, 390px); }
    .login-security-modal header { padding: 20px 18px 15px; }
    .login-security-timer { padding: 16px 18px 12px; }
    .login-security-progress { margin: 0 18px 20px; }
    .session-timeout > div { padding: 22px 18px 18px; border-radius: 14px; }
    .session-timeout h2 { font-size: 15.5px; }
    .session-timeout-actions { flex-direction: column-reverse; }
    .session-timeout-actions .btn, .session-timeout-actions form { width: 100%; }
}

/* CONEXO unified AI operations and Core security */
.ops-center { width: 100%; }
.ops-header { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 26px 28px; border: 1px solid var(--border); border-left: 4px solid var(--success); border-radius: var(--r-sm); background: #fff; }
.ops-header.status-attention, .ops-header.status-critical, .ops-header.status-error { border-left-color: var(--danger); }
.ops-header.status-warning { border-left-color: var(--warning); }
.ops-header h2 { margin: 5px 0 7px; font-size: 23px; }
.ops-header p { margin: 0; }
.ops-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 17px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.ops-meta span { display: inline-flex; align-items: center; gap: 7px; }
.ops-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(16,185,129,.12); }
.ops-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.ops-actions form { margin: 0; }

.detail-tabs { display: flex; gap: 28px; margin: 24px 0 30px; overflow-x: auto; border-bottom: 1px solid var(--border); }
.detail-tabs a { position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 48px; color: var(--muted); font-weight: 800; white-space: nowrap; text-decoration: none; }
.detail-tabs a::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; background: transparent; content: ''; }
.detail-tabs a.active { color: var(--accent); }
.detail-tabs a.active::after { background: var(--accent); }
.detail-tabs a span { min-width: 21px; padding: 2px 6px; border-radius: 10px; background: #eaf7fb; color: var(--accent); font-size: 9px; text-align: center; }

.ops-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.ops-kpis > div { position: relative; min-height: 91px; padding: 18px 23px; border-right: 1px solid var(--border); }
.ops-kpis > div:last-child { border-right: 0; }
.ops-kpis span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.ops-kpis strong { display: block; margin-top: 7px; font-size: 24px; }
.ops-kpis i { position: absolute; top: 21px; right: 20px; width: 8px; height: 8px; border-radius: 50%; background: var(--gray); }
.ops-kpis i.critical, .ops-kpis i.error { background: var(--danger); }
.ops-kpis i.warning { background: var(--warning); }
.ops-kpis i.ok { background: var(--success); }

.ops-summary-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr); gap: 42px; margin-top: 34px; }
.ops-summary-grid > section { min-width: 0; }
.ops-summary-grid h3, .ops-map-link h3 { margin: 5px 0 12px; font-size: 17px; }
.ops-analysis { padding-left: 17px; border-left: 3px solid #aee9f5; line-height: 1.7; white-space: pre-line; }
.ops-priority-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 43px; border-bottom: 1px solid var(--border2); color: var(--text); text-decoration: none; }
.ops-priority-row i, .ops-event-list article > i, .ops-visits article > i { width: 7px; height: 7px; border-radius: 50%; background: var(--gray); }
.ops-priority-row i.critical, .ops-priority-row i.error, .ops-event-list i.critical, .ops-event-list i.error, .ops-visits i.critical, .ops-visits i.error { background: var(--danger); }
.ops-priority-row i.warning, .ops-event-list i.warning, .ops-visits i.warning { background: var(--warning); }
.ops-priority-row i.ok, .ops-event-list i.ok, .ops-visits i.ok { background: var(--success); }
.ops-priority-row em { color: var(--muted); font-size: 9px; font-style: normal; font-weight: 900; text-transform: uppercase; }
.ops-map-link { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 36px; padding: 24px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.ops-map-link p { margin: 0; }

.ops-section { min-height: 420px; }
.ops-section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.ops-section-title h2 { margin: 5px 0 6px; font-size: 19px; }
.ops-section-title p { margin: 0; }
.ops-run-list, .ops-event-list { border-top: 1px solid var(--border); }
.ops-run { border-bottom: 1px solid var(--border); }
.ops-run > summary { display: grid; grid-template-columns: 190px auto minmax(240px, 1fr); align-items: center; gap: 18px; min-height: 58px; cursor: pointer; list-style: none; }
.ops-run > summary::-webkit-details-marker { display: none; }
.ops-run > summary small { color: var(--muted); text-align: right; }
.ops-run > p { margin: 0 0 14px; }
.ops-visits { margin-bottom: 16px; border-top: 1px solid var(--border2); }
.ops-visits article { display: grid; grid-template-columns: 8px minmax(180px, .8fr) minmax(120px, .45fr) auto 80px; align-items: center; gap: 12px; min-height: 44px; border-bottom: 1px solid var(--border2); }
.ops-visits article > p { grid-column: 2 / -1; margin: -3px 0 10px; color: var(--muted); }
.ops-visits article > span, .ops-visits article > small { color: var(--muted); }
.ops-visits article > small { text-align: right; }

.ops-event-list article { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto 110px; align-items: start; gap: 16px; padding: 17px 0; border-bottom: 1px solid var(--border2); }
.ops-event-list article > i { margin-top: 5px; }
.ops-event-list article > div { min-width: 0; }
.ops-event-list article strong, .ops-event-list article span { display: block; }
.ops-event-list article span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.ops-event-list article p { margin: 7px 0 0; color: var(--text); }
.ops-event-list article > small { color: var(--muted); text-align: right; }

.ops-policy-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.ops-policy-grid > div { min-height: 125px; padding: 22px; border-right: 1px solid var(--border); }
.ops-policy-grid > div:last-child { border-right: 0; }
.ops-policy-grid span, .ops-policy-grid small { display: block; color: var(--muted); }
.ops-policy-grid span { font-size: 9px; font-weight: 900; text-transform: uppercase; }
.ops-policy-grid strong { display: block; margin: 10px 0 7px; }

.agent-message-stream { display: flex; flex-direction: column; gap: 10px; max-height: 520px; padding: 16px 0; overflow-y: auto; }
.agent-message { width: min(78%, 760px); padding: 13px 15px; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fff; }
.agent-message.admin { align-self: flex-end; border-color: #b8e7f2; background: #f0fbfe; }
.agent-message.severity-critical, .agent-message.severity-error { border-left: 3px solid var(--danger); }
.agent-message.severity-warning { border-left: 3px solid var(--warning); }
.agent-message > div { display: flex; justify-content: space-between; gap: 12px; }
.agent-message small { color: var(--muted); }
.agent-message p { margin: 7px 0 0; line-height: 1.55; white-space: pre-line; }
.agent-chat-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; padding-top: 15px; border-top: 1px solid var(--border); }
.agent-chat-form textarea { resize: vertical; }

.agent-dock-trigger { position: fixed; right: 24px; bottom: 24px; z-index: 90; display: grid; place-items: center; width: 50px; height: 50px; border: 0; border-radius: 50%; background: #1188a8; color: #fff; box-shadow: 0 10px 28px rgba(15,23,42,.25); cursor: pointer; font-weight: 900; transition: bottom .24s cubic-bezier(.2,.8,.2,1); }
.agent-dock-trigger b { position: absolute; top: -4px; right: -4px; min-width: 20px; padding: 3px 5px; border: 2px solid #fff; border-radius: 12px; background: var(--danger); color: #fff; font-size: 9px; }
.agent-dock { position: fixed; right: 24px; bottom: 84px; z-index: 89; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; width: min(410px, calc(100vw - 32px)); height: min(620px, calc(100vh - 120px)); border: 1px solid var(--border); border-radius: var(--r-sm); background: #fff; box-shadow: 0 20px 50px rgba(15,23,42,.22); transition: opacity .18s, transform .18s, bottom .24s cubic-bezier(.2,.8,.2,1), height .24s cubic-bezier(.2,.8,.2,1); }
.agent-dock[aria-hidden="true"] { pointer-events: none; opacity: 0; transform: translateY(12px); }
.agent-dock header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.agent-dock header strong, .agent-dock header span { display: block; }
.agent-dock header span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.agent-dock header button { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 24px; }
.agent-dock-status { display: flex; align-items: center; gap: 8px; padding: 9px 18px; border-bottom: 1px solid var(--border2); color: var(--muted); font-size: 10px; }
.agent-dock-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.agent-dock-status a { margin-left: auto; font-weight: 800; }
.agent-dock .agent-message-stream { padding: 12px 14px; }
.agent-dock .agent-message { width: 88%; font-size: 11px; }
.agent-chat-form.compact { padding: 10px 12px; }
.agent-chat-form.compact textarea { min-height: 52px; }
.agent-chat-form.compact button { min-height: 38px; border: 0; border-radius: var(--r-sm); background: var(--accent); color: #fff; cursor: pointer; font-weight: 800; }

.session-timeout { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; background: rgba(15,23,42,.46); }
.session-timeout[hidden] { display: none; }
.session-timeout > div { width: min(460px, 100%); padding: 26px; border-radius: var(--r-sm); background: #fff; box-shadow: 0 24px 60px rgba(15,23,42,.28); }
.session-timeout h2 { margin: 6px 0 8px; }
.session-timeout > div > div { display: flex; gap: 8px; margin-top: 20px; }
.session-timeout form { margin: 0; }

.core-security-settings { margin-top: 24px; }
.core-security-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px 18px; }
.core-security-form label { display: flex; flex-direction: column; gap: 7px; color: var(--text); font-weight: 700; }
.core-security-submit { display: flex; align-items: end; }

.ops-control-settings { max-width: 1480px; }
.ops-settings-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.ops-settings-form fieldset { min-width: 0; margin: 0; padding: 22px 24px 24px; border: 0; border-right: 1px solid var(--border); }
.ops-settings-form fieldset:last-of-type { border-right: 0; }
.ops-settings-form legend { padding: 0; color: var(--accent); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.ops-settings-form label, .ops-security-form label { display: flex; flex-direction: column; gap: 7px; margin-top: 15px; color: var(--text); font-size: 11px; font-weight: 800; }
.ops-settings-form label:first-of-type { margin-top: 7px; }
.ops-settings-form small, .ops-security-form small { color: var(--muted); font-weight: 500; }
.ops-inline-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ops-settings-submit { display: flex; align-items: center; gap: 9px; grid-column: 1 / -1; padding: 17px 0; }
.security-title { margin-top: 38px; padding-top: 30px; border-top: 2px solid #b9e9f3; }
.ops-security-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px 20px; }
.ops-security-form .ops-settings-submit { margin-top: 8px; border-top: 1px solid var(--border); }
.settings-handoff { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; padding: 24px 28px; border-top: 3px solid var(--accent); border-bottom: 1px solid var(--border); background: #fff; }
.settings-handoff h2 { margin: 5px 0 7px; }
.settings-handoff p { margin: 0; }

.login-security-lock { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 20px; background: rgba(100,116,139,.48); backdrop-filter: blur(5px); }
.login-security-modal { width: min(520px, 100%); overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: 0 25px 70px rgba(15,23,42,.25); }
.login-security-modal header { display: flex; align-items: flex-start; gap: 17px; padding: 25px 28px 22px; }
.login-security-modal h2 { margin: 0 0 6px; font-size: 20px; }
.login-security-modal p { margin: 0; color: var(--muted); line-height: 1.55; }
.login-security-icon { display: grid; flex: 0 0 48px; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--accent); color: #fff; font-size: 19px; font-weight: 900; }
.login-security-timer { display: flex; align-items: center; justify-content: space-between; padding: 22px 28px 14px; border-top: 1px solid var(--border); }
.login-security-timer span { color: var(--muted); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.login-security-timer strong { font-family: var(--mono); font-size: 28px; }
.login-security-progress { height: 8px; margin: 0 28px 28px; overflow: hidden; border: 1px solid #fed7aa; border-radius: 5px; background: #fff7ed; }
.login-security-progress i { display: block; height: 100%; background: #f59e0b; transition: width 1s linear; }

.session-timeout > div { border-top: 3px solid var(--accent); }
.session-timeout section[hidden] { display: none; }
.session-timeout-actions { display: flex; align-items: center; gap: 8px; margin-top: 20px; }
.session-timeout-actions form { margin: 0; }
.session-reauth-form label { display: flex; flex-direction: column; gap: 7px; margin-top: 14px; color: var(--text); font-size: 11px; font-weight: 800; }
.session-reauth-error { min-height: 18px; margin: 9px 0 0; color: var(--danger); font-size: 11px; font-weight: 700; }

@media (max-width: 1050px) {
    .ops-summary-grid { grid-template-columns: 1fr; }
    .ops-policy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ops-policy-grid > div:nth-child(2) { border-right: 0; }
    .ops-policy-grid > div:nth-child(n + 3) { border-top: 1px solid var(--border); }
    .core-security-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ops-settings-form { grid-template-columns: 1fr; }
    .ops-settings-form fieldset { border-right: 0; border-bottom: 1px solid var(--border); }
    .ops-security-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .ops-header, .ops-map-link, .ops-section-title { align-items: flex-start; flex-direction: column; }
    .ops-actions { flex-wrap: wrap; }
    .detail-tabs { gap: 20px; }
    .ops-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ops-kpis > div:nth-child(2) { border-right: 0; }
    .ops-kpis > div:nth-child(n + 3) { border-top: 1px solid var(--border); }
    .ops-run > summary { grid-template-columns: minmax(0, 1fr) auto; padding: 10px 0; }
    .ops-run > summary small { grid-column: 1 / -1; text-align: left; }
    .ops-event-list article { grid-template-columns: 8px minmax(0, 1fr) auto; }
    .ops-event-list article > small { grid-column: 2 / -1; text-align: left; }
    .ops-visits article { grid-template-columns: 8px minmax(0, 1fr) auto; padding: 9px 0; }
    .ops-visits article > span, .ops-visits article > small { grid-column: 2; text-align: left; }
    .ops-visits article > em { grid-column: 3; grid-row: 1; }
    .ops-policy-grid, .core-security-form { grid-template-columns: 1fr; }
    .ops-security-form { grid-template-columns: 1fr; }
    .settings-handoff { align-items: flex-start; flex-direction: column; }
    .ops-policy-grid > div { border-right: 0; border-bottom: 1px solid var(--border); }
    .agent-message { width: 92%; }
    .agent-dock-trigger { right: 16px; bottom: 16px; }
    .agent-dock { right: 16px; bottom: 76px; }
}

/* CONEXO system agent */
.ops-v2-agent-brief {
    display: grid;
    grid-template-columns: minmax(190px, .6fr) minmax(0, 1.45fr) auto auto;
    align-items: center;
    gap: 22px;
    margin-top: 18px;
    padding: 16px 20px;
    border-top: 1px solid var(--p-mid);
    border-bottom: 1px solid var(--p-mid);
    background: #f4faff;
}

.ops-v2-agent-brief .eyebrow { margin-bottom: 5px; }
.ops-v2-agent-brief h2 { margin: 0; font-size: 14px; }
.ops-v2-agent-brief > p { margin: 0; color: var(--text); font-size: 11.5px; }

.graph-agent-badge {
    position: absolute;
    z-index: 7;
    display: grid;
    width: 23px;
    height: 23px;
    padding: 0;
    place-items: center;
    transform: translate(-50%, -50%);
    border: 2px solid #e9d5ff;
    border-radius: 50%;
    background: #7c3aed;
    box-shadow: 0 0 0 4px rgba(125, 211, 252, .20), 0 7px 20px rgba(15, 23, 42, .42);
    color: #fff;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .04em;
    cursor: pointer;
    pointer-events: auto;
}

.graph-agent-badge[data-status="running"] {
    background: #0369a1;
    box-shadow: 0 0 0 5px rgba(14, 165, 233, .25), 0 7px 20px rgba(15, 23, 42, .42);
}

.graph-agent-halo {
    position: absolute;
    z-index: 6;
    width: 39px;
    height: 39px;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(125, 211, 252, .20);
    border-radius: 50%;
    pointer-events: none;
}

.graph-agent-halo[hidden],
.graph-agent-caption[hidden] { display: none; }

.graph-agent-halo::after {
    position: absolute;
    inset: -2px;
    border: 3px solid transparent;
    border-top-color: #67e8f9;
    border-right-color: #38bdf8;
    border-radius: inherit;
    content: "";
}

.graph-agent-halo[data-phase="checking"]::after {
    animation: graph-agent-check 1s linear infinite;
}

.graph-agent-halo[data-phase="travelling"] {
    border-style: dashed;
    animation: graph-agent-travel 1.15s ease-in-out infinite;
}

.graph-agent-halo[data-phase="travelling"]::after { opacity: .35; }

.graph-agent-caption {
    position: absolute;
    z-index: 8;
    max-width: 180px;
    padding: 4px 8px;
    transform: translate(-50%, 0);
    overflow: hidden;
    border: 1px solid rgba(125, 211, 252, .28);
    border-radius: 999px;
    background: rgba(8, 15, 28, .88);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .28);
    color: #e0f2fe;
    font-family: var(--font);
    font-size: 8.5px;
    font-weight: 900;
    line-height: 1.2;
    pointer-events: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@keyframes graph-agent-check {
    to { transform: rotate(360deg); }
}

@keyframes graph-agent-travel {
    0%, 100% { opacity: .55; transform: translate(-50%, -50%) scale(.92); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

@media (prefers-reduced-motion: reduce) {
    .graph-agent-halo,
    .graph-agent-halo::after,
    .graph-node-check { animation: none !important; }
}

.agent-dashboard { padding-bottom: 28px; }

.agent-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 22px;
    padding: 22px 24px;
    border: 1px solid var(--border);
    border-left: 4px solid #0ea5e9;
    border-radius: var(--r);
    background: var(--surface);
    box-shadow: var(--sh);
}

.agent-hero.agent-attention { border-left-color: #f59e0b; }
.agent-hero.agent-failed { border-left-color: #ef4444; }
.agent-hero .eyebrow { margin-bottom: 6px; }
.agent-hero h2 { margin-bottom: 6px; font-size: 21px; }
.agent-hero p:not(.eyebrow) { max-width: 780px; margin: 0; }

.agent-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    margin-top: 13px;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 800;
}

.agent-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #14b8a6;
    box-shadow: 0 0 0 4px rgba(20, 184, 166, .14);
}

.agent-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.agent-actions form { margin: 0; }

.agent-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 30px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.agent-stats > div {
    min-height: 70px;
    padding: 13px 18px;
    border-right: 1px solid var(--border);
}

.agent-stats > div:first-child { padding-left: 0; }
.agent-stats > div:last-child { border-right: 0; }
.agent-stats span { color: var(--muted); font-size: 10px; font-weight: 800; }
.agent-stats strong { display: block; margin-top: 5px; color: var(--text-strong); font-size: 20px; }

.agent-analysis-section,
.agent-console-section,
.agent-history-section { margin-bottom: 34px; }

.agent-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.agent-section-heading .eyebrow { margin-bottom: 5px; }
.agent-section-heading h2 { margin: 0 0 4px; font-size: 17px; }
.agent-section-heading p { max-width: 730px; margin: 0; }
.agent-section-heading > span { color: var(--muted); font-size: 10.5px; font-weight: 800; }

.agent-route-note {
    display: grid;
    grid-template-columns: minmax(150px, .34fr) minmax(0, 1fr);
    gap: 22px;
    align-items: center;
    margin-bottom: 30px;
    padding: 15px 18px;
    border-top: 1px solid var(--p-mid);
    border-bottom: 1px solid var(--p-mid);
    background: #f7fcff;
}

.agent-route-note .eyebrow { margin: 0; }
.agent-route-note > div { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.agent-route-note p:not(.eyebrow) { margin: 0; }

.agent-analysis {
    max-width: 980px;
    margin: 0;
    padding: 16px 18px;
    border-left: 3px solid #7dd3fc;
    background: #f7fcff;
    color: var(--text);
    line-height: 1.6;
    white-space: pre-wrap;
}

.agent-run-list { border-top: 1px solid var(--border); }
.agent-console-list { border-top: 1px solid var(--border); }
.agent-console-item {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto 100px;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border2);
}

.agent-console-item > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.agent-console-item > div > i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--gray); }
.agent-console-item.severity-warning > div > i { background: var(--warning); }
.agent-console-item.severity-error > div > i,
.agent-console-item.severity-critical > div > i { background: var(--danger); }
.agent-console-item > div > strong { overflow: hidden; color: var(--text-strong); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.agent-console-item > div > span { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.agent-console-item > small { color: var(--muted); text-align: right; font-size: 10px; font-weight: 800; }
.agent-console-item > p { grid-column: 1 / -1; margin: -3px 0 0 15px; color: var(--muted); font-size: 10.5px; }
.agent-run { border-bottom: 1px solid var(--border2); }

.agent-run > summary {
    display: grid;
    grid-template-columns: minmax(160px, .45fr) auto minmax(220px, 1fr);
    align-items: center;
    gap: 14px;
    min-height: 48px;
    cursor: pointer;
    list-style: none;
}

.agent-run > summary::-webkit-details-marker { display: none; }
.agent-run > summary small { color: var(--muted); text-align: right; }
.agent-run > p { max-width: 980px; margin: 0 0 13px; color: var(--text); }

.agent-visit-list { border-top: 1px solid var(--border2); }
.agent-visit {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto 70px;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border2);
}

.agent-visit > div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.agent-visit > div > i { width: 7px; height: 7px; border-radius: 50%; background: var(--gray); }
.agent-visit.severity-ok > div > i { background: var(--success); }
.agent-visit.severity-warning > div > i { background: var(--warning); }
.agent-visit.severity-error > div > i,
.agent-visit.severity-critical > div > i { background: var(--danger); }
.agent-visit > div > span { color: var(--muted); font-size: 10px; }
.agent-visit > small { color: var(--muted); text-align: right; font-size: 10px; font-weight: 800; }
.agent-visit > p { grid-column: 1 / -1; margin: -3px 0 0 15px; color: var(--muted); font-size: 10.5px; }

@media (max-width: 1160px) {
    .ops-v2-agent-brief { grid-template-columns: 1fr auto; }
    .ops-v2-agent-brief > p { grid-column: 1 / -1; grid-row: 2; }
    .agent-hero { align-items: flex-start; flex-direction: column; }
    .agent-actions { justify-content: flex-start; }
}

@media (max-width: 760px) {
    .agent-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .agent-stats > div:nth-child(2) { border-right: 0; }
    .agent-stats > div:nth-child(n + 3) { border-top: 1px solid var(--border); }
    .agent-run > summary { grid-template-columns: minmax(0, 1fr) auto; padding: 9px 0; }
    .agent-run > summary small { grid-column: 1 / -1; text-align: left; }
    .agent-console-item { grid-template-columns: minmax(0, 1fr) auto; }
    .agent-console-item > small { text-align: right; }
}

@media (max-width: 560px) {
    .agent-hero { padding: 18px; }
    .agent-hero h2 { font-size: 19px; }
    .agent-route-note { grid-template-columns: 1fr; gap: 8px; }
    .agent-route-note > div { align-items: flex-start; flex-direction: column; }
    .agent-visit { grid-template-columns: minmax(0, 1fr) auto; }
    .agent-visit > small { text-align: right; }
}

/* CONEXO operational dashboard: compact, scan-friendly status flow */
.dashboard-status {
    margin-bottom: 20px;
    padding: 16px 0 18px 18px;
    border-top: 0;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.dashboard-status p {
    max-width: 440px;
    margin: 0;
    text-align: right;
}

.dashboard-stats {
    gap: 0;
    margin: 0 0 24px;
    padding: 0 2px;
    border-bottom: 1px solid var(--border);
}

.dashboard-stats .stat {
    min-height: 72px;
    padding: 0 18px 18px;
    border: 0;
    border-radius: 0;
    border-right: 1px solid var(--border);
    background: transparent;
    box-shadow: none;
}

.dashboard-stats .stat:first-child { padding-left: 0; }
.dashboard-stats .stat:last-child { border-right: 0; }

.dashboard-stats .stat strong {
    margin-top: 5px;
    font-size: 21px;
}

.ops-dashboard {
    margin: 0 0 28px;
    padding: 18px 0 0;
    border-top: 2px solid var(--p-mid);
}

.ops-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.ops-header h2 { margin-bottom: 4px; }
.ops-header p { margin: 0; }

.ops-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.ops-actions form {
    margin: 0;
}

.ops-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 0;
    padding: 11px 0;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
}

.ops-summary span {
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.ops-summary strong {
    display: block;
    color: var(--text-strong);
    font-size: 18px;
    font-weight: 900;
}

.ops-summary p {
    margin: 0;
}

.ops-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 30px;
    border-bottom: 1px solid var(--border);
}

.ops-row {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border2);
    color: inherit;
}

.ops-row:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.ops-row:hover {
    text-decoration: none;
    color: var(--text-strong);
}

.ops-state-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gray);
}

.ops-row-copy span {
    display: block;
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.ops-row-copy small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.ops-row strong {
    color: var(--text-strong);
    font-size: 13px;
    font-weight: 900;
    text-align: right;
}

.ops-row em {
    min-width: 62px;
    color: var(--p-d);
    font-style: normal;
    font-weight: 800;
    text-align: right;
}

.ops-ok .ops-state-dot { background: var(--success); }
.ops-warning .ops-state-dot { background: var(--warning); }
.ops-error .ops-state-dot,
.ops-critical .ops-state-dot { background: var(--error); }

.ops-list-section {
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.ops-list-heading {
    margin-bottom: 12px;
}

.ops-list-heading h2 { margin-bottom: 4px; }
.ops-list-heading p { margin: 0; }

.ops-followup-grid {
    margin-bottom: 24px;
}

.dashboard-lower {
    margin-top: 4px;
    margin-bottom: 24px;
}

.dashboard-ai,
.dashboard-checks {
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.dashboard-ai h2,
.dashboard-checks h2 {
    margin-bottom: 8px;
}

.dashboard-ai .ai-box {
    margin: 0;
    padding: 3px 0 3px 14px;
    border: 0;
    border-left: 3px solid var(--p-mid);
    border-radius: 0;
    background: transparent;
    color: var(--text);
}

.dashboard-ai .card-actions {
    margin-top: 12px;
}

.dashboard-checks .mini-list {
    gap: 0;
}

.dashboard-checks .mini-list a,
.dashboard-checks .mini-row {
    min-height: 48px;
    align-items: center;
    padding: 10px 0;
}

.ops-action-list a,
.ops-watchlist a {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}

.ops-action-list small,
.ops-watchlist small {
    grid-column: 1 / -1;
}

@media (max-width: 980px) {
    .dashboard-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        row-gap: 16px;
    }

    .dashboard-stats .stat:nth-child(3) { border-right: 0; }

    .ops-grid {
        grid-template-columns: 1fr;
        column-gap: 0;
    }

    .ops-row:nth-last-child(-n + 2) { border-bottom: 1px solid var(--border2); }
    .ops-row:last-child { border-bottom: 0; }

    .ops-summary,
    .ops-header,
    .ops-actions {
        align-items: flex-start;
        justify-content: flex-start;
    }

    .ops-header { flex-direction: column; }
}

@media (max-width: 680px) {
    .dashboard-status {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-status p { text-align: left; }

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

    .dashboard-stats .stat:nth-child(3) { border-right: 1px solid var(--border); }
    .dashboard-stats .stat:nth-child(even) { border-right: 0; }

    .ops-summary {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .ops-row {
        grid-template-columns: 8px minmax(0, 1fr) auto;
        gap: 9px;
    }

    .ops-row em {
        display: none;
    }

    .ops-row strong {
        grid-column: 2 / -1;
        text-align: left;
    }
}

/* CONEXO control dashboard redesign */
.command-dashboard {
    max-width: 1540px;
    margin: 0 auto;
}

.command-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
    gap: 32px;
    margin: 0 0 18px;
    padding: 24px 28px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    background: var(--surface);
    box-shadow: var(--sh);
}

.command-hero .eyebrow {
    margin-bottom: 7px;
}

.command-hero h2 {
    margin-bottom: 7px;
    font-size: 25px;
    line-height: 1.15;
}

.command-headline {
    max-width: 700px;
    margin: 0;
    color: var(--text);
    font-size: 13px;
}

.command-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    margin-top: 17px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.command-state {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-strong);
    font-weight: 900;
    letter-spacing: .04em;
}

.command-state i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gray);
}

.status-ok .command-state i { background: var(--success); }
.status-warning .command-state i { background: var(--warning); }
.status-error .command-state i,
.status-critical .command-state i { background: var(--error); }

.command-actions {
    align-self: center;
    padding-left: 26px;
    border-left: 1px solid var(--border);
}

.command-actions > span,
.panel-heading > div > span {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.command-actions > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.command-actions form { margin: 0; }

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.dashboard-stats .stat {
    min-height: 78px;
    padding: 16px 18px;
    border: 0;
    border-right: 1px solid var(--border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.dashboard-stats .stat:first-child { padding-left: 0; }
.dashboard-stats .stat:last-child { border-right: 0; }

.dashboard-stats .stat span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
}

.dashboard-stats .stat strong {
    margin-top: 5px;
    color: var(--text-strong);
    font-size: 22px;
}

.control-workspace {
    margin-top: 32px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 15px;
}

.section-heading .eyebrow { margin-bottom: 5px; }
.section-heading h2 { margin-bottom: 4px; font-size: 17px; }
.section-heading p { margin: 0; }

.control-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(310px, .55fr);
    gap: 32px;
    align-items: start;
}

.platform-status {
    border-top: 2px solid var(--p);
}

.platform-status-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}

.platform-status-head > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.readiness-state {
    color: var(--text-strong);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .05em;
}

.readiness-ok { color: #15803d; }
.readiness-warning { color: #b45309; }
.readiness-error,
.readiness-critical { color: #dc2626; }

.platform-status .ops-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 26px;
    border-bottom: 0;
}

.platform-status .ops-row {
    grid-template-columns: 8px minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 70px;
}

.platform-status .ops-row em {
    display: none;
}

.platform-status .ops-row strong {
    font-size: 12px;
}

.priority-stack {
    padding-left: 26px;
    border-left: 1px solid var(--border);
}

.priority-panel,
.watchlist-panel {
    padding-bottom: 18px;
}

.watchlist-panel {
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.panel-heading h3 {
    margin: 0;
    font-size: 14px;
}

.panel-heading a {
    color: var(--p-d);
    font-size: 10.5px;
    font-weight: 800;
}

.priority-stack .mini-list { gap: 0; }

.priority-stack .mini-list a,
.priority-stack .mini-row {
    min-height: 47px;
    padding: 9px 0;
}

.priority-stack .mini-list small {
    color: var(--muted);
    font-size: 10.5px;
}

.ops-action-list a,
.ops-watchlist a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}

.ops-action-list small,
.ops-watchlist small { grid-column: 1 / -1; }

.ecosystem-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(290px, .5fr);
    gap: 32px;
    align-items: start;
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.ecosystem-workspace .network-scene-panel {
    margin: 0;
    padding: 0;
}

.network-heading { margin-bottom: 12px; }

.ecosystem-workspace .network-graph {
    height: 382px;
}

.ecosystem-workspace .legend {
    margin-top: 10px;
}

.dashboard-checks {
    padding: 2px 0 0 26px;
    border-top: 0;
    border-left: 1px solid var(--border);
}

.dashboard-checks .mini-list { gap: 0; }

.dashboard-checks .mini-list a,
.dashboard-checks .mini-row {
    min-height: 48px;
    align-items: center;
    padding: 10px 0;
}

.ai-brief {
    display: grid;
    grid-template-columns: minmax(210px, .55fr) minmax(0, 1.45fr) auto;
    align-items: center;
    gap: 26px;
    margin-top: 30px;
    padding: 17px 20px;
    border-top: 1px solid var(--p-mid);
    border-bottom: 1px solid var(--p-mid);
    background: var(--p-soft);
}

.ai-brief .eyebrow { margin-bottom: 5px; }
.ai-brief h2 { margin: 0; font-size: 14px; }
.ai-brief > p { margin: 0; color: var(--text); font-size: 11.5px; }

@media (max-width: 1160px) {
    .command-hero,
    .control-layout,
    .ecosystem-workspace {
        grid-template-columns: 1fr;
    }

    .command-actions,
    .priority-stack,
    .dashboard-checks {
        padding: 18px 0 0;
        border-top: 1px solid var(--border);
        border-left: 0;
    }

    .priority-stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
    .watchlist-panel { padding-top: 0; border-top: 0; border-left: 1px solid var(--border); padding-left: 24px; }
    .dashboard-checks { margin-top: 6px; }
    .dashboard-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .dashboard-stats .stat:nth-child(3) { border-right: 0; }
    .dashboard-stats .stat:nth-child(n + 4) { border-top: 1px solid var(--border); }
    .ai-brief { grid-template-columns: 1fr auto; }
    .ai-brief > p { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 720px) {
    .command-hero { padding: 20px; }
    .command-hero h2 { font-size: 22px; }
    .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-stats .stat { padding: 13px 12px; }
    .dashboard-stats .stat:first-child { padding-left: 0; }
    .dashboard-stats .stat:nth-child(odd) { border-right: 1px solid var(--border); }
    .dashboard-stats .stat:nth-child(even) { border-right: 0; }
    .dashboard-stats .stat:nth-child(n + 3) { border-top: 1px solid var(--border); }
    .platform-status .ops-grid { grid-template-columns: 1fr; }
    .platform-status .ops-row:nth-last-child(-n + 2) { border-bottom: 1px solid var(--border2); }
    .platform-status .ops-row:last-child { border-bottom: 0; }
    .priority-stack { grid-template-columns: 1fr; }
    .watchlist-panel { padding-top: 18px; padding-left: 0; border-top: 1px solid var(--border); border-left: 0; }
    .ecosystem-workspace .network-graph { height: 320px; }
    .ai-brief { display: flex; align-items: flex-start; flex-direction: column; gap: 10px; }
}

/* CONEXO dashboard: operational hierarchy with full-width system map */
.ops-v2-dashboard {
    max-width: 1540px;
    margin: 0 auto;
}

.ops-v2-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(310px, .6fr);
    gap: 34px;
    margin-bottom: 18px;
    padding: 24px 28px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    background: var(--surface);
    box-shadow: var(--sh);
}

.ops-v2-hero .eyebrow { margin-bottom: 7px; }

.ops-v2-hero h2 {
    margin-bottom: 7px;
    color: var(--text-strong);
    font-size: 25px;
    line-height: 1.15;
}

.ops-v2-hero > div > p:not(.eyebrow) {
    max-width: 680px;
    margin: 0;
    color: var(--text);
    font-size: 13px;
}

.ops-v2-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    margin-top: 17px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.ops-v2-state {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--text-strong);
    font-weight: 900;
    letter-spacing: .04em;
}

.ops-v2-state i,
.ops-v2-control-row > i {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--gray);
}

.status-ok .ops-v2-state i,
.control-ok > i { background: var(--success); }
.status-warning .ops-v2-state i,
.control-warning > i { background: var(--warning); }
.status-error .ops-v2-state i,
.status-critical .ops-v2-state i,
.control-error > i,
.control-critical > i { background: var(--error); }

.ops-v2-quick-actions {
    align-self: center;
    padding-left: 26px;
    border-left: 1px solid var(--border);
}

.ops-v2-quick-actions > span,
.ops-v2-panel-heading > div > span {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.ops-v2-quick-actions > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ops-v2-quick-actions form { margin: 0; }

.ops-v2-kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin: 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.ops-v2-kpis > div {
    min-height: 76px;
    padding: 15px 18px;
    border-right: 1px solid var(--border);
}

.ops-v2-kpis > div:first-child { padding-left: 0; }
.ops-v2-kpis > div:last-child { border-right: 0; }

.ops-v2-kpis span {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
}

.ops-v2-kpis strong {
    display: block;
    margin-top: 5px;
    color: var(--text-strong);
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
}

.ops-v2-section {
    margin-top: 34px;
}

.ops-v2-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}

.ops-v2-section-heading .eyebrow { margin-bottom: 5px; }
.ops-v2-section-heading h2 { margin-bottom: 4px; font-size: 17px; }
.ops-v2-section-heading p { margin: 0; }

.ops-v2-priority-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    margin-bottom: 26px;
    border-top: 2px solid var(--p);
    border-bottom: 1px solid var(--border);
}

.ops-v2-priority-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    min-height: 125px;
    padding: 16px 18px;
    border-right: 1px solid var(--border);
    color: var(--text);
}

.ops-v2-priority-item:first-child { padding-left: 0; }
.ops-v2-priority-item:last-child { border-right: 0; }
.ops-v2-priority-item:hover { color: var(--text-strong); text-decoration: none; }

.ops-v2-priority-item span {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.ops-v2-priority-item strong {
    display: block;
    margin-top: 5px;
    color: var(--text-strong);
    font-size: 14px;
}

.ops-v2-priority-item em { align-self: start; }

.ops-v2-priority-item p {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--muted);
    font-size: 10.5px;
}

.priority-warning { border-top: 2px solid var(--warning); }
.priority-error,
.priority-critical { border-top: 2px solid var(--error); }

.ops-v2-empty-state {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 0;
}

.ops-v2-empty-state strong { color: var(--text-strong); }
.ops-v2-empty-state span { color: var(--muted); }

.ops-v2-management-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(330px, .55fr);
    gap: 34px;
    align-items: start;
}

.ops-v2-platform {
    border-top: 1px solid var(--border);
}

.ops-v2-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 0 12px;
}

.ops-v2-panel-heading h3 {
    margin: 0;
    color: var(--text-strong);
    font-size: 14px;
}

.ops-v2-panel-heading > a {
    color: var(--p-d);
    font-size: 10.5px;
    font-weight: 800;
}

.ops-v2-readiness {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .05em;
}

.ops-v2-readiness.readiness-ok { color: #15803d; }
.ops-v2-readiness.readiness-warning { color: #b45309; }
.ops-v2-readiness.readiness-error,
.ops-v2-readiness.readiness-critical { color: #dc2626; }

.ops-v2-control-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 26px;
    border-bottom: 1px solid var(--border);
}

.ops-v2-control-row {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 71px;
    padding: 12px 0;
    border-top: 1px solid var(--border2);
    color: var(--text);
}

.ops-v2-control-row:nth-child(-n + 2) { border-top: 0; }
.ops-v2-control-row:hover { color: var(--text-strong); text-decoration: none; }

.ops-v2-control-row span {
    display: block;
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.ops-v2-control-row small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 10.5px;
    line-height: 1.35;
}

.ops-v2-control-row strong {
    color: var(--text-strong);
    font-size: 12px;
    text-align: right;
}

.ops-v2-continuity {
    border-top: 1px solid var(--border);
    border-left: 1px solid var(--border);
    padding-left: 26px;
}

.ops-v2-continuity > section + section {
    border-top: 1px solid var(--border);
}

.ops-v2-compact-list,
.ops-v2-backup-list,
.ops-v2-check-list {
    display: flex;
    flex-direction: column;
}

.ops-v2-compact-list a,
.ops-v2-backup-list a,
.ops-v2-check-list a,
.ops-v2-empty-inline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 12px;
    min-height: 42px;
    padding: 9px 0;
    border-top: 1px solid var(--border2);
    color: var(--text);
}

.ops-v2-compact-list a:first-child,
.ops-v2-backup-list a:first-child,
.ops-v2-check-list a:first-child { border-top: 0; }

.ops-v2-compact-list a:hover,
.ops-v2-backup-list a:hover,
.ops-v2-check-list a:hover { color: var(--text-strong); text-decoration: none; }

.ops-v2-compact-list small,
.ops-v2-backup-list small {
    grid-column: 1 / -1;
    overflow: hidden;
    color: var(--muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ops-v2-backup-list strong {
    color: var(--text-strong);
    font-size: 10.5px;
}

.ops-v2-ai-brief {
    display: grid;
    grid-template-columns: minmax(210px, .55fr) minmax(0, 1.45fr) auto;
    align-items: center;
    gap: 26px;
    margin-top: 30px;
    padding: 17px 20px;
    border-top: 1px solid var(--p-mid);
    border-bottom: 1px solid var(--p-mid);
    background: var(--p-soft);
}

.ops-v2-ai-brief .eyebrow { margin-bottom: 5px; }
.ops-v2-ai-brief h2 { margin: 0; font-size: 14px; }
.ops-v2-ai-brief > p { margin: 0; color: var(--text); font-size: 11.5px; }

.ops-v2-map-section {
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.ops-v2-map-heading { margin-bottom: 12px; }

.ops-v2-map-section .network-graph {
    height: clamp(500px, 70vh, 760px);
}

.ops-v2-map-section .legend { margin-top: 10px; }

.ai-agent-settings {
    margin-bottom: 22px;
    border-top: 2px solid var(--p);
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.ai-agent-settings-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--border);
}

.ai-agent-settings-header h2 { margin-bottom: 4px; font-size: 17px; }
.ai-agent-settings-header p:not(.eyebrow) { margin: 0; font-size: 12px; }

.ai-agent-status-summary {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 5px;
    white-space: nowrap;
}

.ai-agent-status-summary small,
.ai-agent-secret-state small,
.ai-agent-settings-form label > small,
.ai-agent-schedule-state small { color: var(--muted); font-size: 10px; }

.ai-agent-settings-form { padding: 0 22px 20px; }

.ai-agent-settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
}

.ai-agent-settings-grid > section {
    min-width: 0;
    padding: 20px 20px 12px 0;
}

.ai-agent-settings-grid > section + section {
    padding-left: 20px;
    border-left: 1px solid var(--border);
}

.ai-agent-settings-grid label {
    display: grid;
    gap: 6px;
    margin: 0 0 14px;
    color: var(--text);
    font-size: 10.5px;
    font-weight: 800;
}

.ai-agent-settings-grid input:not([type="checkbox"]),
.ai-agent-settings-grid select {
    width: 100%;
    min-height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: var(--surface-soft);
    color: var(--text-strong);
    font: inherit;
    padding: 8px 10px;
}

.ai-agent-toggle {
    display: flex !important;
    align-items: center;
    grid-template-columns: auto 1fr;
    gap: 8px !important;
    min-height: 36px;
}

.ai-agent-toggle input { width: 16px; height: 16px; accent-color: var(--p); }

.ai-agent-secret-state,
.ai-agent-schedule-state {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 4px 10px;
    min-height: 58px;
    padding: 10px 0;
    border-top: 1px solid var(--border2);
}

.ai-agent-secret-state > span,
.ai-agent-schedule-state > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.ai-agent-secret-state strong,
.ai-agent-schedule-state strong { color: var(--text-strong); font-size: 11px; }
.ai-agent-secret-state small { grid-column: 1 / -1; }
.ai-agent-schedule-state a { font-size: 10.5px; font-weight: 800; }

.ai-agent-settings-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

@media (max-width: 1050px) {
    .ai-agent-settings-grid { grid-template-columns: 1fr 1fr; }
    .ai-agent-settings-grid > section:nth-child(3) { padding-left: 0; border-left: 0; border-top: 1px solid var(--border); }
}

@media (max-width: 680px) {
    .ai-agent-settings-header { align-items: flex-start; flex-direction: column; }
    .ai-agent-status-summary { align-items: flex-start; }
    .ai-agent-settings-grid { grid-template-columns: 1fr; }
    .ai-agent-settings-grid > section + section { padding-left: 0; border-left: 0; border-top: 1px solid var(--border); }
    .ai-agent-settings-actions { align-items: stretch; flex-direction: column; }
}

@media (max-width: 1160px) {
    .ops-v2-hero,
    .ops-v2-management-grid { grid-template-columns: 1fr; }

    .ops-v2-quick-actions,
    .ops-v2-continuity {
        padding: 18px 0 0;
        border-top: 1px solid var(--border);
        border-left: 0;
    }

    .ops-v2-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ops-v2-kpis > div:nth-child(3) { border-right: 0; }
    .ops-v2-kpis > div:nth-child(n + 4) { border-top: 1px solid var(--border); }
    .ops-v2-ai-brief { grid-template-columns: 1fr auto; }
    .ops-v2-ai-brief > p { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 720px) {
    .ops-v2-hero { padding: 20px; }
    .ops-v2-hero h2 { font-size: 22px; }
    .ops-v2-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ops-v2-kpis > div { padding: 13px 12px; }
    .ops-v2-kpis > div:first-child { padding-left: 0; }
    .ops-v2-kpis > div:nth-child(odd) { border-right: 1px solid var(--border); }
    .ops-v2-kpis > div:nth-child(even) { border-right: 0; }
    .ops-v2-kpis > div:nth-child(n + 3) { border-top: 1px solid var(--border); }
    .ops-v2-priority-item { border-right: 0; border-top: 1px solid var(--border); }
    .ops-v2-priority-item:first-child { padding-left: 0; border-top: 0; }
    .ops-v2-control-grid { grid-template-columns: 1fr; }
    .ops-v2-control-row:nth-child(-n + 2) { border-top: 1px solid var(--border2); }
    .ops-v2-control-row:first-child { border-top: 0; }
    .ops-v2-ai-brief { display: flex; align-items: flex-start; flex-direction: column; gap: 10px; }
    .ops-v2-map-section .network-graph { height: 430px; }
}

/* CONEXO automation center */
.automation-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--p);
    border-radius: var(--r);
    background: var(--surface);
    box-shadow: var(--sh);
}

.automation-hero .eyebrow { margin-bottom: 5px; }
.automation-hero h2 { margin-bottom: 4px; font-size: 18px; }
.automation-hero p:not(.eyebrow) { margin: 0; }
.automation-create,
.automation-editor { position: relative; }

.automation-create > summary,
.automation-editor > summary {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border: 1px solid var(--p);
    border-radius: var(--r-sm);
    background: var(--p);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.automation-create > summary::-webkit-details-marker,
.automation-editor > summary::-webkit-details-marker { display: none; }

.automation-editor > summary {
    border-color: var(--border);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--sh);
}

.automation-create .automation-form,
.automation-editor .automation-form {
    position: absolute;
    z-index: 12;
    top: 40px;
    right: 0;
    width: min(760px, calc(100vw - 80px));
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    background: var(--surface);
    box-shadow: var(--sh-md);
}

.automation-editor .automation-form { top: 36px; width: min(640px, calc(100vw - 80px)); }

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

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

.automation-form label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 800;
}

.automation-form input,
.automation-form select {
    width: 100%;
    min-height: 32px;
    padding: 0 9px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 11px;
}

.automation-form .checkbox-field {
    flex-direction: row;
    align-items: center;
    gap: 7px;
    color: var(--text);
}

.automation-form .checkbox-field input { width: 15px; min-height: 15px; }
.automation-form-actions { display: flex; align-items: end; }

.automation-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 28px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.automation-stats > div { min-height: 70px; padding: 13px 18px; border-right: 1px solid var(--border); }
.automation-stats > div:first-child { padding-left: 0; }
.automation-stats > div:last-child { border-right: 0; }
.automation-stats span { color: var(--muted); font-size: 10px; font-weight: 800; }
.automation-stats strong { display: block; margin-top: 5px; color: var(--text-strong); font-size: 21px; }

.automation-list-section,
.automation-history-section { margin-bottom: 30px; }

.automation-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.automation-section-heading .eyebrow { margin-bottom: 5px; }
.automation-section-heading h2 { margin: 0; font-size: 16px; }
.automation-section-heading > span { color: var(--muted); font-size: 10.5px; font-weight: 800; }
.automation-list,
.automation-history { border-top: 1px solid var(--border); }

.automation-row {
    display: grid;
    grid-template-columns: 8px minmax(200px, 1.15fr) minmax(160px, .75fr) minmax(160px, .8fr) minmax(110px, .45fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border2);
}

.automation-row-state { width: 7px; height: 7px; border-radius: 50%; background: var(--gray); }
.automation-row.is-active .automation-row-state { background: var(--success); }
.automation-row.is-paused .automation-row-state { background: var(--light); }
.automation-row-main > div { display: flex; align-items: center; gap: 6px; }
.automation-row-main h3 { margin: 6px 0 3px; font-size: 13px; }
.automation-row-main p { margin: 0; font-size: 10.5px; }
.automation-system-label { color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }

.automation-row-schedule,
.automation-row-scope,
.automation-row-result { display: flex; flex-direction: column; gap: 3px; }

.automation-row-schedule > span,
.automation-row-scope > span,
.automation-row-result > span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.automation-row-schedule strong,
.automation-row-scope strong { color: var(--text-strong); font-size: 11px; }
.automation-row-schedule code { color: var(--muted); font-size: 9.5px; }
.automation-row-scope small,
.automation-row-result small { color: var(--muted); font-size: 10px; }
.automation-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.automation-row-actions form { margin: 0; }

.automation-run { border-bottom: 1px solid var(--border2); }
.automation-run > summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(220px, .8fr);
    align-items: center;
    gap: 14px;
    min-height: 46px;
    cursor: pointer;
    list-style: none;
}

.automation-run > summary::-webkit-details-marker { display: none; }
.automation-run > summary small { color: var(--muted); text-align: right; }
.automation-run pre {
    max-height: 240px;
    margin: 0 0 12px;
    padding: 12px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: #0f172a;
    color: #dbeafe;
    font-family: var(--mono);
    font-size: 10px;
    white-space: pre-wrap;
}

@media (max-width: 1180px) {
    .automation-row { grid-template-columns: 8px minmax(200px, 1fr) minmax(150px, .75fr) minmax(145px, .7fr) auto; }
    .automation-row-result { display: none; }
}

@media (max-width: 820px) {
    .automation-hero { align-items: flex-start; flex-direction: column; }
    .automation-create .automation-form,
    .automation-editor .automation-form { position: static; width: 100%; margin-top: 10px; }
    .automation-form,
    .automation-form.compact { grid-template-columns: 1fr; }
    .automation-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .automation-stats > div:nth-child(2) { border-right: 0; }
    .automation-stats > div:nth-child(n + 3) { border-top: 1px solid var(--border); }
    .automation-row { grid-template-columns: 8px minmax(0, 1fr) auto; align-items: start; }
    .automation-row-schedule,
    .automation-row-scope { grid-column: 2; }
    .automation-row-actions { grid-column: 3; grid-row: 1 / span 3; }
}

@media (max-width: 560px) {
    .automation-run > summary { grid-template-columns: minmax(0, 1fr) auto; padding: 8px 0; }
    .automation-run > summary small { grid-column: 1 / -1; text-align: left; }
}

/* Definitive security modal cascade */
.login-security-lock { z-index: 2147483647; padding: 18px; background: radial-gradient(circle at 50% 34%, rgba(0,164,211,.16), transparent 34%), rgba(15,23,42,.36); backdrop-filter: blur(8px) saturate(1.08); }
.login-security-modal { width: min(100%, 468px); border: 1px solid rgba(213,226,238,.92); border-radius: 24px; background: rgba(255,255,255,.96); box-shadow: 0 28px 90px rgba(15,23,42,.22); }
.login-security-modal header { align-items: flex-start; gap: 14px; padding: 24px 24px 18px; border-bottom: 1px solid rgba(226,232,240,.82); }
.login-security-modal h2 { margin: 0; font-size: 18px; line-height: 1.18; }
.login-security-modal p { margin: 7px 0 0; font-size: 13px; line-height: 1.55; }
.login-security-icon { flex-basis: 44px; width: 44px; height: 44px; border-radius: 16px; background: linear-gradient(135deg, #00a4d3, #12b8cf); }
.login-security-timer { padding: 20px 24px 12px; border-top: 0; }
.login-security-timer span { font-size: 11px; letter-spacing: .9px; }
.login-security-timer strong { font-size: 25px; font-weight: 600; }
.login-security-progress { height: 7px; margin: 0 24px 24px; border-radius: 999px; background: #ffedd5; }
.login-security-progress i { border-radius: inherit; background: linear-gradient(90deg, #f59e0b, #fb923c); }
.session-timeout { z-index: 2147483647; padding: 22px; background: rgba(15,23,42,.42); backdrop-filter: blur(3px); }
.session-timeout > div { width: min(100%, 420px); padding: 26px 26px 22px; border: 1px solid var(--border); border-radius: 16px; background: rgba(255,255,255,.98); box-shadow: 0 22px 55px rgba(15,23,42,.18); }
.session-timeout h2 { margin: 0; font-size: 17px; line-height: 1.18; }
.session-timeout section > p:not(.eyebrow):not(.session-reauth-error) { margin: 14px 0 18px; font-size: 12px; line-height: 1.5; }
.session-reauth-form label { display: block; margin: 0 0 6px; font-size: 11px; }
.session-timeout-actions { justify-content: flex-end; gap: 8px; margin-top: 4px; }
.session-reauth-error { margin: -2px 0 10px; font-size: 11.5px; }

/* CRM agent workspace */
.crm-mission-intro,
.crm-mission-compose,
.crm-mission-history { margin-bottom: 30px; }

.crm-mission-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.crm-mission-intro .eyebrow { margin-bottom: 6px; }
.crm-mission-intro h2 { margin: 0 0 5px; font-size: 19px; }
.crm-mission-intro p:not(.eyebrow) { max-width: 780px; margin: 0; }

.crm-mission-compose form {
    display: grid;
    grid-template-columns: minmax(220px, .7fr) minmax(0, 1.55fr);
    gap: 14px 18px;
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
}

.crm-mission-compose label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 10.5px; font-weight: 800; }
.crm-mission-compose label > span { color: var(--text); }
.crm-mission-compose select,
.crm-mission-compose textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 12px;
}
.crm-mission-compose select { min-height: 38px; padding: 0 10px; }
.crm-mission-compose textarea { min-height: 104px; padding: 10px; resize: vertical; line-height: 1.45; }
.crm-mission-task { grid-row: span 2; }
.crm-mission-compose .crm-mission-visual { flex-direction: row; align-items: center; align-self: end; gap: 8px; padding-bottom: 4px; color: var(--text); font-size: 11px; }
.crm-mission-visual input { width: 16px; height: 16px; margin: 0; }
.crm-mission-submit { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.crm-mission-submit small { max-width: 350px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.crm-mission-submit .btn { min-width: 164px; }

.crm-mission-list { border-top: 1px solid var(--border); }
.crm-mission { border-bottom: 1px solid var(--border2); }
.crm-mission > summary {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    cursor: pointer;
    list-style: none;
}
.crm-mission > summary::-webkit-details-marker { display: none; }
.crm-mission-state { width: 7px; height: 7px; border-radius: 50%; background: var(--gray); }
.crm-mission-state.running { background: #1d9bd1; animation: crmMissionPulse 1.5s ease-in-out infinite; }
.crm-mission-state.completed { background: var(--success); }
.crm-mission-state.failed { background: var(--danger); }
.crm-mission-state.queued { background: var(--warning); }
.crm-mission > summary strong,
.crm-mission > summary small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-mission > summary strong { color: var(--text-strong); font-size: 12px; }
.crm-mission > summary small { margin-top: 3px; color: var(--muted); font-size: 10px; }

.crm-mission-detail { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(300px, 1.05fr); gap: 24px; padding: 0 0 18px 20px; }
.crm-mission-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.crm-mission-panel-heading span { color: var(--text-strong); font-size: 10.5px; font-weight: 900; text-transform: uppercase; }
.crm-mission-panel-heading small { color: var(--muted); font-size: 10px; }
.crm-mission-preview { min-height: 150px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-alt); }
.crm-mission-preview img { display: block; width: 100%; height: 260px; object-fit: contain; object-position: top; background: #f7fafc; }
.crm-mission-preview p { margin: 0; padding: 16px; color: var(--muted); font-size: 11px; }
.crm-mission-summary { margin: 9px 0 0; color: var(--text); font-size: 11.5px; line-height: 1.5; }
.crm-mission-trace ol { max-height: 360px; margin: 0; padding: 0; overflow: auto; border-top: 1px solid var(--border); list-style: none; }
.crm-mission-trace li { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 48px; border-bottom: 1px solid var(--border2); }
.crm-mission-trace li > i { width: 7px; height: 7px; border-radius: 50%; background: var(--gray); }
.crm-mission-trace li.ok > i { background: var(--success); }
.crm-mission-trace li.warn > i,
.crm-mission-trace li.queued > i { background: var(--warning); }
.crm-mission-trace li.error > i { background: var(--danger); }
.crm-mission-trace li strong,
.crm-mission-trace li small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crm-mission-trace li strong { color: var(--text-strong); font-size: 11px; }
.crm-mission-trace li small { margin-top: 3px; color: var(--muted); font-size: 9.5px; }
.crm-mission-trace li em { color: var(--muted); font-size: 9px; font-style: normal; font-weight: 900; text-transform: uppercase; }
.crm-mission-analysis { margin: 0 0 18px 20px; padding: 12px 14px; border-left: 3px solid #1d9bd1; background: #f0fbfe; color: var(--text); font-size: 11.5px; line-height: 1.55; white-space: pre-line; }

@keyframes crmMissionPulse { 50% { opacity: .35; } }

@media (max-width: 480px) {
    .login-security-lock, .session-timeout { padding: 14px; }
    .login-security-modal { width: min(100%, 390px); }
    .login-security-modal header { padding: 20px 18px 15px; }
    .login-security-timer { padding: 16px 18px 12px; }
    .login-security-progress { margin: 0 18px 20px; }
    .session-timeout > div { padding: 22px 18px 18px; border-radius: 14px; }
    .session-timeout h2 { font-size: 15.5px; }
    .session-timeout-actions { flex-direction: column-reverse; }
    .session-timeout-actions .btn, .session-timeout-actions form { width: 100%; }

    .crm-mission-intro { flex-direction: column; }
    .crm-mission-compose form { grid-template-columns: 1fr; }
    .crm-mission-task { grid-row: auto; }
    .crm-mission-submit { align-items: stretch; flex-direction: column; }
    .crm-mission-submit .btn { width: 100%; }
    .crm-mission-detail { grid-template-columns: 1fr; padding-left: 0; }
    .crm-mission-analysis { margin-left: 0; }
    .crm-mission-preview img { height: 210px; }
}

/* Isolated CRM bot lab */
.bot-lab-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.bot-lab-heading h2 { margin: 0 0 5px; font-size: 19px; }
.bot-lab-heading p:not(.eyebrow) { max-width: 820px; margin: 0; }
.bot-lab-empty { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--border); }
.bot-lab-empty strong { color: var(--text-strong); font-size: 14px; }
.bot-lab-empty p { max-width: 720px; margin: 6px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.55; }

.bot-lab-status { padding: 22px 0 24px; border-bottom: 1px solid var(--border); }
.bot-lab-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--r-sm); background: #fff; }
.bot-lab-kpis > div { min-width: 0; padding: 14px 16px; border-right: 1px solid var(--border2); }
.bot-lab-kpis > div:last-child { border-right: 0; }
.bot-lab-kpis span, .bot-lab-kpis strong, .bot-lab-kpis small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-lab-kpis span { color: var(--muted); font-size: 9.5px; font-weight: 900; text-transform: uppercase; }
.bot-lab-kpis strong { margin-top: 5px; color: var(--text-strong); font-size: 13px; }
.bot-lab-kpis small { margin-top: 3px; color: var(--muted); font-size: 9.5px; }
.bot-automation-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 10px; border: 1px solid var(--border2); border-radius: var(--r-sm); background: var(--surface-alt); }
.bot-automation-strip > div { display: grid; grid-template-columns: 8px minmax(0, 1fr); column-gap: 8px; min-width: 0; padding: 10px 12px; border-right: 1px solid var(--border2); }
.bot-automation-strip > div:last-child { border-right: 0; }
.bot-automation-strip i { grid-row: 1 / 4; align-self: center; width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; }
.bot-automation-strip .online i { background: var(--success); }
.bot-automation-strip .offline i { background: var(--danger); }
.bot-automation-strip span, .bot-automation-strip strong, .bot-automation-strip small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-automation-strip span { color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.bot-automation-strip strong { margin-top: 2px; color: var(--text-strong); font-size: 10.5px; }
.bot-automation-strip small { margin-top: 2px; color: var(--muted); font-size: 8.5px; }
.bot-shift-progress { display: grid; grid-template-columns: minmax(210px, .8fr) minmax(180px, 1.4fr) auto; align-items: center; gap: 16px; min-height: 56px; margin-top: 10px; padding: 9px 13px; border: 1px solid #bae6d4; border-radius: var(--r-sm); background: #f2fbf7; }
.bot-shift-progress > div:first-child span, .bot-shift-progress > div:first-child strong, .bot-shift-progress > div:first-child small { display: block; }
.bot-shift-progress > div:first-child span { color: #0f766e; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.bot-shift-progress > div:first-child strong { margin-top: 2px; color: var(--text-strong); font-size: 11px; }
.bot-shift-progress > div:first-child small { margin-top: 2px; color: var(--muted); font-size: 8.5px; }
.bot-shift-progress.cancelled { border-color: var(--border); background: var(--surface-alt); }
.bot-shift-progress.paused { border-color: #fde68a; background: #fffbeb; }
.bot-shift-progress.paused .bot-shift-meter > i { background: #d97706; }
.bot-shift-meter { height: 7px; overflow: hidden; border-radius: 4px; background: #dbe9e4; }
.bot-shift-meter i { display: block; height: 100%; border-radius: inherit; background: #0f9f75; transition: width .25s ease; }
.bot-shift-progress > em { color: #0f766e; font-size: 8.5px; font-style: normal; font-weight: 900; white-space: nowrap; }
.bot-team { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 12px; border-top: 1px solid var(--border2); border-bottom: 1px solid var(--border2); }
.bot-team article { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto auto; align-items: center; gap: 10px; min-width: 0; padding: 11px 14px; border-right: 1px solid var(--border2); }
.bot-team article:last-child { border-right: 0; }
.bot-team article.selected { background: #f4fbf8; }
.bot-team article.inactive { opacity: .58; background: #f8fafc; }
.bot-team article > i { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--bot-color) 12%, white); color: var(--bot-color); font-size: 11px; font-style: normal; font-weight: 900; }
.bot-team strong, .bot-team span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-team strong { color: var(--text-strong); font-size: 11.5px; }
.bot-team span { margin-top: 2px; color: var(--muted); font-size: 9.5px; }
.bot-team em { color: var(--muted); font-size: 9px; font-style: normal; }
.bot-team em.active { color: var(--success); font-weight: 800; }
.bot-persona-actions { display: flex; gap: 4px; }
.bot-persona-actions form { margin: 0; }
.bot-persona-actions .icon-button { width: 26px; height: 26px; font-size: 9px; }
.bot-persona-creator { border-bottom: 1px solid var(--border2); }
.bot-persona-creator > summary { display: flex; min-height: 42px; align-items: center; gap: 7px; color: var(--p-d); cursor: pointer; font-size: 9.5px; font-weight: 900; list-style: none; }
.bot-persona-creator > summary::-webkit-details-marker { display: none; }
.bot-persona-creator > form { display: grid; grid-template-columns: 1.15fr 1.15fr .9fr .85fr 90px auto; align-items: end; gap: 9px; padding: 13px 0 16px; border-top: 1px solid var(--border2); }
.bot-persona-creator label { color: var(--muted); font-size: 8.5px; font-weight: 800; }
.bot-persona-creator input:not([type="color"]), .bot-persona-creator select { width: 100%; min-height: 34px; margin-top: 4px; padding: 0 8px; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fff; color: var(--text); font-size: 10px; }
.bot-persona-creator input[type="color"] { width: 100%; height: 34px; margin-top: 4px; padding: 3px; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fff; }
.bot-persona-creator .btn { min-height: 34px; white-space: nowrap; }

.bot-lab-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 28px 0; border-bottom: 1px solid var(--border); }
.bot-control-panel { order: 1; }
.bot-task-bank { order: 2; }
.bot-collapsible { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.bot-collapsible > summary { display: flex; min-height: 62px; align-items: center; justify-content: space-between; gap: 18px; cursor: pointer; list-style: none; }
.bot-collapsible > summary::-webkit-details-marker { display: none; }
.bot-collapsible > summary h2 { margin: 2px 0 0; font-size: 14px; }
.bot-collapsible > summary > span { flex: 0 0 auto; color: var(--muted); font-size: 9.5px; font-weight: 900; }
.bot-collapsible > summary::after { content: '+'; display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--muted); font-size: 15px; }
.bot-collapsible[open] > summary::after { content: '−'; }
.bot-task-bank-body { padding: 2px 0 18px; border-top: 1px solid var(--border2); }
.bot-scenario-filters { display: flex; gap: 4px; margin: 12px 0 18px; padding: 3px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-alt); }
.bot-scenario-filters button { flex: 0 0 auto; min-height: 30px; padding: 0 10px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; font: 800 9.5px/1 var(--font); }
.bot-scenario-filters button span { margin-left: 4px; color: #64748b; font-size: 8px; }
.bot-scenario-filters button.active { background: #fff; color: var(--text-strong); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.bot-scenario-group + .bot-scenario-group { margin-top: 22px; }
.bot-scenario-group > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; }
.bot-scenario-group > header strong { color: var(--text-strong); font-size: 10px; text-transform: uppercase; }
.bot-scenario-group > header span { color: var(--muted); font-size: 9px; }
.bot-scenario-list { border-top: 1px solid var(--border); }
.bot-scenario-list article { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 92px; padding: 12px 0; border-bottom: 1px solid var(--border2); }
.bot-scenario-index { color: #00a4d3; font-size: 11px; font-weight: 900; }
.bot-scenario-list strong { color: var(--text-strong); font-size: 12px; }
.bot-scenario-list p { margin: 4px 0; color: var(--text); font-size: 10.5px; line-height: 1.45; }
.bot-scenario-list small { color: var(--muted); font-size: 9.5px; }
.bot-scenario-list form { display: flex; align-items: center; gap: 7px; }
.bot-scenario-list select { width: 118px; min-height: 32px; padding: 0 8px; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fff; color: var(--text); font-size: 10px; }
.bot-scenario-list .btn { min-height: 32px; padding: 0 11px; font-size: 10px; }

.bot-control-panel > form { display: grid; gap: 18px; }
.bot-control-panel fieldset { display: grid; gap: 9px; margin: 0; padding: 0 0 15px; border: 0; border-bottom: 1px solid var(--border2); }
.bot-control-panel legend { margin-bottom: 8px; color: var(--text-strong); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.bot-control-panel label { color: var(--muted); font-size: 9.5px; font-weight: 800; }
.bot-control-panel select, .bot-control-panel input[type="time"], .bot-control-panel input[type="number"] { width: 100%; min-height: 34px; margin-top: 4px; padding: 0 9px; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fff; color: var(--text); font-size: 10.5px; }
.bot-segmented { display: grid; grid-template-columns: repeat(3, 1fr); padding: 3px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-alt); }
.bot-mode-segmented { grid-template-columns: repeat(4, 1fr); }
.bot-team-mode-segmented { grid-template-columns: 1fr 1fr; }
.bot-segmented label { position: relative; }
.bot-segmented input { position: absolute; opacity: 0; pointer-events: none; }
.bot-segmented span { display: grid; min-height: 29px; place-items: center; border-radius: 4px; color: var(--muted); cursor: pointer; font-size: 9.5px; }
.bot-segmented input:checked + span { background: #fff; color: var(--text-strong); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.bot-toggle { display: flex; align-items: center; gap: 8px; color: var(--text) !important; }
.bot-toggle input[type="checkbox"] { width: 16px; height: 16px; margin: 0; }
.bot-field-note { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.bot-team-selection { display: grid; gap: 5px; }
.bot-team-selection[hidden] { display: none; }
.bot-team-selection > label { display: grid; grid-template-columns: 15px 8px minmax(0, 1fr); align-items: center; gap: 7px; min-height: 34px; padding: 5px 7px; border: 1px solid var(--border2); border-radius: var(--r-sm); background: #fff; color: var(--text); }
.bot-team-selection input { width: 14px; height: 14px; margin: 0; }
.bot-team-selection i { width: 7px; height: 7px; border-radius: 50%; background: var(--bot-color); }
.bot-team-selection strong, .bot-team-selection small { display: block; }
.bot-team-selection strong { color: var(--text-strong); font-size: 9.5px; }
.bot-team-selection small { margin-top: 1px; color: var(--muted); font-size: 8px; }
.bot-primary-settings { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.bot-primary-settings > fieldset { min-width: 0; padding: 17px 20px; border-bottom: 0; }
.bot-primary-settings > fieldset:nth-child(odd) { border-right: 1px solid var(--border2); }
.bot-primary-settings > fieldset:nth-child(-n+2) { border-bottom: 1px solid var(--border2); }
.bot-plan-presets { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
.bot-plan-presets button { min-width: 0; min-height: 50px; padding: 7px 9px; border: 0; border-right: 1px solid var(--border2); border-bottom: 1px solid var(--border2); background: #fff; color: var(--text); cursor: pointer; text-align: left; }
.bot-plan-presets button:nth-child(2n) { border-right: 0; }
.bot-plan-presets button:last-child { border-bottom: 0; }
.bot-plan-presets button:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; border-bottom: 0; }
.bot-plan-presets button.active { background: #edfaff; box-shadow: inset 3px 0 #00a4d3; }
.bot-plan-presets strong, .bot-plan-presets span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-plan-presets strong { color: var(--text-strong); font: 900 9.5px/1.2 var(--font); }
.bot-plan-presets span { margin-top: 3px; color: var(--muted); font: 700 8px/1.2 var(--font); }
.bot-selection-summary { margin: 0; color: var(--muted); font-size: 9px; }
.bot-selection-summary strong { color: var(--text-strong); font-size: 11px; }
.bot-advanced-settings { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.bot-advanced-settings > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) 24px; align-items: center; gap: 10px; min-height: 48px; cursor: pointer; list-style: none; }
.bot-advanced-settings > summary::-webkit-details-marker { display: none; }
.bot-advanced-settings > summary strong { color: var(--text-strong); font-size: 10.5px; }
.bot-advanced-settings > summary span { color: var(--muted); font-size: 9px; }
.bot-advanced-settings > summary::after { content: '+'; display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid var(--border); border-radius: var(--r-sm); color: var(--muted); font-size: 14px; }
.bot-advanced-settings[open] > summary::after { content: '−'; }
.bot-advanced-settings-body { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; padding: 18px 0 3px; border-top: 1px solid var(--border2); }
.bot-advanced-settings-body > fieldset { min-width: 0; }
.bot-advanced-settings-body > .bot-enabled-scenarios { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 18px; }
.bot-advanced-settings-body > .bot-enabled-scenarios legend { grid-column: 1 / -1; }
.bot-control-actions { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 7px; }
.bot-control-actions .btn { min-width: 0; }
.bot-control-actions i { margin-right: 6px; }
.bot-control-actions .btn:disabled, .bot-scenario-list .btn:disabled { border-color: #dbe2e8; background: #f1f5f9; color: #94a3b8; box-shadow: none; cursor: not-allowed; }
.bot-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.bot-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.bot-weekdays label { position: relative; }
.bot-weekdays input { position: absolute; opacity: 0; }
.bot-weekdays span { display: grid; height: 27px; place-items: center; border: 1px solid var(--border); border-radius: 4px; background: #fff; color: var(--muted); cursor: pointer; }
.bot-weekdays input:checked + span { border-color: #00a4d3; background: #edfaff; color: #087da4; }
.bot-enabled-scenarios label { display: flex; align-items: center; gap: 7px; color: var(--text); }
.bot-enabled-scenarios input { width: 14px; height: 14px; margin: 0; }
.bot-enabled-scenarios { max-height: 260px; overflow-y: auto; }

.bot-run-history { padding: 28px 0; }
.bot-history-heading { align-items: flex-end; }
.bot-history-heading form { flex: 0 0 auto; }
.bot-history-heading .btn { min-height: 32px; padding: 0 10px; font-size: 9px; }
.bot-history-heading .btn i { margin-right: 6px; }
.bot-run-list { border-top: 1px solid var(--border); }
.bot-run-list:not(.show-all) > .bot-run:nth-of-type(n+6) { display: none; }
.bot-history-more { min-height: 32px; margin-top: 12px; padding: 0 11px; font-size: 9px; }
.bot-run { border-bottom: 1px solid var(--border2); }
.bot-run.attention { border-bottom-color: #f1d39a; }
.bot-run.failed { border-bottom-color: #fecaca; }
.bot-run > summary { display: grid; grid-template-columns: 8px minmax(180px, 1fr) auto auto; align-items: center; gap: 12px; min-height: 62px; cursor: pointer; list-style: none; }
.bot-run > summary::-webkit-details-marker { display: none; }
.bot-run-state { width: 7px; height: 7px; border-radius: 50%; background: var(--gray); }
.bot-run-state.queued { background: var(--warning); }
.bot-run-state.running { background: #00a4d3; animation: crmMissionPulse 1.5s ease-in-out infinite; }
.bot-run-state.completed { background: var(--success); }
.bot-run-state.failed { background: var(--danger); }
.bot-run > summary strong, .bot-run > summary small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-run > summary strong { color: var(--text-strong); font-size: 11.5px; }
.bot-run > summary small { max-width: 620px; margin-top: 3px; color: var(--muted); font-size: 9.5px; }
.bot-run-counts { display: flex; gap: 5px; }
.bot-run-counts span { padding: 3px 6px; border: 1px solid var(--border2); border-radius: 4px; color: var(--muted); font-size: 8.5px; white-space: nowrap; }
.bot-run-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-height: 38px; margin: 0 0 8px 20px; border-top: 1px solid var(--border2); border-bottom: 1px solid var(--border2); }
.bot-run-toolbar > span { margin-right: auto; color: var(--muted); font-size: 9px; }
.bot-run-toolbar form { margin: 0; }
.icon-button { display: grid; width: 30px; height: 30px; place-items: center; padding: 0; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fff; color: var(--muted); cursor: pointer; }
.icon-button:hover { border-color: #fca5a5; color: var(--danger); }
.icon-button.activate:hover { border-color: #86efac; color: #15803d; }
.ui-icon { display: inline-grid; min-width: 1em; place-items: center; font-family: Arial, sans-serif; font-size: 1.15em; font-style: normal; font-weight: 700; line-height: 1; }
.bot-run-detail { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(300px, 1fr); gap: 24px; padding: 0 0 20px 20px; }
.bot-run-preview { min-height: 180px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface-alt); }
.bot-run-preview img { display: block; width: 100%; height: 300px; object-fit: contain; object-position: top; background: #f8fafc; }
.bot-run-preview video { display: block; width: 100%; height: 300px; background: #111827; object-fit: contain; }
.bot-run-preview p { margin: 0; padding: 16px; color: var(--muted); font-size: 10.5px; }
.bot-event-trace ol { max-height: 380px; margin: 0; padding: 0; overflow: auto; border-top: 1px solid var(--border); list-style: none; }
.bot-event-trace li { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 9px; min-height: 49px; border-bottom: 1px solid var(--border2); background: transparent; }
.bot-event-trace li > i { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; }
.bot-event-trace li.ok > i { background: var(--success); }
.bot-event-trace li.warning > i { background: var(--warning); }
.bot-event-trace li.error > i, .bot-event-trace li.critical > i { background: var(--danger); }
.bot-event-trace li strong, .bot-event-trace li small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-event-trace li strong { color: var(--text-strong); font-size: 10.5px; }
.bot-event-trace li small { max-width: 420px; margin-top: 3px; color: var(--muted); font-size: 9px; }
.bot-event-trace li em { color: var(--muted); font-size: 8.5px; font-style: normal; font-weight: 900; text-transform: uppercase; }
.bot-run-quality { margin: 0 0 20px 20px; padding-top: 14px; border-top: 1px solid var(--border); }
.bot-quality-meter { display: grid; grid-template-columns: auto minmax(120px, 1fr) 42px; align-items: center; gap: 10px; margin: 7px 0 12px; }
.bot-quality-meter > span, .bot-quality-meter > strong { color: var(--muted); font-size: 9px; font-weight: 900; }
.bot-quality-meter > strong { color: var(--text-strong); text-align: right; }
.bot-quality-meter > div { height: 6px; overflow: hidden; border-radius: 3px; background: #e5e7eb; }
.bot-quality-meter > div > i { display: block; width: 0; height: 100%; background: var(--success); transition: width .2s ease; }
.bot-run-quality ol { display: grid; grid-template-columns: 1fr 1fr; column-gap: 22px; max-height: 250px; margin: 0; padding: 0; overflow: auto; border-top: 1px solid var(--border2); list-style: none; }
.bot-run-quality li { display: grid; grid-template-columns: 7px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 42px; border-bottom: 1px solid var(--border2); }
.bot-run-quality li > i { width: 6px; height: 6px; border-radius: 50%; background: #94a3b8; }
.bot-run-quality li.passed > i { background: var(--success); }
.bot-run-quality li.failed > i { background: var(--danger); }
.bot-run-quality li strong, .bot-run-quality li small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-run-quality li strong { color: var(--text-strong); font-size: 10px; }
.bot-run-quality li small { margin-top: 2px; color: var(--muted); font-size: 8.5px; }
.bot-run-quality li em { color: var(--muted); font-size: 8px; font-style: normal; font-weight: 900; }
.bot-run-quality li.failed em { color: var(--danger); }
.bot-trace-link { min-height: 30px; margin-top: 12px; padding: 0 10px; font-size: 9px; }
.bot-trace-link i { margin-right: 6px; }
.bot-visual-comparisons { margin: 0 0 22px 20px; padding-top: 15px; border-top: 1px solid var(--border); }
.bot-visual-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
.bot-visual-list article { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fff; }
.bot-visual-list article.changed { border-color: #f59e0b; }
.bot-visual-list article.error { border-color: var(--danger); }
.bot-visual-list article > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 10px; border-bottom: 1px solid var(--border2); }
.bot-visual-list article > header strong, .bot-visual-list article > header small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-visual-list article > header strong { color: var(--text-strong); font-size: 10px; }
.bot-visual-list article > header small { margin-top: 3px; color: var(--muted); font-size: 8.5px; }
.bot-visual-list article > header em { flex: 0 0 auto; color: var(--success); font-size: 8px; font-style: normal; font-weight: 900; text-transform: uppercase; }
.bot-visual-list article.changed > header em { color: #b45309; }
.bot-visual-list article.error > header em { color: var(--danger); }
.bot-visual-list article > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border2); }
.bot-visual-list figure { min-width: 0; margin: 0; background: #fff; }
.bot-visual-list figure a { display: block; background: #f8fafc; }
.bot-visual-list figure img { display: block; width: 100%; height: 128px; object-fit: contain; object-position: top; }
.bot-visual-list figcaption { padding: 5px 7px; color: var(--muted); font-size: 8px; font-weight: 800; text-align: center; }
.bot-run-analysis { margin: 0 0 20px 20px; padding: 14px 16px; border-left: 3px solid #00a4d3; background: #eef9fc; }
.bot-run-analysis.fallback, .bot-run-analysis.limit_reached, .bot-run-analysis.not_needed { border-left-color: #64748b; background: #f8fafc; }
.bot-run-analysis.failed { border-left-color: var(--danger); background: #fff7f7; }
.bot-run-analysis p { margin: 8px 0 0; color: var(--text); font-size: 10.5px; line-height: 1.55; white-space: pre-line; }

@media (max-width: 980px) {
    .bot-lab-kpis { grid-template-columns: 1fr 1fr; }
    .bot-lab-kpis > div:nth-child(2n) { border-right: 0; }
    .bot-lab-kpis > div:nth-child(-n+2) { border-bottom: 1px solid var(--border2); }
    .bot-lab-workspace { grid-template-columns: 1fr; }
    .bot-automation-strip { grid-template-columns: 1fr 1fr; }
    .bot-automation-strip > div:nth-child(2n) { border-right: 0; }
    .bot-automation-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--border2); }
    .bot-control-panel { padding: 0; border: 0; }
    .bot-advanced-settings-body > .bot-enabled-scenarios { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bot-persona-creator > form { grid-template-columns: 1fr 1fr 1fr; }
    .bot-run > summary { grid-template-columns: 8px minmax(0, 1fr) auto; }
    .bot-run-counts { grid-column: 2 / -1; padding-bottom: 8px; }
}

@media (max-width: 620px) {
    .bot-lab-heading, .bot-lab-empty { align-items: stretch; flex-direction: column; }
    .bot-lab-empty .btn { width: 100%; }
    .bot-lab-kpis { grid-template-columns: 1fr; }
    .bot-lab-kpis > div { border-right: 0; border-bottom: 1px solid var(--border2); }
    .bot-lab-kpis > div:last-child { border-bottom: 0; }
    .bot-automation-strip { grid-template-columns: 1fr; }
    .bot-automation-strip > div { border-right: 0; border-bottom: 1px solid var(--border2); }
    .bot-automation-strip > div:last-child { border-bottom: 0; }
    .bot-shift-progress { grid-template-columns: 1fr; gap: 8px; }
    .bot-shift-progress > em { justify-self: start; }
    .bot-team { grid-template-columns: 1fr; }
    .bot-team article { border-right: 0; border-bottom: 1px solid var(--border2); }
    .bot-team article:last-child { border-bottom: 0; }
    .bot-persona-creator > form { grid-template-columns: 1fr; }
    .bot-primary-settings, .bot-advanced-settings-body { grid-template-columns: 1fr; }
    .bot-primary-settings > fieldset { padding: 15px 0; border-right: 0 !important; border-bottom: 1px solid var(--border2); }
    .bot-primary-settings > fieldset:last-child { border-bottom: 0; }
    .bot-advanced-settings-body > .bot-enabled-scenarios { grid-column: auto; grid-template-columns: 1fr; }
    .bot-advanced-settings > summary { grid-template-columns: minmax(0, 1fr) 24px; }
    .bot-advanced-settings > summary span { display: none; }
    .bot-scenario-list article { grid-template-columns: 26px minmax(0, 1fr); }
    .bot-scenario-list form { grid-column: 2; flex-wrap: wrap; }
    .bot-scenario-list select { width: 132px; }
    .bot-history-heading { align-items: stretch; flex-direction: column; }
    .bot-history-heading .btn { width: 100%; }
    .bot-control-actions { grid-template-columns: 1fr; }
    .bot-mode-segmented { grid-template-columns: 1fr 1fr; }
    .bot-control-actions .btn.danger { grid-column: auto; }
    .bot-run-counts { flex-wrap: wrap; }
    .bot-run-toolbar { margin-left: 0; }
    .bot-run-detail { grid-template-columns: 1fr; padding-left: 0; }
    .bot-run-quality, .bot-visual-comparisons, .bot-run-analysis { margin-left: 0; }
    .bot-run-quality ol { grid-template-columns: 1fr; }
    .bot-run-preview img, .bot-run-preview video { height: 220px; }
    .bot-visual-list { grid-template-columns: 1fr; }
    .bot-visual-list figure img { height: 110px; }
}

/* AI Bot workspace and floating live team */
.bot-view-panel[hidden], .bot-live-window[hidden], .bot-live-backdrop[hidden] { display: none !important; }
.bot-workspace-tabs { display: flex; min-height: 48px; gap: 24px; overflow-x: auto; border-bottom: 1px solid var(--border); }
.bot-workspace-tabs button { position: relative; flex: 0 0 auto; min-width: 76px; padding: 0 2px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font: 800 10.5px/1 var(--font); }
.bot-workspace-tabs button::after { content: ''; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: transparent; }
.bot-workspace-tabs button:hover { color: var(--text-strong); }
.bot-workspace-tabs button.active { color: #087da4; }
.bot-workspace-tabs button.active::after { background: #00a4d3; }
.bot-workspace-tabs button > span { display: inline-grid; min-width: 18px; height: 18px; margin-left: 5px; place-items: center; border-radius: 9px; background: #edf5f8; color: #4f7180; font-size: 8px; }

.bot-lab-status { padding-top: 26px; }
.bot-team-overview { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding-bottom: 18px; }
.bot-team-overview h2 { margin: 3px 0 5px; color: var(--text-strong); font-size: 18px; }
.bot-team-overview p:not(.eyebrow) { max-width: 760px; margin: 0; color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.bot-team-overview-actions { display: flex; flex: 0 0 auto; gap: 7px; }
.bot-team-overview-actions .btn { min-height: 34px; padding: 0 13px; font-size: 9.5px; }
.bot-team-overview-actions .ui-icon { margin-right: 5px; font-size: 10px; }
.bot-team-snapshot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.bot-team-snapshot > div { min-width: 0; padding: 12px 15px; border-right: 1px solid var(--border2); }
.bot-team-snapshot > div:last-child { border-right: 0; }
.bot-team-snapshot span, .bot-team-snapshot strong, .bot-team-snapshot small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-team-snapshot span { color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.bot-team-snapshot strong { margin-top: 3px; color: var(--text-strong); font-size: 12px; }
.bot-team-snapshot small { margin-top: 2px; color: var(--muted); font-size: 8.5px; }
.bot-team { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.bot-team-runtime { display: flex; align-items: center; gap: 8px 18px; min-height: 38px; overflow-x: auto; border-bottom: 1px solid var(--border2); color: var(--muted); font-size: 8.5px; white-space: nowrap; }
.bot-team-runtime span { display: inline-flex; align-items: center; gap: 6px; }
.bot-team-runtime i { width: 6px; height: 6px; border-radius: 50%; background: #94a3b8; }
.bot-team-runtime .online i { background: var(--success); }
.bot-team-runtime .offline i { background: var(--danger); }

.bot-lab-workspace { display: contents; }
.bot-control-panel, .bot-task-bank, .bot-run-history { padding: 28px 0; border-bottom: 1px solid var(--border); }
.bot-task-bank.bot-collapsible { border-top: 0; }
.bot-task-bank.bot-collapsible > summary { min-height: 54px; }
.bot-task-bank.bot-collapsible[open] > summary::after { content: none; }
.bot-task-bank.bot-collapsible > summary::after { content: none; }
.bot-task-bank-body { border-top: 1px solid var(--border2); }

.bot-live-backdrop { position: fixed; inset: 0; z-index: 1180; background: rgba(15, 23, 42, .28); backdrop-filter: blur(2px); }
.bot-live-window { position: fixed; right: 24px; bottom: 82px; z-index: 1200; display: flex; width: min(430px, calc(100vw - 32px)); height: min(590px, calc(100vh - 110px)); flex-direction: column; overflow: hidden; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; box-shadow: 0 22px 60px rgba(15, 23, 42, .24); }
.bot-live-header { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 12px; padding: 0 10px 0 14px; border-bottom: 1px solid var(--border); background: #fff; }
.bot-live-title { display: flex; min-width: 0; align-items: center; gap: 9px; }
.bot-live-title > i { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }
.bot-live-title > i.connected { background: var(--success); box-shadow: 0 0 0 4px #dcfce7; }
.bot-live-title strong, .bot-live-title span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-live-title strong { color: var(--text-strong); font-size: 11px; }
.bot-live-title span { margin-top: 2px; color: var(--muted); font-size: 8.5px; }
.bot-live-controls { display: flex; flex: 0 0 auto; gap: 3px; }
.bot-live-controls button { display: grid; width: 28px; height: 28px; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #64748b; cursor: pointer; font: 700 15px/1 Arial, sans-serif; }
.bot-live-controls button:hover { border-color: var(--border); background: var(--surface-alt); color: var(--text-strong); }
.bot-live-workers { display: flex; flex: 0 0 58px; overflow-x: auto; border-bottom: 1px solid var(--border); background: #f8fafc; }
.bot-live-workers button { display: grid; flex: 1 0 124px; min-width: 0; grid-template-columns: 26px minmax(0, 1fr); align-items: center; gap: 7px; padding: 0 9px; border: 0; border-right: 1px solid var(--border2); border-bottom: 2px solid transparent; background: transparent; color: var(--muted); cursor: pointer; text-align: left; }
.bot-live-workers button:last-child { border-right: 0; }
.bot-live-workers button.active { border-bottom-color: #00a4d3; background: #fff; color: var(--text-strong); }
.bot-live-workers button > i { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--bot-color) 13%, white); color: var(--bot-color); font-size: 9px; font-style: normal; font-weight: 900; }
.bot-live-workers button > span, .bot-live-workers strong, .bot-live-workers small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-live-workers strong { color: inherit; font-size: 9px; }
.bot-live-workers small { margin-top: 2px; color: var(--muted); font-size: 7.5px; }
.bot-live-workers button.working small { color: #047857; font-weight: 900; }
.bot-live-workers button.ready small { color: #087b9b; font-weight: 900; }
.bot-live-workers button.scheduled small, .bot-live-workers button.break small { color: #a16207; font-weight: 900; }
.bot-live-body { display: grid; min-height: 0; flex: 1 1 auto; grid-template-rows: minmax(250px, auto) minmax(96px, 1fr); overflow: hidden; }
.bot-live-stage { display: grid; min-height: 0; grid-template-rows: minmax(170px, 1fr) auto; border-bottom: 1px solid var(--border); }
.bot-live-screen { position: relative; min-height: 0; overflow: hidden; background: #111827; }
.bot-live-screen img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: top; }
.bot-live-cursor { position: absolute; z-index: 4; width: 20px; height: 24px; pointer-events: none; transition: left .32s cubic-bezier(.2, .8, .2, 1), top .32s cubic-bezier(.2, .8, .2, 1); filter: drop-shadow(0 2px 3px rgba(15, 23, 42, .5)); }
.bot-live-cursor[hidden] { display: none; }
.bot-live-cursor::before { position: absolute; inset: 0 auto auto 0; width: 16px; height: 21px; background: #fff; clip-path: polygon(0 0, 0 92%, 5px 72%, 9px 100%, 13px 98%, 9px 69%, 18px 68%); content: ""; }
.bot-live-cursor::after { position: absolute; inset: 1px auto auto 1px; width: 13px; height: 18px; background: #0891b2; clip-path: polygon(0 0, 0 90%, 4px 69%, 8px 96%, 10px 95%, 7px 66%, 15px 65%); content: ""; }
.bot-live-cursor > i { position: absolute; top: -8px; left: -8px; width: 28px; height: 28px; border: 2px solid rgba(14, 165, 233, .72); border-radius: 50%; opacity: 0; transform: scale(.45); }
.bot-live-cursor.clicking > i, .bot-live-cursor.dropping > i { animation: bot-live-click .62s ease-out infinite; }
.bot-live-cursor.typing::after { background: #0f9f75; }
.bot-live-cursor.dragging::after, .bot-live-cursor.dropping::after { background: #f59e0b; }
@keyframes bot-live-click { 0% { opacity: .9; transform: scale(.35); } 100% { opacity: 0; transform: scale(1.25); } }
.bot-live-screen > em { position: absolute; top: 9px; right: 9px; padding: 4px 7px; border-radius: 4px; background: rgba(15, 23, 42, .82); color: #fff; font-size: 7.5px; font-style: normal; font-weight: 900; }
.bot-live-screen > em.working { background: rgba(4, 120, 87, .92); }
.bot-live-screen > em.ready { background: rgba(8, 123, 155, .92); }
.bot-live-screen > em.scheduled, .bot-live-screen > em.break { background: rgba(161, 98, 7, .92); }
.bot-live-screen > em.off_shift, .bot-live-screen > em.inactive { background: rgba(71, 85, 105, .9); }
.bot-live-placeholder { display: grid; width: 100%; height: 100%; place-content: center; padding: 18px; color: #cbd5e1; text-align: center; }
.bot-live-placeholder[hidden] { display: none; }
.bot-live-placeholder strong { color: #fff; font-size: 11px; }
.bot-live-placeholder span { margin-top: 5px; font-size: 8.5px; }
.bot-live-stage-meta { min-width: 0; padding: 10px 12px; background: #fff; }
.bot-live-stage-meta > strong, .bot-live-stage-meta > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-live-stage-meta > strong { color: var(--text-strong); font-size: 10.5px; }
.bot-live-stage-meta > span { margin-top: 3px; color: var(--muted); font-size: 8.5px; }
.bot-live-stage-meta > div { display: flex; gap: 12px; margin-top: 7px; overflow: hidden; color: #526479; font-size: 8px; font-weight: 800; white-space: nowrap; }
.bot-live-stage-meta > div span { overflow: hidden; text-overflow: ellipsis; }
.bot-live-stage-meta > div [data-live-cursor-action] { flex: 1 1 auto; color: #087b9b; }
.bot-live-activity { display: grid; min-height: 0; grid-template-rows: 36px minmax(0, 1fr); padding: 0 12px; }
.bot-live-activity > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--border2); }
.bot-live-activity > header strong { color: var(--text-strong); font-size: 9px; }
.bot-live-activity > header span { color: var(--muted); font-size: 7.5px; }
.bot-live-activity ol { min-height: 0; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.bot-live-activity li { display: grid; min-height: 42px; grid-template-columns: 7px minmax(0, 1fr); align-items: center; gap: 8px; border-bottom: 1px solid var(--border2); background: transparent; }
.bot-live-activity li > i { width: 6px; height: 6px; border-radius: 50%; background: #94a3b8; }
.bot-live-activity li.ok > i { background: var(--success); }
.bot-live-activity li.warning > i { background: var(--warning); }
.bot-live-activity li.error > i, .bot-live-activity li.critical > i { background: var(--danger); }
.bot-live-activity li strong, .bot-live-activity li small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-live-activity li strong { color: var(--text-strong); font-size: 8.5px; }
.bot-live-activity li small { margin-top: 2px; color: var(--muted); font-size: 7.5px; }
.bot-live-footer { display: grid; min-height: 48px; flex: 0 0 auto; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 0 12px; border-top: 1px solid var(--border); background: #f8fafc; }
.bot-live-footer > div > span { display: block; color: var(--muted); font-size: 8px; }
.bot-live-footer > div > div { height: 5px; margin-top: 5px; overflow: hidden; border-radius: 3px; background: #e2e8f0; }
.bot-live-footer > div > div > i { display: block; width: 0; height: 100%; border-radius: inherit; background: #0f9f75; transition: width .25s ease; }
.bot-live-footer .btn { min-height: 29px; padding: 0 9px; font-size: 8px; }
.bot-live-window.minimized { width: min(360px, calc(100vw - 32px)); height: 48px; }
.bot-live-window.minimized .bot-live-header { border-bottom: 0; }
.bot-live-window.minimized .bot-live-workers, .bot-live-window.minimized .bot-live-body, .bot-live-window.minimized .bot-live-footer { display: none; }
.bot-live-window.expanded { inset: 24px; width: auto; height: auto; max-width: none; }
.bot-live-window.expanded .bot-live-body { grid-template-columns: minmax(0, 1.55fr) minmax(280px, .65fr); grid-template-rows: minmax(0, 1fr); }
.bot-live-window.expanded .bot-live-stage { grid-template-rows: minmax(0, 1fr) auto; border-right: 1px solid var(--border); border-bottom: 0; }
.bot-live-window.expanded .bot-live-screen { aspect-ratio: auto; }
.bot-live-window.expanded .bot-live-stage-meta > span { white-space: normal; line-height: 1.45; }
.bot-live-window.expanded .bot-live-activity { grid-template-rows: 44px minmax(0, 1fr); padding: 0 16px; }
.bot-live-window.expanded .bot-live-activity li { min-height: 52px; }
body.bot-live-expanded { overflow: hidden; }

/* Billing and subscription operations */
.billing-workspace { max-width: 1420px; }
.billing-panel { padding: 0; }
.billing-panel + .billing-panel { margin-top: 22px; }
.billing-panel .workspace-panel-heading { padding: 22px 24px 18px; border-bottom: 1px solid var(--border); }
.billing-panel .eyebrow { margin-bottom: 5px; }
.table-secondary { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 500; }
.billing-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.billing-plan { min-width: 0; border-right: 1px solid var(--border); }
.billing-plan:last-child { border-right: 0; }
.billing-plan > summary { display: flex; min-height: 106px; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 20px 16px; cursor: pointer; list-style: none; }
.billing-plan > summary::-webkit-details-marker { display: none; }
.billing-plan > summary b, .billing-plan > summary small { display: block; }
.billing-plan > summary b { color: var(--text-strong); font-size: 15px; }
.billing-plan > summary small { margin-top: 5px; color: var(--muted); font-size: 9.5px; line-height: 1.45; }
.billing-plan-summary { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: 6px; }
.billing-plan-summary em { color: #087da4; font-size: 10px; font-style: normal; font-weight: 800; white-space: nowrap; }
.billing-plan-summary i { padding: 4px 6px; border: 1px solid #a7f3d0; border-radius: 999px; background: #ecfdf5; color: #047857; font-size: 8px; font-style: normal; font-weight: 800; }
.billing-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 20px 20px; }
.billing-form-grid label { display: flex; min-width: 0; flex-direction: column; gap: 6px; color: var(--muted); font-size: 9px; font-weight: 800; }
.billing-form-grid input, .billing-form-grid select { width: 100%; min-width: 0; }
.billing-form-grid footer { display: flex; grid-column: 1 / -1; justify-content: flex-end; padding-top: 4px; }
.billing-toggles { display: flex; grid-column: 1 / -1; flex-wrap: wrap; gap: 10px 16px; }
.billing-toggles label, .form-choice label { display: inline-flex; align-items: center; gap: 7px; color: var(--text); font-size: 9px; font-weight: 700; }
.billing-toggles input, .form-choice input { width: auto; }
.form-choice { display: flex; min-width: 0; flex-wrap: wrap; align-content: flex-start; gap: 8px 14px; margin: 0; padding: 0; border: 0; }
.form-choice legend { width: 100%; margin-bottom: 2px; padding: 0; color: var(--muted); font-size: 9px; font-weight: 800; }
.billing-form-wide { max-width: 1020px; padding: 22px 24px 24px; }
.billing-invoice-create { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 22px 24px 24px; border-bottom: 1px solid var(--border); }
.billing-form-span { grid-column: span 2; }
.billing-panel .table-scroll { padding: 0 24px 10px; }
.billing-panel .table-scroll table { min-width: 760px; }
.billing-panel .table-actions { display: flex; gap: 6px; }
.billing-panel .table-actions form { margin: 0; }

@media (max-width: 1020px) {
    .billing-plan-grid { grid-template-columns: 1fr; }
    .billing-plan { border-right: 0; border-bottom: 1px solid var(--border); }
    .billing-plan:last-child { border-bottom: 0; }
    .billing-plan > summary { min-height: 0; }
}

@media (max-width: 700px) {
    .billing-panel .workspace-panel-heading, .billing-form-wide, .billing-invoice-create { padding-right: 16px; padding-left: 16px; }
    .billing-form-grid, .billing-invoice-create { grid-template-columns: 1fr; }
    .billing-form-span { grid-column: auto; }
    .billing-panel .table-scroll { padding-right: 16px; padding-left: 16px; }
}

@media (max-width: 760px) {
    .bot-workspace-tabs { gap: 18px; }
    .bot-team-overview { align-items: stretch; flex-direction: column; gap: 14px; }
    .bot-team-overview-actions { width: 100%; }
    .bot-team-overview-actions .btn { flex: 1 1 0; }
    .bot-team-snapshot { grid-template-columns: 1fr 1fr; }
    .bot-team-snapshot > div:nth-child(2) { border-right: 0; }
    .bot-team-snapshot > div:last-child { grid-column: 1 / -1; border-top: 1px solid var(--border2); }
    .bot-team-runtime { align-items: flex-start; flex-direction: column; padding: 10px 0; overflow: visible; white-space: normal; }
    .bot-live-window { right: 8px; bottom: 74px; width: calc(100vw - 16px); height: min(520px, calc(100vh - 84px)); }
    .bot-live-window.minimized { width: calc(100vw - 16px); }
    .bot-live-window.expanded { inset: 8px; width: auto; height: auto; }
    .bot-live-window.expanded .bot-live-body { grid-template-columns: 1fr; grid-template-rows: minmax(250px, 1.2fr) minmax(150px, .8fr); }
    .bot-live-window.expanded .bot-live-stage { border-right: 0; border-bottom: 1px solid var(--border); }
    .bot-live-workers button { flex-basis: 116px; }
}

/* NEXO Meet operations */
.meet-ops { display: grid; gap: 16px; min-width: 0; }
.meet-ops-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.meet-ops-header h2 { margin-bottom: 4px; font-size: 19px; }
.meet-ops-header p:last-child { margin: 0; }
.meet-ops-live-state { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10.5px; font-weight: 800; white-space: nowrap; }
.meet-ops-live-state i { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 5px rgba(16,185,129,.11); }
.meet-ops-environments { display: flex; align-items: center; gap: 5px; width: max-content; padding: 4px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.meet-ops-environments > span { padding: 0 8px; color: var(--light); font-size: 9px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.meet-ops-environments a { min-height: 28px; display: inline-flex; align-items: center; padding: 0 11px; border-radius: 6px; color: var(--muted); font-weight: 800; }
.meet-ops-environments a:hover { color: var(--text-strong); background: var(--bg); text-decoration: none; }
.meet-ops-environments a.active { color: var(--p-d); background: var(--p-soft); }
.meet-ops-source { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: var(--muted); font-size: 10px; }
.meet-ops-source strong { padding: 4px 8px; border-radius: 999px; color: var(--p-d); background: var(--p-soft); }
.meet-ops-tabs { display: flex; align-items: center; gap: 6px; padding: 5px; width: max-content; max-width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: var(--sh); }
.meet-ops-tabs a { min-height: 31px; display: inline-flex; align-items: center; padding: 0 13px; border-radius: 7px; color: var(--muted); font-weight: 800; white-space: nowrap; }
.meet-ops-tabs a:hover { color: var(--text-strong); background: var(--bg); text-decoration: none; }
.meet-ops-tabs a.active { color: #fff; background: var(--p); box-shadow: 0 3px 10px rgba(0,164,211,.2); }
.meet-ops-metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.meet-ops-metrics article { min-width: 0; padding: 15px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: var(--sh); }
.meet-ops-metrics article.has-error { border-color: #fecaca; background: #fffafa; }
.meet-ops-metrics span, .meet-ops-metrics small { display: block; color: var(--muted); }
.meet-ops-metrics span { font-size: 10px; font-weight: 900; letter-spacing: .03em; text-transform: uppercase; }
.meet-ops-metrics strong { display: block; margin: 4px 0 2px; color: var(--text-strong); font-size: 25px; line-height: 1.05; }
.meet-ops-metrics small { font-size: 10.5px; }
.meet-ops-warnings { display: grid; gap: 8px; }
.meet-ops-warnings article { display: grid; grid-template-columns: minmax(120px,auto) 1fr; gap: 3px 12px; padding: 10px 12px; border: 1px solid #fde68a; border-radius: 8px; background: #fffbeb; color: #92400e; }
.meet-ops-warnings span { font-weight: 700; }
.meet-ops-warnings small { grid-column: 2; }
.meet-ops-activation-pending { min-height: 310px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 20px; padding: 40px; border: 1px solid #bae6fd; border-radius: 14px; background: linear-gradient(135deg,#f0f9ff 0%,#ffffff 72%); box-shadow: var(--sh); }
.meet-ops-activation-pending > span { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 18px; background: var(--p-soft); color: var(--p); font-size: 34px; }
.meet-ops-activation-pending h2 { margin: 3px 0 8px; color: var(--text-strong); font-size: 21px; }
.meet-ops-activation-pending p:not(.eyebrow) { max-width: 760px; margin: 0; line-height: 1.65; }
.meet-ops-activation-pending > a { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 17px; border-radius: 9px; background: var(--p); color: #fff; font-weight: 900; white-space: nowrap; box-shadow: 0 8px 18px rgba(14,165,233,.18); }
.meet-ops-activation-pending > a:hover { background: var(--p-d); color: #fff; text-decoration: none; }
.meet-ops-panel { overflow: hidden; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); box-shadow: var(--sh); }
.meet-ops-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.meet-ops-panel > header h2 { margin: 0; }
.meet-ops-explainer { margin: 0; padding: 12px 18px; border-bottom: 1px solid var(--border2); background: var(--p-soft); }
.meet-ops-table-wrap { overflow-x: auto; }
.meet-ops-table { width: 100%; min-width: 820px; border-collapse: collapse; }
.meet-ops-table th { padding: 10px 13px; background: #f8fafc; color: var(--light); font-size: 9.5px; font-weight: 900; letter-spacing: .04em; text-align: left; text-transform: uppercase; }
.meet-ops-table td { padding: 12px 13px; border-top: 1px solid var(--border2); color: var(--text); vertical-align: middle; }
.meet-ops-table tbody tr:hover { background: #fbfdff; }
.meet-ops-table tr.is-failed { background: #fffafa; }
.meet-ops-table td > strong:not(.meet-ops-count):not(.meet-ops-queue-number) { display: block; color: var(--text-strong); }
.meet-ops-table td > small { display: block; margin-top: 2px; color: var(--muted); }
.meet-ops-count { color: var(--p-d); font-size: 20px; }
.meet-ops-queue-number { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: var(--p-soft); color: var(--p-d); }
.meet-ops-error { max-width: 220px; color: var(--error) !important; }
.meet-ops-empty { min-height: 250px; display: grid; place-items: center; align-content: center; gap: 7px; padding: 32px; text-align: center; }
.meet-ops-empty > span { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--p-soft); color: var(--p); font-size: 23px; }
.meet-ops-empty strong { color: var(--text-strong); font-size: 15px; }
.meet-ops-empty p { margin: 0; }
.meet-ops-capacity-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.meet-ops-resource-card { padding: 17px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: var(--sh); }
.meet-ops-resource-card header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.meet-ops-resource-card header h2 { margin: 0; }
.meet-ops-resource-card header > strong { color: var(--p-d); font-size: 18px; }
.meet-ops-resource-card dl { display: grid; grid-template-columns: repeat(3,1fr); margin: 0; border: 1px solid var(--border2); border-radius: 8px; }
.meet-ops-resource-card dl div { padding: 10px; border-right: 1px solid var(--border2); }
.meet-ops-resource-card dl div:last-child { border-right: 0; }
.meet-ops-resource-card dt { color: var(--muted); font-size: 9.5px; font-weight: 800; }
.meet-ops-resource-card dd { margin: 3px 0 0; color: var(--text-strong); font-size: 16px; font-weight: 900; }
.meet-ops-resource-card p { margin: 8px 0 0; }
.meet-ops-meter { height: 7px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.meet-ops-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--p),#22c55e); }
.meet-ops-rules { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.meet-ops-rules article { display: flex; gap: 12px; padding: 15px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.meet-ops-rules article > span { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; background: var(--p-soft); color: var(--p); font-size: 16px; font-weight: 900; }
.meet-ops-rules strong { color: var(--text-strong); }
.meet-ops-rules p { margin: 3px 0 0; font-size: 10.5px; }
.meet-ops-updated { padding: 3px 2px 0; color: var(--light); font-size: 9.5px; text-align: right; }
@media (max-width: 1050px) {
    .meet-ops-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .meet-ops-rules { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .meet-ops-header { align-items: flex-start; flex-direction: column; }
    .meet-ops-metrics, .meet-ops-capacity-grid { grid-template-columns: 1fr; }
    .meet-ops-tabs { width: 100%; }
    .meet-ops-warnings article { grid-template-columns: 1fr; }
    .meet-ops-warnings small { grid-column: 1; }
    .meet-ops-activation-pending { grid-template-columns: 1fr; padding: 24px; }
    .meet-ops-activation-pending > a { justify-self: start; }
}

/* AI autonomy control plane R1 */
.autonomy-command-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: #fff; }
.autonomy-command-grid article { min-width: 0; padding: 16px 18px; border-right: 1px solid var(--border2); }
.autonomy-command-grid article:last-child { border-right: 0; }
.autonomy-command-grid article.has-warning { background: #fffdf5; }
.autonomy-command-grid article.is-critical { background: #fff7f7; }
.autonomy-command-grid span, .autonomy-command-grid small { display: block; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.autonomy-command-grid span { font-size: 8.5px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.autonomy-command-grid strong { display: block; margin: 5px 0 3px; color: var(--text-strong); font-size: 21px; line-height: 1; }
.autonomy-command-grid small { font-size: 8.5px; }
.autonomy-truth-strip { min-height: 43px; display: flex; align-items: center; gap: 24px; padding: 7px 18px; border-bottom: 1px solid var(--border); background: #f8fafc; }
.autonomy-truth-strip > div { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; }
.autonomy-truth-strip > div > span { font-weight: 800; text-transform: uppercase; }
.autonomy-truth-strip strong { color: var(--text-strong); font-size: 10px; }
.autonomy-truth-strip strong i { width: 7px; height: 7px; display: inline-block; margin-right: 6px; border-radius: 50%; background: var(--gray); }
.autonomy-truth-strip strong.is-online i { background: var(--success); box-shadow: 0 0 0 4px rgba(16,185,129,.10); }
.autonomy-truth-strip strong.is-offline { color: var(--danger); }
.autonomy-truth-strip strong.is-offline i { background: var(--danger); }
.autonomy-truth-strip > a { margin-left: auto; color: var(--p-d); font-size: 9.5px; font-weight: 900; }
.autonomy-health-axes { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); background: #fff; }
.autonomy-health-axes article > div:first-child { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; color: var(--muted); font-size: 9px; }
.autonomy-health-axes strong { color: var(--text-strong); }
.autonomy-meter { height: 5px; overflow: hidden; border-radius: 999px; background: #e2e8f0; }
.autonomy-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#0ea5e9,#10b981); }

.crm-mission-compose form { grid-template-columns: minmax(190px,.65fr) minmax(300px,1.35fr) minmax(260px,1fr); }
.crm-mission-criteria textarea { min-height: 104px; }
.crm-mission-timeout { align-self: end; }
.crm-mission-timeout select { width: 100%; }
.crm-mission-criteria span small { margin-left: 4px; color: var(--light); font-weight: 600; }
.autonomy-verdict-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); margin: 0 0 16px 20px; border: 1px solid var(--border2); border-radius: var(--r-sm); background: #f8fafc; }
.autonomy-verdict-grid > div { min-width: 0; padding: 8px 10px; border-right: 1px solid var(--border2); }
.autonomy-verdict-grid > div:last-child { border-right: 0; }
.autonomy-verdict-grid span, .autonomy-verdict-grid strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.autonomy-verdict-grid span { color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.autonomy-verdict-grid strong { margin-top: 3px; color: var(--text-strong); font-size: 10px; }
.autonomy-verdict-grid strong.ok { color: var(--success); }
.autonomy-verdict-grid strong.warning { color: #b45309; }
.autonomy-verdict-grid strong.error { color: var(--danger); }
.autonomy-plan-strip { display: grid; grid-template-columns: minmax(180px,.8fr) minmax(280px,1.5fr) auto; align-items: center; gap: 12px; margin: -6px 0 18px 20px; padding: 9px 11px; border: 1px dashed #bae6fd; border-radius: var(--r-sm); background: #f0f9ff; }
.autonomy-plan-strip > span, .autonomy-plan-strip > small { color: #526274; font-size: 8.5px; }
.autonomy-plan-strip > span { font-weight: 900; text-transform: uppercase; }
.autonomy-plan-strip > small { text-align: right; }
.autonomy-plan-strip > div { display: flex; flex-wrap: wrap; gap: 4px; }
.autonomy-plan-strip em { padding: 2px 6px; border-radius: 999px; background: #fff; color: var(--p-d); font-size: 8px; font-style: normal; font-weight: 800; }
.autonomy-verification-reasons { margin: -8px 0 16px 20px; padding: 9px 11px; border-left: 3px solid #38bdf8; border-radius: 0 var(--r-sm) var(--r-sm) 0; background: #f0f9ff; }
.autonomy-verification-reasons > strong { color: #075985; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.autonomy-verification-reasons ul { display: grid; gap: 3px; margin: 5px 0 0; padding-left: 16px; }
.autonomy-verification-reasons li { color: #334155; font-size: 9px; line-height: 1.45; }

.bot-team-snapshot { grid-template-columns: repeat(4,minmax(0,1fr)); }
.bot-team article > div > small { display: block; max-width: 420px; margin-top: 3px; overflow: hidden; color: var(--light); font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.bot-persona-creator > form { grid-template-columns: repeat(4,minmax(150px,1fr)); }
.bot-persona-creator .bot-persona-wide { grid-column: span 2; }
.bot-persona-creator textarea { width: 100%; min-height: 62px; margin-top: 4px; padding: 8px; resize: vertical; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fff; color: var(--text); font-size: 10px; }
.bot-persona-creator .btn { justify-self: start; }
.autonomy-guardrails { border-color: #bae6fd !important; background: #f8fdff !important; }
.bot-emergency-toggle { color: var(--danger) !important; }
.bot-run.verified_success { border-bottom-color: #bbf7d0; }
.bot-run.success_with_findings, .bot-run.inconclusive, .bot-run.timed_out { border-bottom-color: #fde68a; }
.bot-verdict-grid { margin-top: 0; }

.autonomy-operations { display: grid; gap: 18px; }
.autonomy-queue-summary { display: flex; flex-wrap: wrap; gap: 7px; }
.autonomy-queue-summary span { padding: 5px 8px; border: 1px solid var(--border); border-radius: 999px; background: #fff; color: var(--muted); font-size: 9px; font-weight: 800; }
.autonomy-incident-list, .autonomy-approval-list { display: grid; gap: 9px; }
.autonomy-incident { overflow: hidden; border: 1px solid var(--border); border-left: 3px solid var(--warning); border-radius: var(--r-sm); background: #fff; }
.autonomy-incident.error, .autonomy-incident.critical { border-left-color: var(--danger); }
.autonomy-incident.info { border-left-color: #0ea5e9; }
.autonomy-incident.sla-overdue { box-shadow: 0 0 0 2px rgba(239,68,68,.08); }
.autonomy-incident > summary { display: grid; grid-template-columns: 8px minmax(0,1fr) auto; align-items: center; gap: 11px; min-height: 58px; padding: 0 14px; cursor: pointer; list-style: none; }
.autonomy-incident > summary::-webkit-details-marker { display: none; }
.autonomy-incident > summary > i { width: 7px; height: 7px; border-radius: 50%; background: var(--warning); }
.autonomy-incident.error > summary > i, .autonomy-incident.critical > summary > i { background: var(--danger); }
.autonomy-incident > summary strong, .autonomy-incident > summary small { display: block; }
.autonomy-incident > summary strong { color: var(--text-strong); font-size: 11px; }
.autonomy-incident > summary small { margin-top: 3px; color: var(--muted); font-size: 8.5px; }
.autonomy-incident > summary > span, .autonomy-approval-list article header > span { display: flex; gap: 5px; }
.autonomy-incident-body { padding: 14px 16px 16px 33px; border-top: 1px solid var(--border2); background: #fbfdff; }
.autonomy-incident-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 18px; }
.autonomy-incident-facts span { color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.autonomy-incident-facts p { margin: 3px 0 0; color: var(--text); font-size: 10px; line-height: 1.5; }
.autonomy-incident-meta { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 13px 0 0; border: 1px solid var(--border2); border-radius: var(--r-sm); background: #fff; }
.autonomy-incident-meta div { padding: 8px 10px; border-right: 1px solid var(--border2); }
.autonomy-incident-meta div:last-child { border-right: 0; }
.autonomy-incident-meta dt { color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.autonomy-incident-meta dd { margin: 2px 0 0; color: var(--text-strong); font-size: 9.5px; font-weight: 800; }
.autonomy-incident-meta dd.error { color: var(--danger); }
.autonomy-remediation { margin-top: 12px; padding: 10px 12px; border: 1px solid #fed7aa; border-radius: var(--r-sm); background: #fff7ed; }
.autonomy-remediation strong, .autonomy-incident-timeline > strong { color: #7c2d12; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.autonomy-remediation p { margin: 4px 0 0; color: #7c2d12; font-size: 9.5px; line-height: 1.45; }
.autonomy-incident-timeline { margin-top: 12px; }
.autonomy-incident-timeline ol { display: grid; gap: 0; margin: 7px 0 0; padding: 0; list-style: none; }
.autonomy-incident-timeline li { display: grid; grid-template-columns: 8px minmax(0,1fr) auto; gap: 9px; padding: 8px 0; border-top: 1px solid var(--border2); }
.autonomy-incident-timeline li > i { width: 7px; height: 7px; margin-top: 3px; border: 2px solid #7dd3fc; border-radius: 50%; background: #fff; }
.autonomy-incident-timeline li strong { color: var(--text-strong); font-size: 9px; text-transform: uppercase; }
.autonomy-incident-timeline li p { margin: 2px 0 0; color: var(--text); font-size: 9px; line-height: 1.4; }
.autonomy-incident-timeline li small { color: var(--muted); font-size: 8px; white-space: nowrap; }
.autonomy-incident-actions { display: flex; align-items: flex-end; gap: 10px; margin-top: 13px; }
.autonomy-incident-actions form { margin: 0; }
.autonomy-resolve-form { display: grid; grid-template-columns: minmax(220px,1fr) minmax(220px,1fr) auto; align-items: end; gap: 9px; flex: 1; }
.autonomy-resolve-form label, .autonomy-approval-list form label { color: var(--muted); font-size: 8.5px; font-weight: 800; }
.autonomy-resolve-form textarea, .autonomy-approval-list form input { width: 100%; margin-top: 4px; padding: 8px; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fff; color: var(--text); font-size: 10px; }
.autonomy-resolve-form textarea { min-height: 58px; resize: vertical; }
.autonomy-approval-title { margin-top: 14px; }
.autonomy-approval-list article { padding: 14px 16px; border: 1px solid var(--border); border-left: 3px solid var(--warning); border-radius: var(--r-sm); background: #fff; }
.autonomy-approval-list article.approved { border-left-color: var(--success); }
.autonomy-approval-list article.rejected { border-left-color: var(--danger); }
.autonomy-approval-list article header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.autonomy-approval-list article header strong, .autonomy-approval-list article header small { display: block; }
.autonomy-approval-list article header strong { color: var(--text-strong); font-size: 11px; }
.autonomy-approval-list article header small, .autonomy-approval-list article > p { margin-top: 3px; color: var(--muted); font-size: 8.5px; }
.autonomy-approval-audit { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 10px 0 0; border: 1px solid var(--border2); border-radius: var(--r-sm); background: #fbfdff; }
.autonomy-approval-audit div { min-width: 0; padding: 8px 10px; border-right: 1px solid var(--border2); }
.autonomy-approval-audit div:last-child { border-right: 0; }
.autonomy-approval-audit dt { color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.autonomy-approval-audit dd { margin: 2px 0 0; overflow-wrap: anywhere; color: var(--text-strong); font-size: 9px; font-weight: 700; }
.autonomy-approval-reason { display: grid; gap: 3px; }
.autonomy-approval-reason strong { color: var(--text-strong); font-size: 8px; text-transform: uppercase; }
.autonomy-approval-list form { display: grid; grid-template-columns: minmax(260px,1fr) auto auto; align-items: end; gap: 8px; margin-top: 10px; }
.autonomy-empty { padding: 28px; border: 1px dashed var(--border); border-radius: var(--r-sm); background: #fbfdff; text-align: center; }
.autonomy-empty strong { color: var(--text-strong); }
.autonomy-empty p { max-width: 680px; margin: 5px auto 0; font-size: 10px; }
.system-verdict-grid { max-width: 720px; margin: 10px 0 8px 20px; grid-template-columns: repeat(4,minmax(0,1fr)); }

@media (max-width: 1180px) {
    .autonomy-command-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .autonomy-command-grid article:nth-child(3) { border-right: 0; }
    .autonomy-command-grid article:nth-child(-n+3) { border-bottom: 1px solid var(--border2); }
    .autonomy-health-axes { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .crm-mission-compose form { grid-template-columns: minmax(190px,.7fr) minmax(300px,1.3fr); }
    .crm-mission-criteria { grid-column: 1 / -1; }
    .autonomy-plan-strip { grid-template-columns: 1fr; }
    .autonomy-plan-strip > small { text-align: left; }
}
@media (max-width: 820px) {
    .autonomy-command-grid, .autonomy-health-axes { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .autonomy-command-grid article:nth-child(3) { border-right: 1px solid var(--border2); }
    .autonomy-command-grid article:nth-child(-n+4) { border-bottom: 1px solid var(--border2); }
    .autonomy-command-grid article:nth-child(even) { border-right: 0; }
    .autonomy-verdict-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .autonomy-verdict-grid > div:nth-child(3) { border-right: 0; }
    .autonomy-verdict-grid > div:nth-child(-n+3) { border-bottom: 1px solid var(--border2); }
    .bot-team-snapshot { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .bot-persona-creator > form { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .autonomy-incident-facts { grid-template-columns: 1fr; }
    .autonomy-resolve-form { grid-template-columns: 1fr; }
    .autonomy-incident-actions { align-items: stretch; flex-direction: column; }
}
@media (max-width: 620px) {
    .autonomy-command-grid, .autonomy-health-axes, .crm-mission-compose form, .autonomy-verdict-grid, .bot-persona-creator > form, .autonomy-incident-meta, .autonomy-approval-list form, .autonomy-approval-audit, .system-verdict-grid { grid-template-columns: 1fr; }
    .autonomy-command-grid article, .autonomy-command-grid article:nth-child(3), .autonomy-verdict-grid > div, .autonomy-verdict-grid > div:nth-child(3), .autonomy-incident-meta div, .autonomy-approval-audit div { border-right: 0; border-bottom: 1px solid var(--border2); }
    .autonomy-command-grid article:last-child, .autonomy-verdict-grid > div:last-child, .autonomy-incident-meta div:last-child, .autonomy-approval-audit div:last-child { border-bottom: 0; }
    .autonomy-truth-strip { align-items: flex-start; flex-direction: column; gap: 7px; }
    .autonomy-truth-strip > a { margin-left: 0; }
    .crm-mission-criteria, .bot-persona-creator .bot-persona-wide { grid-column: auto; }
    .autonomy-verdict-grid, .autonomy-plan-strip, .autonomy-verification-reasons, .system-verdict-grid { margin-left: 0; }
    .autonomy-incident > summary { grid-template-columns: 8px minmax(0,1fr); padding: 10px 12px; }
    .autonomy-incident > summary > span { grid-column: 2; }
    .autonomy-incident-body { padding-left: 12px; }
    .autonomy-incident-timeline li { grid-template-columns: 8px minmax(0,1fr); }
    .autonomy-incident-timeline li small { grid-column: 2; white-space: normal; }
    .autonomy-approval-list article header { flex-direction: column; }
}

/* AI credits control plane */
.ai-credit-workspace { display: grid; gap: 16px; min-width: 0; color: var(--text); }
.ai-credit-workspace code { font-family: var(--mono); font-size: .9em; overflow-wrap: anywhere; }
.ai-credit-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 22px; overflow: hidden; border: 1px solid var(--p-mid); border-radius: var(--r); background: linear-gradient(120deg, #fff 0%, var(--p-soft) 100%); box-shadow: var(--sh); }
.ai-credit-hero-copy { max-width: 800px; }
.ai-credit-hero-copy h2 { margin-bottom: 8px; font-size: 22px; }
.ai-credit-hero-copy p:last-child { margin-bottom: 0; font-size: 12px; line-height: 1.6; }
.ai-credit-hero-state { display: flex; align-items: flex-end; flex-direction: column; gap: 7px; flex: 0 0 auto; }
.ai-credit-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 8px; border: 1px solid var(--border); border-radius: 999px; background: #f8fafc; color: var(--muted); font-size: 9px; font-style: normal; font-weight: 900; line-height: 1.2; white-space: nowrap; }
.ai-credit-badge.is-live, .ai-credit-badge.is-free, .ai-credit-badge.is-ok { border-color: #bbf7d0; background: #ecfdf5; color: #15803d; }
.ai-credit-badge.is-shadow { border-color: var(--p-mid); background: var(--p-soft); color: var(--p-d); }
.ai-credit-badge.is-billable { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }
.ai-credit-badge.is-warning { border-color: #fde68a; background: #fffbeb; color: #b45309; }
.ai-credit-badge.is-error { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.ai-credit-badge.is-muted { border-color: #e2e8f0; background: #f1f5f9; color: #64748b; }
.ai-credit-jump-nav { display: flex; gap: 5px; padding: 5px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r); background: #fff; box-shadow: var(--sh); scrollbar-width: thin; }
.ai-credit-jump-nav a { min-height: 40px; display: inline-flex; align-items: center; flex: 0 0 auto; padding: 0 10px; border-radius: var(--r-sm); color: var(--muted); font-size: 10.5px; font-weight: 800; white-space: nowrap; }
.ai-credit-jump-nav a:hover, .ai-credit-jump-nav a:focus-visible { background: var(--p-soft); color: var(--p-d); text-decoration: none; outline: none; }
.ai-credit-export-menu { flex: 0 0 210px; border-left: 1px solid var(--border2); }
.ai-credit-export-menu > summary { min-height: 40px; display: flex; align-items: center; padding: 0 10px; border-radius: var(--r-sm); color: var(--p-d); cursor: pointer; font-size: 10.5px; font-weight: 900; list-style: none; }
.ai-credit-export-menu > summary::-webkit-details-marker { display: none; }
.ai-credit-export-menu > summary::after { margin-left: auto; content: '↓'; }
.ai-credit-export-menu[open] > summary { background: var(--p-soft); }
.ai-credit-export-menu > div { display: grid; gap: 2px; padding: 4px; border-top: 1px solid var(--border2); }
.ai-credit-export-menu > div > small { padding: 7px 8px 5px; color: var(--muted); font-size: 8px; line-height: 1.4; }
.ai-credit-export-menu > div a { min-height: 32px; font-size: 9px; }
.ai-credit-export-menu > summary:focus-visible { outline: 3px solid rgba(0, 164, 211, .2); outline-offset: -2px; }
.ai-credit-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--border); border-radius: var(--r); background: #fff; box-shadow: var(--sh); }
.ai-credit-metrics article { min-width: 0; padding: 16px 18px; border-right: 1px solid var(--border2); }
.ai-credit-metrics article:last-child { border-right: 0; }
.ai-credit-metrics span, .ai-credit-metrics small { display: block; color: var(--muted); }
.ai-credit-metrics span { font-size: 9px; font-weight: 900; letter-spacing: .03em; text-transform: uppercase; }
.ai-credit-metrics strong { display: block; margin: 5px 0 3px; color: var(--text-strong); font-size: 20px; line-height: 1.05; overflow-wrap: anywhere; }
.ai-credit-metrics strong.is-ok { color: var(--success); }
.ai-credit-metrics strong.is-warning { color: #b45309; }
.ai-credit-metrics strong.is-error { color: var(--error); }
.ai-credit-metrics small { font-size: 9px; }
.ai-credit-panel { min-width: 0; scroll-margin-top: 14px; padding: 20px; border: 1px solid var(--border); border-radius: var(--r); background: #fff; box-shadow: var(--sh); }
.ai-credit-panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.ai-credit-panel-header > div { max-width: 820px; }
.ai-credit-panel-header h3 { margin: 0 0 6px; font-size: 16px; }
.ai-credit-panel-header p:not(.eyebrow) { margin: 0; line-height: 1.55; }
.ai-credit-version, .ai-credit-record-count { flex: 0 0 auto; padding: 5px 8px; border: 1px solid var(--border); border-radius: var(--r-sm); background: #f8fafc; color: var(--muted); font-family: var(--mono); font-size: 9px; font-weight: 500; white-space: nowrap; }
.ai-credit-version-stack { display: flex; align-items: flex-end; flex-direction: column; gap: 5px; }
.ai-credit-form { display: grid; gap: 18px; }
.ai-credit-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.ai-credit-form legend { color: var(--text-strong); font-size: 11px; font-weight: 900; }
.ai-credit-form label, .ai-credit-company-picker label { color: var(--text-strong); font-size: 10px; font-weight: 800; }
.ai-credit-form input[type="text"], .ai-credit-form input[type="number"], .ai-credit-form input[type="datetime-local"], .ai-credit-form textarea, .ai-credit-form select, .ai-credit-company-picker select { width: 100%; min-height: 38px; margin-top: 5px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fff; color: var(--text-strong); font: 500 11px/1.35 var(--font); }
.ai-credit-form textarea { min-height: 72px; resize: vertical; }
.ai-credit-form input[type="text"]:focus, .ai-credit-form input[type="number"]:focus, .ai-credit-form input[type="datetime-local"]:focus, .ai-credit-form textarea:focus, .ai-credit-form select:focus, .ai-credit-company-picker select:focus { border-color: var(--p); outline: 3px solid rgba(0, 164, 211, .12); }
.ai-credit-form label > small, .ai-credit-company-picker label > small { display: block; margin-top: 4px; color: var(--muted); font-size: 8.5px; font-weight: 600; line-height: 1.4; }
.ai-credit-form .btn:focus-visible, .ai-credit-company-picker .btn:focus-visible { outline: 3px solid rgba(0, 164, 211, .2); outline-offset: 2px; }
.ai-credit-form .btn:disabled { opacity: .5; cursor: not-allowed; }
.ai-credit-visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.ai-credit-switches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ai-credit-switch-card { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px; border: 1px solid var(--border); border-radius: var(--r); background: #fbfdff; cursor: pointer; }
.ai-credit-switch-card.is-sensitive { border-color: #fed7aa; background: #fffbf7; }
.ai-credit-switch-card > span { min-width: 0; }
.ai-credit-switch-card strong, .ai-credit-switch-card small { display: block; }
.ai-credit-switch-card strong { margin-bottom: 4px; font-size: 12px; }
.ai-credit-switch-card small { color: var(--muted); font-size: 9px; font-weight: 600; line-height: 1.45; }
.ai-credit-switch-card input[type="checkbox"] { position: relative; width: 42px; height: 24px; flex: 0 0 42px; margin: 0; -webkit-appearance: none; appearance: none; border: 1px solid #cbd5e1; border-radius: 999px; background: #e2e8f0; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.ai-credit-switch-card input[type="checkbox"]::after { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .25); content: ''; transition: transform .15s ease; }
.ai-credit-switch-card input[type="checkbox"]:checked { border-color: var(--p); background: var(--p); }
.ai-credit-switch-card input[type="checkbox"]:checked::after { transform: translateX(18px); }
.ai-credit-switch-card input[type="checkbox"]:focus-visible { outline: 3px solid rgba(0, 164, 211, .2); outline-offset: 3px; }
.ai-credit-reason-row { display: grid; grid-template-columns: minmax(260px, 1fr) auto; align-items: end; gap: 12px; padding-top: 16px; border-top: 1px solid var(--border2); }
.ai-credit-reason-row .btn { min-height: 38px; }
.ai-credit-package-editor { display: grid; grid-template-columns: 1.4fr .8fr .5fr; gap: 12px; padding: 16px !important; border: 1px solid var(--p-mid) !important; border-radius: var(--r); background: var(--p-soft); }
.ai-credit-package-editor legend { padding: 0 6px; color: var(--p-d); }
.ai-credit-package-wide { grid-column: span 2; }
.ai-credit-rate-list { display: grid; gap: 9px; }
.ai-credit-subheading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 4px; }
.ai-credit-subheading h4, .ai-credit-split-tables h4 { margin: 0 0 4px; color: var(--text-strong); font-size: 12px; }
.ai-credit-subheading p { margin: 0; font-size: 9.5px; }
.ai-credit-subheading > span { color: var(--muted); font-size: 9px; font-weight: 800; }
.ai-credit-rate { overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fff; }
.ai-credit-rate > summary { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 13px; cursor: pointer; list-style: none; }
.ai-credit-rate > summary::-webkit-details-marker { display: none; }
.ai-credit-rate > summary::after { flex: 0 0 auto; color: var(--p-d); font-size: 15px; font-weight: 900; content: '+'; }
.ai-credit-rate[open] > summary::after { content: '−'; }
.ai-credit-rate > summary strong, .ai-credit-rate > summary small { display: block; }
.ai-credit-rate > summary strong { color: var(--text-strong); font-size: 10.5px; }
.ai-credit-rate > summary small { margin-top: 3px; color: var(--muted); font-size: 8.5px; }
.ai-credit-rate-profile { margin-left: auto; color: var(--muted); font: 500 8.5px/1.3 var(--mono); overflow-wrap: anywhere; text-align: right; }
.ai-credit-rate-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 14px; border-top: 1px solid var(--border2); background: #fbfdff; }
.ai-credit-rate-grid label:first-child { grid-column: span 2; }
.ai-credit-feature-groups { display: grid; gap: 12px; }
.ai-credit-feature-group { overflow: hidden; border: 1px solid var(--border) !important; border-radius: var(--r); background: #fbfdff; }
.ai-credit-feature-group > legend { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px !important; border-bottom: 1px solid var(--border2); background: #fff; }
.ai-credit-feature-group > legend small { color: var(--muted); font-size: 8.5px; }
.ai-credit-category-actions { display: flex; align-items: center; gap: 12px; }
.ai-credit-category-actions label { display: inline-flex; align-items: center; gap: 7px; color: var(--text-strong); cursor: pointer; font-size: 9px; font-weight: 800; }
.ai-credit-category-actions input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--p); }
.ai-credit-category-actions input[type="checkbox"]:focus-visible { outline: 3px solid rgba(0, 164, 211, .2); outline-offset: 2px; }
.ai-credit-feature-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ai-credit-feature-option { min-width: 0; min-height: 80px; display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: flex-start; gap: 10px; padding: 13px 14px; border-right: 1px solid var(--border2); border-bottom: 1px solid var(--border2); cursor: pointer; }
.ai-credit-feature-option:nth-child(even) { border-right: 0; }
.ai-credit-feature-option input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--p); }
.ai-credit-feature-option input:focus-visible { outline: 3px solid rgba(0, 164, 211, .2); outline-offset: 2px; }
.ai-credit-feature-option > span, .ai-credit-feature-option code, .ai-credit-feature-option small { min-width: 0; display: block; }
.ai-credit-feature-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ai-credit-feature-title strong { color: var(--text-strong); font-size: 10.5px; }
.ai-credit-feature-badges { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 4px; }
.ai-credit-feature-option code { margin-top: 3px; color: var(--p-d); }
.ai-credit-feature-option small { margin-top: 5px; color: var(--muted); font-size: 8.5px; font-weight: 600; line-height: 1.4; }
.ai-credit-feature-option.is-core-internal, .ai-credit-company-policy.is-core-internal { border-color: rgba(0, 164, 211, .28) !important; background: linear-gradient(135deg, #f2fbfe, #fbfdff); cursor: default; }
.ai-credit-feature-option.is-core-internal input:disabled, .ai-credit-company-policy.is-core-internal input:disabled { opacity: 1; accent-color: #10b981; }
.ai-credit-company-picker { display: grid; grid-template-columns: minmax(260px, 520px) auto; align-items: end; gap: 10px; margin-bottom: 18px; padding: 14px; border: 1px solid var(--border); border-radius: var(--r); background: #fbfdff; }
.ai-credit-company-picker .btn { min-height: 38px; }
.ai-credit-company-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 13px; border: 1px solid var(--p-mid); border-radius: var(--r-sm); background: var(--p-soft); }
.ai-credit-company-heading span, .ai-credit-company-heading strong { display: block; }
.ai-credit-company-heading span { color: var(--p-d); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.ai-credit-company-heading strong { margin-top: 2px; color: var(--text-strong); font-size: 12px; }
.ai-credit-company-heading small { color: var(--muted); font-size: 8.5px; text-align: right; }
.ai-credit-company-actions { display: flex; align-items: flex-end; flex-direction: column; gap: 4px; }
.ai-credit-company-actions a { color: var(--p-d); font-size: 9px; font-weight: 900; }
.ai-credit-company-policy-list { display: grid; gap: 8px; }
.ai-credit-company-policy { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(360px, 1.2fr); align-items: center; gap: 14px; padding: 12px !important; border: 1px solid var(--border) !important; border-radius: var(--r-sm); }
.ai-credit-company-policy > legend { width: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; grid-column: 1; }
.ai-credit-company-policy > legend > span:first-child { min-width: 0; }
.ai-credit-company-policy > legend strong, .ai-credit-company-policy > legend code { display: block; }
.ai-credit-company-policy > legend strong { font-size: 10.5px; }
.ai-credit-company-policy > legend code { margin-top: 3px; color: var(--p-d); }
.ai-credit-effective-state { display: flex; align-items: flex-end; flex-direction: column; gap: 3px; }
.ai-credit-effective-state small { color: var(--muted); font-size: 8.5px; white-space: nowrap; }
.ai-credit-policy-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; grid-column: 2; grid-row: 1; }
.ai-credit-policy-choices label { position: relative; min-width: 0; cursor: pointer; }
.ai-credit-policy-choices input { position: absolute; inset: 0 auto auto 0; width: 1px; height: 1px; opacity: 0; }
.ai-credit-policy-choices label > span { min-height: 48px; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fff; text-align: center; }
.ai-credit-policy-choices label > span strong, .ai-credit-policy-choices label > span small { display: block; }
.ai-credit-policy-choices label > span strong { color: var(--text-strong); font-size: 9.5px; }
.ai-credit-policy-choices label > span small { margin-top: 2px; color: var(--muted); font-size: 8.2px; font-weight: 600; }
.ai-credit-policy-choices input:checked + span { border-color: var(--p); background: var(--p-soft); box-shadow: inset 0 0 0 1px var(--p); }
.ai-credit-policy-choices input[value="free"]:checked + span { border-color: #10b981; background: #ecfdf5; box-shadow: inset 0 0 0 1px #10b981; }
.ai-credit-policy-choices input:focus-visible + span { outline: 3px solid rgba(0, 164, 211, .2); outline-offset: 2px; }
.ai-credit-core-lock { min-width: 0; display: flex; align-items: center; gap: 10px; grid-column: 2; grid-row: 1; padding: 9px 11px; border: 1px solid rgba(16, 185, 129, .25); border-radius: var(--r-sm); background: #ecfdf5; cursor: default; }
.ai-credit-core-lock input { width: 18px; height: 18px; flex: 0 0 auto; margin: 0; opacity: 1; accent-color: #10b981; }
.ai-credit-core-lock span, .ai-credit-core-lock strong, .ai-credit-core-lock small { min-width: 0; display: block; }
.ai-credit-core-lock strong { color: #047857; font-size: 9.5px; }
.ai-credit-core-lock small { margin-top: 2px; color: #0f766e; font-size: 8.2px; font-weight: 600; line-height: 1.4; }
.ai-credit-company-pricing-form { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.ai-credit-callout { padding: 11px 13px; border-left: 3px solid var(--p); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--p-soft); }
.ai-credit-callout strong, .ai-credit-callout p { display: block; }
.ai-credit-callout strong { color: var(--p-d); font-size: 9.5px; }
.ai-credit-callout p { margin: 3px 0 0; color: var(--muted); font-size: 8.8px; line-height: 1.45; }
.ai-credit-tenant-rate-list { display: grid; gap: 9px; }
.ai-credit-tenant-rate { overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fbfdff; }
.ai-credit-tenant-rate > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 13px; border-bottom: 1px solid var(--border2); background: #fff; }
.ai-credit-tenant-rate > header > div { min-width: 0; }
.ai-credit-tenant-rate > header strong, .ai-credit-tenant-rate > header code, .ai-credit-tenant-rate > header small { display: block; }
.ai-credit-tenant-rate > header strong { color: var(--text-strong); font-size: 10.5px; }
.ai-credit-tenant-rate > header code { margin-top: 2px; color: var(--p-d); }
.ai-credit-tenant-rate > header small { margin-top: 3px; color: var(--muted); font-size: 8.5px; }
.ai-credit-override-toggle { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; cursor: pointer; }
.ai-credit-override-toggle input[type="checkbox"] { width: 17px; height: 17px; margin: 0; accent-color: var(--p); }
.ai-credit-override-toggle input[type="checkbox"]:focus-visible { outline: 3px solid rgba(0, 164, 211, .2); outline-offset: 2px; }
.ai-credit-override-toggle span { color: var(--text-strong); font-size: 9px; font-weight: 900; }
.ai-credit-tenant-rate-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 13px; }
.ai-credit-effective-row { display: grid; grid-template-columns: minmax(240px, 420px); }
.ai-credit-gateway-environments { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ai-credit-gateway-environment { min-width: 0; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fbfdff; }
.ai-credit-gateway-environment > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border-bottom: 1px solid var(--border2); background: #fff; }
.ai-credit-gateway-environment > header h4 { margin: 0; color: var(--text-strong); font-size: 11px; }
.ai-credit-gateway-environment > header small { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; }
.ai-credit-gateway-environment .ai-credit-table-wrap { border: 0; border-radius: 0; }
.ai-credit-gateway-environment .ai-credit-table { min-width: 680px; }
.ai-credit-sensitive-form { margin-top: 18px; padding: 16px; border: 1px solid #fed7aa; border-radius: var(--r); background: #fffbf7; }
.ai-credit-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ai-credit-admin-wide { grid-column: 1 / -1; }
.ai-credit-confirm { display: flex; align-items: flex-start; gap: 9px; color: var(--text-strong); cursor: pointer; }
.ai-credit-confirm input[type="checkbox"] { width: 17px; height: 17px; flex: 0 0 17px; margin: 1px 0 0; accent-color: var(--p); }
.ai-credit-confirm input[type="checkbox"]:focus-visible { outline: 3px solid rgba(0, 164, 211, .2); outline-offset: 2px; }
.ai-credit-confirm span { font-size: 8.8px; font-weight: 700; line-height: 1.45; }
.ai-credit-form-actions { display: flex; justify-content: flex-end; }
.ai-credit-wallet-prompt { margin-top: 18px; }
.ai-credit-subtable { margin-top: 18px; }
.ai-credit-subtable h4 { margin: 0 0 7px; color: var(--text-strong); font-size: 11px; }
.ai-credit-budget-list { display: grid; gap: 9px; }
.ai-credit-budget-row { overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fbfdff; }
.ai-credit-budget-row > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 13px; border-bottom: 1px solid var(--border2); background: #fff; }
.ai-credit-budget-row > header > div { min-width: 0; }
.ai-credit-budget-row > header strong, .ai-credit-budget-row > header small { display: block; }
.ai-credit-budget-row > header strong { color: var(--text-strong); font-size: 10.5px; }
.ai-credit-budget-row > header small { margin-top: 3px; color: var(--muted); font-size: 8.5px; }
.ai-credit-budget-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 13px; }
.ai-credit-readonly-field { min-height: 64px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-sm); background: #f8fafc; }
.ai-credit-readonly-field span, .ai-credit-readonly-field strong, .ai-credit-readonly-field small { display: block; }
.ai-credit-readonly-field span { color: var(--text-strong); font-size: 10px; font-weight: 800; }
.ai-credit-readonly-field strong { margin-top: 6px; color: var(--text-strong); font-size: 10.5px; }
.ai-credit-readonly-field small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.ai-credit-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fff; }
.ai-credit-table-wrap:focus-visible { outline: 3px solid rgba(0, 164, 211, .16); outline-offset: 2px; }
.ai-credit-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.ai-credit-table th, .ai-credit-table td { padding: 9px 11px; border-bottom: 1px solid var(--border2); text-align: left; vertical-align: top; }
.ai-credit-table th { background: #f8fafc; color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
.ai-credit-table td { color: var(--text); font-size: 9.5px; }
.ai-credit-table tbody tr:last-child td { border-bottom: 0; }
.ai-credit-table tbody tr.is-warning td { background: #fffbeb; }
.ai-credit-table td > strong, .ai-credit-table td > small { display: block; }
.ai-credit-table td > small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.ai-credit-table td > .ai-credit-badge { margin: 0 3px 3px 0; }
.ai-credit-economics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 12px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-sm); }
.ai-credit-economics article { min-width: 0; padding: 12px; border-right: 1px solid var(--border2); }
.ai-credit-economics article:last-child { border-right: 0; }
.ai-credit-economics span, .ai-credit-economics small { display: block; color: var(--muted); }
.ai-credit-economics span { font-size: 8px; font-weight: 900; text-transform: uppercase; }
.ai-credit-economics strong { display: block; margin-top: 4px; color: var(--text-strong); font-size: 14px; overflow-wrap: anywhere; }
.ai-credit-economics small { margin-top: 2px; font-size: 8.5px; }
.ai-credit-cost-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 18px; padding: 9px 11px; border-left: 3px solid var(--p); background: var(--p-soft); }
.ai-credit-cost-strip span { color: var(--p-d); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.ai-credit-cost-strip strong { color: var(--text-strong); font: 500 10px/1.3 var(--mono); }
.ai-credit-split-tables { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ai-credit-split-tables > div { min-width: 0; }
.ai-credit-package-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-bottom: 18px; }
.ai-credit-package-list article { position: relative; min-width: 0; padding: 13px; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fbfdff; }
.ai-credit-package-list article.is-active { border-color: var(--p-mid); background: var(--p-soft); }
.ai-credit-package-list article > div span, .ai-credit-package-list article > div code, .ai-credit-package-list article > strong, .ai-credit-package-list article > small, .ai-credit-package-list article > b { display: block; }
.ai-credit-package-list article > div span { padding-right: 70px; color: var(--text-strong); font-size: 10.5px; font-weight: 900; }
.ai-credit-package-list article > div code { margin-top: 2px; color: var(--muted); }
.ai-credit-package-list article > strong { margin-top: 12px; color: var(--text-strong); font-size: 17px; }
.ai-credit-package-list article > small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.ai-credit-package-list article > b { margin-top: 8px; color: var(--p-d); font-size: 12px; }
.ai-credit-package-list article > .ai-credit-badge { position: absolute; top: 10px; right: 10px; }
.ai-credit-package-management { display: grid; gap: 9px; margin-bottom: 20px; padding-top: 18px; border-top: 1px solid var(--border2); }
.ai-credit-package-editor-card { overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fbfdff; }
.ai-credit-package-editor-card > summary { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 13px; background: #fff; cursor: pointer; list-style: none; }
.ai-credit-package-editor-card > summary::-webkit-details-marker { display: none; }
.ai-credit-package-editor-card > summary::after { color: var(--p-d); font-size: 15px; font-weight: 900; content: '+'; }
.ai-credit-package-editor-card[open] > summary::after { content: '−'; }
.ai-credit-package-editor-card > summary > span:first-child { min-width: 0; margin-right: auto; }
.ai-credit-package-editor-card > summary strong, .ai-credit-package-editor-card > summary small { display: block; }
.ai-credit-package-editor-card > summary strong { color: var(--text-strong); font-size: 10.5px; }
.ai-credit-package-editor-card > summary small { margin-top: 2px; color: var(--muted); font-size: 8.5px; }
.ai-credit-package-editor-card > .ai-credit-form { padding: 15px; border-top: 1px solid var(--border2); }
.ai-credit-package-admin-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ai-credit-package-admin-wide { grid-column: 1 / -1; }
.ai-credit-flag-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 24px; padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--r-sm); background: #fff; }
.ai-credit-flag-row label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.ai-credit-flag-row input[type="checkbox"] { width: 17px; height: 17px; margin: 0; accent-color: var(--p); }
.ai-credit-flag-row input[type="checkbox"]:focus-visible { outline: 3px solid rgba(0, 164, 211, .2); outline-offset: 2px; }
.ai-credit-publish-actions { min-width: 240px; display: grid; gap: 10px; }
.ai-credit-publish-actions .btn { width: 100%; }
.ai-credit-integrity-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 14px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-sm); }
.ai-credit-integrity-grid article { min-width: 0; padding: 12px; border-right: 1px solid var(--border2); }
.ai-credit-integrity-grid article:last-child { border-right: 0; }
.ai-credit-integrity-grid span { display: block; color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.ai-credit-integrity-grid strong { display: block; margin-top: 4px; color: var(--text-strong); font-size: 14px; overflow-wrap: anywhere; }
.ai-credit-integrity-runner { margin-bottom: 16px; padding: 14px; border: 1px solid var(--p-mid); border-radius: var(--r-sm); background: var(--p-soft); }
.ai-credit-period-filter { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-bottom: 14px; padding: 12px; border: 1px solid var(--border2); border-radius: var(--r-sm); background: #f8fafc; }
.ai-credit-period-filter label { display: grid; gap: 4px; color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .02em; text-transform: uppercase; }
.ai-credit-period-filter input { min-height: 36px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); font: inherit; }
.ai-credit-period-filter > small { flex: 1 1 260px; color: var(--muted); font-size: 8px; }
.ai-credit-integrity-decision { display: grid; min-width: 270px; gap: 8px; padding: 10px; border: 1px solid var(--border2); border-radius: var(--r-sm); background: #fff; }
.ai-credit-integrity-decision label:not(.ai-credit-confirm) { display: grid; gap: 4px; color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .02em; text-transform: uppercase; }
.ai-credit-integrity-decision select, .ai-credit-integrity-decision textarea { width: 100%; border: 1px solid var(--border); border-radius: 6px; background: #fff; color: var(--text); font: inherit; text-transform: none; }
.ai-credit-integrity-decision select { min-height: 34px; padding: 6px 8px; }
.ai-credit-integrity-decision textarea { min-height: 74px; padding: 8px; resize: vertical; }
.ai-credit-integrity-decision .btn { width: 100%; min-height: 36px; }
.ai-credit-run-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 13px; padding: 9px 11px; border: 1px solid rgba(0, 164, 211, .18); border-radius: var(--r-sm); background: #fff; }
.ai-credit-run-summary code, .ai-credit-run-summary span:not(.ai-credit-badge), .ai-credit-run-summary small { color: var(--muted); font-size: 8.5px; }
.ai-credit-alert-form { display: grid; gap: 12px; margin-top: 10px; padding: 14px; border: 1px solid var(--border2); border-radius: var(--r-sm); background: #fbfdff; }
.ai-credit-alert-form.is-company { border-color: var(--p-mid); background: var(--p-soft); }
.ai-credit-alert-form .ai-credit-flag-row { margin: 0; }
.ai-credit-empty { grid-column: 1 / -1; padding: 24px; color: var(--muted); text-align: center; }
.ai-credit-empty.is-inline { border: 1px dashed var(--border); border-radius: var(--r-sm); background: #fbfdff; }
.ai-credit-empty strong { display: block; color: var(--text-strong); }
.ai-credit-empty p { max-width: 680px; margin: 4px auto 0; font-size: 9.5px; }

@media (max-width: 1180px) {
    .ai-credit-rate-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ai-credit-package-admin-grid, .ai-credit-budget-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ai-credit-economics, .ai-credit-integrity-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ai-credit-economics article:nth-child(3), .ai-credit-integrity-grid article:nth-child(3) { border-right: 0; }
    .ai-credit-economics article:nth-child(-n+3), .ai-credit-integrity-grid article:nth-child(-n+3) { border-bottom: 1px solid var(--border2); }
}
@media (max-width: 900px) {
    .ai-credit-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ai-credit-metrics article:nth-child(2) { border-right: 0; }
    .ai-credit-metrics article:nth-child(-n+2) { border-bottom: 1px solid var(--border2); }
    .ai-credit-package-editor { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ai-credit-package-wide { grid-column: auto; }
    .ai-credit-rate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ai-credit-feature-list, .ai-credit-split-tables, .ai-credit-gateway-environments { grid-template-columns: 1fr; }
    .ai-credit-feature-option { border-right: 0; }
    .ai-credit-company-policy { grid-template-columns: 1fr; }
    .ai-credit-company-policy > legend, .ai-credit-policy-choices, .ai-credit-core-lock { grid-column: 1; grid-row: auto; }
    .ai-credit-tenant-rate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ai-credit-package-admin-grid, .ai-credit-budget-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ai-credit-package-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    .ai-credit-hero, .ai-credit-panel-header { align-items: flex-start; flex-direction: column; }
    .ai-credit-hero { padding: 17px; }
    .ai-credit-hero-state, .ai-credit-version-stack { align-items: flex-start; }
    .ai-credit-panel { padding: 15px; }
    .ai-credit-switches, .ai-credit-package-editor, .ai-credit-rate-grid, .ai-credit-tenant-rate-grid, .ai-credit-package-admin-grid, .ai-credit-budget-grid, .ai-credit-admin-grid, .ai-credit-package-list { grid-template-columns: 1fr; }
    .ai-credit-package-wide, .ai-credit-rate-grid label:first-child { grid-column: auto; }
    .ai-credit-reason-row, .ai-credit-company-picker { grid-template-columns: 1fr; }
    .ai-credit-reason-row .btn, .ai-credit-company-picker .btn { width: 100%; }
    .ai-credit-company-heading { align-items: flex-start; flex-direction: column; }
    .ai-credit-company-heading small { text-align: left; }
    .ai-credit-company-actions { align-items: flex-start; }
    .ai-credit-tenant-rate > header { align-items: flex-start; flex-direction: column; }
    .ai-credit-budget-row > header { align-items: flex-start; flex-direction: column; }
    .ai-credit-package-editor-card > summary { align-items: flex-start; }
    .ai-credit-package-editor-card > summary > .ai-credit-badge { display: none; }
    .ai-credit-package-admin-wide, .ai-credit-admin-wide { grid-column: auto; }
    .ai-credit-form-actions .btn { width: 100%; }
    .ai-credit-policy-choices { grid-template-columns: 1fr; }
    .ai-credit-policy-choices label > span { min-height: 44px; align-items: flex-start; text-align: left; }
    .ai-credit-economics, .ai-credit-integrity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ai-credit-economics article, .ai-credit-economics article:nth-child(3), .ai-credit-integrity-grid article, .ai-credit-integrity-grid article:nth-child(3) { border-right: 1px solid var(--border2); border-bottom: 1px solid var(--border2); }
    .ai-credit-economics article:nth-child(even), .ai-credit-integrity-grid article:nth-child(even) { border-right: 0; }
    .ai-credit-economics article:nth-last-child(-n+2), .ai-credit-integrity-grid article:nth-last-child(-n+2) { border-bottom: 0; }
    .ai-credit-subheading { align-items: flex-start; flex-direction: column; }
    .ai-credit-feature-group > legend, .ai-credit-category-actions { align-items: flex-start; flex-direction: column; }
    .ai-credit-rate > summary { align-items: flex-start; }
    .ai-credit-rate-profile { display: none; }
    .ai-credit-jump-nav a { min-height: 44px; }
}
@media (max-width: 430px) {
    .ai-credit-metrics, .ai-credit-economics, .ai-credit-integrity-grid { grid-template-columns: 1fr; }
    .ai-credit-metrics article, .ai-credit-metrics article:nth-child(2), .ai-credit-economics article, .ai-credit-economics article:nth-child(3), .ai-credit-integrity-grid article, .ai-credit-integrity-grid article:nth-child(3) { border-right: 0; border-bottom: 1px solid var(--border2); }
    .ai-credit-metrics article:last-child, .ai-credit-economics article:last-child, .ai-credit-integrity-grid article:last-child { border-bottom: 0; }
    .ai-credit-feature-title, .ai-credit-company-policy > legend { align-items: flex-start; flex-direction: column; }
    .ai-credit-feature-badges { justify-content: flex-start; }
    .ai-credit-effective-state { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    .ai-credit-switch-card input[type="checkbox"], .ai-credit-switch-card input[type="checkbox"]::after { transition: none; }
}
@media (forced-colors: active) {
    .ai-credit-switch-card input[type="checkbox"] { width: 24px; height: 24px; flex-basis: 24px; -webkit-appearance: auto; appearance: auto; }
    .ai-credit-switch-card input[type="checkbox"]::after { display: none; }
    .ai-credit-policy-choices input { position: static; width: 18px; height: 18px; opacity: 1; }
    .ai-credit-policy-choices label { display: flex; align-items: center; gap: 7px; }
}
