:root,
html.theme-default,
html.theme-light {
    --cg-primary: #1677ff;
    --cg-navy: #0c1b33;
    --cg-sidebar: #101d32;
    --cg-border: #e7ebf1;
    --cg-muted: #6b778c;
    --cg-surface: #ffffff;
    --cg-surface-raised: #ffffff;
    --cg-background: #f5f7fb;
    --ant-primary-color: #1677ff;
    --ant-primary-1: #e6f4ff;
    --ant-primary-2: #bae0ff;
    --ant-text-color: #1f2937;
    --ant-text-color-secondary: #6b778c;
    --ant-heading-color: #172033;
    --ant-border-color-base: #e7ebf1;
    --ant-component-background: #ffffff;
    --ant-body-background: #f5f7fb;
}

html, body, #app {
    min-height: 100%;
    margin: 0;
}

body {
    background: var(--cg-background);
    color: #1f2937;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.access-bootstrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 1rem;
    padding: 2rem;
    background: var(--cg-background);
    text-align: center;
}

.access-bootstrap-animation {
    display: block;
    width: min(220px, 60vw);
    height: auto;
}

.access-bootstrap > p {
    margin: 0;
    color: var(--cg-muted);
    font-weight: 600;
}

.access-bootstrap-error {
    max-width: 34rem;
}

.access-bootstrap-error h1 {
    margin: 0 0 .5rem;
    color: var(--cg-navy);
    font-size: 1.35rem;
}

.access-bootstrap-error p {
    margin: 0 0 1rem;
    color: var(--cg-muted);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(560px, 1.05fr) minmax(440px, .95fr);
    background: #f6f8fb;
}

.auth-brand-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2.5rem;
    padding: clamp(2rem, 5vw, 5rem);
    color: #fff;
    background:
        linear-gradient(rgba(18, 45, 75, .2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(18, 45, 75, .2) 1px, transparent 1px),
        radial-gradient(circle at 15% 20%, rgba(22, 119, 255, .14), transparent 34%),
        #08172a;
    background-size: 72px 72px, 72px 72px, auto, auto;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: .9rem;
}

.auth-brand img {
    width: 52px;
    height: 52px;
}

.auth-brand h1 {
    margin: 0;
    color: #fff;
    font-size: 1.4rem;
}

.auth-brand span, .auth-trust {
    color: #8292a8;
    font-size: .82rem;
}

.auth-value h2 {
    margin: 0 0 1.5rem;
    color: #fff;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.08;
}

.auth-value h2 em {
    color: #38a8ff;
    font-style: normal;
}

.auth-value > p {
    max-width: 44rem;
    margin-bottom: 2rem;
    color: #99a7ba;
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    line-height: 1.9;
}

.auth-frameworks {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
}

.auth-frameworks span {
    padding: .35rem .9rem;
    border: 1px solid rgba(56, 168, 255, .25);
    border-radius: 999px;
    background: rgba(22, 119, 255, .09);
    color: #56b6ff;
    font-size: .78rem;
    font-weight: 700;
}

.auth-frameworks span:nth-child(3n) { color: #bd83ff; border-color: rgba(189, 131, 255, .3); }
.auth-frameworks span:nth-child(5n) { color: #51d785; border-color: rgba(81, 215, 133, .3); }
.auth-frameworks span:nth-child(8n) { color: #f6a74f; border-color: rgba(246, 167, 79, .3); }

.auth-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 3rem;
}

.auth-stats div { display: grid; }
.auth-stats strong { font-size: clamp(1.45rem, 2.6vw, 2.1rem); }
.auth-stats span { color: #63738a; font-size: .75rem; text-transform: uppercase; }
.auth-trust { display: flex; align-items: center; gap: .5rem; }

.auth-form-link {
    display: flex;
    justify-content: flex-end;
    margin: -.5rem 0 .25rem;
}

.auth-link-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--cg-primary);
    cursor: pointer;
}

.auth-link-button:disabled { opacity: .55; cursor: default; }

.auth-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 100vh;
    padding: clamp(1.5rem, 5vw, 5rem);
}

.auth-content > .auth-card,
.auth-card {
    flex: 0 1 460px;
    width: min(100%, 460px);
    margin: auto;
    box-shadow: 0 24px 70px rgba(15, 35, 58, .12);
}

.auth-card-heading {
    margin-bottom: 1.5rem;
}

.auth-card-heading h2 {
    margin: .4rem 0;
    font-size: 1.75rem;
}

.auth-card-heading p {
    color: #64748b;
}

.auth-brand,
.auth-value,
.auth-card-heading,
.feature-eyebrow {
    text-align: center;
}

.auth-brand {
    justify-content: center;
}

.auth-field {
    display: grid;
    gap: .45rem;
    margin: 1.15rem 0;
}

.auth-field label {
    font-weight: 600;
    color: #23384f;
}

.auth-field input {
    width: 100%;
    min-height: 42px;
    padding: .65rem .8rem;
    border: 1px solid #d9e1ea;
    border-radius: 6px;
}

.auth-field small {
    color: #64748b;
}

.auth-submit-button {
    width: 100%;
}

.quick-audit-hero {
    overflow: hidden;
    border-top: 3px solid #1677ff;
    background: linear-gradient(135deg, #ffffff 55%, #f0f7ff);
}

.quick-audit-hero h2 {
    margin: .35rem 0 .45rem;
    color: var(--cg-navy);
    font-size: clamp(1.25rem, 2vw, 1.75rem);
}

.quick-audit-hero .ant-col {
    margin-block: .35rem;
}

.quick-audit-hero .ant-row > .ant-col:last-child {
    padding-top: 26px;
}

.filter-label {
    display: block;
    margin-bottom: .4rem;
    color: #334155;
    font-size: .8rem;
    font-weight: 700;
}

.vendor-checkbox-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    padding-top: 4px;
}

.vendor-contract-checkboxes {
    margin-top: 14px;
}

.vendor-checkbox-stack .ant-checkbox-wrapper {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    margin: 0;
    line-height: 22px;
}

.vendor-checkbox-stack .ant-checkbox {
    top: 0;
    flex: 0 0 auto;
}

.vendor-checkbox-stack .ant-checkbox + span {
    padding-left: 9px;
}

.vendor-analysis-kpis > .ant-col {
    display: flex;
    margin-bottom: 16px;
}

.vendor-analysis-kpi {
    width: 100%;
    min-height: 138px;
}

.vendor-analysis-kpi .ant-card-body {
    display: flex;
    min-height: 136px;
    flex-direction: column;
    justify-content: center;
}

.vendor-progress-kpi .ant-progress {
    margin: 8px 0 5px;
}

.vendor-settings-grid {
    margin-top: 18px;
}

.vendor-settings-grid > .ant-col {
    display: flex;
    margin-bottom: 16px;
}

.vendor-settings-card {
    width: 100%;
    min-height: 480px;
}

.vendor-tier-item {
    --tier-color: #64748b;
    margin-bottom: 9px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb,var(--tier-color) 30%,var(--cg-border));
    border-radius: 9px;
    background: color-mix(in srgb,var(--tier-color) 5%,var(--cg-surface));
}
.vendor-tier-item.tier-critical { --tier-color: #ef3340; }
.vendor-tier-item.tier-high { --tier-color: #f97316; }
.vendor-tier-item.tier-moderate { --tier-color: #f59e0b; }
.vendor-tier-item.tier-low { --tier-color: #16a34a; }
.vendor-tier-item.tier-minimal { --tier-color: #0891b2; }

.vendor-tier-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    background: color-mix(in srgb,var(--tier-color) 10%,var(--cg-surface));
}
.vendor-tier-name { display:flex;align-items:center;gap:8px; }
.vendor-tier-name i { width:9px;height:9px;border-radius:50%;background:var(--tier-color);box-shadow:0 0 0 4px color-mix(in srgb,var(--tier-color) 14%,transparent); }
.vendor-tier-score { display:flex;align-items:baseline;gap:8px;padding:8px 12px 0; }
.vendor-tier-score strong { color:var(--tier-color);font-size:14px; }
.vendor-tier-score span { color:var(--cg-muted);font-size:11px; }

.vendor-tier-heading span,
.vendor-tier-caption {
    color: #627392;
}

.vendor-tier-caption {
    padding: 5px 12px 11px;
    font-size: .82rem;
}

html[data-color-scheme="dark"] .vendor-tier-item { border-color:color-mix(in srgb,var(--tier-color) 38%,var(--mXZkqc));background:color-mix(in srgb,var(--tier-color) 7%,var(--xhUGwc)); }
html[data-color-scheme="dark"] .vendor-tier-heading { background:color-mix(in srgb,var(--tier-color) 13%,var(--xhUGwc)); }
html[data-color-scheme="dark"] .vendor-tier-caption,html[data-color-scheme="dark"] .vendor-tier-heading span,html[data-color-scheme="dark"] .vendor-tier-score span { color:var(--IXoxUe); }
html[data-color-scheme="dark"] .vendor-settings-header>strong { color:var(--bbQxAb); }
html[data-color-scheme="dark"] .vendor-automation-row { border-color:var(--mXZkqc); }

.vendor-settings-header,
.vendor-automation-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.vendor-settings-header > strong {
    color: #51698f;
    font-size: 1rem;
}

.vendor-automation-list {
    margin-top: 12px;
}

.vendor-automation-row {
    min-height: 50px;
    padding: 8px 18px;
    border-bottom: 1px solid #e5e7eb;
}

@media (max-width: 575px) {
    .vendor-settings-header { align-items: flex-start; flex-direction: column; }
    .vendor-automation-row { padding-inline: 4px; }
    .vendor-tier-heading { flex-direction: column; gap: 3px; }
}

.quick-audit-kpi-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(150px, 1fr));
    gap: 12px;
}

.evidence-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.evidence-kpi-grid .ant-card {
    min-width: 0;
    height: 100%;
}

@media (max-width: 1200px) {
    .evidence-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .evidence-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 440px) {
    .evidence-kpi-grid { grid-template-columns: 1fr; }
}

.quick-audit-chart-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.quick-audit-lower-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 2fr);
    gap: 16px;
    margin-top: 16px;
}

.quick-audit-chart-card,
.quick-audit-timeline-card { min-width: 0; height: 100%; }
.quick-audit-chart-card .ant-card-body { display: flex; min-height: 306px; flex-direction: column; overflow: hidden; }
.quick-audit-chart-host { width: 100%; min-width: 0; height: 246px; min-height: 246px; overflow: visible; flex: 1 1 auto; display:flex; }
.quick-audit-chart-host > div,
.quick-audit-chart-host canvas,
.quick-audit-chart-host svg { max-width: 100%; }
.quick-audit-chart-tags { display: flex; min-height: 32px; align-items: center; justify-content: center; gap: 8px; padding-top: 5px; flex-wrap: wrap; }
.quick-audit-empty-chart { display: grid; min-height: 246px; place-content: center; justify-items: center; gap: 10px; color: #94a3b8; text-align: center; }
.quick-audit-empty-chart .anticon { font-size: 32px; }

.score-ring {
    display: grid;
    width: 190px;
    max-width: 90%;
    aspect-ratio: 1;
    margin: 16px auto;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 57%, transparent 58%), conic-gradient(#20b7a5 calc(var(--score) * 3.6deg), #dbe5f2 0);
}
.score-ring div { display: grid; text-align: center; }
.score-ring strong { color: #20a995; font-size: 2rem; }
.score-ring span { color: #526175; font-weight: 700; }

.scan-timeline {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, minmax(105px, 1fr));
    gap: 8px;
    padding-top: 16px;
}
.scan-timeline::before { position: absolute; top: 35px; right: 10%; left: 10%; height: 2px; background: #dbe5f2; content: ""; }
.scan-timeline-step { position: relative; z-index: 1; display: grid; justify-items: center; gap: 6px; text-align: center; }
.scan-step-icon { display: grid; width: 40px; height: 40px; place-items: center; border: 2px solid #dbe5f2; border-radius: 50%; background: #fff; color: #7b8ba5; font-size: 18px; }
.scan-timeline-step strong { color: var(--cg-navy); font-size: .82rem; }
.scan-timeline-step span { color: var(--cg-muted); font-size: .75rem; }
.scan-timeline-step.complete .scan-step-icon { border-color: #20b7a5; background: #20b7a5; color: #fff; }
.scan-timeline-step.active .scan-step-icon { border-color: #1677ff; color: #1677ff; box-shadow: 0 0 0 5px rgba(22,119,255,.12); }

@media (max-width: 1400px) {
    .quick-audit-kpi-grid { grid-template-columns: repeat(4, minmax(160px, 1fr)); }
    .quick-audit-chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .quick-audit-lower-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .quick-audit-timeline-card { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
    .quick-audit-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .quick-audit-chart-grid, .quick-audit-lower-grid { grid-template-columns: 1fr; }
    .quick-audit-timeline-card { grid-column: auto; overflow-x: auto; }
    .scan-timeline { min-width: 620px; }
}

@media (max-width: 440px) {
    .quick-audit-kpi-grid { grid-template-columns: 1fr; }
    .quick-audit-hero .ant-row > .ant-col:last-child { padding-top: 4px; }
}

@media (max-width: 1023px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        min-height: auto;
        padding: 2rem;
    }

    .auth-content { min-height: auto; padding: 2rem 1rem 3rem; }
    .auth-value > p { margin-bottom: 1.25rem; line-height: 1.6; }
    .auth-value h2 { font-size: 2rem; }
    .auth-stats { grid-template-columns: repeat(2, 1fr); margin-top: 2rem; }
    .auth-trust { display: none; }
}

@media (max-width: 560px) {
    .auth-brand-panel { gap: 1.5rem; padding: 1.25rem; }
    .auth-brand img { width: 42px; height: 42px; }
    .auth-value h2 { font-size: 1.7rem; }
    .auth-frameworks, .auth-stats { display: none; }
    .auth-content { padding: 1rem; }
}

h1:focus {
    outline: none;
}

.app-shell {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    min-height: 100vh;
}

.app-sidebar {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    z-index: 20;
    width: 264px;
    overflow-y: auto;
    background: var(--cg-sidebar);
    color: #fff;
}

.sidebar-backdrop {
    display: none;
}

.sidebar-collapsed {
    grid-template-columns: 76px minmax(0, 1fr);
}

.sidebar-collapsed .app-sidebar {
    width: 76px;
}

.sidebar-collapsed .brand {
    justify-content: center;
    padding-inline: 12px;
}

.sidebar-collapsed .brand > div {
    display: none;
}

.sidebar-collapsed .nav-entry {
    justify-content: center;
    padding-inline: 8px;
}

.sidebar-collapsed .nav-entry .anticon {
    display: inline-flex;
    visibility: visible;
    opacity: 1;
}

.sidebar-collapsed .nav-entry .nav-title {
    display: none;
}

.app-main {
    grid-column: 2;
    min-width: 0;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    padding: 0 30px;
    border-bottom: 1px solid var(--cg-border);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(8px);
}

.app-header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-toggle {
    display: grid;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--cg-border);
    border-radius: 6px;
    background: #fff;
    color: #445066;
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.sidebar-toggle:hover {
    border-color: var(--cg-primary);
    background: #f0f7ff;
    color: var(--cg-primary);
}

.header-action-icon {
    display: inline-grid;
    width: 32px;
    height: 32px;
    padding: 6px;
    place-items: center;
    color: #526078;
    box-sizing: border-box;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.header-action-icon:hover,
.header-action-icon[aria-expanded="true"] {
    background: #eef4ff;
    color: var(--cg-primary);
}

.header-action-icon:disabled {
    cursor: wait;
    opacity: .65;
}

.header-action-icon .anticon {
    display: inline-flex;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.copilot-header-button { color: var(--ant-primary-color, #1677ff); }
.copilot-shell-drawer .ant-drawer-content-wrapper { width: min(560px, 100vw) !important; max-width: 100vw; }
.copilot-shell-drawer .ant-drawer-content,.copilot-shell-drawer .ant-drawer-wrapper-body { height: 100%; min-height: 0; }
.copilot-shell-drawer .ant-drawer-wrapper-body { display: flex; flex-direction: column; }
.copilot-shell-drawer .ant-drawer-body { flex: 1; min-height: 0; overflow: hidden; }
.copilot-drawer { width: 100%; height: 100%; min-height: 0; display: flex; flex-direction: column; gap: 12px; }
.copilot-context { display: flex; gap: 8px; align-items: center; padding: 9px 12px; border-radius: 8px; background: var(--cg-surface-muted, #f5f7fa); color: var(--ant-text-color-secondary, #667085); }
.copilot-model-picker { display: grid; grid-template-columns: 1fr 1.45fr; gap: 8px; }
.copilot-model-picker label { display: grid; gap: 4px; color: var(--ant-text-color-secondary, #667085); font-size: 12px; }
.copilot-model-picker select { min-width: 0; height: 32px; padding: 0 8px; border: 1px solid #d9d9d9; border-radius: 6px; background: #fff; color: inherit; }
.copilot-model-picker .ant-select { width: 100%; min-width: 0; }
.copilot-attachment iframe { width: 100%; min-height: 320px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; }
.copilot-quick-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.copilot-messages { flex: 1 1 auto; min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 12px; padding: 4px; scrollbar-gutter: stable; }
.copilot-welcome { margin: auto 12px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; color: var(--ant-text-color-secondary, #667085); }
.copilot-welcome .anticon { font-size: 30px; }
.copilot-message { max-width: 88%; padding: 10px 12px; border-radius: 12px; background: var(--cg-surface-muted, #f5f7fa); }
.copilot-message.user { align-self: flex-end; background: var(--ant-primary-color, #1677ff); color: white; }
.copilot-message.assistant { align-self: stretch; max-width: 100%; padding: 12px 4px; border-radius: 0; background: transparent; color: #25324a; }
.copilot-message > span { display: block; font-size: 11px; font-weight: 700; opacity: .7; margin-bottom: 4px; }
.copilot-message-actions { display: flex; min-height: 28px; align-items: center; gap: 4px; margin-top: 8px; color: #667085; }
.copilot-message-actions .ant-btn { color: #667085; }
.copilot-message-actions .ant-btn:hover { background: #edf4ff; color: #1677ff; }
.copilot-message-actions > span { margin: 0; color: #2f855a; font-size: 11px; font-weight: 600; opacity: 1; }
.copilot-message p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.copilot-markdown { font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.copilot-markdown > :first-child { margin-top: 0; }
.copilot-markdown > :last-child { margin-bottom: 0; }
.copilot-markdown p { margin: 0 0 12px; white-space: normal; }
.copilot-markdown h2,.copilot-markdown h3,.copilot-markdown h4 { margin: 18px 0 8px; color: #14213a; line-height: 1.3; }
.copilot-markdown h2 { font-size: 19px; }.copilot-markdown h3 { font-size: 16px; }.copilot-markdown h4 { font-size: 14px; }
.copilot-markdown ul,.copilot-markdown ol { margin: 8px 0 14px; padding-left: 24px; }
.copilot-markdown li { margin: 5px 0; padding-left: 3px; }
.copilot-markdown ol > li { color: #14213a; font-weight: 700; }
.copilot-markdown ul > li { color: #334155; font-weight: 400; }
.copilot-markdown strong { color: #14213a; font-weight: 700; }
.copilot-markdown code { padding: 2px 5px; border-radius: 5px; background: #edf1f7; color: #b42318; font: 12px/1.5 Consolas,monospace; }
.copilot-markdown pre { overflow-x: auto; margin: 10px 0 14px; padding: 14px; border: 1px solid #dfe5ee; border-radius: 9px; background: #111827; }
.copilot-markdown pre code { padding: 0; background: transparent; color: #e5e7eb; white-space: pre; }
.copilot-markdown blockquote { margin: 10px 0 14px; padding: 8px 12px; border-left: 3px solid #1677ff; background: #f5f9ff; color: #526078; }
.copilot-markdown a { color: #1677ff; text-decoration: underline; }
.copilot-markdown-table-wrap { overflow-x: auto; margin: 10px 0 15px; border: 1px solid #e2e8f0; border-radius: 8px; }
.copilot-markdown table { width: 100%; border-collapse: collapse; font-size: 12px; }
.copilot-markdown th,.copilot-markdown td { padding: 8px 10px; border-bottom: 1px solid #e2e8f0; text-align: left; white-space: nowrap; }
.copilot-markdown th { background: #f8fafc; color: #334155; font-weight: 700; }
.copilot-result { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(127,127,127,.2); }
.copilot-rich-response { display:flex; flex-direction:column; gap:12px; min-width:0; }
.copilot-rich-response > .copilot-markdown { margin-bottom:2px; }
.copilot-artifact { width:100%; min-width:0; overflow:hidden; }
.copilot-chart-artifact .card-body { min-height:230px; padding:10px; }
.copilot-apex-chart { width:100%; min-height:210px; overflow:hidden; }
.copilot-chart-artifact .apexcharts-canvas,.copilot-chart-artifact svg { max-width:100%!important; }
.copilot-kpi-artifact .card-body { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.copilot-timeline-item { position:relative; display:grid; grid-template-columns:14px minmax(0,1fr); gap:8px; padding:0 0 14px; }
.copilot-timeline-item i { width:9px; height:9px; margin-top:5px; border-radius:50%; background:#1677ff; box-shadow:0 0 0 4px #e6f4ff; }
.copilot-timeline-item strong,.copilot-timeline-item time { display:block; }
.copilot-timeline-item time { margin-top:2px; color:#667085; font-size:11px; }
.copilot-timeline-item p { margin:4px 0 0; }
.copilot-suggested-actions { display:flex; flex-wrap:wrap; gap:8px; }
@media (max-width:767px) { .copilot-chart-artifact .card-body { min-height:190px; padding:6px; } .copilot-apex-chart { min-height:180px; } .copilot-rich-response { gap:8px; } }
.copilot-table-wrap { margin-top: 8px; overflow-x: auto; }
.copilot-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.copilot-table th,.copilot-table td { padding: 5px 7px; text-align: left; border-bottom: 1px solid rgba(127,127,127,.18); white-space: nowrap; }
.copilot-chart { display: grid; gap: 5px; margin-top: 8px; }
.copilot-chart-row { display: grid; grid-template-columns: minmax(65px,1fr) 2fr auto; align-items: center; gap: 6px; font-size: 10px; }
.copilot-chart-row i { display: block; min-width: 2px; height: 8px; border-radius: 5px; background: var(--ant-primary-color, #1677ff); }
.copilot-thinking { display: flex; align-items: center; gap: 8px; color: var(--ant-text-color-secondary, #667085); }
.copilot-composer { flex: 0 0 auto; display: grid; gap: 8px; padding-top: 8px; border-top: 1px solid var(--cg-border, #eaecf0); background: #fff; }
.copilot-friendly-error { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; gap: 10px; align-items: start; padding: 12px; border: 1px solid #ffd8bf; border-radius: 10px; background: #fff7e6; color: #613400; }
.copilot-friendly-error-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 9px; background: #fa8c16; color: #fff; font-size: 18px; }
.copilot-friendly-error strong { display: block; margin-bottom: 3px; color: #873800; }
.copilot-friendly-error p { margin: 0 0 3px; line-height: 1.4; white-space: normal; }
.copilot-friendly-error span { color: #925b22; font-size: 12px; }

@media (max-width: 767px) {
    .copilot-shell-drawer .ant-drawer-content-wrapper { width: 100vw !important; }
    .copilot-shell-drawer .ant-drawer-content { height: 100dvh; }
    .copilot-shell-drawer .ant-drawer-header { flex: 0 0 auto; padding: 14px 16px; }
    .copilot-shell-drawer .ant-drawer-body { padding: 12px 14px max(12px, env(safe-area-inset-bottom)); }
    .copilot-drawer { gap: 9px; }
    .copilot-context { padding: 7px 10px; font-size: 12px; }
    .copilot-quick-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .copilot-quick-actions .ant-btn { width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
    .copilot-message { max-width: 94%; }
    .copilot-message.assistant { max-width: 100%; }
    .copilot-markdown { font-size: 13px; line-height: 1.58; }
    .copilot-chart-row { grid-template-columns: minmax(72px, 1fr) minmax(80px, 1.5fr) auto; }
    .copilot-friendly-error { grid-template-columns: 32px minmax(0,1fr) auto; padding: 10px; }
    .copilot-friendly-error-icon { width: 30px; height: 30px; }
    .copilot-composer textarea { max-height: 24dvh; }
    .copilot-attachment iframe { min-height: min(360px, 48dvh); }
    .copilot-attachment .ant-image-img { max-height: 48dvh; }
    .ant-image-preview-img { max-width: calc(100vw - 24px) !important; max-height: calc(100dvh - 96px) !important; object-fit: contain; }
}

@media (max-width: 479px) {
    .copilot-model-picker { grid-template-columns: 1fr; gap: 6px; }
    .copilot-model-picker select { width: 100%; height: 38px; }
    .copilot-model-picker .ant-select,.copilot-model-picker .ant-select-selector { width: 100%; min-width: 0; }
    .copilot-quick-actions { gap: 5px; }
    .copilot-message.user { max-width: 96%; }
    .copilot-markdown h2 { font-size: 17px; }
    .copilot-markdown h3 { font-size: 15px; }
    .copilot-table th,.copilot-table td,.copilot-markdown th,.copilot-markdown td { padding: 7px 8px; font-size: 11px; }
}

@media (max-width: 359px) {
    .copilot-quick-actions { grid-template-columns: 1fr; }
    .copilot-friendly-error { grid-template-columns: minmax(0,1fr) auto; }
    .copilot-friendly-error-icon { display: none; }
}

@media (max-height: 650px) and (min-width: 768px) {
    .copilot-shell-drawer .ant-drawer-header { padding-block: 10px; }
    .copilot-shell-drawer .ant-drawer-body { padding-block: 10px; }
    .copilot-drawer { gap: 8px; }
    .copilot-context { display: none; }
}

.header-action-icon svg {
    display: block;
    width: 20px;
    height: 20px;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-actions { display: flex; align-items: center; gap: 12px; }
.header-activity { position: relative; display: inline-flex; }

.header-panel {
    position: absolute;
    top: calc(100% + 18px);
    inset-inline-end: -12px;
    z-index: 40;
    width: min(390px, calc(100vw - 32px));
    max-height: min(570px, calc(100vh - 92px));
    overflow: hidden;
    border: 1px solid var(--cg-border);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 16px 44px rgba(15, 35, 64, .18);
}

.header-panel::before {
    position: absolute;
    top: -7px;
    inset-inline-end: 23px;
    width: 13px;
    height: 13px;
    border-top: 1px solid var(--cg-border);
    border-left: 1px solid var(--cg-border);
    background: #fff;
    content: "";
    transform: rotate(45deg);
}

.header-panel-title { display: flex; align-items: center; justify-content: space-between; padding: 17px 18px 13px; border-bottom: 1px solid #edf0f5; }
.header-panel-title h2 { margin: 0; color: #15233b; font-size: 19px; font-weight: 700; }
.header-panel-title span { color: #8390a3; font-size: 11px; }
.header-panel-list { max-height: 490px; overflow-y: auto; padding: 8px; }

.header-feed-item {
    display: grid;
    grid-template-columns: 9px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 12px 10px;
    border-bottom: 1px solid #edf0f5;
}

.header-feed-item:last-child { border-bottom: 0; }
.header-feed-item.inbox-item { grid-template-columns: minmax(0, 1fr) auto auto; }
.header-feed-item strong { display: block; color: #18263d; font-size: 13px; line-height: 1.35; }
.header-feed-item p { margin: 3px 0; color: #647188; font-size: 11px; line-height: 1.35; }
.header-feed-item time { color: #98a2b3; font-size: 10px; }
.header-feed-dot { width: 8px; height: 8px; border-radius: 50%; background: #1677ff; }
.header-feed-dot.critical { background: #cf1322; }
.header-feed-dot.high { background: #ff4d4f; }
.header-feed-dot.medium { background: #fa8c16; }
.header-feed-dot.info { background: #1677ff; }
.header-panel-state { display: flex; align-items: center; gap: 9px; padding: 24px; color: #6b778c; }

.header-sign-out {
    padding: 6px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #526078;
    cursor: pointer;
}

.header-sign-out:hover {
    background: #f0f7ff;
    color: var(--cg-primary);
}

.header-count-badge .ant-badge-count {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border: 1px solid #fff;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 600;
    line-height: 16px;
    box-shadow: none;
}

.app-header-context {
    margin-inline-start: 14px;
    color: var(--cg-muted);
    font-size: 13px;
}

.app-content {
    padding: 28px 20px 48px;
}

.agent-heartbeat-widget {
    position: fixed;
    inset-inline-end: 24px;
    bottom: 24px;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.grc-ai-widget {
    position: fixed;
    inset-inline-end: 24px;
    bottom: 82px;
    z-index: 1050;
}

.grc-ai-trigger {
    display: flex;
    width: 50px;
    height: 50px;
    padding: 0;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(22,119,255,.24);
    border-radius: 25px !important;
    background: linear-gradient(135deg,#1677ff,#5b5ce2);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 9px 26px rgba(22,119,255,.3);
    transition: width .2s ease,transform .18s ease,box-shadow .18s ease;
}

.grc-ai-widget:hover .grc-ai-trigger,
.grc-ai-trigger:focus-visible {
    width: 156px;
    transform: translateY(-2px);
    box-shadow: 0 13px 32px rgba(22,119,255,.38);
    outline: none;
}

.grc-ai-spark {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    place-items: center;
    font-size: 21px;
}

.grc-ai-label {
    display: grid;
    min-width: 88px;
    padding-inline-end: 14px;
    text-align: left;
    white-space: nowrap;
}

.grc-ai-label strong { font-size: 12px; line-height: 1.15; }
.grc-ai-label small { margin-top: 2px; color: rgba(255,255,255,.78); font-size: 9px; }
.grc-ai-trigger > i {
    position: absolute;
    inset-inline-start: 36px;
    bottom: 3px;
    width: 10px;
    height: 10px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34,197,94,.15);
}

.agent-heartbeat-trigger {
    display: grid;
    width: 48px;
    height: 48px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(22, 119, 255, .18);
    border-radius: 50% !important;
    background: #fff;
    color: #1677ff;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(31, 56, 88, .18);
    transition: transform .18s ease, box-shadow .18s ease;
}

.agent-heartbeat-trigger:hover,
.agent-heartbeat-trigger:focus-visible {
    color: #0958d9;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(31, 56, 88, .24);
    outline: none;
}

.agent-heartbeat-trigger.online { color: #16a34a; }
.agent-heartbeat-trigger.delayed { color: #d97706; }
.agent-heartbeat-trigger.offline { color: #dc2626; }
.agent-heartbeat-trigger.neverconnected { color: #64748b; }

.agent-live-pulse {
    position: absolute;
    right: 2px;
    bottom: 3px;
    width: 12px;
    height: 12px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: currentColor;
}

.header-theme-menu {
    position: absolute;
    top: calc(100% + 10px);
    inset-inline-end: 0;
    z-index: 1100;
}

.agent-heartbeat-panel {
    width: min(360px, calc(100vw - 32px));
    overflow: hidden;
    border: 1px solid #edf0f5;
    border-radius: 12px;
    background: #fff;
    color: #26364d;
    box-shadow: 0 12px 36px rgba(31, 56, 88, .2);
    animation: theme-menu-in .16s ease-out;
}

.agent-heartbeat-panel > header {
    display: flex;
    padding: 15px 16px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #edf0f5;
}

.agent-heartbeat-panel > header strong,
.agent-heartbeat-panel > header span { display: block; }
.agent-heartbeat-panel > header span { margin-top: 2px; color: #8a96a8; font-size: 11px; }
.agent-heartbeat-panel > header button { border: 0; background: transparent; color: #526078; cursor: pointer; }

.agent-status-summary {
    display: grid;
    padding: 11px 14px;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    border-bottom: 1px solid #edf0f5;
    font-size: 11px;
}

.agent-status-summary span { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.agent-status-summary i,
.agent-heartbeat-list i { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; }
.agent-status-summary i.online, .agent-heartbeat-list i.online { background: #16a34a; }
.agent-status-summary i.delayed, .agent-heartbeat-list i.delayed { background: #d97706; }
.agent-status-summary i.offline, .agent-heartbeat-list i.offline { background: #dc2626; }
.agent-heartbeat-list i.neverconnected { background: #94a3b8; }

.agent-heartbeat-list { max-height: 310px; overflow-y: auto; }
.agent-heartbeat-list button {
    display: grid;
    width: 100%;
    padding: 11px 14px;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border: 0;
    border-bottom: 1px solid #f1f3f6;
    border-radius: 0 !important;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}
.agent-heartbeat-list button:hover,
.agent-heartbeat-list button:focus-visible { background: #f7faff; outline: none; }
.agent-heartbeat-list strong, .agent-heartbeat-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agent-heartbeat-list strong { font-size: 12px; }
.agent-heartbeat-list small { margin-top: 2px; color: #8a96a8; font-size: 10px; }
.agent-heartbeat-list time { color: #647188; font-size: 10px; white-space: nowrap; }
.agent-heartbeat-empty, .agent-heartbeat-error { padding: 26px 16px; color: #647188; text-align: center; }
.agent-heartbeat-error { color: #b42318; }
.view-all-agents { width: 100%; padding: 10px; border: 0; background: #f7faff; color: #1677ff; cursor: pointer; }

.theme-switcher-menu {
    width: 172px;
    padding: 6px;
    border: 1px solid #edf0f5;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(31, 56, 88, .18);
    animation: theme-menu-in .16s ease-out;
}

.theme-switcher-option {
    display: grid;
    width: 100%;
    min-height: 38px;
    padding: 7px 9px;
    grid-template-columns: 16px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 9px;
    border: 0;
    border-radius: 6px !important;
    background: transparent;
    color: #26364d;
    text-align: left;
    cursor: pointer;
}

.theme-switcher-option:hover,
.theme-switcher-option:focus-visible,
.theme-switcher-option.is-active {
    background: #f0f7ff;
    color: #1677ff;
    outline: none;
}

.theme-option-swatch {
    width: 14px;
    height: 14px;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 50%;
    background: #1677ff;
}



.theme-option-swatch.theme-default { background: #1677ff; }
.theme-option-swatch.theme-dark { background: #18263d; }
.theme-option-swatch.theme-compact { background: #13c2c2; }
.theme-option-swatch.theme-aliyun { background: #ff6a00; }
.theme-option-swatch.theme-light { background: linear-gradient(135deg, #ffffff 0 50%, #e6f4ff 50% 100%); }
.theme-option-swatch.theme-dark-compact { background: linear-gradient(135deg, #18263d 0 50%, #13c2c2 50% 100%); }

@keyframes theme-menu-in {
    from { opacity: 0; transform: translateY(6px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

html[data-color-scheme="dark"] body,
html[data-color-scheme="dark"] .app-main,
html[data-color-scheme="dark"] .app-content { background: #111827; color: #e5e7eb; }
html[data-color-scheme="dark"] .app-header,
html[data-color-scheme="dark"] .ant-card,
html[data-color-scheme="dark"] .theme-switcher-menu,
html[data-color-scheme="dark"] .agent-heartbeat-panel,
html[data-color-scheme="dark"] .agent-heartbeat-trigger { background: #1f2937; border-color: #374151; color: #e5e7eb; }
html[data-color-scheme="dark"] .theme-switcher-option { color: #d1d5db; }
html[data-color-scheme="dark"] .theme-switcher-option:hover,
html[data-color-scheme="dark"] .theme-switcher-option:focus-visible,
html[data-color-scheme="dark"] .theme-switcher-option.is-active { background: #25344a; color: #69b1ff; }
html[data-color-scheme="dark"] .agent-heartbeat-panel > header,
html[data-color-scheme="dark"] .agent-status-summary,
html[data-color-scheme="dark"] .agent-heartbeat-list button { border-color: #374151; }
html[data-color-scheme="dark"] .agent-heartbeat-list button:hover,
html[data-color-scheme="dark"] .agent-heartbeat-list button:focus-visible,
html[data-color-scheme="dark"] .view-all-agents { background: #25344a; }
html[data-color-scheme="dark"] .grc-ai-trigger { border-color:#4c78bd; background:linear-gradient(135deg,#185fc7,#5146c8); box-shadow:0 9px 28px rgba(0,0,0,.38); }

html[data-density="compact"] .app-content { padding: 18px 20px 36px; }
html[data-density="compact"] .ant-card-body { padding: 16px; }
html[data-density="compact"] .ant-table-thead > tr > th,
html[data-density="compact"] .ant-table-tbody > tr > td { padding: 9px 12px; }

html.theme-aliyun { --cg-primary: #ff6a00; }
html.theme-aliyun .ant-btn-primary { border-color: #ff6a00; background: #ff6a00; }
html.theme-aliyun .ant-menu-item-selected,
html.theme-aliyun .theme-switcher-option.is-active { color: #ff6a00; }

@media (max-width: 560px) {
    .agent-heartbeat-widget { inset-inline-end: 16px; bottom: 16px; }
    .grc-ai-widget { inset-inline-end: 16px; bottom: 74px; }
    .grc-ai-widget:hover .grc-ai-trigger,.grc-ai-trigger:focus-visible { width:50px; }
}

.user-invite-card,
.user-list-card {
    margin-top: 20px;
}

.user-invite-card h2,
.user-list-card h2 {
    margin-top: 0;
}

.user-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.user-form-grid select,
.user-table select {
    min-height: 38px;
    padding: 6px 10px;
    border: 1px solid #d9e1ea;
    border-radius: 6px;
    background: #fff;
}

.user-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-list-heading span {
    color: var(--cg-muted);
}

.user-table-scroll {
    overflow-x: auto;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
}

.user-table th,
.user-table td {
    padding: 13px 12px;
    border-bottom: 1px solid var(--cg-border);
    text-align: left;
    vertical-align: middle;
}

.user-table th {
    color: #526078;
    font-size: 12px;
    text-transform: uppercase;
}

.user-table td:first-child span {
    display: block;
    color: var(--cg-muted);
    font-size: 12px;
}

@media (max-width: 900px) {
    .user-form-grid {
        grid-template-columns: 1fr;
    }
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 72px;
    padding: 0 22px;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.brand-logo {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    object-fit: contain;
}

.brand-name {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .2px;
}

.brand-edition {
    color: #8ea0ba;
    font-size: 11px;
}

.app-navigation {
    padding: 14px 12px 30px;
}

.nav-section {
    margin: 0;
}

.nav-entry {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 41px;
    margin: 2px 0;
    padding: 8px 12px;
    border-radius: 8px;
    color: #b8c4d6;
    font-size: 13px;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

.nav-entry .anticon {
    display: inline-flex;
    width: 18px;
    min-width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    color: inherit;
    font-size: 18px;
    line-height: 1;
}

.nav-entry .anticon svg {
    display: block;
    width: 1em;
    height: 1em;
    fill: currentColor;
}

.nav-entry:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

.nav-entry.active {
    background: #1677ff;
    color: #fff;
    box-shadow: 0 6px 18px rgba(22, 119, 255, .22);
}

.nav-entry .nav-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-entry .nav-badge {
    display: inline-flex;
    margin-left: auto;
    line-height: 1;
}

.nav-entry .nav-badge .ant-badge-count {
    position: static;
    transform: none;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border: 1px solid rgba(255, 255, 255, .24);
    background: rgba(255, 255, 255, .12);
    color: #dce8fa;
    box-shadow: none;
    font-size: 11px;
    line-height: 18px;
}

.nav-entry .site-badge-count-standard .ant-badge-count {
    border-color: #ff4d4f;
    background-color: #ff4d4f;
    color: #fff;
    box-shadow: none;
}

.nav-entry .site-badge-count-4 .ant-badge-count {
    border-color: #d9d9d9;
    background-color: #fff;
    color: #999;
    box-shadow: 0 0 0 1px #d9d9d9 inset;
}

.nav-entry .site-badge-count-109 .ant-badge-count {
    border-color: #52c41a;
    background-color: #52c41a;
    color: #fff;
    box-shadow: none;
}

.nav-entry.active .nav-badge .ant-badge-count {
    border-color: #d9d9d9;
    background: #fff;
    color: #667085;
    box-shadow: 0 0 0 1px #d9d9d9 inset;
}

.nav-entry.active .site-badge-count-standard .ant-badge-count {
    border-color: #ff4d4f;
    background-color: #ff4d4f;
    color: #fff;
    box-shadow: none;
}

.nav-entry.active .site-badge-count-109 .ant-badge-count {
    border-color: #52c41a;
    background-color: #52c41a;
    color: #fff;
    box-shadow: none;
}

.sidebar-collapsed .nav-entry .nav-badge {
    display: inline-flex !important;
    position: absolute;
    top: 3px;
    right: 2px;
    margin: 0;
}

.sidebar-collapsed .nav-entry {
    position: relative;
}

.sidebar-collapsed .nav-entry .nav-badge .ant-badge-count {
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    font-size: 9px;
    line-height: 15px;
}

.feature-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.feature-heading h1 {
    margin: 4px 0 6px;
    color: var(--cg-navy);
    font-size: 28px;
    font-weight: 700;
}

.feature-heading p {
    max-width: 760px;
    margin: 0;
    color: var(--cg-muted);
}

.feature-eyebrow {
    color: var(--cg-primary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.metric-card {
    min-height: 136px;
    margin-bottom: 16px;
    border-color: var(--cg-border);
    border-radius: 10px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
}

.metric-label {
    color: var(--cg-muted);
    font-size: 13px;
}

.metric-value {
    margin-top: 8px;
    color: var(--cg-navy);
    font-size: 28px;
    font-weight: 700;
}

.metric-caption {
    margin-top: 10px;
    color: #8994a5;
    font-size: 12px;
}

.workspace-card {
    margin-top: 8px;
    border-color: var(--cg-border);
    border-radius: 10px;
}

.workspace-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 28px;
}

.workspace-toolbar h2 {
    margin: 0 0 3px;
    color: var(--cg-navy);
    font-size: 17px;
}

.workspace-toolbar span {
    color: var(--cg-muted);
    font-size: 12px;
}

.workspace-toolbar code {
    color: var(--cg-primary);
}

.workspace-empty {
    display: grid;
    min-height: 180px;
    place-items: center;
    align-content: center;
    gap: 7px;
    color: var(--cg-muted);
    text-align: center;
}

.workspace-empty .anticon {
    margin-bottom: 6px;
    color: #aab5c4;
    font-size: 34px;
}

.workspace-empty strong {
    color: var(--cg-navy);
}

.startup-error {
    min-height: 100vh;
    padding: 2rem;
    background: radial-gradient(circle at top, #163d5c, #07172a 65%);
}

.startup-error:not([hidden]) { display: grid; place-items: center; }
.startup-error-card {
    width: min(100%, 520px);
    padding: clamp(1.5rem, 5vw, 3rem);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 18px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .3);
    text-align: center;
}
.startup-error-icon {
    display: grid;
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    place-items: center;
    border-radius: 50%;
    background: #fff1f0;
    color: #cf1322;
    font-size: 1.5rem;
    font-weight: 800;
}
.startup-error-card h1 { margin-bottom: .65rem; color: var(--cg-navy); font-size: 1.5rem; }
.startup-error-card p { color: var(--cg-muted); }
.startup-error-card button { padding: .65rem 1.4rem; border: 0; border-radius: 7px; background: var(--cg-primary); color: #fff; font-weight: 700; }
.startup-error-card details { margin-top: 1.25rem; text-align: left; }
.startup-error-card pre { max-height: 140px; overflow: auto; padding: .75rem; border-radius: 6px; background: #f5f7fb; white-space: pre-wrap; }

@media (max-width: 900px) {
    .app-shell {
        display: block;
    }

    .app-sidebar {
        position: static;
        width: 100%;
        max-height: none;
    }

    .sidebar-collapsed .app-sidebar {
        display: none;
    }

    .app-navigation {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-main {
        width: 100%;
    }

    .feature-heading,
    .workspace-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .app-header-context {
        display: none;
    }

    .app-content {
        padding: 20px 16px 36px;
    }

    .app-navigation {
        display: block;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

/* Global Button Border Radius Override */
.ant-btn,
.ant-btn-primary,
.ant-btn-default,
.ant-btn-dashed,
.ant-btn-text,
.ant-btn-link,
.ant-btn-group > .ant-btn,
.ant-btn-group > span > .ant-btn,
button,
.btn,
input[type="button"],
input[type="submit"],
input[type="reset"] {
    border-radius: 6px !important;
}

.access-bootstrap-animation {
    display: block;
    width: min(220px, 60vw);
    height: auto;
    background: transparent !important;
    mix-blend-mode: multiply;
}

/* Custom Spin Indicator using CZG_Gif */
.ant-spin {
    background-color: transparent !important;
    background: transparent !important;
    mix-blend-mode: multiply;
}

.ant-spin-spinning {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 9999 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: transparent !important;
}

.ant-spin-dot {
    position: relative;
    display: inline-block;
    font-size: 64px;
    width: 1em;
    height: 1em;
    background-image: url('../CZG_Gif.gif');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent !important;
    mix-blend-mode: multiply;
    animation: none !important;
    transform: none !important;
}

.ant-spin-dot-item {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.ant-spin-sm .ant-spin-dot {
    font-size: 28px;
    width: 28px;
    height: 28px;
}

.ant-spin-lg .ant-spin-dot {
    font-size: 96px;
    width: 96px;
    height: 96px;
}

.ant-spin-container,
.ant-spin-nested-loading {
    background: transparent !important;
}
.feature-page{padding:4px 2px 28px;color:#16213e}.feature-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:22px}.feature-heading h1{font-size:26px;margin:4px 0}.feature-heading p{color:#64748b;margin:0}.eyebrow{color:#1677ff;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.08em}.primary-button{background:#00a9c7;color:#fff;border:0;border-radius:6px;padding:10px 18px;font-weight:600}.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.metric-card{background:#fff;border:1px solid #e5eaf1;border-bottom:3px solid var(--accent);border-radius:10px;padding:15px;display:flex;justify-content:space-between;box-shadow:0 2px 5px #0f172a0d}.metric-card div{display:flex;flex-direction:column}.metric-card span,.metric-card small{color:#64748b}.metric-card strong{font-size:25px;margin:3px 0}.metric-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:color-mix(in srgb,var(--accent) 12%,white);color:var(--accent)!important;font-size:20px;font-weight:700}.panel{background:#fff;border:1px solid #e5eaf1;border-radius:10px;overflow:hidden}.panel-title{padding:16px 18px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #edf0f5}.panel-title h2{font-size:17px;margin:0}.panel-title span{color:#64748b}.toolbar{display:flex;gap:12px;padding:14px 0;align-items:center}.toolbar select{height:40px;border:1px solid #d8dee8;border-radius:6px;padding:0 12px;background:#fff}.search-box{min-width:300px;max-width:540px;flex:1;height:40px;border:1px solid #d8dee8;border-radius:6px;display:flex;align-items:center;gap:8px;padding:0 12px;background:#fff}.search-box input{border:0;outline:0;width:100%}.feature-table-wrap{overflow:auto}.feature-table{width:100%;border-collapse:collapse;font-size:13px}.feature-table th{background:#f7f9fc;text-align:left;color:#526078;font-weight:600;padding:11px 14px;white-space:nowrap}.feature-table td{padding:12px 14px;border-top:1px solid #edf0f5;vertical-align:middle}.feature-table tbody tr:hover{background:#fafcff}.cell-subtitle,.attachment-row small{display:block;color:#8490a3;font-size:11px;margin-top:3px}.empty-cell{text-align:center!important;color:#7c8798;padding:35px!important}.status-pill{display:inline-block;padding:3px 9px;border-radius:99px;font-size:11px;font-weight:600}.status-pill.success{background:#e8f8ef;color:#168344}.status-pill.danger{background:#ffebec;color:#c92a36}.status-pill.warning{background:#fff5df;color:#a96500}.status-pill.info{background:#eaf3ff;color:#1769aa}.overdue-text{color:#cf2634;font-weight:600}.pager{display:flex;justify-content:flex-end;align-items:center;gap:14px;padding:13px 18px;border-top:1px solid #edf0f5}.pager button,.link-button,.icon-button{border:0;background:transparent;color:#1677ff}.feature-tabs{display:flex;gap:4px;border-bottom:1px solid #e6eaf0;padding:0 14px}.feature-tabs button{border:0;background:transparent;padding:14px 12px;color:#64748b}.feature-tabs button.active{color:#1677ff;border-bottom:2px solid #1677ff;font-weight:600}.feature-tabs button span{background:#edf2f8;border-radius:99px;padding:1px 6px;font-size:10px}.error-banner{padding:11px 14px;margin-bottom:12px;background:#fff0f0;color:#b4232d;border:1px solid #ffc9cd;border-radius:6px}.loading-state{padding:45px;text-align:center;color:#64748b}.modal-backdrop{position:fixed;inset:0;background:#0f172a80;z-index:1050;display:grid;place-items:center;padding:20px}.feature-modal{background:#fff;border-radius:10px;width:min(620px,100%);max-height:80vh;overflow:auto;padding-bottom:12px}.attachment-row{display:flex;align-items:center;gap:12px;padding:12px 18px;color:#17233d;text-decoration:none;border-bottom:1px solid #edf0f5}.attachment-row>span:nth-child(2){flex:1}.detail-grid{display:grid;grid-template-columns:130px 1fr;gap:12px;padding:18px}.detail-grid dt{color:#64748b}.detail-grid dd{margin:0;word-break:break-all}@media(max-width:900px){.metric-grid{grid-template-columns:repeat(2,1fr)}.feature-heading{flex-direction:column}.toolbar{flex-wrap:wrap}}@media(max-width:560px){.metric-grid{grid-template-columns:1fr}.search-box{min-width:100%}}
.ticket-create-modal{width:min(860px,100%)}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:18px}.form-grid label{display:flex;flex-direction:column;gap:7px;color:#526078;font-weight:600}.form-grid input,.form-grid select,.form-grid textarea{border:1px solid #d8dee8;border-radius:6px;padding:10px;background:#fff;color:#17233d;font-weight:400}.span-all{grid-column:1/-1}.modal-actions{display:flex;justify-content:flex-end;gap:10px;padding:12px 18px}.modal-actions>button:not(.primary-button){border:1px solid #d8dee8;background:#fff;border-radius:6px;padding:9px 16px}.assignment-summary{display:flex;flex-direction:column;gap:5px;margin:18px 18px 0;padding:14px;background:#f7f9fc;border-radius:7px}.assignment-summary span{color:#64748b}.assign-button{border:1px solid #1677ff;background:#eef6ff;color:#1677ff;border-radius:5px;padding:5px 12px;font-weight:600}

/* Application-wide responsive contract. Keep feature content inside the viewport. */
html,
body,
#app {
    width: 100%;
    max-width: 100%;
    min-height: 100%;
    overflow-x: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
}

.app-shell,
.app-main,
.app-content,
.feature-page,
.ant-layout,
.ant-layout-content,
.ant-row,
.ant-col,
.ant-card,
.ant-card-body,
.ant-tabs,
.ant-tabs-content,
.ant-tabs-tabpane {
    min-width: 0;
    max-width: 100%;
}

.app-content {
    overflow-x: clip;
}

/*
 * Shared host for AntDesign select popups. Keeping overlays in a fixed,
 * viewport-sized layer prevents them from extending the document or being
 * offset by nested page/table scrolling.
 */
#app-overlay-root {
    position: fixed;
    inset: 0;
    z-index: 1050;
    width: 100vw;
    height: 100dvh;
    overflow: visible;
    pointer-events: none;
}

#app-overlay-root > * {
    pointer-events: auto;
}

/* Keep Ant Design select menus in the shared overlay and let longer option
   lists use more of the available viewport before scrolling internally. */
#app-overlay-root .ant-select-dropdown {
    max-height: min(70dvh, 480px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
}

/* Keep Select popups usable even when a screen does not explicitly portal them. */
.ant-select-dropdown {
    z-index: 1200 !important;
    max-height: min(70dvh, 480px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
}

.ant-select-dropdown .rc-virtual-list-holder,
.ant-select-dropdown .ant-select-dropdown-menu {
    max-height: min(70dvh, 480px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
}

.ant-select-dropdown .ant-select-item-option-content {
    white-space: normal;
    overflow-wrap: anywhere;
}

.dashboard-table-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.dashboard-table-grid > *,
.metric-grid > *,
.metrics-grid > * {
    min-width: 0;
}

.ant-table-wrapper,
.ant-table-container,
.ant-table-content,
.ant-table-body {
    max-width: 100%;
}

.ant-table-wrapper {
    width: 100%;
   /* overflow-x: auto;*/
    -webkit-overflow-scrolling: touch;
}

.ant-table-content,
.ant-table-body {
    overflow-x: auto !important;
}

.ant-form,
.ant-form-item,
.ant-form-item-control,
.ant-input-affix-wrapper,
.ant-picker,
.ant-select,
.ant-input-number {
    max-width: 100%;
}

.ant-modal {
    max-width: calc(100vw - 32px);
}

.ant-modal-content,
.ant-drawer-content-wrapper {
    max-height: calc(100dvh - 32px);
}

.ant-modal-body,
.ant-drawer-body {
    max-height: calc(100dvh - 150px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.header-actions,
.app-header-brand,
.workspace-toolbar,
.toolbar,
.filter-group,
.modal-actions,
.ant-card-extra {
    min-width: 0;
}

@media (max-width: 1100px) {
    .dashboard-table-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .app-header {
        min-height: 64px;
        height: auto;
        padding: 10px 16px;
        gap: 10px;
        flex-wrap: wrap;
    }

    .header-actions {
        margin-inline-start: auto;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .header-panel {
        position: fixed;
        top: 72px;
        inset-inline: 12px;
        width: auto;
        max-height: calc(100dvh - 90px);
        overflow-y: auto;
    }

    .ant-pagination {
        flex-wrap: wrap;
        row-gap: 8px;
    }
}

@media (max-width: 640px) {
    .app-content {
        padding: 16px 12px 28px;
    }

    .app-header {
        padding: 8px 12px;
    }

    .app-header-brand strong,
    .header-user > span,
    .header-sign-out:not(:focus) {
        font-size: 0;
    }

    .header-sign-out .anticon {
        margin: 0;
        font-size: 16px;
    }

    .feature-heading h1 {
        font-size: clamp(21px, 7vw, 26px);
    }

    .feature-heading > *,
    .workspace-toolbar > *,
    .toolbar > *,
    .filter-group > * {
        width: 100%;
        max-width: 100%;
    }

    .toolbar,
    .filter-group,
    .workspace-toolbar,
    .panel-title {
        align-items: stretch;
        flex-direction: column;
    }

    .form-grid,
    .detail-grid {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .span-all {
        grid-column: auto;
    }

    .modal-backdrop {
        align-items: end;
        padding: 8px;
    }

    .feature-modal,
    .ticket-create-modal {
        width: 100%;
        max-height: calc(100dvh - 16px);
        border-radius: 12px 12px 6px 6px;
    }

    .modal-backdrop:has(.ticket-create-modal) {
        align-items: stretch;
        overflow: hidden;
        padding: 8px 8px max(8px, env(safe-area-inset-bottom));
    }

    .ticket-create-modal {
        height: calc(100dvh - 16px - env(safe-area-inset-bottom));
        max-height: none;
        overflow: hidden;
    }

    .ticket-create-modal > .ant-card-body { height:100%; overflow-y:auto; overscroll-behavior:contain; }
    .ticket-create-modal textarea { height:76px!important; min-height:76px!important; max-height:76px!important; }
    .ticket-create-actions { position:static!important; display:flex!important; width:100%; margin:12px 0 0!important; padding:0!important; border:0!important; box-shadow:none!important; background:transparent!important; }
    .ticket-create-actions .ant-btn { min-height:40px; }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .modal-actions .ant-btn,
    .modal-actions > button {
        width: 100%;
        min-height: 44px;
    }

    .ant-modal {
        top: 8px;
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px);
        margin: 0 auto;
        padding-bottom: 8px;
    }

    .ant-modal-header,
    .ant-modal-body,
    .ant-modal-footer,
    .ant-card-head,
    .ant-card-body {
        padding-right: 14px;
        padding-left: 14px;
    }

    .ant-pagination {
        justify-content: center;
    }

    .ant-pagination-options,
    .ant-pagination-jump-prev,
    .ant-pagination-jump-next {
        display: none;
    }

    .feature-tabs,
    .ant-tabs-nav-wrap {
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .feature-tabs {
        flex-wrap: nowrap;
    }

    .feature-tabs button {
        flex: 0 0 auto;
    }

    input,
    select,
    textarea,
    .ant-input,
    .ant-select-selector,
    .ant-picker {
        font-size: 16px !important;
    }
}

.server-pager{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-top:18px}.risk-chart-host{width:100%;height:240px;min-height:240px;max-height:240px;overflow:hidden}.risk-chart-host>div,.risk-chart-host canvas,.risk-chart-host svg{width:100%!important;max-width:100%!important;height:240px!important;max-height:240px!important}
@media (max-width: 380px) {
    .app-content {
        padding-right: 8px;
        padding-left: 8px;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .ant-card-body {
        padding: 12px;
    }
}

/* Tablet and mobile shell: the sidebar is always an off-canvas drawer.
   In this breakpoint the existing toggled class means "drawer open". */
@media (max-width: 1023px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Compact authentication screens retain the logo, application name,
       value/form titles and form while removing supporting descriptions. */
    .auth-value > p,
    .auth-frameworks,
    .auth-stats,
    .auth-trust,
    .auth-card-heading > p {
        display: none;
    }

    .app-shell,
    .app-shell.sidebar-collapsed {
        display: block;
        min-width: 0;
    }

    .app-main {
        width: 100%;
        min-width: 0;
    }

    .app-sidebar,
    .sidebar-collapsed .app-sidebar {
        position: fixed;
        inset-block: 0;
        inset-inline-start: 0;
        z-index: 1001;
        display: block;
        width: min(82vw, 300px);
        max-height: 100dvh;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform .24s ease;
        box-shadow: 12px 0 32px rgba(2, 12, 27, .25);
    }

    .sidebar-collapsed .app-sidebar {
        transform: translateX(0);
    }

    .sidebar-collapsed .brand {
        justify-content: flex-start;
        padding-inline: 24px;
    }

    .sidebar-collapsed .brand > div,
    .sidebar-collapsed .nav-entry .nav-title {
        display: block;
    }

    .sidebar-collapsed .nav-entry {
        justify-content: flex-start;
        padding-inline: 20px;
    }

    .app-navigation {
        display: block;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1000;
        display: block;
        border: 0;
        background: rgba(4, 14, 28, .46);
        opacity: 0;
        visibility: hidden;
        transition: opacity .24s ease, visibility .24s ease;
    }

    .sidebar-collapsed .sidebar-backdrop {
        opacity: 1;
        visibility: visible;
    }

    .app-header {
        position: sticky;
        z-index: 30;
    }

    .app-content {
        width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }

    .ant-table-wrapper,
    .feature-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .header-sign-out {
        display: inline-grid;
        width: 32px;
        height: 32px;
        padding: 0;
        place-items: center;
        border-radius: 50%;
    }

    .header-sign-out-label {
        display: none;
    }
}

@media (max-width: 767px) {
    .app-header-brand strong,
    .app-header-context,
    .header-user > span {
        display: none;
    }

    .app-header {
        flex-wrap: nowrap;
    }

    .header-actions {
        gap: clamp(2px, 2vw, 10px);
        flex-wrap: nowrap;
    }

    .auth-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .auth-brand-panel,
    .auth-content {
        width: 100%;
    }
}

@media (max-width: 359px) {
    .app-header {
        padding-inline: 8px;
    }

    .header-action-icon,
    .header-sign-out {
        width: 30px;
        height: 30px;
    }
}
.risk-donut{width:190px;aspect-ratio:1;border-radius:50%;margin:12px auto 18px;display:grid;place-items:center;position:relative}.risk-donut:after{content:"";position:absolute;inset:28px;border-radius:50%;background:#fff}.risk-donut>div{z-index:1;display:flex;flex-direction:column;text-align:center}.risk-donut strong{font-size:28px;color:#17233d}.risk-donut span,.risk-chart-row span,.risk-action span{color:#64748b;font-size:12px}.risk-chart-row{display:grid;grid-template-columns:70px 1fr 28px;align-items:center;gap:10px;margin:14px 0}.risk-action{display:flex;gap:10px;align-items:flex-start;padding:10px 0;border-bottom:1px solid #edf0f5}.risk-action>div{display:flex;min-width:0;flex-direction:column}.risk-action strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.feature-form-field { margin-bottom: 18px; }
.feature-form-field > label:not(.ant-checkbox-wrapper) { display: block; margin-bottom: 6px; color: #1f2937; font-weight: 500; }
.configuration-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.configuration-section { margin-top: 20px; padding: clamp(16px,2vw,24px); border: 1px solid #e3eaf3; border-radius: 16px; background: linear-gradient(180deg,#fff 0%,#fbfdff 100%); box-shadow: 0 8px 28px rgba(31,56,88,.045); }
.configuration-section-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.configuration-section-title h2 { margin: 0 0 4px; color: #17233d; font-size: 18px; }
.configuration-section-title p { margin: 0; color: #66758c; }
.ai-provider-grid { display: grid; grid-template-columns: repeat(4,minmax(220px,1fr)); gap: 16px; }
.ai-provider-card-interaction { min-width: 0; height: 100%; border-radius: 14px; outline: none; }
.ai-provider-card-interaction[role="button"] { cursor: pointer; }
.ai-provider-card-interaction:focus-visible { box-shadow: 0 0 0 3px rgba(22,119,255,.2); }
.ai-provider-card { position: relative; height: 100%; overflow: hidden; border: 1px solid #dfe7f1; border-radius: 14px; background: #fff; }
.ai-provider-card::before { position: absolute; top: 0; right: 0; left: 0; height: 4px; background: linear-gradient(90deg,#1677ff,#69b1ff); content: ""; }
.ai-provider-card.ant-card-hoverable:hover { transform: translateY(-3px); border-color: #91caff; box-shadow: 0 12px 30px rgba(22,119,255,.11); }
.ai-provider-card .ant-card-body { display: flex; min-height: 310px; height: 100%; padding: 20px; flex-direction: column; }
.ai-provider-card-head { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; gap: 12px; align-items: center; }
.ai-provider-logo { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid #cfe1fb; border-radius: 13px; background: linear-gradient(145deg,#f6faff,#eaf3ff); color: #0958d9; box-shadow: inset 0 1px 0 #fff; }
.ai-provider-logo img { display: block; width: 30px; height: 30px; object-fit: contain; }
.ai-provider-logo span { font-size: 14px; font-weight: 800; letter-spacing: -.02em; }
.ai-provider-identity { min-width: 0; }
.ai-provider-card-head h3 { margin: 0; overflow: hidden; color: #14213d; font-size: 16px; line-height: 1.3; text-overflow: ellipsis; }
.ai-provider-identity > span { display: block; margin-top: 3px; overflow: hidden; color: #7a879b; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ai-provider-availability { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .035em; text-transform: uppercase; white-space: nowrap; }
.ai-provider-availability i { width: 6px; height: 6px; border-radius: 50%; }
.ai-provider-availability.is-active { background: #edfdf3; color: #14783c; }
.ai-provider-availability.is-active i { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.13); }
.ai-provider-availability.is-disabled { background: #fff1f0; color: #b42318; }
.ai-provider-availability.is-disabled i { background: #ef4444; }
.ai-provider-description { min-height: 44px; margin: 16px 0 13px; color: #58677d; font-size: 13px; line-height: 1.55; }
.ai-provider-tags { display: flex; min-height: 25px; flex-wrap: wrap; gap: 6px; margin-bottom: 15px; }
.ai-provider-tags .ant-tag { margin: 0; border: 0; border-radius: 6px; background: #edf5ff; color: #0958d9; }
.ai-provider-info-grid { display: grid; gap: 0; margin-top: auto; border: 1px solid #edf1f6; border-radius: 10px; background: #fafcff; }
.ai-provider-detail { display: flex; min-width: 0; min-height: 52px; flex-direction: column; gap: 5px; padding: 10px 12px; }
.ai-provider-detail + .ai-provider-detail { border-top: 1px solid #e8eef5; }
.ai-provider-detail span { display: flex; align-items: center; gap: 6px; color: #77869a; font-size: 11px; }
.ai-provider-detail span .anticon { color: #1677ff; }
.ai-provider-detail strong { overflow: hidden; color: #233653; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.ai-provider-footer { display: flex; min-height: 42px; align-items: flex-end; justify-content: space-between; gap: 10px; padding-top: 14px; color: #1677ff; font-size: 12px; }
.ai-provider-config-state { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 7px; font-weight: 600; }
.ai-provider-config-state.is-configured { background: #edfdf3; color: #168447; }
.ai-provider-config-state.is-unconfigured { background: #f2f4f7; color: #667085; }
.ai-provider-config-state.is-local { background: #f5f0ff; color: #722ed1; }
.ai-provider-action { display: inline-flex; align-items: center; gap: 6px; padding: 5px 2px; font-weight: 600; white-space: nowrap; }
.configuration-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px; border: 1px solid #e7ecf3; border-radius: 8px; }
.configuration-switch-row div { display: flex; flex-direction: column; gap: 3px; }
.configuration-switch-row span { color: #758198; font-size: 12px; }
.configuration-secret-input { position: relative; display: flex; align-items: center; }
.configuration-secret-input .ant-input { padding-right: 42px; }
.configuration-secret-input button { position: absolute; right: 1px; display: grid; width: 38px; height: calc(100% - 2px); padding: 0; place-items: center; border: 0; border-left: 1px solid #edf0f4; border-radius: 0 5px 5px 0; background: #fff; color: #667085; cursor: pointer; }
.configuration-secret-input button:hover { color: #1677ff; background: #f7faff; }
.configuration-secret-input button:disabled { cursor: wait; opacity: .65; }
.configuration-secret-hint { display: block; margin-top: 5px; color: #7b8798; font-size: 11px; }
html[data-color-scheme="dark"] .configuration-section { border-color: var(--mXZkqc); background: linear-gradient(180deg,var(--xhUGwc) 0%,var(--ZEpPmd) 100%); box-shadow: 0 8px 28px rgba(0,0,0,.22); }
html[data-color-scheme="dark"] .configuration-section-title h2,
html[data-color-scheme="dark"] .ai-provider-card-head h3 { color: var(--EpFNW); }
html[data-color-scheme="dark"] .configuration-section-title p,
html[data-color-scheme="dark"] .ai-provider-identity > span,
html[data-color-scheme="dark"] .ai-provider-description,
html[data-color-scheme="dark"] .ai-provider-detail span,
html[data-color-scheme="dark"] .configuration-switch-row span,
html[data-color-scheme="dark"] .configuration-secret-hint { color: var(--IXoxUe); }
html[data-color-scheme="dark"] .ai-provider-card { border-color: var(--mXZkqc); background: var(--xhUGwc); }
html[data-color-scheme="dark"] .ai-provider-card.ant-card-hoverable:hover { border-color: var(--T6sXBb); box-shadow: 0 12px 30px rgba(0,0,0,.3); }
html[data-color-scheme="dark"] .ai-provider-logo { border-color: var(--mXZkqc); background: linear-gradient(145deg,var(--XKMDxc),var(--ZEpPmd)); box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
html[data-color-scheme="dark"] .ai-provider-tags .ant-tag { background: color-mix(in srgb,var(--T6sXBb) 16%,var(--ZEpPmd)); color: var(--T6sXBb); }
html[data-color-scheme="dark"] .ai-provider-info-grid { border-color: var(--mXZkqc); background: var(--ZEpPmd); }
html[data-color-scheme="dark"] .ai-provider-detail + .ai-provider-detail { border-color: var(--mXZkqc); }
html[data-color-scheme="dark"] .ai-provider-detail strong { color: var(--bbQxAb); }
html[data-color-scheme="dark"] .ai-provider-availability.is-active,
html[data-color-scheme="dark"] .ai-provider-config-state.is-configured { background: rgba(22,163,74,.14); color: #6fd995; }
html[data-color-scheme="dark"] .ai-provider-availability.is-disabled { background: rgba(239,51,64,.14); color: #ff8790; }
html[data-color-scheme="dark"] .ai-provider-config-state.is-unconfigured { background: var(--XKMDxc); color: var(--IXoxUe); }
html[data-color-scheme="dark"] .ai-provider-config-state.is-local { background: rgba(168,85,247,.15); color: #c9a5ff; }
html[data-color-scheme="dark"] .configuration-switch-row { border-color: var(--mXZkqc); background: var(--ZEpPmd); }
html[data-color-scheme="dark"] .configuration-secret-input button { border-left-color: var(--mXZkqc); background: inherit; color: var(--IXoxUe); }
html[data-color-scheme="dark"] .configuration-secret-input button:hover { background: var(--XKMDxc); color: var(--T6sXBb); }
html[data-color-scheme="dark"] .ant-input { background-color: inherit !important; }
@media (max-width: 1399px) { .ai-provider-grid { grid-template-columns: repeat(3,minmax(220px,1fr)); } }
@media (max-width: 1023px) { .ai-provider-grid { grid-template-columns: repeat(2,minmax(230px,1fr)); } }
@media (max-width: 767px) {
    .configuration-heading { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
    .configuration-heading > div { flex: 1 1 220px; }
    .configuration-heading .configuration-refresh { width: auto; min-width: 38px; height: 32px; padding-inline: 10px; flex: 0 0 auto; }
    .configuration-section-title { align-items: flex-start; flex-direction: row; }
    .configuration-section-title > div { min-width: 0; flex: 1 1 auto; }
    .configuration-provider-count { width: auto; min-width: max-content; margin: 0; padding-inline: 7px; flex: 0 0 auto; }
    .configuration-section { padding: 14px; border-radius: 12px; }
    .ai-provider-grid { grid-template-columns: 1fr; gap: 13px; }
    .ai-provider-card .ant-card-body { min-height: 0; padding: 16px; }
    .ai-provider-card-head { grid-template-columns: 42px minmax(0,1fr) auto; padding-right: 0; }
    .ai-provider-logo { width: 42px; height: 42px; }
    .ai-provider-availability { align-self: start; justify-self: end; }
    .ai-provider-description { min-height: 0; margin: 12px 0 10px; }
    .ai-provider-tags { min-height: 0; margin-bottom: 10px; }
    .ai-provider-detail { min-height: 42px; gap: 2px; padding: 7px 10px; }
    .ai-provider-info-grid { border-radius: 8px; }
    .ai-provider-footer { min-height: 36px; padding-top: 10px; align-items: center; }
}
@media (max-width: 420px) {
    .configuration-heading .configuration-refresh { font-size: 0; }
    .configuration-heading .configuration-refresh .anticon { margin: 0; font-size: 14px; }
    .ai-provider-card-head { grid-template-columns: 40px minmax(0,1fr) auto; gap: 9px; }
    .ai-provider-logo { width: 40px; height: 40px; }
    .ai-provider-availability { padding: 4px 6px; font-size: 9px; }
    .ai-provider-footer { align-items: center; }
}
.evidence-control-picker { display: flex; width: 100%; min-width: 0; align-items: center; gap: 8px; }
.evidence-control-picker > .ant-select { min-width: 0; flex: 1 1 auto; }
.evidence-control-picker .evidence-control-reload { display: inline-grid; flex: 0 0 32px; width: 32px; min-width: 32px; height: 32px; padding: 0; place-items: center; }
.feature-form-field .ant-checkbox-wrapper,
.ant-checkbox-wrapper {
    display: inline-flex !important;
    align-items: flex-start !important;
    white-space: normal !important;
    cursor: pointer !important;
}

/* Compact tablet/mobile density. Desktop (1024px and wider) intentionally
   keeps Ant Design's default/medium typography and control dimensions. */
@media (max-width: 1023px) {
    .app-shell,
    .auth-shell {
        font-size: 13px;
    }

    .app-content h1,
    .feature-heading h1 {
        font-size: 22px;
    }

    .app-content h2,
    .panel-title h2,
    .ant-card-head-title {
        font-size: 16px;
    }

    .app-content h3 {
        font-size: 14px;
    }

    .ant-table,
    .feature-table,
    .ant-form,
    .ant-form-item,
    .ant-descriptions,
    .ant-tabs,
    .ant-select,
    .ant-input,
    .ant-picker,
    .ant-tag,
    .ant-typography {
        font-size: 12px;
    }

    .ant-btn,
    .app-content button,
    .auth-content button {
        font-size: 12px;
    }

    .ant-btn:not(.ant-btn-circle) {
        min-height: 30px;
        height: 30px;
        padding: 0 10px;
    }

    .ant-btn-circle,
    .ant-btn-icon-only {
        width: 30px;
        min-width: 30px;
        height: 30px;
        padding: 0;
    }

    .ant-input,
    .ant-input-affix-wrapper,
    .ant-picker,
    .ant-select-single .ant-select-selector {
        min-height: 30px;
    }

    .ant-table-thead > tr > th,
    .ant-table-tbody > tr > td,
    .feature-table th,
    .feature-table td {
        padding: 8px 10px;
    }

    .server-pager,
    .incident-pagination,
    .pager {
        gap: 8px;
        font-size: 12px;
    }

    /* Ant pagination already renders previous/next as icons. These rules make
       every table pager consistently compact across feature implementations. */
    .ant-pagination-item,
    .ant-pagination-prev,
    .ant-pagination-next,
    .ant-pagination-jump-prev,
    .ant-pagination-jump-next {
        min-width: 28px;
        width: 28px;
        height: 28px;
        margin-right: 4px;
        line-height: 26px;
    }

    .ant-pagination-prev .ant-pagination-item-link,
    .ant-pagination-next .ant-pagination-item-link {
        display: grid;
        padding: 0;
        place-items: center;
        font-size: 12px;
    }

    .ant-pagination-options {
        font-size: 12px;
    }
}

@media (max-width: 767px) {
    .app-shell,
    .auth-shell {
        font-size: 12px;
    }

    .app-content h1,
    .feature-heading h1 {
        font-size: 20px;
    }

    .ant-btn:not(.ant-btn-circle) {
        min-height: 28px;
        height: 28px;
        padding-inline: 8px;
    }

    .ant-btn-circle,
    .ant-btn-icon-only {
        width: 28px;
        min-width: 28px;
        height: 28px;
    }

    .server-pager,
    .incident-pagination,
    .pager {
        align-items: center;
        flex-wrap: wrap;
    }

    .server-pager > .ant-typography,
    .incident-pagination > span,
    .pager > span {
        flex: 1 1 100%;
    }

    /* Mobile pagers prioritize the icon controls and current page, avoiding a
       row of tiny numbered targets on a 320px viewport. */
    .ant-pagination-item:not(.ant-pagination-item-active),
    .ant-pagination-jump-prev,
    .ant-pagination-jump-next,
    .ant-pagination-options {
        display: none;
    }

    .ant-pagination-item,
    .ant-pagination-prev,
    .ant-pagination-next {
        min-width: 26px;
        width: 26px;
        height: 26px;
        line-height: 24px;
    }
}
.feature-form-field .ant-checkbox-wrapper > .ant-checkbox,
.ant-checkbox-wrapper > .ant-checkbox {
    margin-top: 2px !important;
    flex-shrink: 0 !important;
}
.feature-form-field .ant-checkbox-wrapper > span:last-child,
.ant-checkbox-wrapper > span:last-child {
    display: inline !important;
    padding-left: 8px !important;
    line-height: 1.4 !important;
    color: #1E293B !important;
}
.required-mark { color: #ff4d4f; }

/* Shared KPI treatment: every Ant Design statistic card uses the Incident Response bottom accent. */
.kpi-accent-card,
.ant-row > .ant-col > .ant-card:has(.ant-statistic),
.metrics-grid > .ant-card:has(.ant-statistic) {
    --kpi-accent: #1677ff;
    height: 100%;
    border-radius: 10px;
    border-bottom: 4px solid var(--kpi-accent) !important;
    box-shadow: 0 2px 7px rgba(15, 23, 42, .06);
}
.ant-row > .ant-col:nth-child(2) > .ant-card:has(.ant-statistic), .metrics-grid > .ant-card:nth-child(2):has(.ant-statistic) { --kpi-accent: #16a34a; }
.ant-row > .ant-col:nth-child(3) > .ant-card:has(.ant-statistic), .metrics-grid > .ant-card:nth-child(3):has(.ant-statistic) { --kpi-accent: #f59e0b; }
.ant-row > .ant-col:nth-child(4) > .ant-card:has(.ant-statistic), .metrics-grid > .ant-card:nth-child(4):has(.ant-statistic) { --kpi-accent: #dc2626; }
.ant-row > .ant-col:nth-child(5) > .ant-card:has(.ant-statistic), .metrics-grid > .ant-card:nth-child(5):has(.ant-statistic) { --kpi-accent: #7c3aed; }

/* One pagination appearance for client- and server-paged tables. */
.ant-table-pagination.ant-pagination,
.server-pager .ant-pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    margin: 18px 0 0;
}
.ant-pagination-item,
.ant-pagination-prev .ant-pagination-item-link,
.ant-pagination-next .ant-pagination-item-link {
    border-radius: 6px !important;
}
.ant-pagination-item-active {
    background: #1677ff !important;
    border-color: #1677ff !important;
}
.ant-pagination-item-active a { color: #fff !important; }
.dashboard-view-all{display:inline-flex!important;align-items:center!important;justify-content:center!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:#0958d9!important;font-family:inherit!important;font-size:12px!important;font-weight:400!important;line-height:20px!important;white-space:nowrap!important;cursor:pointer!important}.dashboard-view-all:hover,.dashboard-view-all:focus{background:transparent!important;color:#1677ff!important;text-decoration:none!important;outline:none!important}.dashboard-view-all:active{color:#003eb3!important}

/* Responsive application splash, adapted from the supplied OrienShield HTML. */
.orien-splash{--splash-bg:#f5f8ff;--splash-grid:#e3eaf7;--splash-blue:#2f5fef;--splash-navy:#0e1b3a;--splash-muted:#6b7690;--splash-green:#22c55e;position:relative;z-index:0;display:flex;width:100%;min-height:100dvh;align-items:center;justify-content:center;overflow:hidden;background:radial-gradient(ellipse 900px 500px at 82% 8%,rgba(47,95,239,.13),transparent 60%),radial-gradient(ellipse 700px 500px at 10% 95%,rgba(47,95,239,.08),transparent 60%),linear-gradient(var(--splash-grid) 1px,transparent 1px),linear-gradient(90deg,var(--splash-grid) 1px,transparent 1px),var(--splash-bg);background-size:auto,auto,42px 42px,42px 42px,auto;color:var(--splash-navy)}
.orien-splash::before{position:absolute;inset:0;background:radial-gradient(ellipse 70% 70% at 50% 45%,transparent 40%,var(--splash-bg) 100%);content:"";pointer-events:none}.orien-splash-overlay{position:fixed;inset:0;z-index:3000;min-height:100dvh}.orien-splash-wordmark{position:absolute;top:clamp(34px,10vh,100px);z-index:2;display:flex;align-items:center;justify-content:center;gap:10px;animation:orienRise .7s ease both}.orien-splash-wordmark svg{width:22px;height:22px;fill:none;stroke:var(--splash-blue);stroke-width:1.8;stroke-linejoin:round}.orien-splash-wordmark strong{font-size:18px;letter-spacing:.2px}.orien-splash-wordmark span{margin-left:2px;padding-left:10px;border-left:1px solid #dce4f5;color:var(--splash-muted);font:600 9px ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:1.2px;text-transform:uppercase}.orien-splash-center{position:relative;z-index:2;display:flex;flex-direction:column;align-items:center;gap:22px}.orien-splash-lines{position:absolute;inset:-108px;width:400px;height:400px;overflow:visible;pointer-events:none}.orien-splash-lines line{stroke:#c7d4f5;stroke-width:1.4}.orien-splash-lines circle{fill:var(--splash-green);animation:orienNode 2.6s ease-in-out infinite}.orien-splash-lines .n2{animation-delay:.5s}.orien-splash-lines .n3{animation-delay:1s}.orien-splash-lines .n4{animation-delay:1.5s}.orien-splash-badge{position:relative;display:grid;width:184px;height:184px;place-items:center;border:1px solid #e7ecf8;border-radius:50%;background:#fff;box-shadow:0 20px 50px -20px rgba(30,60,150,.25),0 0 0 8px rgba(47,95,239,.05);animation:orienRise .7s .1s ease both}.orien-splash-ring{position:absolute;inset:-1px;width:184px;height:184px;transform:rotate(-90deg)}.orien-splash-ring circle{fill:none;stroke-width:2.5}.orien-splash-ring .track{stroke:#eef2fc}.orien-splash-ring .progress{stroke:var(--splash-blue);stroke-linecap:round;stroke-dasharray:534;filter:drop-shadow(0 0 6px rgba(47,95,239,.35));animation:orienRing 2.4s cubic-bezier(.65,0,.35,1) infinite}.orien-splash-shield{display:grid;justify-items:center;gap:6px}.orien-splash-shield svg{width:38px;height:38px}.orien-splash-shield path{fill:none;stroke:var(--splash-blue);stroke-width:5.5;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:132;animation:orienShield 1.4s ease both}.orien-splash-shield path.check{stroke:var(--splash-green);stroke-dasharray:34;animation-duration:.7s}.orien-splash-shield span{display:flex;align-items:center;gap:5px;color:var(--splash-green);font:700 9px ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:1.2px}.orien-splash-shield i{width:5px;height:5px;border-radius:50%;background:var(--splash-green);animation:orienPulse 1.4s ease-in-out infinite}.orien-splash-message{height:20px;margin:0;color:var(--splash-navy);font-size:14px;font-weight:500;text-align:center;animation:orienRise .6s .15s ease both}.orien-splash-progress{width:220px;height:3px;overflow:hidden;border-radius:3px;background:#e7ecf8}.orien-splash-progress i{display:block;width:45%;height:100%;border-radius:3px;background:linear-gradient(90deg,#1c3fc7,var(--splash-blue));animation:orienProgress 1.5s ease-in-out infinite}.orien-splash-center>small{margin-top:-14px;color:var(--splash-muted);font:600 9px ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.6px}.orien-splash-footnotes{position:absolute;bottom:clamp(30px,10vh,100px);z-index:2;height:15px;min-width:310px;color:var(--splash-muted);font:500 9px ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.7px;text-align:center}.orien-splash-footnotes span{position:absolute;inset:0;opacity:0;animation:orienFootnote 6s ease-in-out infinite}.orien-splash-footnotes span:nth-child(2){animation-delay:2s}.orien-splash-footnotes span:nth-child(3){animation-delay:4s}
@keyframes orienRise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}@keyframes orienRing{0%{stroke-dashoffset:534}50%{stroke-dashoffset:80}100%{stroke-dashoffset:534;transform:rotate(360deg)}}@keyframes orienShield{from{stroke-dashoffset:132}to{stroke-dashoffset:0}}@keyframes orienPulse{50%{opacity:.45;box-shadow:0 0 0 4px rgba(34,197,94,0)}}@keyframes orienProgress{0%{transform:translateX(-110%)}50%{transform:translateX(65%)}100%{transform:translateX(225%)}}@keyframes orienNode{0%,100%{opacity:0;transform:scale(.6)}20%,75%{opacity:1;transform:scale(1)}}@keyframes orienFootnote{0%,34%,100%{opacity:0;transform:translateY(4px)}5%,29%{opacity:1;transform:none}}
@media(max-width:767px){.orien-splash-wordmark{top:34px;gap:7px}.orien-splash-wordmark strong{font-size:15px}.orien-splash-wordmark span{font-size:7px;letter-spacing:.7px}.orien-splash-center{gap:18px}.orien-splash-badge,.orien-splash-ring{width:138px;height:138px}.orien-splash-ring{inset:-1px}.orien-splash-ring circle{transform-origin:center;transform:scale(.75)}.orien-splash-lines{inset:-104px;width:346px;height:346px}.orien-splash-message{font-size:12px}.orien-splash-progress{width:min(190px,68vw)}.orien-splash-footnotes{bottom:30px;min-width:280px;font-size:8px}}
@media(max-height:540px){.orien-splash-wordmark{top:18px}.orien-splash-footnotes{bottom:16px}.orien-splash-center{transform:scale(.82)}}
@media(prefers-reduced-motion:reduce){.orien-splash *{animation-duration:.01ms!important;animation-iteration-count:1!important}}

/* Real milestone progress and animated CZG badge. */
.orien-splash-badge-inner{display:grid;width:128px;height:128px;place-items:center;overflow:hidden;border-radius:50%;background:#fff}
.orien-splash-badge-inner img{display:block;width:90%;height:90%;object-fit:contain}
.orien-splash-progress{height:4px;border-radius:4px}
.orien-splash-progress i{display:block;height:100%;border-radius:4px;background:linear-gradient(90deg,#1c3fc7,var(--splash-blue));animation:none;transition:width .3s ease-out;transform:none}
.orien-splash-progress-meta{display:flex;width:220px;align-items:center;justify-content:space-between;margin-top:-14px;color:var(--splash-muted);font:600 9px ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.6px}
.orien-splash-progress-meta strong{color:#1c3fc7;font-size:10px}
@media(max-width:767px){.orien-splash-badge-inner{width:94px;height:94px}.orien-splash-progress-meta{width:min(190px,68vw)}}
@media(prefers-reduced-motion:reduce){.orien-splash-progress i{transform:none}}

/* Keep splash branding, visualization and footer in one centered stack. */
.orien-splash{flex-direction:column;gap:100px}
.orien-splash-wordmark{position:relative;top:auto;left:auto;right:auto;flex:0 0 auto}
.orien-splash-center{isolation:isolate;flex:0 0 auto}
.orien-splash-lines{inset:auto;top:50%;left:50%;z-index:-1;width:400px;height:400px;transform:translate(-50%,-50%)}
.orien-splash-lines line{stroke:#adc2f1;stroke-width:1.5}
.orien-splash-lines circle{filter:drop-shadow(0 0 4px rgba(34,197,94,.7))}
.orien-splash-badge{z-index:1}
.orien-splash-footnotes{position:relative;bottom:auto;left:auto;right:auto;flex:0 0 15px}
@media(max-width:767px){.orien-splash{gap:100px}.orien-splash-wordmark{top:auto}.orien-splash-lines{inset:auto;top:50%;left:50%;width:330px;height:330px;transform:translate(-50%,-50%)}.orien-splash-footnotes{bottom:auto}}
@media(max-height:640px){.orien-splash{gap:44px}.orien-splash-wordmark{top:auto}.orien-splash-center{transform:scale(.88)}.orien-splash-footnotes{bottom:auto}}

/* Reference layout: fixed top/bottom insets with the loader independently
   centered. Widths are capped to the splash itself to prevent mobile scroll. */
.orien-splash{display:flex;max-width:100%;flex-direction:row;gap:0;overflow:hidden;overscroll-behavior:none}
.orien-splash-wordmark{position:absolute;top:100px;left:16px;right:16px;width:auto;max-width:calc(100% - 32px);flex:none;white-space:nowrap}
.orien-splash-center{position:relative;flex:none;transform:none}
.orien-splash-lines{max-width:none;overflow:hidden}
.orien-splash-footnotes{position:absolute;right:16px;bottom:100px;left:16px;width:auto;min-width:0;max-width:calc(100% - 32px);height:15px;flex:none;overflow:hidden}
.orien-splash-footnotes span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:767px){.orien-splash-wordmark{top:40px;left:12px;right:12px;max-width:calc(100% - 24px)}.orien-splash-wordmark span{overflow:hidden;text-overflow:ellipsis}.orien-splash-lines{width:min(330px,110vw);height:min(330px,110vw)}.orien-splash-footnotes{right:12px;bottom:40px;left:12px;max-width:calc(100% - 24px)}}
@media(max-width:359px){.orien-splash-wordmark span{display:none}.orien-splash-lines{width:300px;height:300px}}
@media(max-height:640px){.orien-splash-wordmark{top:20px}.orien-splash-center{transform:scale(.82)}.orien-splash-footnotes{bottom:20px}}

/* Full-screen loading never contributes to the document's scroll size and
   stays above the application sidebar, header and floating widgets. */
.orien-splash-overlay{position:fixed;inset:0;z-index:5000;width:100vw;max-width:100vw;height:100dvh;min-height:0;overflow:hidden}
html:has(.orien-splash-overlay),body:has(.orien-splash-overlay){overflow:hidden!important;overscroll-behavior:none}

/* Desktop readability. Compact breakpoints retain their existing sizing. */
@media(min-width:1024px){.orien-splash-wordmark svg{width:30px;height:30px}.orien-splash-wordmark strong{font-size:24px}.orien-splash-wordmark span{font-size:12px;letter-spacing:1.4px}.orien-splash-message{height:25px;font-size:18px}.orien-splash-progress,.orien-splash-progress-meta{width:280px}.orien-splash-progress-meta{font-size:11px}.orien-splash-progress-meta strong{font-size:13px}.orien-splash-footnotes{font-size:12px;letter-spacing:.9px}}

/* Long, visible connector paths with one packet travelling along each line. */
.orien-splash-lines{z-index:0;width:500px;height:500px;overflow:visible}
.orien-splash-lines line{stroke:#86a9ee;stroke-width:2;opacity:.9}
.orien-splash-lines circle{opacity:0;filter:drop-shadow(0 0 5px rgba(34,197,94,.95));transform-box:fill-box;transform-origin:center}
.orien-splash-lines .n1{animation:orienNodeNw 2.6s linear infinite}
.orien-splash-lines .n2{animation:orienNodeNe 2.6s linear .45s infinite}
.orien-splash-lines .n3{animation:orienNodeSw 2.6s linear .9s infinite}
.orien-splash-lines .n4{animation:orienNodeSe 2.6s linear 1.35s infinite}
.orien-splash-badge,.orien-splash-message,.orien-splash-progress,.orien-splash-progress-meta{position:relative;z-index:2}
@keyframes orienNodeNw{0%{opacity:0;transform:translate(0,0)}10%,88%{opacity:1}100%{opacity:0;transform:translate(-172px,-130px)}}
@keyframes orienNodeNe{0%{opacity:0;transform:translate(0,0)}10%,88%{opacity:1}100%{opacity:0;transform:translate(172px,-130px)}}
@keyframes orienNodeSw{0%{opacity:0;transform:translate(0,0)}10%,88%{opacity:1}100%{opacity:0;transform:translate(-172px,130px)}}
@keyframes orienNodeSe{0%{opacity:0;transform:translate(0,0)}10%,88%{opacity:1}100%{opacity:0;transform:translate(172px,130px)}}

/* Reference edge spacing reduced from 100px to 60px. */
.orien-splash-wordmark{top:60px}
.orien-splash-footnotes{bottom:60px;font-size:11px;letter-spacing:.9px}
@media(min-width:1024px){.orien-splash-footnotes{font-size:14px;letter-spacing:1px}}
@media(max-width:767px){.orien-splash-lines{width:390px;height:390px}.orien-splash-footnotes{font-size:11px}}

/* Align the connector intersection with the ring, not the full content stack. */
.orien-splash-center{--splash-badge-size:184px}
.orien-splash-lines{top:calc(var(--splash-badge-size) / 2);width:440px;height:440px}
.orien-splash-message{margin-top:14px}
.orien-splash-lines .n1{animation-name:orienNodeNwShort}
.orien-splash-lines .n2{animation-name:orienNodeNeShort}
.orien-splash-lines .n3{animation-name:orienNodeSwShort}
.orien-splash-lines .n4{animation-name:orienNodeSeShort}
@keyframes orienNodeNwShort{0%{opacity:0;transform:translate(0,0)}10%,88%{opacity:1}100%{opacity:0;transform:translate(-145px,-108px)}}
@keyframes orienNodeNeShort{0%{opacity:0;transform:translate(0,0)}10%,88%{opacity:1}100%{opacity:0;transform:translate(145px,-108px)}}
@keyframes orienNodeSwShort{0%{opacity:0;transform:translate(0,0)}10%,88%{opacity:1}100%{opacity:0;transform:translate(-145px,108px)}}
@keyframes orienNodeSeShort{0%{opacity:0;transform:translate(0,0)}10%,88%{opacity:1}100%{opacity:0;transform:translate(145px,108px)}}
@media(max-width:767px){.orien-splash-center{--splash-badge-size:138px}.orien-splash-lines{top:calc(var(--splash-badge-size) / 2);width:350px;height:350px}.orien-splash-message{margin-top:10px}}

/* --------------------------------------------------------------------------
   Complete Ant Design theme coverage
   -------------------------------------------------------------------------- */
html[data-color-scheme="dark"]{
--blue:#5292f9;--green:#90e58c;--yellow:#f5b84f;--red:#ff878f;--purple:#a56eff;--orange:#ffb787;
--glass-surface:rgba(30,35,45,.65);--badge-border:rgba(255,255,255,.1);--disabled-foreground:#797c90;
--yTtsEf:#17181f;--xhUGwc:#22242a;--ZEpPmd:#21242b;--mXZkqc:#363840;--JclFj:#4e5059;--gS5jXb:#363840;--XKMDxc:#2c2e35;
--EpFNW:#fff;--Xqboce:#fff;--bbQxAb:#e6e8f0;--IXoxUe:#adafb8;--rrJJUc:#5292f9;--LI4Bo:"Google Sans",Arial,sans-serif,"Noto Color Emoji";--Mhs7de:14px;--ofwUBc:400;--XWv1if:22px;
--primary:#336ef3;--primary-hover:#395fe1;--badge-bg:#42444d;
--grc-sidebar-bg:#101218;--grc-sidebar-text:#e6e8f0;--grc-sidebar-muted:#adafb8;--grc-sidebar-link:#99c3ff;--grc-nav-selected:#2d2f38;--grc-nav-hover:#2c2e35;--grc-header-bg:#17181f;--grc-header-border:#363840;
--grc-modal-bg:#292b33;--grc-drawer-bg:#292b33;--grc-popover-bg:#292b33;--grc-dropdown-bg:#292b33;--grc-notification-bg:#292b33;--grc-tooltip-bg:#0b0c0e;--grc-backdrop:rgba(11,12,14,.75);
--grc-bg-error:rgba(255,135,143,.1);--grc-border-error:#ff878f;--grc-bg-warning:rgba(245,184,79,.1);--grc-border-warning:#f5b84f;--grc-bg-success:rgba(144,229,140,.08);--grc-border-success:#90e58c;--grc-bg-info:rgba(82,146,249,.1);--grc-border-info:#5292f9;
--grc-control-disabled-bg:rgba(54,56,64,.4);--grc-focus-ring:rgba(51,110,243,.6);--grc-table-row-selected:rgba(51,110,243,.08);
--grc-chart-canvas:#22242a;--grc-chart-grid:rgba(54,56,64,.5);--grc-chart-axis:#797c90;--grc-chart-legend-text:#e6e8f0;--grc-chart-tooltip-bg:#292b33;
--cg-primary:var(--primary);--cg-navy:var(--EpFNW);--cg-sidebar:var(--grc-sidebar-bg);--cg-border:var(--mXZkqc);--cg-muted:var(--IXoxUe);--cg-surface:var(--xhUGwc);--cg-background:var(--yTtsEf);--cg-surface-muted:var(--ZEpPmd);
--ant-primary-color:var(--primary);--ant-primary-1:rgba(51,110,243,.12);--ant-primary-2:rgba(51,110,243,.22);--ant-text-color:var(--bbQxAb);--ant-text-color-secondary:var(--IXoxUe);--ant-heading-color:var(--EpFNW);--ant-border-color-base:var(--mXZkqc);--ant-component-background:var(--xhUGwc);--ant-body-background:var(--yTtsEf)
}
html.theme-aliyun{--cg-primary:#ff6a00;--cg-navy:#1f2937;--cg-sidebar:#182331;--cg-border:#eadfd6;--cg-muted:#756a63;--cg-surface:#fffdfa;--cg-background:#f7f4f1;--ant-primary-color:#ff6a00;--ant-primary-1:#fff1e8;--ant-primary-2:#ffd8bf;--ant-text-color:#2f2925;--ant-text-color-secondary:#756a63;--ant-heading-color:#201a17;--ant-border-color-base:#e5d8cf;--ant-component-background:#fffdfa;--ant-body-background:#f7f4f1}

html[data-color-scheme="dark"] body,html[data-color-scheme="dark"] .app-main,html[data-color-scheme="dark"] .app-content,html[data-color-scheme="dark"] .dashboard-page,
html.theme-aliyun body,html.theme-aliyun .app-main,html.theme-aliyun .app-content,html.theme-aliyun .dashboard-page{background:var(--cg-background);color:var(--ant-text-color)}

html[data-color-scheme="dark"] :is(h1,h2,h3,h4,h5,h6,strong,label,.ant-typography,.ant-statistic-title,.ant-statistic-content,.ant-card-head-title,.ant-form-item-label>label),
html.theme-aliyun :is(h1,h2,h3,h4,h5,h6,strong,label,.ant-typography,.ant-statistic-title,.ant-statistic-content,.ant-card-head-title,.ant-form-item-label>label){color:var(--ant-text-color)}
html[data-color-scheme="dark"] :is(p,small,.cell-subtitle,.ant-typography-secondary,.ant-form-item-extra,.ant-form-item-explain),
html.theme-aliyun :is(p,small,.cell-subtitle,.ant-typography-secondary,.ant-form-item-extra,.ant-form-item-explain){color:var(--ant-text-color-secondary)!important}

html[data-color-scheme="dark"] :is(.ant-card,.ant-modal-content,.ant-modal-header,.ant-modal-footer,.ant-drawer-content,.ant-drawer-header,.ant-popover-inner,.ant-dropdown-menu,.ant-select-dropdown,.ant-picker-panel-container,.ant-collapse,.ant-list,.ant-descriptions-view,.panel,.role-panel,.metric-card,.feature-modal),
html.theme-aliyun :is(.ant-card,.ant-modal-content,.ant-modal-header,.ant-modal-footer,.ant-drawer-content,.ant-drawer-header,.ant-popover-inner,.ant-dropdown-menu,.ant-select-dropdown,.ant-picker-panel-container,.ant-collapse,.ant-list,.ant-descriptions-view,.panel,.role-panel,.metric-card,.feature-modal){border-color:var(--cg-border)!important;background:var(--cg-surface)!important;color:var(--ant-text-color)!important}

html[data-color-scheme="dark"] :is(.ant-page-header,.ant-page-header-heading,.ant-page-header-content),
html.theme-aliyun :is(.ant-page-header,.ant-page-header-heading,.ant-page-header-content){border-color:var(--cg-border)!important;background:var(--cg-surface)!important;color:var(--ant-text-color)!important}
html[data-color-scheme="dark"] :is(.ant-page-header-heading-title,.ant-page-header-heading-sub-title),
html.theme-aliyun :is(.ant-page-header-heading-title,.ant-page-header-heading-sub-title){color:var(--ant-text-color)!important}

html[data-color-scheme="dark"] :is(.ant-card-head,.ant-modal-header,.ant-modal-footer,.ant-drawer-header,.ant-tabs-nav::before,.ant-divider,.panel-title,.ant-collapse-item,.ant-collapse-content),
html.theme-aliyun :is(.ant-card-head,.ant-modal-header,.ant-modal-footer,.ant-drawer-header,.ant-tabs-nav::before,.ant-divider,.panel-title,.ant-collapse-item,.ant-collapse-content){border-color:var(--cg-border)!important}

html[data-color-scheme="dark"] :is(.ant-input,.ant-input-affix-wrapper,.ant-input-number,.ant-picker,.ant-select-selector,textarea,select),
html.theme-aliyun :is(.ant-input,.ant-input-affix-wrapper,.ant-input-number,.ant-picker,.ant-select-selector,textarea,select){border-color:var(--cg-border)!important;background:var(--cg-surface)!important;color:var(--ant-text-color)!important}
html[data-color-scheme="dark"] :is(.ant-input::placeholder,textarea::placeholder,.ant-select-selection-placeholder),
html.theme-aliyun :is(.ant-input::placeholder,textarea::placeholder,.ant-select-selection-placeholder){color:var(--ant-text-color-secondary)!important}
html[data-color-scheme="dark"] :is(.ant-select-arrow,.ant-picker-suffix,.ant-input-prefix,.ant-input-suffix,.ant-modal-close,.ant-drawer-close),
html.theme-aliyun :is(.ant-select-arrow,.ant-picker-suffix,.ant-input-prefix,.ant-input-suffix,.ant-modal-close,.ant-drawer-close){color:var(--ant-text-color-secondary)!important}

html[data-color-scheme="dark"] :is(.ant-table,.ant-table-container,.ant-table-content,.ant-table-body,.ant-table-cell),
html.theme-aliyun :is(.ant-table,.ant-table-container,.ant-table-content,.ant-table-body,.ant-table-cell){border-color:var(--cg-border)!important;background:var(--cg-surface);color:var(--ant-text-color)}
html[data-color-scheme="dark"] .ant-table-thead>tr>th,html[data-color-scheme="dark"] .feature-table th,
html.theme-aliyun .ant-table-thead>tr>th,html.theme-aliyun .feature-table th{border-color:var(--cg-border)!important;background:color-mix(in srgb,var(--cg-surface) 82%,var(--cg-background))!important;color:var(--ant-text-color)!important}
html[data-color-scheme="dark"] .ant-table-tbody>tr>td,html[data-color-scheme="dark"] .feature-table td,
html.theme-aliyun .ant-table-tbody>tr>td,html.theme-aliyun .feature-table td{border-color:var(--cg-border)!important;background:var(--cg-surface)!important;color:var(--ant-text-color)!important}
html[data-color-scheme="dark"] .ant-table-tbody>tr:hover>td,html[data-color-scheme="dark"] .feature-table tbody tr:hover,
html.theme-aliyun .ant-table-tbody>tr:hover>td,html.theme-aliyun .feature-table tbody tr:hover{background:color-mix(in srgb,var(--cg-primary) 10%,var(--cg-surface))!important}

html[data-color-scheme="dark"] :is(.ant-tabs-tab,.ant-pagination-item a,.ant-pagination-prev button,.ant-pagination-next button,.ant-dropdown-menu-item,.ant-select-item,.ant-picker-cell,.ant-descriptions-item-label,.ant-descriptions-item-content),
html.theme-aliyun :is(.ant-tabs-tab,.ant-pagination-item a,.ant-pagination-prev button,.ant-pagination-next button,.ant-dropdown-menu-item,.ant-select-item,.ant-picker-cell,.ant-descriptions-item-label,.ant-descriptions-item-content){color:var(--ant-text-color)!important}
html[data-color-scheme="dark"] :is(.ant-dropdown-menu-item:hover,.ant-select-item-option-active,.ant-select-item-option-selected,.ant-picker-cell-in-view.ant-picker-cell-selected .ant-picker-cell-inner),
html.theme-aliyun :is(.ant-dropdown-menu-item:hover,.ant-select-item-option-active,.ant-select-item-option-selected,.ant-picker-cell-in-view.ant-picker-cell-selected .ant-picker-cell-inner){background:color-mix(in srgb,var(--cg-primary) 15%,var(--cg-surface))!important;color:var(--cg-primary)!important}

html[data-color-scheme="dark"] :is(.ant-pagination-item,.ant-pagination-prev .ant-pagination-item-link,.ant-pagination-next .ant-pagination-item-link),
html.theme-aliyun :is(.ant-pagination-item,.ant-pagination-prev .ant-pagination-item-link,.ant-pagination-next .ant-pagination-item-link){border-color:var(--cg-border)!important;background:var(--cg-surface)!important;color:var(--ant-text-color)!important}
html[data-color-scheme="dark"] .ant-pagination-item-active,html.theme-aliyun .ant-pagination-item-active{border-color:var(--cg-primary)!important;background:var(--cg-primary)!important}
html[data-color-scheme="dark"] .ant-pagination-item-active a,html.theme-aliyun .ant-pagination-item-active a{color:#fff!important}

html[data-color-scheme="dark"] :is(.ant-btn-default,.ant-btn-dashed),html.theme-aliyun :is(.ant-btn-default,.ant-btn-dashed){border-color:var(--cg-border)!important;background:var(--cg-surface)!important;color:var(--ant-text-color)!important}
html[data-color-scheme="dark"] .ant-btn-primary,html.theme-aliyun .ant-btn-primary{border-color:var(--cg-primary)!important;background:var(--cg-primary)!important;color:#fff!important}
.export-action-wrap{display:inline-flex!important;visibility:visible!important;opacity:1!important;min-width:max-content!important}
.export-action-wrap>.export-trigger{display:inline-flex!important;visibility:visible!important;opacity:1!important;min-width:112px!important}
@media(max-width:767px){.export-action-wrap>.export-trigger{width:32px!important;min-width:32px!important;height:30px!important;padding:0!important}.export-action-wrap>.export-trigger>.export-trigger-label,.export-action-wrap>.export-trigger>.export-direction-icon{display:none!important}.export-action-wrap>.export-trigger>.anticon:first-child{display:inline-flex!important;visibility:visible!important;opacity:1!important;margin:0!important}}
.policy-page-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px;margin-bottom:12px;white-space:nowrap}
.policy-page-actions>.ant-btn{flex:none}
html[data-color-scheme="dark"] :is(a,.ant-btn-link,.ant-btn-text,.ant-tabs-tab-active .ant-tabs-tab-btn),html.theme-aliyun :is(a,.ant-btn-link,.ant-btn-text,.ant-tabs-tab-active .ant-tabs-tab-btn){color:var(--cg-primary)!important}

/* Shared phone layout: dense KPIs, usable tabs/filters, and a complete scan timeline. */
@media (max-width: 575px) {
    .metrics-grid,
    .quick-audit-kpi-grid,
    .evidence-kpi-grid,
    .executive-kpis,
    .compliance-kpis,
    .external-kpis,
    .policy-kpis,
    .risk-kpis,
    .role-metrics,
    .tenant-kpis,
    .vendor-kpis,
    .incident-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .ant-row > .ant-col:has(.ant-statistic) {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }

    .kpi-accent-card .ant-card-body,
    .ant-row > .ant-col > .ant-card:has(.ant-statistic) .ant-card-body,
    .metrics-grid > .ant-card:has(.ant-statistic) .ant-card-body {
        min-height: 112px;
        padding: 12px !important;
    }

    .ant-statistic-title { font-size: 11px; line-height: 1.25; }
    .ant-statistic-content { font-size: 20px; }
    .ant-card:has(.ant-statistic) .ant-typography { font-size: 10px; line-height: 1.3; }

    .kpi-accent-card .ant-card-body,
    .ant-card:has(.ant-statistic) .ant-card-body,
    .metric-card,
    .role-metric,
    .admin-kpi,
    .audit-kpi,
    .compliance-kpi,
    .lifecycle-kpi,
    .vendor-kpi {
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }
    .kpi-accent-card .ant-card-body,
    .ant-card:has(.ant-statistic) .ant-card-body {
        display: flex !important;
        flex-direction: column !important;
    }
    .ant-card:has(.ant-statistic) .ant-statistic { width: 100%; text-align: center; }
    .role-metric,
    .admin-kpi,
    .audit-kpi,
    .compliance-kpi,
    .lifecycle-kpi,
    .vendor-kpi { flex-direction: column !important; grid-template-columns: 1fr !important; gap: 7px !important; padding: 11px !important; }
    .role-metric-icon,
    .admin-kpi-icon,
    .vendor-kpi .icon { margin-inline:auto; }

    .ant-tabs-nav { margin-bottom: 10px; }
    .ant-tabs-nav-wrap {
        overflow-x: auto !important;
        overflow-y: hidden !important;
        touch-action: pan-x;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    .ant-tabs-nav-list { min-width: max-content; transform: none !important; }
    .ant-tabs-nav-operations { display: none !important; }
    .ant-tabs-tab,
    .ant-tabs-small > .ant-tabs-nav .ant-tabs-tab {
        margin: 0 12px 0 0 !important;
        padding: 7px 5px !important;
        font-size: 12px;
        white-space: nowrap;
    }

    .filter-group,
    .toolbar,
    .workspace-toolbar,
    .ant-card .ant-row:has(.ant-input, .ant-select, .ant-picker) {
        gap: 9px !important;
        row-gap: 9px !important;
    }

    .quick-audit-timeline-card { overflow: visible; }
    .quick-audit-timeline-card .ant-card-body { overflow: visible; }
    .scan-timeline {
        min-width: 0;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 3px;
        padding-top: 8px;
    }
    .scan-timeline::before { top: 24px; right: 8%; left: 8%; }
    .scan-step-icon { width: 32px; height: 32px; font-size: 13px; }
    .scan-timeline-step { gap: 4px; min-width: 0; }
    .scan-timeline-step strong { font-size: 10px; line-height: 1.15; }
    .scan-timeline-step span { font-size: 9px; line-height: 1.15; overflow-wrap: anywhere; }
}

html[data-color-scheme="dark"] :is(.ant-empty-description,.ant-progress-text,.ant-breadcrumb,.ant-breadcrumb a,.ant-breadcrumb-separator),
html.theme-aliyun :is(.ant-empty-description,.ant-progress-text,.ant-breadcrumb,.ant-breadcrumb a,.ant-breadcrumb-separator){color:var(--ant-text-color-secondary)!important}
html[data-color-scheme="dark"] :is(.ant-alert-info,.ant-alert-warning,.ant-alert-error,.ant-alert-success),
html.theme-aliyun :is(.ant-alert-info,.ant-alert-warning,.ant-alert-error,.ant-alert-success){border-color:var(--cg-border)!important;color:var(--ant-text-color)!important}

html[data-color-scheme="dark"] .app-header,html.theme-aliyun .app-header{border-color:var(--cg-border);background:color-mix(in srgb,var(--cg-surface) 96%,transparent);color:var(--ant-text-color)}
html[data-color-scheme="dark"] :is(.sidebar-toggle,.header-action-icon,.header-sign-out),html.theme-aliyun :is(.sidebar-toggle,.header-action-icon,.header-sign-out){border-color:var(--cg-border);background:transparent;color:var(--ant-text-color-secondary)}
html[data-color-scheme="dark"] :is(.header-panel,.theme-switcher-menu),html.theme-aliyun :is(.header-panel,.theme-switcher-menu){border-color:var(--cg-border);background:var(--cg-surface);color:var(--ant-text-color)}

/* OrienShield dark theme: shell, elevated layers and interaction states. */
html[data-color-scheme="dark"] .app-sidebar{background:var(--grc-sidebar-bg);color:var(--grc-sidebar-text);scrollbar-color:var(--JclFj) transparent}
html[data-color-scheme="dark"] .app-sidebar .brand{border-color:var(--mXZkqc)}
html[data-color-scheme="dark"] .app-sidebar .brand-name{color:var(--EpFNW)}
html[data-color-scheme="dark"] .app-sidebar .brand-edition{color:var(--grc-sidebar-muted)}
html[data-color-scheme="dark"] .app-sidebar .nav-entry{inline-size:100%;position:relative;box-sizing:border-box;display:flex;align-items:center;gap:12px;border:none;border-radius:12px;background:transparent;color:#fff;font-family:var(--LI4Bo);font-size:var(--Mhs7de);font-weight:var(--ofwUBc);line-height:var(--XWv1if);cursor:pointer}
html[data-color-scheme="dark"] .app-sidebar .nav-entry:hover{background:var(--grc-nav-hover);color:var(--EpFNW)}
html[data-color-scheme="dark"] .app-sidebar .nav-entry.active{background:var(--grc-nav-selected);color:#fff;box-shadow:inset 3px 0 0 var(--primary)}
html[data-color-scheme="dark"] .app-sidebar .nav-entry :is(.nav-title,.anticon),html[data-color-scheme="dark"] .app-sidebar .nav-entry.active :is(.nav-title,.anticon){color:#fff}
html[data-color-scheme="dark"] .app-sidebar::-webkit-scrollbar{width:8px}
html[data-color-scheme="dark"] .app-sidebar::-webkit-scrollbar-thumb{border:2px solid var(--grc-sidebar-bg);border-radius:8px;background:var(--JclFj)}
html[data-color-scheme="dark"] .app-header{border-color:var(--grc-header-border);background:color-mix(in srgb,var(--grc-header-bg) 96%,transparent)}
html[data-color-scheme="dark"] :is(.ant-modal-content,.ant-modal-header,.ant-modal-footer){background:var(--grc-modal-bg)!important}
html[data-color-scheme="dark"] :is(.ant-drawer-content,.ant-drawer-header,.ant-drawer-body){background:var(--grc-drawer-bg)!important}
html[data-color-scheme="dark"] .ant-popover-inner{background:var(--grc-popover-bg)!important}
html[data-color-scheme="dark"] :is(.ant-dropdown-menu,.ant-select-dropdown,.ant-picker-panel-container){background:var(--grc-dropdown-bg)!important}
html[data-color-scheme="dark"] .ant-notification-notice{border:1px solid var(--mXZkqc);background:var(--grc-notification-bg)!important;color:var(--bbQxAb)}
html[data-color-scheme="dark"] :is(.ant-tooltip-inner,.ant-tooltip-content){background:var(--grc-tooltip-bg)!important;color:var(--EpFNW)!important}
html[data-color-scheme="dark"] :is(.ant-modal-mask,.ant-drawer-mask){background:var(--grc-backdrop)!important}
html[data-color-scheme="dark"] :is(.ant-input,.ant-input-affix-wrapper,.ant-input-number,.ant-picker,.ant-select-selector,textarea,select){background:var(--ZEpPmd)!important}
html[data-color-scheme="dark"] :is(.auth-field input,.auth-field select,.user-form-grid input,.user-form-grid select){border-color:var(--mXZkqc)!important;background-color:inherit!important;color:var(--bbQxAb)!important}
html[data-color-scheme="dark"] :is(.auth-field input,.user-form-grid input)::placeholder{color:var(--IXoxUe)!important}
html[data-color-scheme="dark"] :is(.server-pager,.export-form-field,.tickets-page,.quick-audit-page){color:var(--bbQxAb)}
html[data-color-scheme="dark"] .quick-audit-page :is(.score-ring span,.scan-timeline-step span,.quick-audit-empty-chart){color:var(--IXoxUe)!important}
html[data-color-scheme="dark"] .quick-audit-page :is(svg text,.g2-label,.g2-legend-item-name){fill:var(--IXoxUe)!important;color:var(--IXoxUe)!important}
html[data-color-scheme="dark"] :is(.ant-input,.ant-input-affix-wrapper,.ant-input-number,.ant-picker,.ant-select-selector,textarea,select):focus,
html[data-color-scheme="dark"] :is(.ant-input-affix-wrapper,.ant-input-number,.ant-picker,.ant-select-focused .ant-select-selector):focus-within{border-color:var(--primary)!important;box-shadow:0 0 0 3px var(--grc-focus-ring)!important}
html[data-color-scheme="dark"] :is(.ant-input,.ant-input-affix-wrapper,.ant-input-number,.ant-picker,.ant-select-disabled .ant-select-selector,textarea,select):disabled{background:var(--grc-control-disabled-bg)!important;color:var(--disabled-foreground)!important}
html[data-color-scheme="dark"] .ant-table-tbody>tr:hover>td{background:var(--XKMDxc)!important}
html[data-color-scheme="dark"] .ant-table-tbody>tr.ant-table-row-selected>td{background:var(--grc-table-row-selected)!important}
html[data-color-scheme="dark"] .ant-btn-primary:hover,html[data-color-scheme="dark"] .ant-btn-primary:focus{border-color:var(--primary-hover)!important;background:var(--primary-hover)!important}
html[data-color-scheme="dark"] :is(a,.ant-btn-link,.ant-btn-text){color:var(--rrJJUc)!important}
html[data-color-scheme="dark"] .ant-alert-error{border-color:var(--grc-border-error)!important;background:var(--grc-bg-error)!important}
html[data-color-scheme="dark"] .ant-alert-warning{border-color:var(--grc-border-warning)!important;background:var(--grc-bg-warning)!important}
html[data-color-scheme="dark"] .ant-alert-success{border-color:var(--grc-border-success)!important;background:var(--grc-bg-success)!important}
html[data-color-scheme="dark"] .ant-alert-info{border-color:var(--grc-border-info)!important;background:var(--grc-bg-info)!important}
html[data-color-scheme="dark"] .severity-badge{border-color:var(--badge-border);background:var(--badge-bg)}
html[data-color-scheme="dark"] .severity-badge.critical{color:var(--red)}html[data-color-scheme="dark"] .severity-badge.high{color:var(--orange)}html[data-color-scheme="dark"] .severity-badge.medium{color:var(--yellow)}html[data-color-scheme="dark"] .severity-badge.low,html[data-color-scheme="dark"] .severity-badge.positive{color:var(--green)}
html[data-color-scheme="dark"] :is(.apexcharts-canvas,.apexcharts-svg){background:transparent!important}
html[data-color-scheme="dark"] .apexcharts-gridline{stroke:var(--grc-chart-grid)}
html[data-color-scheme="dark"] :is(.apexcharts-xaxis-label,.apexcharts-yaxis-label){fill:var(--grc-chart-axis)!important}
html[data-color-scheme="dark"] .apexcharts-legend-text{color:var(--grc-chart-legend-text)!important}
html[data-color-scheme="dark"] :is(.apexcharts-tooltip,.apexcharts-xaxistooltip,.apexcharts-yaxistooltip){border-color:var(--mXZkqc)!important;background:var(--grc-chart-tooltip-bg)!important;color:var(--bbQxAb)!important}

/* Consistent dark-theme hover feedback for interactive workspace surfaces. */
html[data-color-scheme="dark"] :is(.ant-card,.panel,.role-panel,.metric-card,.feature-modal){transition:border-color .16s ease,background-color .16s ease,box-shadow .16s ease,transform .16s ease}
html[data-color-scheme="dark"] :is(.ant-card,.panel,.role-panel,.metric-card):hover{border-color:var(--JclFj)!important;background:color-mix(in srgb,var(--xhUGwc) 94%,var(--primary))!important;box-shadow:0 8px 22px rgba(0,0,0,.28)}
html[data-color-scheme="dark"] :is(.ant-card,.panel,.role-panel,.metric-card):has(a:hover,button:hover,.ant-btn:hover):hover{transform:translateY(-1px)}

html[data-color-scheme="dark"] .ant-table-tbody>tr>td{transition:background-color .15s ease,border-color .15s ease,color .15s ease}
html[data-color-scheme="dark"] .ant-table-tbody>tr:hover>td{border-color:var(--JclFj)!important;background:var(--XKMDxc)!important;color:var(--EpFNW)!important}
html[data-color-scheme="dark"] .ant-table-tbody>tr:hover :is(a,.ant-btn-link){color:var(--grc-sidebar-link)!important}

html[data-color-scheme="dark"] :is(.ant-dropdown-menu-item,.ant-select-item,.ant-menu-item,.ant-tabs-tab,.ant-pagination-item,.theme-switcher-option){transition:background-color .15s ease,color .15s ease,border-color .15s ease}
html[data-color-scheme="dark"] :is(.ant-dropdown-menu-item,.ant-select-item-option,.theme-switcher-option):hover{background:var(--XKMDxc)!important;color:var(--EpFNW)!important}
html[data-color-scheme="dark"] :is(.ant-tabs-tab,.ant-pagination-item):hover{border-color:var(--primary)!important;color:var(--rrJJUc)!important}
html[data-color-scheme="dark"] :is(.ant-collapse-header,.ant-list-item-action a,.ant-descriptions-item-label){transition:background-color .15s ease,color .15s ease}
html[data-color-scheme="dark"] .ant-collapse-header:hover{background:var(--XKMDxc);color:var(--EpFNW)!important}

html[data-color-scheme="dark"] :is(.ant-btn-default,.ant-btn-dashed,.sidebar-toggle,.header-action-icon,.header-sign-out){transition:border-color .15s ease,background-color .15s ease,color .15s ease,box-shadow .15s ease,transform .15s ease}
html[data-color-scheme="dark"] :is(.ant-btn-default,.ant-btn-dashed,.sidebar-toggle,.header-action-icon,.header-sign-out):hover{border-color:var(--primary)!important;background:var(--XKMDxc)!important;color:var(--rrJJUc)!important;box-shadow:0 0 0 2px rgba(51,110,243,.16)}
html[data-color-scheme="dark"] :is(.ant-btn,.sidebar-toggle,.header-action-icon,.header-sign-out):active{transform:translateY(1px)}

html[data-color-scheme="dark"] :is(.apexcharts-canvas,.ant-chart-host){border-radius:8px;transition:background-color .16s ease,box-shadow .16s ease}
html[data-color-scheme="dark"] :is(.apexcharts-canvas,.ant-chart-host):hover{background:color-mix(in srgb,var(--grc-chart-canvas) 92%,var(--primary))!important;box-shadow:inset 0 0 0 1px var(--JclFj)}
html[data-color-scheme="dark"] .apexcharts-series{transition:opacity .16s ease,filter .16s ease}
html[data-color-scheme="dark"] .apexcharts-canvas:hover .apexcharts-series{opacity:.76}
html[data-color-scheme="dark"] .apexcharts-canvas:hover .apexcharts-series:hover{opacity:1;filter:brightness(1.12)}
html[data-color-scheme="dark"] .apexcharts-legend-series{border-radius:5px;padding:3px 5px;transition:background-color .15s ease}
html[data-color-scheme="dark"] .apexcharts-legend-series:hover{background:var(--XKMDxc)}

@media(prefers-reduced-motion:reduce){html[data-color-scheme="dark"] :is(.ant-card,.panel,.role-panel,.metric-card,.ant-table-tbody>tr>td,.ant-btn,.nav-entry,.apexcharts-series,.apexcharts-canvas){transition:none!important;transform:none!important}}

/* Viewport-fixed application header across desktop, tablet and mobile. */
.app-shell{--app-header-height:68px}
.app-main{padding-top:var(--app-header-height)}
.app-header{
    position:fixed!important;
    inset-block-start:0;
    inset-inline:264px 0;
    z-index:900;
    width:auto;
    height:var(--app-header-height);
    min-height:var(--app-header-height);
    box-shadow:0 3px 12px rgba(15,35,65,.06);
}
.app-shell.sidebar-collapsed .app-header{inset-inline-start:76px}

@media(max-width:1023px){
    .app-shell{--app-header-height:64px}
    .app-header,.app-shell.sidebar-collapsed .app-header{inset-inline:0;flex-wrap:nowrap}
}

@media(max-width:575px){
    .app-shell{--app-header-height:56px}
    .app-header{padding-block:6px}
}
.copilot-attachments { display: grid; gap: .65rem; margin-top: .75rem; }
.copilot-attachment { overflow: hidden; border: 1px solid #dbe5f1; border-radius: 10px; background: #fff; }
.copilot-attachment img { display: block; width: 100%; height: auto; max-height: 320px; object-fit: contain; background: #f8fafc; }
.copilot-attachment .ant-image { display: block; width: 100%; cursor: zoom-in; background: #f8fafc; }
.copilot-attachment .ant-image-img { display: block; width: 100%; height: auto; max-height: 320px; object-fit: contain; }
.copilot-image-hint { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 10px; border-top: 1px solid #edf1f5; color: #667085; font-size: 12px; }
.copilot-attachment a { display: flex; align-items: center; gap: .45rem; padding: .65rem .8rem; color: #1677ff; font-weight: 600; text-decoration: none; }
.copilot-attachment a:hover { background: #f0f7ff; }
.incident-report-table .ant-table-cell { vertical-align: top; }
.incident-message-card { min-width: 300px; max-width: 520px; padding: 11px 12px; border: 1px solid #e3eaf3; border-radius: 10px; background: linear-gradient(145deg,#fff 0%,#f8fbff 100%); box-shadow: 0 3px 10px rgba(15,43,76,.05); }
.incident-message-heading { display: flex; align-items: flex-start; gap: 8px; color: #1f2f46; line-height: 1.4; }
.incident-message-heading .anticon { flex: 0 0 auto; margin-top: 3px; color: #fa8c16; }
.incident-message-fields { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.incident-message-fields span { display: inline-flex; max-width: 100%; gap: 5px; padding: 4px 7px; border-radius: 6px; background: #edf5ff; color: #40536d; font-size: 11px; overflow-wrap: anywhere; }
.incident-message-fields b { color: #1677ff; }
.incident-detail-button { height: auto; margin-top: 8px; padding: 5px 0 0; border-top: 1px solid #e6edf5; border-radius: 0; font-weight: 600; }
.incident-captured { display: grid; grid-template-columns: auto 1fr; gap: 2px 7px; align-items: center; white-space: nowrap; }
.incident-captured .anticon { grid-row: 1 / 3; color: #1677ff; }
.incident-captured span { color: #7b8798; font-size: 11px; }
.incident-modal-hero { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 14px; align-items: start; margin-bottom: 18px; padding: 16px; border: 1px solid #d9e7f7; border-radius: 12px; background: linear-gradient(135deg,#f3f8ff,#fff); }
.incident-modal-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 12px; background: #fff1f0; color: #cf1322; font-size: 22px; }
.incident-modal-hero span { color: #1677ff; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.incident-modal-hero h3 { margin: 3px 0 4px; color: #172b4d; font-size: 18px; line-height: 1.4; }
.incident-modal-hero p { margin: 0; color: #667085; }
.incident-modal-summary { margin-bottom: 20px; }
.incident-modal-section-title { display: flex; gap: 9px; align-items: center; margin: 18px 0 10px; color: #172b4d; }
.incident-modal-section-title > .anticon { color: #1677ff; font-size: 18px; }
.incident-modal-section-title strong,.incident-modal-section-title span { display: block; }
.incident-modal-section-title span { margin-top: 2px; color: #7b8798; font-size: 11px; font-weight: 400; }
.incident-modal-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.incident-modal-fields article { min-width: 0; padding: 10px 12px; border: 1px solid #e1e9f3; border-left: 3px solid #1677ff; border-radius: 8px; background: #fbfdff; }
.incident-modal-fields span { display: block; margin-bottom: 4px; color: #1677ff; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.incident-modal-fields strong { display: block; color: #243b5a; font: 600 12px/1.5 Consolas,monospace; overflow-wrap: anywhere; }
.incident-modal-raw { max-height: 280px; margin: 0; padding: 14px 16px; overflow: auto; border-radius: 9px; background: #101828; color: #e6edf7; font: 12px/1.65 Consolas,monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 575px) {
    .incident-detail-modal { padding: 0 !important; overflow: hidden; }
    .incident-detail-modal .ant-modal {
        top: 6px !important;
        width: calc(100vw - 12px) !important;
        max-width: calc(100vw - 12px) !important;
        margin: 0 auto !important;
        padding: 0 !important;
    }
    .incident-detail-modal .ant-modal-content {
        display: flex;
        max-height: calc(100dvh - 12px) !important;
        overflow: hidden;
        flex-direction: column;
    }
    .incident-detail-modal .ant-modal-header { flex: 0 0 auto; padding: 14px 16px; }
    .incident-detail-modal .ant-modal-body {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none !important;
        padding: 12px !important;
        overflow-x: hidden;
        overflow-y: auto;
    }
    .incident-modal-hero {
        grid-template-columns: 38px minmax(0,1fr);
        gap: 10px;
        margin-bottom: 12px;
        padding: 11px;
    }
    .incident-modal-icon { width: 38px; height: 38px; }
    .incident-modal-hero h3 { font-size: 15px; overflow-wrap: anywhere; }
    .incident-modal-hero p { font-size: 12px; line-height: 1.45; }
    .incident-modal-summary { width: 100%; margin-bottom: 14px; overflow: hidden; }
    .incident-modal-summary .ant-descriptions-view,
    .incident-modal-summary table,
    .incident-modal-summary tbody { display: block; width: 100%; }
    .incident-modal-summary tr {
        display: grid;
        width: 100%;
        grid-template-columns: 92px minmax(0,1fr);
    }
    .incident-modal-summary .ant-descriptions-item-label,
    .incident-modal-summary .ant-descriptions-item-content {
        display: block;
        width: auto !important;
        min-width: 0;
        padding: 9px 10px !important;
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .incident-modal-summary .ant-descriptions-item-label { font-size: 12px; }
    .incident-modal-summary .ant-descriptions-item-content { font-size: 12px; }
    .incident-modal-section-title { align-items: flex-start; margin: 14px 0 8px; }
    .incident-modal-section-title div { min-width: 0; }
    .incident-modal-section-title span { line-height: 1.4; }
    .incident-modal-fields { grid-template-columns: 1fr; }
    .incident-modal-raw { max-height: 220px; padding: 11px; font-size: 11px; }
}

.incident-signal-message { display: flex; min-width: 280px; flex-direction: column; align-items: flex-start; gap: 4px; line-height: 1.5; }
.incident-signal-message .ant-btn { height: auto; padding: 2px 0; font-weight: 600; }
.signal-detail-hero { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 14px; align-items: start; margin-bottom: 18px; padding: 16px; border: 1px solid #f3dfb2; border-radius: 12px; background: linear-gradient(135deg,#fff9eb,#fff); }
.signal-detail-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 12px; background: #fff1f0; color: #cf1322; font-size: 21px; }
.signal-detail-hero span { color: #d46b08; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.signal-detail-hero h3 { margin: 3px 0 4px; color: #172b4d; font-size: 18px; line-height: 1.4; }
.signal-detail-hero p { margin: 0; color: #667085; }
.signal-detail-summary { width: 100%; margin-bottom: 18px; overflow: hidden; }
.signal-detail-summary .ant-descriptions-item-content { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.signal-message-heading { display: flex; gap: 9px; align-items: center; margin: 18px 0 10px; color: #172b4d; }
.signal-message-heading > .anticon { color: #1677ff; font-size: 18px; }
.signal-message-heading strong,.signal-message-heading span { display: block; }
.signal-message-heading span { margin-top: 2px; color: #7b8798; font-size: 11px; font-weight: 400; }
.signal-message-panel { padding: 16px; border: 1px solid #dce7f5; border-left: 4px solid #1677ff; border-radius: 9px; background: #f8fbff; color: #243b5a; font: 13px/1.7 Consolas,monospace; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.incident-collected-date { display: grid; gap: 2px; min-width: 112px; white-space: nowrap; }
.incident-collected-date strong { color: #243b5a; font-weight: 600; }
.incident-collected-date span { color: #7b8798; font-size: 11px; }

@media (max-width: 991px) {
    .incident-signal-detail-modal { padding: 0 !important; overflow: hidden; }
    .incident-signal-detail-modal .ant-modal { top: 12px !important; width: calc(100vw - 24px) !important; max-width: 760px !important; margin: 0 auto !important; padding: 0 !important; }
    .incident-signal-detail-modal .ant-modal-content { display: flex; max-height: calc(100dvh - 24px) !important; overflow: hidden; flex-direction: column; }
    .incident-signal-detail-modal .ant-modal-header { flex: 0 0 auto; }
    .incident-signal-detail-modal .ant-modal-body { flex: 1 1 auto; min-height: 0; max-height: none !important; overflow-x: hidden; overflow-y: auto; }
}

@media (max-width: 575px) {
    .incident-signal-detail-modal .ant-modal { top: 6px !important; width: calc(100vw - 12px) !important; max-width: calc(100vw - 12px) !important; }
    .incident-signal-detail-modal .ant-modal-content { max-height: calc(100dvh - 12px) !important; }
    .incident-signal-detail-modal .ant-modal-header { padding: 14px 16px; }
    .incident-signal-detail-modal .ant-modal-body { padding: 12px !important; }
    .signal-detail-hero { grid-template-columns: 38px minmax(0,1fr); gap: 10px; margin-bottom: 12px; padding: 11px; }
    .signal-detail-icon { width: 38px; height: 38px; }
    .signal-detail-hero h3 { font-size: 15px; overflow-wrap: anywhere; }
    .signal-detail-hero p { font-size: 12px; line-height: 1.45; }
    .signal-detail-summary .ant-descriptions-view,.signal-detail-summary table,.signal-detail-summary tbody { display: block; width: 100%; }
    .signal-detail-summary tr { display: grid; width: 100%; grid-template-columns: 92px minmax(0,1fr); }
    .signal-detail-summary .ant-descriptions-item-label,.signal-detail-summary .ant-descriptions-item-content { display: block; width: auto !important; min-width: 0; padding: 9px 10px !important; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
    .signal-message-panel { padding: 12px; font-size: 11px; line-height: 1.65; }
}

/* Keep the Copilot overlay inside the visual viewport. These rules intentionally
   appear after the shared drawer constraints so mobile sizing cannot be overridden. */
.copilot-shell-drawer,.copilot-shell-drawer * { box-sizing: border-box; }
.copilot-shell-drawer .ant-drawer-content-wrapper,
.copilot-shell-drawer .ant-drawer-content,
.copilot-shell-drawer .ant-drawer-wrapper-body,
.copilot-shell-drawer .ant-drawer-body,
.copilot-drawer { min-width: 0; max-width: 100%; }
.copilot-context span,.copilot-model-picker label,.copilot-message,.copilot-result,.copilot-attachment { min-width: 0; }
.copilot-context span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 767px) {
    html:has(.copilot-shell-drawer.ant-drawer-open),
    body:has(.copilot-shell-drawer.ant-drawer-open) { width: 100%; max-width: 100%; overflow: hidden; }
    .copilot-shell-drawer { position: fixed !important; inset: 0 !important; width: 100% !important; height: auto !important; max-width: 100% !important; overflow: hidden !important; }
    .copilot-shell-drawer .ant-drawer-content-wrapper { top: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important; width: 100% !important; height: auto !important; max-width: 100% !important; max-height: none !important; }
    .copilot-shell-drawer .ant-drawer-content,
    .copilot-shell-drawer .ant-drawer-wrapper-body { width: 100% !important; height: 100% !important; max-height: none !important; overflow: hidden; }
    .copilot-shell-drawer .ant-drawer-body { position: relative; width: 100%; max-height: none !important; overflow: hidden !important; }
    .copilot-drawer { width: 100%; height: 100%; max-height: 100%; padding-bottom: 78px; overflow: hidden; }
    .copilot-messages { flex: 1 1 0; max-height: calc(100% - 78px); margin-bottom: 6px; }
    .copilot-model-picker,.copilot-quick-actions,.copilot-composer { width: 100%; min-width: 0; }
    .copilot-model-picker select,.copilot-composer textarea,.copilot-composer .ant-btn { width: 100%; max-width: 100%; }
    .copilot-composer { position: absolute; z-index: 2; right: 24px; bottom: max(40px, env(safe-area-inset-bottom)); left: 24px; width: auto; grid-template-columns: minmax(0, 1fr) 72px; gap: 7px; align-items: stretch; padding: 7px 0 0; }
    .copilot-composer textarea { height: 44px !important; min-height: 44px !important; max-height: 44px !important; padding: 9px 10px; resize: none; font-size: 13px; }
    .copilot-composer .ant-btn { width: 72px; height: 44px; padding-inline: 5px; font-size: 12px; }
    .copilot-quick-actions .ant-btn > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .copilot-table-wrap,.copilot-markdown-table-wrap,.copilot-markdown pre { width: 100%; max-width: 100%; }
    .ant-drawer.ant-drawer-open:is(.ant-drawer-left, .ant-drawer-right).copilot-shell-drawer {
        top: 0 !important;
        right: 0 !important;
        bottom: auto !important;
        left: 0 !important;
        height: 92svh !important;
        min-height: 0 !important;
        max-height: 92svh !important;
    }
    .ant-drawer.ant-drawer-open:is(.ant-drawer-left, .ant-drawer-right).copilot-shell-drawer > .ant-drawer-content-wrapper,
    .ant-drawer.ant-drawer-open:is(.ant-drawer-left, .ant-drawer-right).copilot-shell-drawer .ant-drawer-content,
    .ant-drawer.ant-drawer-open:is(.ant-drawer-left, .ant-drawer-right).copilot-shell-drawer .ant-drawer-wrapper-body {
        height: 100% !important;
        min-height: 0 !important;
        max-height: 100% !important;
    }
    .ant-drawer.ant-drawer-open:is(.ant-drawer-left, .ant-drawer-right).copilot-shell-drawer .ant-drawer-body {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
    }
    .copilot-shell-drawer .copilot-messages {
        flex: 1 1 0;
        height: auto;
        min-height: 60px;
        max-height: 24svh;
        overflow-y: auto;
    }
    .copilot-shell-drawer .ant-select-dropdown {
        right: auto;
        max-width: calc(100vw - 28px) !important;
        max-height: min(280px, 42svh);
        overflow: hidden;
    }
    .copilot-shell-drawer .ant-select-dropdown .rc-virtual-list-holder,
    .copilot-shell-drawer .ant-select-dropdown-menu { max-height: min(240px, 36svh) !important; overflow-y: auto !important; }
}

@supports not (height: 100svh) {
    @media (max-width: 767px) {
        .ant-drawer.ant-drawer-open:is(.ant-drawer-left, .ant-drawer-right).copilot-shell-drawer { height: 92vh !important; max-height: 92vh !important; }
        .copilot-shell-drawer .copilot-messages { max-height: 24vh; }
    }
}

/* Copilot workspace refresh */
.copilot-shell-drawer .ant-drawer-content-wrapper { width: min(760px,100vw) !important; }
.copilot-shell-drawer .ant-drawer-wrapper-body { position: relative; }
.copilot-shell-drawer .ant-drawer-header { position: absolute; z-index: 5; top: 0; inset-inline-end: 0; width: 58px; min-height: 74px; padding: 16px 14px; border: 0; background: transparent; }
.copilot-shell-drawer .ant-drawer-title { display: none; }
.copilot-shell-drawer .ant-drawer-body { padding: 0 22px 16px; background: linear-gradient(180deg,#fff 0%,#fcfdff 100%); }
.copilot-drawer { position: relative; gap: 0; padding: 0 !important; }
.copilot-topbar { display: flex; min-width: 0; height: 74px; flex: 0 0 74px; align-items: center; gap: 11px; padding-inline-end: 48px; border-bottom: 1px solid #e8eef7; }
.copilot-topbar > strong { flex: 0 0 auto; color: #14213a; font-size: 19px; }
.copilot-brand-mark { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 50%; background: #eef5ff; color: #1677ff; font-size: 23px; }
.copilot-context { width: auto; max-width: 260px; margin-inline-start: 8px; padding: 7px 12px; border: 1px solid #d9e4f2; border-radius: 8px; background: #fff; color: #263b5c; font-weight: 600; }
.copilot-context .anticon { color: #1677ff; }
.copilot-messages { padding: 18px 6px 10px; scrollbar-gutter: stable; }
.copilot-welcome { width: 100%; max-width: 600px; margin: auto; gap: 0; color: #63728c; }
.copilot-welcome-mark { position: relative; display: grid; width: 76px; height: 76px; margin-bottom: 18px; place-items: center; border: 1px solid #dbe8fb; border-radius: 50%; background: radial-gradient(circle at 50% 42%,#fff 0%,#edf5ff 100%); color: #1677ff; box-shadow: 0 12px 28px rgba(22,119,255,.10); font-size: 38px; }
.copilot-welcome-mark::before,.copilot-welcome-mark::after { position: absolute; color: #91bfff; content: "✦"; font-size: 16px; }
.copilot-welcome-mark::before { left: -22px; top: 23px; }
.copilot-welcome-mark::after { right: -23px; top: 12px; }
.copilot-welcome h2 { margin: 0 0 7px; color: #14213a; font-size: 23px; line-height: 1.3; }
.copilot-welcome p { margin: 0; font-size: 14px; }
.copilot-quick-actions { justify-content: center; gap: 8px; margin-top: 28px; }
.copilot-quick-actions .ant-btn { display: inline-flex; height: 38px; padding-inline: 15px; align-items: center; justify-content: center; gap: 8px; border-color: #d8e2f0; border-radius: 8px; color: #182842; line-height: 1; box-shadow: 0 2px 5px rgba(15,43,76,.03); }
.copilot-quick-actions .ant-btn > .anticon { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; margin: 0; line-height: 1; }
.copilot-quick-actions .ant-btn > .anticon + span { display: inline-flex; min-width: 0; align-items: center; margin-inline-start: 0; line-height: 1.2; }
.copilot-composer-shell { flex: 0 0 auto; padding: 10px; border: 1px solid #dbe4f0; border-radius: 20px; background: #fff; box-shadow: 0 10px 28px rgba(15,43,76,.09); }
.copilot-composer { position: static !important; display: grid; width: 100% !important; grid-template-columns: 38px minmax(0,1fr) 42px !important; gap: 8px; align-items: center; padding: 0 !important; border: 0; background: transparent; }
.copilot-add-button { display: grid; width: 36px; height: 36px; cursor: pointer; place-items: center; border-radius: 50%; background: #f7f9fc; color: #182842; font-size: 17px; transition: background .18s ease,color .18s ease; }
.copilot-add-button:hover { background: #eaf3ff; color: #1677ff; }
.copilot-add-button input[type=file] { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.copilot-selected-file { display: grid; min-width: 0; grid-template-columns: auto minmax(0,1fr) auto auto; gap: 7px; align-items: center; margin: 7px 2px 2px; padding: 7px 8px 7px 10px; border: 1px solid #cfe0f7; border-radius: 9px; background: #f4f9ff; color: #24466f; }
.copilot-selected-file > .anticon { color: #1677ff; }
.copilot-selected-file > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; }
.copilot-selected-file > small { color: #748198; white-space: nowrap; font-size: 10px; }
.copilot-selected-file .ant-btn { width: 24px; min-width: 24px; height: 24px; padding: 0; }
.copilot-composer textarea { width: 100%; height: 42px !important; min-height: 42px !important; max-height: 112px !important; padding: 10px 4px !important; resize: none; border: 0 !important; background: transparent !important; box-shadow: none !important; font-size: 14px; line-height: 22px; }
.copilot-composer .copilot-send-button { width: 42px !important; min-width: 42px; height: 42px !important; padding: 0 !important; box-shadow: 0 7px 16px rgba(22,119,255,.25); }
.copilot-model-picker { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid #edf1f6; }
.copilot-model-picker label { display: grid; width: min(280px,42%); grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 7px; color: #53627a; }
.copilot-model-picker label:last-child { width: min(380px,58%); }
.copilot-model-picker label > span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 11px; font-weight: 700; }
.copilot-model-picker .ant-select { width: 100%; }
.copilot-model-picker .ant-select-selector { min-width: 0; }
.copilot-model-picker .ant-select-selector { border-color: #dbe4f0 !important; border-radius: 8px !important; }
.copilot-model-status { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2fc66d; box-shadow: 0 0 0 3px #e7f8ee; }
.copilot-privacy { flex: 0 0 auto; padding: 12px 8px 0; color: #748198; text-align: center; font-size: 11px; }
.copilot-privacy .anticon { margin-inline-end: 6px; }

@media (max-width: 991px) {
    .copilot-shell-drawer .ant-drawer-content-wrapper { width: min(680px,100vw) !important; }
    .copilot-welcome h2 { font-size: 21px; }
    .copilot-quick-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: min(410px,100%); }
}

@media (max-width: 767px) {
    .copilot-shell-drawer .ant-drawer-header { width: 48px; min-height: 64px; padding: 12px 10px; }
    .copilot-shell-drawer .ant-drawer-body { padding: 0 12px max(8px,env(safe-area-inset-bottom)); }
    .copilot-topbar { height: 64px; flex-basis: 64px; gap: 7px; padding-inline-end: 38px; }
    .copilot-brand-mark { width: 32px; height: 32px; flex-basis: 32px; font-size: 19px; }
    .copilot-topbar > strong { font-size: 16px; }
    .copilot-context { max-width: 150px; margin-inline-start: 2px; padding: 5px 8px; font-size: 11px; }
    .copilot-shell-drawer .copilot-messages { flex: 1 1 0; min-height: 70px; max-height: none; margin: 0; padding: 10px 3px 7px; }
    .copilot-welcome-mark { width: 60px; height: 60px; margin-bottom: 13px; font-size: 29px; }
    .copilot-welcome h2 { margin-bottom: 5px; font-size: 18px; }
    .copilot-welcome p { max-width: 310px; font-size: 12px; line-height: 1.5; }
    .copilot-quick-actions { margin-top: 18px; gap: 6px; }
    .copilot-quick-actions .ant-btn { height: 34px; padding-inline: 8px; font-size: 12px; }
    .copilot-composer-shell { padding: 7px; border-radius: 15px; }
    .copilot-composer { right: auto !important; bottom: auto !important; left: auto !important; grid-template-columns: 32px minmax(0,1fr) 38px !important; gap: 5px; }
    .copilot-add-button { width: 30px; height: 30px; }
    .copilot-composer textarea { height: 38px !important; min-height: 38px !important; padding: 8px 3px !important; font-size: 12px; }
    .copilot-composer .copilot-send-button { width: 38px !important; min-width: 38px; height: 38px !important; }
    .copilot-model-picker { display: grid; grid-template-columns: 1fr 1.25fr; gap: 6px; margin-top: 5px; padding-top: 6px; }
    .copilot-model-picker label { display: block; width: 100%; }
    .copilot-model-picker label > span { margin-bottom: 3px; font-size: 9px; }
    .copilot-model-picker .ant-select-selector { height: 30px !important; }
    .copilot-model-picker .ant-select-selection-item { line-height: 28px !important; font-size: 11px; }
    .copilot-privacy { padding-top: 6px; font-size: 9px; }
}

@media (max-width: 420px) {
    .copilot-topbar > strong { font-size: 14px; }
    .copilot-context { max-width: 112px; }
    .copilot-context .anticon { display: none; }
    .copilot-quick-actions { width: 100%; }
}

@media (max-height: 650px) and (max-width: 767px) {
    .copilot-welcome-mark { width: 48px; height: 48px; margin-bottom: 8px; font-size: 24px; }
    .copilot-welcome h2 { font-size: 16px; }
    .copilot-quick-actions { margin-top: 10px; }
    .copilot-privacy { display: none; }
}

/* ==========================================================================
   RTL (Right-to-Left) Localization Styles for Arabic (ar)
   ========================================================================== */
html[dir="rtl"],
body[dir="rtl"],
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

/* Direction mirrors the grid and flex rows; logical insets reserve the sidebar space. */
[dir="rtl"] .app-sidebar {
    border-inline-end: 1px solid var(--cg-border);
}

[dir="rtl"] .nav-entry {
    text-align: right;
    flex-direction: row;
}

[dir="rtl"] .nav-entry .nav-title {
    margin-right: 10px;
    margin-left: auto;
    text-align: right;
}

[dir="rtl"] .nav-entry .nav-badge {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .nav-section-title {
    text-align: right;
    padding-right: 16px;
    padding-left: 0;
}

[dir="rtl"] .page-header-title,
[dir="rtl"] .dashboard-title,
[dir="rtl"] .panel-header,
[dir="rtl"] .card-title,
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6 {
    text-align: right;
}

[dir="rtl"] .ant-table-wrapper th,
[dir="rtl"] .ant-table-wrapper td {
    text-align: right !important;
}

[dir="rtl"] .ant-form-item-label {
    text-align: right !important;
}

[dir="rtl"] .ant-input-search .ant-input-search-button {
    border-radius: 6px 0 0 6px !important;
}

@media (max-width: 1023px) {
    [dir="rtl"] .app-sidebar {
        transform: translateX(100%);
        box-shadow: -12px 0 32px rgba(2, 12, 27, .25);
    }

    [dir="rtl"] .sidebar-collapsed .app-sidebar {
        transform: translateX(0);
    }
}
:root {
    --risk-critical: #ef3340;
    --risk-failed: #ef3340;
    --risk-partial: #f97316;
    --risk-high: #f97316;
    --risk-medium: #f59e0b;
    --risk-low: #16a34a;
}

/* Theme-complete Ant Design overlays and forms. Popup controls are rendered in
   #app-overlay-root, outside page-scoped CSS, so they must be themed globally. */
html[data-color-scheme="dark"] #app-overlay-root :is(.ant-picker-dropdown,.ant-select-dropdown,.ant-dropdown,.ant-popover),
html[data-color-scheme="dark"] :is(.ant-modal-wrap,.ant-drawer),
html[data-color-scheme="dark"] #app-overlay-root :is(.ant-picker-panel-container,.ant-picker-panel,.ant-picker-date-panel,.ant-picker-time-panel,.ant-select-dropdown,.ant-dropdown-menu),
html[data-color-scheme="dark"] :is(.ant-modal-content,.ant-modal-header,.ant-modal-body,.ant-modal-footer) {
    border-color: var(--mXZkqc) !important;
    background: var(--grc-modal-bg) !important;
    color: var(--bbQxAb) !important;
}
html[data-color-scheme="dark"] #app-overlay-root :is(.ant-picker-header,.ant-picker-body,.ant-picker-content,thead,tbody,tr,th,td),
html[data-color-scheme="dark"] #app-overlay-root .ant-picker-panel table {
    border-color: var(--mXZkqc) !important;
    background: transparent !important;
    color: var(--bbQxAb) !important;
}
html[data-color-scheme="dark"] #app-overlay-root :is(.ant-picker-header button,.ant-picker-content th,.ant-picker-cell,.ant-picker-cell-inner,.ant-picker-range-arrow),
html[data-color-scheme="dark"] :is(.ant-modal-title,.ant-modal-close-x,.ant-form-item-label>label,.ant-form-item-extra,.ant-form-item-explain) {
    color: var(--bbQxAb) !important;
}
html[data-color-scheme="dark"] #app-overlay-root .ant-picker-cell:not(.ant-picker-cell-in-view) {
    color: var(--disabled-foreground) !important;
}
html[data-color-scheme="dark"] #app-overlay-root .ant-picker-cell-in-view.ant-picker-cell-in-range::before,
html[data-color-scheme="dark"] #app-overlay-root .ant-picker-cell-in-view.ant-picker-cell-range-start:not(.ant-picker-cell-range-start-single)::before,
html[data-color-scheme="dark"] #app-overlay-root .ant-picker-cell-in-view.ant-picker-cell-range-end:not(.ant-picker-cell-range-end-single)::before {
    background: color-mix(in srgb,var(--primary) 22%,var(--ZEpPmd)) !important;
}
html[data-color-scheme="dark"] #app-overlay-root .ant-picker-cell::before,
html[data-color-scheme="dark"] #app-overlay-root .ant-picker-cell-inner {
    border-color: transparent !important;
}
html[data-color-scheme="dark"] #app-overlay-root .ant-picker-cell:not(.ant-picker-cell-in-range):not(.ant-picker-cell-selected)::before,
html[data-color-scheme="dark"] #app-overlay-root .ant-picker-cell:not(.ant-picker-cell-in-range):not(.ant-picker-cell-selected) .ant-picker-cell-inner {
    background: transparent !important;
}
html[data-color-scheme="dark"] #app-overlay-root .ant-picker-cell:hover:not(.ant-picker-cell-selected) .ant-picker-cell-inner,
html[data-color-scheme="dark"] #app-overlay-root .ant-picker-cell-range-hover .ant-picker-cell-inner {
    background: var(--XKMDxc) !important;
}
html[data-color-scheme="dark"] #app-overlay-root .ant-picker-cell-in-view:is(.ant-picker-cell-selected,.ant-picker-cell-range-start,.ant-picker-cell-range-end) .ant-picker-cell-inner {
    background: var(--primary) !important;
    color: #fff !important;
}
html[data-color-scheme="dark"] :is(.ant-picker-input>input,.ant-input-number-input,.ant-select-selection-item,.ant-select-selection-search-input,.ant-radio-wrapper,.ant-checkbox-wrapper) {
    color: var(--bbQxAb) !important;
}
html[data-color-scheme="dark"] :is(.ant-picker-range-separator,.ant-picker-clear,.ant-select-clear,.ant-form-item-required::before) {
    color: var(--IXoxUe) !important;
}
html[data-color-scheme="dark"] :is(.auth-field select,.user-form-grid select,.user-table select) option,
html[data-color-scheme="dark"] :is(.auth-field select,.user-form-grid select,.user-table select) optgroup {
    background: var(--grc-dropdown-bg) !important;
    color: var(--bbQxAb) !important;
}
html[data-color-scheme="dark"] :is(.auth-field select,.user-form-grid select,.user-table select) option:checked {
    background: var(--primary) !important;
    color: #fff !important;
}
html[data-color-scheme="dark"] :is(.ant-upload,.ant-upload-drag,.ant-upload-list-item,.ant-form,.ant-form-item-control-input-content) {
    border-color: var(--mXZkqc) !important;
    background-color: transparent !important;
    color: var(--bbQxAb) !important;
}
html[data-color-scheme="dark"] .export-format-list,
html[data-color-scheme="dark"] .export-format-option {
    border-color: var(--mXZkqc) !important;
    background: var(--grc-dropdown-bg) !important;
    color: var(--bbQxAb) !important;
}
html[data-color-scheme="dark"] .export-format-option:hover,
html[data-color-scheme="dark"] .export-format-option:focus-visible {
    border-color: var(--primary) !important;
    background: var(--XKMDxc) !important;
    color: var(--rrJJUc) !important;
}

html[data-color-scheme="light"] .report-workspace :is(.ant-card,.report-control-card,.report-shortcuts,.report-detail-panel),
html[data-color-scheme="light"] :is(.ant-modal-content,.ant-modal-header,.ant-modal-body,.ant-modal-footer) {
    border-color: var(--cg-border);
    background: var(--cg-surface);
    color: var(--cg-navy);
}

/* Incident signal detail modal */
html[data-color-scheme="dark"] .incident-signal-detail-modal :is(.ant-modal-content,.ant-modal-header,.ant-modal-body) {
    border-color: var(--mXZkqc) !important;
    background: var(--grc-modal-bg) !important;
    color: var(--bbQxAb) !important;
}

/* Evidence review is rendered in Ant Design's overlay root, outside component-scoped CSS. */
html[data-color-scheme="dark"] .evidence-review-modal :is(.ant-modal-content,.ant-modal-header,.ant-modal-body) {
    border-color: var(--cg-border) !important;
    background: var(--grc-modal-bg) !important;
    color: var(--ant-text-color) !important;
}
html[data-color-scheme="dark"] .evidence-review-modal :is(.review-summary,.review-section,.checklist-grid label,.decision-grid label) {
    border-color: var(--cg-border) !important;
    background: var(--cg-surface) !important;
    color: var(--ant-text-color) !important;
    box-shadow: none;
}
html[data-color-scheme="dark"] .evidence-review-modal .review-section-heading {
    border-color: var(--cg-border) !important;
    background: var(--cg-surface-muted) !important;
}
html[data-color-scheme="dark"] .evidence-review-modal :is(.summary-primary strong,.summary-context strong,.review-section-heading h3,.checklist-grid label,.decision-grid label) {
    color: var(--ant-text-color) !important;
}
html[data-color-scheme="dark"] .evidence-review-modal :is(.review-eyebrow,.summary-status>span,.summary-primary small,.summary-context small,.review-section-heading p,.comment-field small,.review-actions>span) {
    color: var(--cg-muted) !important;
}
html[data-color-scheme="dark"] .evidence-review-modal :is(.ant-select-selector,.ant-input,textarea.ant-input) {
    border-color: var(--cg-border) !important;
    background: var(--cg-surface-muted) !important;
    color: var(--ant-text-color) !important;
}
html[data-color-scheme="dark"] .evidence-review-modal .review-actions {
    border-color: var(--cg-border) !important;
    background: color-mix(in srgb,var(--grc-modal-bg) 94%,transparent) !important;
}
html[data-color-scheme="dark"] .incident-signal-detail-modal .signal-detail-hero {
    border-color: color-mix(in srgb,#f59e0b 38%,var(--mXZkqc));
    background: linear-gradient(135deg,color-mix(in srgb,#f59e0b 11%,var(--xhUGwc)),var(--xhUGwc));
}
html[data-color-scheme="dark"] .incident-signal-detail-modal .signal-detail-icon {
    background: color-mix(in srgb,#ef3340 14%,var(--xhUGwc));
    color: #ff878f;
}
html[data-color-scheme="dark"] .incident-signal-detail-modal :is(.signal-detail-hero h3,.signal-message-heading,.signal-message-heading strong) {
    color: var(--EpFNW) !important;
}
html[data-color-scheme="dark"] .incident-signal-detail-modal :is(.signal-detail-hero p,.signal-message-heading span) {
    color: var(--IXoxUe) !important;
}
html[data-color-scheme="dark"] .incident-signal-detail-modal :is(.signal-detail-summary,.ant-descriptions-view,.ant-descriptions-row,.ant-descriptions-item-label,.ant-descriptions-item-content) {
    border-color: var(--mXZkqc) !important;
    background: var(--xhUGwc) !important;
    color: var(--bbQxAb) !important;
}
html[data-color-scheme="dark"] .incident-signal-detail-modal .ant-descriptions-item-label {
    background: var(--ZEpPmd) !important;
    color: var(--IXoxUe) !important;
}
html[data-color-scheme="dark"] .incident-signal-detail-modal .signal-message-panel {
    border-color: var(--mXZkqc);
    border-left-color: var(--primary);
    background: var(--ZEpPmd);
    color: var(--bbQxAb);
}

/* A fixed timeline/audit detail overlay must not inherit the card hover
   transform; transformed ancestors change the containing block and cause jump. */
html[data-color-scheme="dark"] .ant-card:has(.incident-description-backdrop),
html[data-color-scheme="dark"] .ant-card:has(.incident-description-backdrop):hover,
html[data-color-scheme="dark"] .ant-card:has(.incident-description-backdrop):has(a:hover,button:hover) {
    transform: none !important;
}
html[data-color-scheme="dark"] .incident-description-backdrop,
html[data-color-scheme="dark"] .incident-description-popup {
    animation: none !important;
    transform: none !important;
    transition: none !important;
}

/* GRC Copilot dark theme */
html[data-color-scheme="dark"] .copilot-shell-drawer .ant-drawer-content,
html[data-color-scheme="dark"] .copilot-shell-drawer .ant-drawer-wrapper-body,
html[data-color-scheme="dark"] .copilot-shell-drawer .ant-drawer-body {
    border-color: #374151 !important;
    background: #171b22 !important;
    color: #e5e7eb !important;
}
html[data-color-scheme="dark"] .copilot-shell-drawer .ant-drawer-close { color: #aeb8c8; }
html[data-color-scheme="dark"] .copilot-shell-drawer .ant-drawer-close:hover { background: #2a303a; color: #fff; }
html[data-color-scheme="dark"] .copilot-topbar { border-color: #343b47; }
html[data-color-scheme="dark"] .copilot-topbar > strong,
html[data-color-scheme="dark"] .copilot-welcome h2,
html[data-color-scheme="dark"] .copilot-message.assistant,
html[data-color-scheme="dark"] .copilot-markdown h2,
html[data-color-scheme="dark"] .copilot-markdown h3,
html[data-color-scheme="dark"] .copilot-markdown h4,
html[data-color-scheme="dark"] .copilot-markdown strong,
html[data-color-scheme="dark"] .copilot-markdown ol > li { color: #f3f4f6; }
html[data-color-scheme="dark"] .copilot-brand-mark,
html[data-color-scheme="dark"] .copilot-welcome-mark { border-color: #355077; background: radial-gradient(circle at 50% 42%,#263349 0%,#1d2c42 100%); color: #69b1ff; box-shadow: 0 12px 28px rgba(0,0,0,.25); }
html[data-color-scheme="dark"] .copilot-context { border-color: #3b4657; background: #222832; color: #dbe5f3; }
html[data-color-scheme="dark"] .copilot-welcome,
html[data-color-scheme="dark"] .copilot-privacy,
html[data-color-scheme="dark"] .copilot-thinking,
html[data-color-scheme="dark"] .copilot-stream-status,
html[data-color-scheme="dark"] .copilot-timeline-item time { color: #9ca7b8; }
html[data-color-scheme="dark"] .copilot-quick-actions .ant-btn { border-color: #3c4655; background: #222832; color: #e2e8f0; box-shadow: none; }
html[data-color-scheme="dark"] .copilot-quick-actions .ant-btn:hover { border-color: #4f8ee8; background: #26364d; color: #69b1ff; }
html[data-color-scheme="dark"] .copilot-message:not(.user) { color: #dce3ed; }
html[data-color-scheme="dark"] .copilot-message-actions,
html[data-color-scheme="dark"] .copilot-message-actions .ant-btn { color: #9ca7b8; }
html[data-color-scheme="dark"] .copilot-message-actions .ant-btn:hover { background: #26364d; color: #69b1ff; }
html[data-color-scheme="dark"] .copilot-markdown ul > li,
html[data-color-scheme="dark"] .copilot-markdown p { color: #d2d9e4; }
html[data-color-scheme="dark"] .copilot-markdown code { background: #29313d; color: #ff8a93; }
html[data-color-scheme="dark"] .copilot-markdown pre { border-color: #3b4657; background: #0f131a; }
html[data-color-scheme="dark"] .copilot-markdown blockquote { border-left-color: #4096ff; background: #202d40; color: #bdc9d9; }
html[data-color-scheme="dark"] .copilot-markdown-table-wrap,
html[data-color-scheme="dark"] .copilot-markdown th,
html[data-color-scheme="dark"] .copilot-markdown td,
html[data-color-scheme="dark"] .copilot-table th,
html[data-color-scheme="dark"] .copilot-table td { border-color: #3a424f; }
html[data-color-scheme="dark"] .copilot-markdown th { background: #252b34; color: #e2e8f0; }
html[data-color-scheme="dark"] .copilot-composer-shell { border-color: #3d4755; background: #20252d; box-shadow: 0 10px 28px rgba(0,0,0,.3); }
html[data-color-scheme="dark"] .copilot-composer { border-color: #343d49; background: transparent; }
html[data-color-scheme="dark"] .copilot-composer textarea,
html[data-color-scheme="dark"] .copilot-composer textarea::placeholder { color: #e5e7eb !important; }
html[data-color-scheme="dark"] .copilot-composer textarea::placeholder { color: #7f8b9d !important; }
html[data-color-scheme="dark"] .copilot-add-button { background: #2b323d; color: #c9d2df; }
html[data-color-scheme="dark"] .copilot-add-button:hover { background: #263b58; color: #69b1ff; }
html[data-color-scheme="dark"] .copilot-selected-file { border-color: #355077; background: #202f44; color: #dbeafe; }
html[data-color-scheme="dark"] .copilot-selected-file > small { color: #9ca7b8; }
html[data-color-scheme="dark"] .copilot-model-picker { border-color: #343d49; }
html[data-color-scheme="dark"] .copilot-model-picker label { color: #b7c0ce; }
html[data-color-scheme="dark"] .copilot-model-picker .ant-select-selector,
html[data-color-scheme="dark"] .copilot-model-picker select { border-color: #414b59 !important; background: #252b34 !important; color: #e5e7eb !important; }
html[data-color-scheme="dark"] .copilot-model-picker .ant-select-selection-item,
html[data-color-scheme="dark"] .copilot-model-picker .ant-select-arrow { color: #dce3ed !important; }
html[data-color-scheme="dark"] .copilot-shell-drawer .ant-select-dropdown { border: 1px solid #414b59; background: #252b34; color: #e5e7eb; box-shadow: 0 12px 30px rgba(0,0,0,.38); }
html[data-color-scheme="dark"] .copilot-shell-drawer .ant-select-item { color: #dce3ed; }
html[data-color-scheme="dark"] .copilot-shell-drawer .ant-select-item-option-active:not(.ant-select-item-option-disabled) { background: #303a48; }
html[data-color-scheme="dark"] .copilot-shell-drawer .ant-select-item-option-selected:not(.ant-select-item-option-disabled) { background: #173a65; color: #fff; }
html[data-color-scheme="dark"] .copilot-friendly-error { border-color: #75452b; background: #3a291e; color: #ffd8ad; }
html[data-color-scheme="dark"] .copilot-friendly-error strong { color: #ffbd73; }
html[data-color-scheme="dark"] .copilot-friendly-error span { color: #dca56e; }
html[data-color-scheme="dark"] .copilot-attachment,
html[data-color-scheme="dark"] .copilot-artifact,
html[data-color-scheme="dark"] .copilot-artifact .card-header,
html[data-color-scheme="dark"] .copilot-artifact .card-body { border-color: #3b4654 !important; background: #222832 !important; color: #dce3ed !important; }
html[data-color-scheme="dark"] .copilot-attachment img,
html[data-color-scheme="dark"] .copilot-attachment .ant-image,
html[data-color-scheme="dark"] .copilot-attachment iframe { border-color: #3b4654; background: #151a21; }
html[data-color-scheme="dark"] .copilot-image-hint { border-color: #3b4654; color: #aab5c5; }
html[data-color-scheme="dark"] .copilot-attachment a:hover { background: #26364d; }
html[data-color-scheme="dark"] .copilot-timeline-item i { box-shadow: 0 0 0 4px #213754; }
.copilot-mode-toggle{display:flex;gap:6px;min-height:32px}.copilot-mode-toggle .ant-btn{flex:1}.copilot-decision-card{margin-top:12px;padding:12px 14px;border:1px solid var(--app-border,#d9e2ef);border-radius:10px;background:var(--app-surface,#fff)}.copilot-decision-card>div{display:flex;align-items:center;gap:8px}.copilot-decision-card p{margin:8px 0 4px}.copilot-decision-card small{color:var(--app-text-secondary,#64748b)}.copilot-decision-card.review{border-left:4px solid #f59e0b}.copilot-decision-card.ready{border-left:4px solid #16a34a}.copilot-vega-chart,.copilot-vega-chart>div{width:100%;min-height:250px}.copilot-vega-chart .vega-embed{width:100%}

/* Responsive width for the User Management invite dialog, including its body portal. */
.um-invite-modal .ant-modal { width: min(760px, calc(100vw - 24px)) !important; max-width: calc(100vw - 24px); }

.task-overview-owner-cell { display: flex; align-items: center; gap: 7px; min-width: 0; color: #334b69; font-size: 12px; }
.task-overview-owner-cell > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.cis-user-avatar { display: inline-flex; flex: 0 0 auto; align-items: center; vertical-align: middle; }
.cis-user-avatar .ant-avatar { border: 1px solid #d7e3f3; background: #eff5ff; color: #2864c5; }

/* CISGuard_Project configuration header port. */
.configuration-page { --configuration-accent:#2563eb; display:grid; gap:20px; width:100%; max-width:1800px; min-width:0; margin:0 auto; padding:8px clamp(10px,1.4vw,24px) 36px; color:#17233d; }
.configuration-hero { position:relative; isolation:isolate; display:flex; min-height:132px; align-items:center; justify-content:space-between; gap:24px; overflow:hidden; padding:25px 28px; border:1px solid #d9e4f4; border-radius:18px; background:radial-gradient(circle at 82% -45%,rgba(37,99,235,.2),transparent 38%),linear-gradient(135deg,#fff 0%,#f8fbff 52%,#eef5ff 100%); box-shadow:0 12px 34px rgba(30,64,175,.08); }
.configuration-hero::after { position:absolute; z-index:-1; right:-58px; bottom:-105px; width:245px; height:245px; border:35px solid rgba(37,99,235,.05); border-radius:50%; content:""; }
.configuration-hero-copy { display:flex; min-width:0; align-items:center; gap:17px; }
.configuration-hero-icon { display:grid; width:58px; height:58px; flex:0 0 58px; place-items:center; border:1px solid rgba(255,255,255,.55); border-radius:18px; background:linear-gradient(145deg,#3b82f6,#4338ca); color:#fff; box-shadow:0 12px 26px rgba(37,99,235,.25); font-size:25px; }
.configuration-hero h1 { margin:0 0 6px; color:#111d39; font-size:clamp(25px,2vw,31px); font-weight:760; letter-spacing:-.025em; }
.configuration-hero p { max-width:720px; margin:0; color:#64748b; font-size:13px; }
.configuration-refresh { position:relative; z-index:1; min-height:39px; padding-inline:16px; border-color:#c8d7ec; border-radius:10px; background:rgba(255,255,255,.82); color:#245ec8; box-shadow:0 5px 14px rgba(30,64,175,.08); font-weight:650; }
.configuration-refresh:hover { border-color:#7eaae9; background:#fff; color:#174ba8; }
.configuration-page > .ant-alert { border-radius:11px; }
.configuration-page > .loading-state { min-height:330px; display:grid; place-items:center; border:1px solid #e1e8f2; border-radius:16px; background:#fff; box-shadow:0 8px 28px rgba(31,56,88,.045); }
@media (max-width:767px) {
    .configuration-page { padding-inline:8px; }
    .configuration-hero { align-items:flex-start; flex-direction:column; padding:20px; }
    .configuration-refresh { align-self:flex-start; }
}
@media (max-width:420px) {
    .configuration-hero-copy { align-items:flex-start; }
    .configuration-hero-icon { width:46px; height:46px; flex-basis:46px; border-radius:14px; font-size:21px; }
    .configuration-hero h1 { font-size:24px; }
    .configuration-refresh { width:100%; }
}
/* Shared placement for tabs with page-level actions. */
.feature-tabs-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; min-width:0; }
.feature-tabs-toolbar > .ant-tabs { width:0; flex:1 1 0; min-width:0; margin-bottom:0; }
.feature-tabs-toolbar > .ant-tabs .ant-tabs-nav { min-width:0; margin-bottom:0; }
.feature-tabs-toolbar > .ant-tabs .ant-tabs-nav-wrap { min-width:0; }
.feature-tabs-toolbar > .ant-tabs .ant-tabs-tab { padding:10px 12px; font-size:13px; }
.feature-tabs-toolbar .ant-tabs-extra-content { display:flex; align-items:center; }
.feature-tabs-toolbar__actions, .feature-card-metadata-actions { display:flex; align-items:center; justify-content:flex-end; flex:0 0 auto; gap:8px; }
.feature-tabs-toolbar__actions .ant-btn, .feature-card-metadata-actions .ant-btn { height:32px; padding:0 10px; font-size:12px; white-space:nowrap; }
.feature-card-metadata-toolbar { display:flex; align-items:center; justify-content:space-between; gap:14px; min-width:0; }
.feature-card-metadata-toolbar > .ant-card-meta { min-width:0; }
.quick-audit-scope-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; min-height:32px; }
.quick-audit-scope-actions > .ant-btn { white-space:nowrap; }
@media (max-width: 900px) {
    .feature-tabs-toolbar, .feature-card-metadata-toolbar { align-items:stretch; flex-direction:column; }
    .feature-tabs-toolbar > .ant-tabs { width:100%; flex:none; }
    .feature-tabs-toolbar__actions, .feature-card-metadata-actions { justify-content:flex-start; flex-wrap:wrap; }
    .quick-audit-scope-actions { justify-content:flex-start; flex-wrap:wrap; }
}
