﻿/* =========================================================
   Darkscope / AP Theme Layer
   Load after site.css and tprm-theme.css.
   Uses the same theme variables as TPRM, but with AP-specific
   sizing so existing AP cards and tables keep their workspace.
   ========================================================= */

/* ---------- Page shells ---------- */
body[data-theme] .ap-main-content,
body[data-theme] .mud-main-content:has(.ap-scroll-page),
body.theme-dark .ap-main-content,
body.theme-dark .mud-main-content:has(.ap-scroll-page),
body.theme-light .ap-main-content,
body.theme-light .mud-main-content:has(.ap-scroll-page) {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
}

body[data-theme] .ap-scroll-page,
body.theme-dark .ap-scroll-page,
body.theme-light .ap-scroll-page {
    width: 100%;
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px);
    max-height: calc(100vh - 64px);
    max-height: calc(100dvh - 64px);
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto !important;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    background: transparent !important;
    color: var(--ds-text) !important;
}

body[data-theme] .ap-scroll-content,
body.theme-dark .ap-scroll-content,
body.theme-light .ap-scroll-content {
    width: 100%;
    max-width: none;
    min-height: max-content;
    flex: 0 0 auto;
    margin: 0;
    padding: 10px 10px 48px 10px;
    overflow: visible !important;
    background: transparent !important;
    color: var(--ds-text) !important;
}

body[data-theme] .ap-scroll-content-90,
body.theme-dark .ap-scroll-content-90,
body.theme-light .ap-scroll-content-90 {
    width: 90%;
    max-width: none;
    min-height: max-content;
    flex: 0 0 auto;
    margin: 0 auto;
    padding: 10px 10px 48px 10px;
    overflow: visible !important;
    background: transparent !important;
    color: var(--ds-text) !important;
}
/* ---------- AP cards / MudPaper surfaces ---------- */
body[data-theme] .ap-card,
body[data-theme] .ap-paper,
body[data-theme] .ap-form-card,
body.theme-dark .ap-card,
body.theme-dark .ap-paper,
body.theme-dark .ap-form-card,
body.theme-light .ap-card,
body.theme-light .ap-paper,
body.theme-light .ap-form-card {
    background: rgba(0, 90, 90, 0.15);
    /*background: var(--ds-card-bg) !important;*/
    color: var(--ds-text) !important;
    border: 1px solid var(--ds-border) !important;
    border-radius: 10px;
    box-shadow: var(--ds-shadow-soft);
    backdrop-filter: var(--ds-glass-blur);
    -webkit-backdrop-filter: var(--ds-glass-blur);
    min-width: 0;
    padding: 10px;
    overflow: hidden;
}

.ap-innerCard{
    background-color:transparent!important;
}

body[data-theme] .ap-card:hover,
body.theme-dark .ap-card:hover,
body.theme-light .ap-card:hover {
    background: var(--ds-card-bg-hover) !important;
    border-color: var(--ds-border-hover) !important;
}

body[data-theme] .ap-card .mud-paper,
body.theme-dark .ap-card .mud-paper,
body.theme-light .ap-card .mud-paper {
    color: var(--ds-text) !important;
}

/* ---------- AP tables and data grids ---------- */
body[data-theme] .ap-table,
body.theme-dark .ap-table,
body.theme-light .ap-table {
    width: 100%;
    background: var(--ds-table-bg) !important;
    color: var(--ds-text) !important;
    border: 1px solid var(--ds-border) !important;
    border-radius: 10px;
    box-shadow: var(--ds-shadow-soft);
    overflow: hidden;
}

body[data-theme] .ap-table .mud-table-head,
body.theme-dark .ap-table .mud-table-head,
body.theme-light .ap-table .mud-table-head {
    background: var(--ds-table-header-bg) !important;
}

body[data-theme] .ap-table .mud-table-head th,
body[data-theme] .ap-table .mud-table-sort-label,
body.theme-dark .ap-table .mud-table-head th,
body.theme-dark .ap-table .mud-table-sort-label,
body.theme-light .ap-table .mud-table-head th,
body.theme-light .ap-table .mud-table-sort-label {
    color: var(--ds-text-strong) !important;
}

body[data-theme] .ap-table .mud-table-body tr:nth-child(even),
body.theme-dark .ap-table .mud-table-body tr:nth-child(even),
body.theme-light .ap-table .mud-table-body tr:nth-child(even) {
    background: var(--ds-row-alt-bg) !important;
}

body[data-theme] .ap-table .mud-table-body tr:hover,
body.theme-dark .ap-table .mud-table-body tr:hover,
body.theme-light .ap-table .mud-table-body tr:hover {
    background: var(--ds-row-hover-bg) !important;
}

body[data-theme] .ap-table .mud-table-cell,
body.theme-dark .ap-table .mud-table-cell,
body.theme-light .ap-table .mud-table-cell {
    color: var(--ds-text) !important;
    border-bottom-color: var(--ds-border) !important;
}

body[data-theme] .ap-table .mud-table-pagination,
body.theme-dark .ap-table .mud-table-pagination,
body.theme-light .ap-table .mud-table-pagination {
    background: var(--ds-surface-0) !important;
    color: var(--ds-text) !important;
    border-top-color: var(--ds-border) !important;
}

.ap-vertical-scroll .mud-table-container,
.ap-vertical-scroll .mud-data-grid-table-container {
    overflow-y: auto !important;
    overflow-x: auto !important;
}

.ap-table-small .mud-table-cell {
    padding: 6px 8px !important;
    font-size: 0.78rem;
}

/* ---------- AP dialogs ---------- */
body[data-theme] .ap-dialog .mud-dialog,
body[data-theme] .mud-dialog.ap-dialog,
body.theme-dark .ap-dialog .mud-dialog,
body.theme-dark .mud-dialog.ap-dialog,
body.theme-light .ap-dialog .mud-dialog,
body.theme-light .mud-dialog.ap-dialog {
    background: var(--ds-dialog-bg) !important;
    color: var(--ds-text) !important;
    border: 1px solid var(--ds-border-strong) !important;
    border-radius: 12px;
    box-shadow: var(--ds-shadow);
    backdrop-filter: var(--ds-glass-blur);
    -webkit-backdrop-filter: var(--ds-glass-blur);
}

body[data-theme] .ap-dialog .mud-dialog-title,
body[data-theme] .ap-dialog .mud-dialog-content,
body[data-theme] .ap-dialog .mud-dialog-actions,
body.theme-dark .ap-dialog .mud-dialog-title,
body.theme-dark .ap-dialog .mud-dialog-content,
body.theme-dark .ap-dialog .mud-dialog-actions,
body.theme-light .ap-dialog .mud-dialog-title,
body.theme-light .ap-dialog .mud-dialog-content,
body.theme-light .ap-dialog .mud-dialog-actions {
    color: var(--ds-text) !important;
}

.ap-dialog-overlay {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(2, 6, 23, 0.42) !important;
}

body.theme-light .ap-dialog-overlay,
body[data-theme="light"] .ap-dialog-overlay {
    background: rgba(148, 163, 184, 0.28) !important;
}

/* ---------- AP controls ---------- */
body[data-theme] .ap-scroll-page .mud-button-root,
body[data-theme] .ap-dialog .mud-button-root,
body.theme-dark .ap-scroll-page .mud-button-root,
body.theme-dark .ap-dialog .mud-button-root,
body.theme-light .ap-scroll-page .mud-button-root,
body.theme-light .ap-dialog .mud-button-root {
    border-radius: 8px;
}

body[data-theme] .ap-scroll-page .mud-icon-button,
body[data-theme] .ap-dialog .mud-icon-button,
body.theme-dark .ap-scroll-page .mud-icon-button,
body.theme-dark .ap-dialog .mud-icon-button,
body.theme-light .ap-scroll-page .mud-icon-button,
body.theme-light .ap-dialog .mud-icon-button {
    color: var(--ds-text-muted);
}

body[data-theme] .ap-scroll-page .mud-input,
body[data-theme] .ap-dialog .mud-input,
body[data-theme] .ap-scroll-page .mud-select,
body[data-theme] .ap-dialog .mud-select,
body.theme-dark .ap-scroll-page .mud-input,
body.theme-dark .ap-dialog .mud-input,
body.theme-dark .ap-scroll-page .mud-select,
body.theme-dark .ap-dialog .mud-select,
body.theme-light .ap-scroll-page .mud-input,
body.theme-light .ap-dialog .mud-input,
body.theme-light .ap-scroll-page .mud-select,
body.theme-light .ap-dialog .mud-select {
    color: var(--ds-text) !important;
}

body[data-theme] .ap-scroll-page .mud-input-label,
body[data-theme] .ap-dialog .mud-input-label,
body.theme-dark .ap-scroll-page .mud-input-label,
body.theme-dark .ap-dialog .mud-input-label,
body.theme-light .ap-scroll-page .mud-input-label,
body.theme-light .ap-dialog .mud-input-label {
    color: var(--ds-text-muted) !important;
}

body[data-theme] .ap-scroll-page .mud-chip,
body[data-theme] .ap-dialog .mud-chip,
body.theme-dark .ap-scroll-page .mud-chip,
body.theme-dark .ap-dialog .mud-chip,
body.theme-light .ap-scroll-page .mud-chip,
body.theme-light .ap-dialog .mud-chip {
    backdrop-filter: blur(8px);
}
/* ---------- AP inline-style cleanup helpers ---------- */
.ap-w-100 { width: 100% !important; }
.ap-w-40 { width: 40% !important; }
.ap-width-80 { width: 80px !important; }
.ap-width-85 { width: 85px !important; }
.ap-min-width-115 { min-width: 115px !important; }
.ap-overflow-x-auto { overflow-x: auto !important; }
.ap-overflow-x-hidden { overflow-x: hidden !important; }
.ap-overflow-x-scroll { overflow-x: scroll !important; }
.ap-maxh-250 { max-height: 250px !important; }
.ap-flex { display: flex !important; }
.ap-flex-wrap { flex-wrap: wrap !important; }
.ap-flex-center-wrap {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
}
.ap-text-center { text-align: center !important; }
.ap-pr-0 { padding-right: 0 !important; }
.ap-mb-5 { margin-bottom: 5px !important; }
.ap-mb-15 { margin-bottom: 15px !important; }
.ap-mb-20 { margin-bottom: 20px !important; }
.ap-mb-25 { margin-bottom: 25px !important; }
.ap-mb-33 { margin-bottom: 33px !important; }
.ap-mt-10 { margin-top: 10px !important; }
.ap-mt-15 { margin-top: 15px !important; }
.ap-mt-20 { margin-top: 20px !important; }
.ap-mt-25 { margin-top: 25px !important; }
.ap-mt-30 { margin-top: 30px !important; }
.ap-mt-neg-5 { margin-top: -5px !important; }
.ap-mt-neg-14 { margin-top: -14px !important; }
.ap-mt-neg-20 { margin-top: -20px !important; }
.ap-mt-neg-35 { margin-top: -35px !important; }
.ap-font-bold { font-weight: 700 !important; }
.ap-weight-400 { font-weight: 400 !important; }

.ap-toolbar-text {
    display: flex !important;
    font-size: clamp(8px, 1.5vw, 14px) !important;
}
.ap-toolbar-text-xs {
    font-size: clamp(8px, 1.2vw, 10px) !important;
}
.ap-card-title {
    font-size: clamp(8px, 1.5vw, 14px) !important;
}
.ap-row-text {
    font-size: clamp(8px, 1.5vw, 12px) !important;
}
.ap-tiny-text {
    font-size: clamp(7px, 1.5vw, 10px) !important;
}
.ap-text-xs {
    font-size: 0.75rem !important;
}
.ap-error-text {
    color: red !important;
    font-size: 0.8rem !important;
}
.ap-section-title,
.ap-page-title {
    font-size: clamp(12px, 2.5vw, 20px) !important;
    font-variant: small-caps;
    margin-bottom: 15px !important;
}
.ap-page-title {
    font-size: clamp(12px, 2.5vw, 22px) !important;
}
.ap-section-title-spaced {
    margin-top: 30px !important;
}
.ap-section-title-large-gap {
    margin-top: 30px !important;
    margin-bottom: 30px !important;
}
.ap-subsection-title {
    font-size: clamp(10px, 2.5vw, 16px) !important;
    font-variant: small-caps;
    margin-bottom: 5px !important;
    margin-top: 15px !important;
}

.ap-empty-state {
    margin-left: -5px !important;
    height: 350px;
    font-size: clamp(8px, 1.5vw, 16px) !important;
    align-content: center;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
}
.ap-empty-state-offset { margin-top: 33px !important; }
.ap-empty-state-short { height: 125px; font-size: clamp(8px, 1.5vw, 12px) !important; }
.ap-empty-state-tall { height: 380px; }
.ap-empty-state-mini { height: 60px; margin-left: 0 !important; }
.ap-score-value {
    margin-left: -5px !important;
    font-size: clamp(8px, 1.5vw, 16px) !important;
}
.ap-score-suffix {
    font-size: clamp(6px, 2vw, 10px) !important;
}
.ap-score-inline {
    text-align: center;
    margin-top: -4.5px;
}
.ap-chart-caption {
    width: 100%;
    display: flow;
    font-size: clamp(8px, 1.5vw, 12px) !important;
}
.ap-inline-meter-label {
    height: 18px;
    font-size: clamp(7px, 1.2vw, 10px) !important;
}

.ap-progress-md { width: 40px !important; height: 40px !important; }
.ap-progress-lg { width: 70px !important; height: 70px !important; }
.ap-action-cell { height: 24px; min-width: 60px; }
.ap-clickable { cursor: pointer !important; }
.ap-action-success { color: green !important; }
.ap-action-danger { color: orangered !important; }
.ap-action-critical { color: mediumvioletred !important; }
.ap-action-warning { color: goldenrod !important; }
.ap-action-disabled { color: dimgray !important; }
.ap-color-chip { height: 20px; }
.ap-color-chip-45 { width: 45px; }
.ap-color-chip-60 { width: 60px; }
.ap-bg-risk-green { background-color: rgb(11, 186, 131) !important; }
.ap-bg-risk-red { background-color: rgb(246, 78, 98) !important; }
.ap-bg-risk-pink { background-color: rgb(255, 64, 129) !important; }
.ap-bg-risk-purple { background-color: rgb(119, 107, 231) !important; }
.ap-bg-black { background-color: black !important; }

.ap-authorizing-shell {
    overflow: hidden;
    align-content: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}
.ap-authorizing-grid {
    width: 30%;
    height: 50%;
}
.ap-login-logo {
    max-height: 50px;
    max-width: 240px;
    padding: 10px;
}

.ap-dialog-confirm { width: 30% !important; min-width: 200px !important; height: 200px !important; }
.ap-dialog-md { width: 60% !important; min-width: 400px !important; }
.ap-dialog-wide { width: 60% !important; min-width: 600px !important; }
.ap-dialog-xl { width: 80% !important; min-width: 500px !important; }
.ap-dialog-nested { width: 50% !important; min-width: 300px !important; height: 250px !important; }
.ap-dialog-target { width: 425px !important; height: 410px !important; }

.ap-report-root { background: white !important; }
.ap-report-page { width: 795px; padding: 40px; }
.ap-report-cover {
    height: 1130px;
    width: 795px;
    text-align: center;
    margin-top: -5px;
}
.ap-report-logo { margin-top: 250px !important; }
.ap-report-cover-title { margin-top: 300px !important; color: white !important; }
.ap-report-cover-subtitle { margin-top: 25px !important; color: white !important; }
.ap-report-cover-customer,
.ap-report-cover-date {
    color: white !important;
    position: absolute;
    left: 55px;
}
.ap-report-cover-customer { font-size: 1.3rem !important; top: 970px; }
.ap-report-cover-date { font-size: 1rem !important; top: 1000px; }
.ap-report-title {
    color: MidnightBlue !important;
    font-size: 1.5rem !important;
}
.ap-report-heading {
    color: MidnightBlue !important;
    font-size: 1rem !important;
}
.ap-report-heading-sm {
    color: MidnightBlue !important;
    font-size: 0.8rem !important;
}
.ap-report-heading-xs {
    color: MidnightBlue !important;
    font-size: 0.6rem !important;
}
.ap-report-heading-inline {
    margin-top: 1px !important;
    font-size: 0.9rem !important;
}
.ap-report-body {
    color: black !important;
    font-size: 0.9rem !important;
}
.ap-report-body-sm {
    color: black !important;
    font-size: 0.7rem !important;
}
.ap-report-body-centered {
    text-align: center;
    line-height: 2;
    margin-bottom: 25px !important;
}
.ap-report-justify,
.ap-report-justify-sm {
    text-align: justify;
    text-justify: inter-word;
}
.ap-report-justify { font-size: 0.8rem !important; }
.ap-report-justify-sm { font-size: 0.7rem !important; }
.ap-report-blue-card {
    padding-left: 15px;
    background: rgb(25, 25, 112) !important;
    opacity: 0.7;
    border-radius: 15px;
    color: white !important;
    text-align: center;
}
.ap-report-card-title {
    margin-top: -2px !important;
    color: white !important;
    font-size: 1rem !important;
}
.ap-report-card-text {
    margin-top: -10px !important;
    color: white !important;
    font-size: 0.7rem !important;
}
.ap-report-risk-label {
    text-align: center !important;
    margin-top: 20px !important;
}
.ap-report-risk-low,
.ap-report-risk-medium,
.ap-report-risk-high,
.ap-report-risk-extreme {
    margin-top: 10px !important;
    font-size: 1.1rem !important;
}
.ap-report-risk-low { color: green !important; }
.ap-report-risk-medium { color: orange !important; }
.ap-report-risk-high { color: indianred !important; }
.ap-report-risk-extreme { color: red !important; }
.ap-report-vector-icon {
    position: relative;
    top: 78px;
    left: 94px;
}

/* ---------- AP inline-style cleanup helpers: pass 2 ---------- */
.ap-h-100 { height: 100% !important; }
.ap-full-size { width: 100% !important; height: 100% !important; }
.ap-w-75 { width: 75% !important; }
.ap-w-97 { width: 97% !important; }
.ap-ml-25 { margin-left: 25px !important; }
.ap-mt-35 { margin-top: 35px !important; }
.ap-overflow-hidden { overflow: hidden !important; }
.ap-overflow-x-none { overflow-x: hidden !important; }
.ap-bg-transparent { background-color: transparent !important; }
.ap-flex-between {
    display: flex;
    justify-content: space-between;
}
.ap-switch-align-end {
    display: flex !important;
    align-items: flex-end !important;
    margin-top: -10px !important;
}
.ap-chart-overlay-title {
    text-align: left !important;
    width: 100%;
    margin-top: -50px;
}
.ap-prewrap-text {
    white-space: pre-wrap;
    font-size: clamp(8px, 1.5vw, 14px) !important;
}
.ap-warning-caption {
    font-size: clamp(8px, 1.5vw, 12px) !important;
    font-variant: small-caps;
    margin-bottom: 15px !important;
}
.ap-action-info { color: deepskyblue !important; }
.ap-action-cell-wide { min-width: 70px; }
.ap-table-spacing-15 { border-spacing: 15px; }
.ap-table-spacing-20 { border-spacing: 20px; }
.ap-error-line {
    margin-bottom: 25px !important;
    text-align: center;
}
.ap-chart-compact { max-height: 125px !important; }
.ap-earth-popup-panel {
    height: 100%;
    width: 250px;
    overflow-y: auto;
}
.ap-text-medium { font-size: medium; }
.ap-text-small { font-size: small; }
.ap-world-map {
    height: 440px;
    width: 100%;
}
.ap-logo-page-shell {
    height: 90vh;
    overflow: hidden;
    align-content: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    background-color: transparent;
}
.ap-nav-footer {
    position: absolute;
    bottom: 10px;
    width: 100%;
    background-color: transparent;
}
.ap-drawer-pin {
    position: fixed !important;
    bottom: 35px;
    z-index: 5000;
}
.ap-password-page {
    margin: auto;
    width: 100%;
    padding: 10px;
    text-align: center;
}
.ap-password-panel {
    margin: 0;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 3px solid lightgray;
    min-width: 50%;
}
.ap-modal-scroll-360 {
    overflow-x: scroll;
    height: 360px;
}
.ap-modal-scroll-355 {
    height: 355px;
    overflow-y: scroll;
}
.ap-modal-center-scroll {
    overflow: auto;
    align-content: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}
.ap-success-note {
    color: chartreuse !important;
    margin-top: 20px !important;
}
.ap-popover-offset {
    margin-top: -20px !important;
    margin-left: -20px !important;
}
.ap-dialog-80 { width: 80% !important; }
.ap-dialog-xxl { width: 80% !important; min-width: 600px !important; }
.ap-dialog-square { height: 50vh !important; width: 50vh !important; min-width: 45% !important; }
.ap-dialog-tall-narrow { height: 500px !important; width: 50vh !important; min-width: 45% !important; }
.ap-dialog-upload { height: 80% !important; max-height: 510px !important; width: 50vh !important; min-width: 45% !important; }
.ap-dialog-management { height: 500px !important; width: 70% !important; min-width: 500px !important; }
.ap-dialog-password { width: 380px !important; }
.ap-avatar-lg { height: 90px !important; width: 90px !important; }
.ap-report-modal-grid {
    display: grid;
    background-color: white !important;
    overflow-y: auto;
}
.ap-report-preview-cover {
    text-align: center;
    overflow: hidden;
    margin-top: -75px;
}
.ap-report-preview-page {
    margin-top: 15px;
    overflow: hidden;
    background-color: white !important;
    color: black !important;
}

/* ---------- AP inline-style cleanup helpers: pass 3 ---------- */
.ap-chart-max-300 { max-height: 300px !important; }
.ap-chart-max-310 { max-height: 310px !important; }
.ap-chart-slice-label {
    position: relative;
    transform: translate(-50%, -50%);
    font-weight: 600;
}

.ap-upload-input-transparent { opacity: 0 !important; }


/* ---------- AP structural scrolling ---------- */
.ap-main-content {
    height: 100vh !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

.ap-main-content > .ap-scroll-page,
.ap-scroll-page {
    position: relative !important;
    width: 100% !important;
    height: calc(100vh - 64px) !important;
    height: calc(100dvh - 64px) !important;
    max-height: calc(100vh - 64px) !important;
    max-height: calc(100dvh - 64px) !important;
    min-height: 0 !important;
    display: block !important;
    overflow-y: scroll !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    background: transparent !important;
}

.ap-scroll-content,
.ap-scroll-content-90 {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
    padding-bottom: 120px !important;
}

.ap-scroll-content {
    width: 100% !important;
}

.ap-scroll-content-90 {
    width: 90% !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ---------- AP page scrolling final override ---------- */
#main-scroll-container:has(.ap-scroll-page) {
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

#main-scroll-container:has(.ap-scroll-page) main,
#main-scroll-container:has(.ap-scroll-page) .mud-layout,
#main-scroll-container:has(.ap-scroll-page) .ap-main-content {
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    overflow: visible !important;
}

#main-scroll-container:has(.ap-scroll-page) .ap-scroll-page {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: calc(100vh - 64px) !important;
    min-height: calc(100dvh - 64px) !important;
    max-height: none !important;
    display: block !important;
    overflow: visible !important;
    background: transparent !important;
}

#main-scroll-container:has(.ap-scroll-page) .ap-scroll-content,
#main-scroll-container:has(.ap-scroll-page) .ap-scroll-content-90 {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    padding-bottom: 140px !important;
}

/* ---------- AP global intelligence map ---------- */
.ap-map-card {
    min-height: 560px;
    overflow: hidden;
}

.ap-map-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--ds-text);
}

.ap-world-map {
    width: 100%;
    min-height: 500px;
}

.ap-country-panel-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2400;
    background: rgba(2, 6, 23, 0.26);
}

.ap-country-panel {
    position: fixed;
    height: 550px;
    top: 88px;
    right: 24px;
    bottom: 24px;
    z-index: 2500;
    width: min(440px, calc(100vw - 48px));
    overflow-y: auto;
    padding: 16px;
    background: var(--ds-dialog-bg) !important;
    color: var(--ds-text) !important;
    border: 1px solid var(--ds-border-strong);
    border-radius: 12px;
    box-shadow: var(--ds-shadow);
    backdrop-filter: var(--ds-glass-blur);
    -webkit-backdrop-filter: var(--ds-glass-blur);
}

.ap-country-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.ap-sanctioned-text {
    color: darkred !important;
}

.ap-stat-card,
.ap-supplier-row {
    background: var(--ds-surface-0) !important;
    color: var(--ds-text) !important;
    border: 1px solid var(--ds-border) !important;
    border-radius: 8px;
}

.ap-supplier-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ap-supplier-row-flat {
    border: none !important;
    margin-left: 0 !important;
    background: transparent !important;
}

.ap-country-risk-note {
    max-width: 310px !important;
}

.ap-country-row-center {
    align-content: center;
}

/* ---------- AP navigation shell ---------- */
.ap-shell {
    min-height: 100vh;
    min-height: 100dvh;
    color: var(--ds-text);
}

.ap-workspace {
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 74px 18px 18px 104px;
    background: transparent;
}

.ap-navigation-rail {
    position: fixed;
    inset: 58px auto 16px 16px;
    z-index: 1150;
    width: 72px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 10px 8px;
    background: var(--ds-dialog-bg);
    border: 1px solid var(--ds-border);
    border-radius: 12px;
    box-shadow: var(--ds-shadow-soft);
    backdrop-filter: var(--ds-glass-blur);
    -webkit-backdrop-filter: var(--ds-glass-blur);
}

.ap-nav-brand {
    height: 52px;
    display: grid;
    place-items: center;
    gap: 2px;
    color: var(--ds-text-strong);
    border-bottom: 1px solid var(--ds-border);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0;
}

.ap-nav-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
}

.ap-nav-bottom {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.ap-nav-item {
    width: 100%;
    min-height: 54px;
    border: 1px solid transparent;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--ds-text-muted);
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 0.62rem;
    line-height: 1.1;
    letter-spacing: 0;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.ap-nav-item:hover:not(:disabled),
.ap-nav-item-active {
    color: var(--ds-text-strong);
    background: var(--ds-card-bg-hover);
    border-color: var(--ds-border-hover);
}

.ap-nav-item-active {
    box-shadow: inset 3px 0 0 var(--mud-palette-primary);
}

.ap-nav-item:active:not(:disabled) {
    transform: translateY(1px);
}

.ap-nav-item:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.ap-nav-exit {
    color: var(--mud-palette-error);
}

.ap-nav-version {
    color: var(--ds-text-muted);
    text-align: center;
    font-size: 0.62rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.ap-top-bar {
    position: sticky;
    top: 48px;
    z-index: 1000;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    padding: 10px 14px;
    background: var(--ds-dialog-bg);
    border: 1px solid var(--ds-border);
    border-radius: 10px;
    box-shadow: var(--ds-shadow-soft);
    backdrop-filter: var(--ds-glass-blur);
    -webkit-backdrop-filter: var(--ds-glass-blur);
}

.ap-top-title-group {
    min-width: 0;
}

.ap-top-kicker {
    display: block;
    color: var(--ds-text-muted);
    font-size: 0.68rem;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0;
}

.ap-top-title-group h1 {
    margin: 3px 0 0;
    color: var(--ds-text-strong);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
}

.ap-top-context {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

.ap-top-customer {
    min-width: 0;
    max-width: min(42vw, 420px);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    color: var(--ds-text);
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
}

.ap-top-customer span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ap-top-icon-button {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    color: var(--ds-text);
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.ap-top-icon-button:hover:not(:disabled) {
    color: var(--ds-text-strong);
    background: var(--ds-card-bg-hover);
    border-color: var(--ds-border-hover);
}

.ap-top-icon-button:disabled {
    opacity: 0.5;
    cursor: progress;
}

.ap-shell .ap-main-content {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding: 0 !important;
}

#main-scroll-container:has(.ap-shell) {
    height: 100vh !important;
    height: 100dvh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

#main-scroll-container:has(.ap-shell) main,
#main-scroll-container:has(.ap-shell) .mud-layout {
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    overflow: visible !important;
}

#main-scroll-container:has(.ap-shell) .ap-scroll-page {
    height: auto !important;
    min-height: calc(100vh - 150px) !important;
    min-height: calc(100dvh - 150px) !important;
    max-height: none !important;
    overflow: visible !important;
}

@media (max-width: 900px) {
    .ap-workspace {
        padding: 72px 12px 96px 12px;
    }

    .ap-navigation-rail {
        inset: auto 10px 10px 10px;
        width: auto;
        height: 70px;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        padding: 8px;
        border-radius: 12px;
    }

    .ap-nav-brand,
    .ap-nav-version {
        display: none;
    }

    .ap-nav-items {
        flex: 1;
        flex-direction: row;
        gap: 6px;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .ap-nav-bottom {
        margin-top: 0;
        flex-direction: row;
        flex: 0 0 auto;
    }

    .ap-nav-item {
        width: 58px;
        min-width: 58px;
        min-height: 52px;
    }

    .ap-top-bar {
        top: 58px;
        align-items: flex-start;
        flex-direction: column;
    }

    .ap-top-context {
        width: 100%;
        justify-content: space-between;
    }

    .ap-top-customer {
        max-width: calc(100vw - 88px);
    }
}


/* ---------- AP attack vector V2 ---------- */
.ap-attack-v2 {
    width: 100%;
    height: 100%;
    min-width: 0;
    padding: 10px;
    overflow: hidden;
    color: var(--ds-text);
}

.ap-attack-v2-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.ap-attack-v2-title {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ap-attack-v2-title span,
.ap-attack-v2-title small {
    color: var(--ds-text-muted);
    font-size: 0.68rem;
    line-height: 1.1;
}

.ap-attack-v2-title strong {
    color: var(--ds-text-strong);
    font-size: 1.05rem;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ap-attack-v2-score {
    flex: 0 0 auto;
    min-width: 78px;
    min-height: 58px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    color: var(--ds-text-strong);
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 10px;
}

.ap-attack-v2-score span {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1;
}

.ap-attack-v2-score small {
    color: var(--ds-text-muted);
    font-size: 0.72rem;
}

.ap-attack-v2-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.ap-attack-v2-card {
    min-width: 0;
    min-height: 96px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    color: var(--ds-text);
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-left-width: 4px;
    border-radius: 10px;
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.ap-attack-v2-card:hover {
    background: var(--ds-card-bg-hover);
    border-color: var(--ds-border-hover);
    transform: translateY(-1px);
}

.ap-attack-v2-card-head,
.ap-attack-v2-card-title,
.ap-attack-v2-metrics {
    display: flex;
    align-items: center;
}

.ap-attack-v2-card-head {
    justify-content: space-between;
    gap: 8px;
}

.ap-attack-v2-card-title {
    min-width: 0;
    gap: 6px;
    color: var(--ds-text-strong);
    font-size: 0.78rem;
    font-weight: 700;
}

.ap-attack-v2-card-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ap-attack-v2-risk-pill {
    flex: 0 0 auto;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
    border: 1px solid currentColor;
}

.ap-attack-v2-metrics {
    justify-content: space-between;
    gap: 6px;
}

.ap-attack-v2-metrics > span {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.ap-attack-v2-metrics strong {
    color: var(--ds-text-strong);
    font-size: 0.92rem;
    line-height: 1;
}

.ap-attack-v2-metrics small {
    color: var(--ds-text-muted);
    font-size: 0.58rem;
    line-height: 1.1;
    white-space: nowrap;
}

.ap-attack-v2-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 6px;
}

.ap-attack-v2 .is-low {
    border-left-color: var(--mud-palette-success);
}

.ap-attack-v2 .is-elevated {
    border-left-color: var(--mud-palette-info);
}

.ap-attack-v2 .is-high {
    border-left-color: var(--mud-palette-warning);
}

.ap-attack-v2 .is-critical {
    border-left-color: var(--mud-palette-error);
}

.ap-attack-v2-risk-pill.is-low,
.ap-attack-v2-score.is-low {
    color: var(--mud-palette-success);
}

.ap-attack-v2-risk-pill.is-elevated,
.ap-attack-v2-score.is-elevated {
    color: var(--mud-palette-info);
}

.ap-attack-v2-risk-pill.is-high,
.ap-attack-v2-score.is-high {
    color: var(--mud-palette-warning);
}

.ap-attack-v2-risk-pill.is-critical,
.ap-attack-v2-score.is-critical {
    color: var(--mud-palette-error);
}

.ap-attack-v2-metrics .is-worse strong {
    color: var(--mud-palette-error);
}

.ap-attack-v2-metrics .is-better strong {
    color: var(--mud-palette-success);
}

.ap-attack-v2-metrics .is-flat strong {
    color: var(--ds-text-muted);
}

@media (max-width: 700px) {
    .ap-attack-v2-grid {
        grid-template-columns: 1fr;
    }

    .ap-attack-v2 {
        overflow-y: auto;
    }
}


/* ---------- AP alarm gauge V2 ---------- */
.ap-alarm-v2 {
    width: 100%;
    height: 100%;
    min-width: 0;
    padding: 10px;
    overflow: hidden;
    color: var(--ds-text);
}

.ap-alarm-v2-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.ap-alarm-v2-title {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ap-alarm-v2-title span,
.ap-alarm-v2-title small {
    color: var(--ds-text-muted);
    font-size: 0.68rem;
    line-height: 1.1;
}

.ap-alarm-v2-title strong {
    color: var(--ds-text-strong);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.ap-alarm-v2-headline {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: var(--ds-surface-0);
    font-size: 0.72rem;
    font-weight: 700;
}

.ap-alarm-v2-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.ap-alarm-v2-kpis > div {
    min-width: 0;
    padding: 8px 10px;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
}

.ap-alarm-v2-kpis span {
    display: block;
    color: var(--ds-text-muted);
    font-size: 0.62rem;
    line-height: 1.1;
}

.ap-alarm-v2-kpis strong {
    display: block;
    margin-top: 3px;
    color: var(--ds-text-strong);
    font-size: 1rem;
    line-height: 1;
}

.ap-alarm-v2-layout {
    display: grid;
    grid-template-columns: minmax(120px, 0.42fr) minmax(0, 1fr);
    gap: 12px;
    min-height: 178px;
}

.ap-alarm-v2-severity {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.ap-alarm-v2-severity-row {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    padding: 6px 8px;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
}

.ap-alarm-v2-severity-row span:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ds-text);
    font-size: 0.7rem;
}

.ap-alarm-v2-severity-row strong {
    color: var(--ds-text-strong);
    font-size: 0.78rem;
}

.ap-alarm-v2-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
}

.ap-alarm-v2-timeline {
    min-width: 0;
    height: 178px;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: end;
    gap: 5px;
    padding: 8px 8px 0;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 10px;
}

.ap-alarm-v2-month {
    min-width: 0;
    height: 100%;
    display: grid;
    grid-template-rows: 1fr auto auto;
    align-items: end;
    gap: 3px;
    padding: 0;
    color: var(--ds-text);
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
}

.ap-alarm-v2-month:hover .ap-alarm-v2-bar {
    outline: 1px solid var(--ds-border-hover);
    filter: brightness(1.08);
}

.ap-alarm-v2-bar {
    width: 100%;
    min-height: 8px;
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-start;
    overflow: hidden;
    border-radius: 7px 7px 3px 3px;
    background: rgba(148, 163, 184, 0.14);
}

.ap-alarm-v2-segment {
    display: block;
    width: 100%;
    min-height: 3px;
}

.ap-alarm-v2-month strong {
    color: var(--ds-text-strong);
    font-size: 0.68rem;
    line-height: 1;
    text-align: center;
}

.ap-alarm-v2-month small {
    color: var(--ds-text-muted);
    font-size: 0.54rem;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.ap-alarm-v2-actions {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

.ap-alarm-v2-neutral {
    color: var(--mud-palette-success);
    background: rgb(11, 186, 131);
}

.ap-alarm-v2-warning {
    color: var(--mud-palette-warning);
    background: rgb(119, 107, 231);
}

.ap-alarm-v2-critical {
    color: var(--mud-palette-error);
    background: rgb(246, 78, 98);
}

.ap-alarm-v2-catastrophic {
    color: var(--mud-palette-error);
    background: rgb(255, 64, 129);
}

.ap-alarm-v2-headline.ap-alarm-v2-neutral,
.ap-alarm-v2-headline.ap-alarm-v2-warning,
.ap-alarm-v2-headline.ap-alarm-v2-critical,
.ap-alarm-v2-headline.ap-alarm-v2-catastrophic {
    background: var(--ds-surface-0);
}

@media (max-width: 900px) {
    .ap-alarm-v2 {
        overflow-y: auto;
    }

    .ap-alarm-v2-layout {
        grid-template-columns: 1fr;
    }

    .ap-alarm-v2-timeline {
        min-width: 640px;
    }
}


/* ---------- AP alarm overview V2 ---------- */
.ap-alarm-overview-v2 {
    width: 100%;
    height: 100%;
    min-width: 0;
    padding: 10px;
    overflow: hidden;
    color: var(--ds-text);
}

.ap-alarm-overview-v2-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.ap-alarm-overview-v2-header > div:first-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ap-alarm-overview-v2-header span,
.ap-alarm-overview-v2-header small {
    color: var(--ds-text-muted);
    font-size: 0.68rem;
    line-height: 1.1;
}

.ap-alarm-overview-v2-header strong {
    color: var(--ds-text-strong);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.ap-alarm-overview-v2-state {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    color: var(--ds-text-strong);
    background: var(--ds-surface-0);
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.ap-alarm-overview-v2-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.ap-alarm-overview-v2-kpis > div {
    min-width: 0;
    padding: 8px 10px;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
}

.ap-alarm-overview-v2-kpis span {
    display: block;
    color: var(--ds-text-muted);
    font-size: 0.62rem;
    line-height: 1.1;
}

.ap-alarm-overview-v2-kpis strong {
    display: block;
    margin-top: 3px;
    color: var(--ds-text-strong);
    font-size: 1rem;
    line-height: 1;
}

.ap-alarm-overview-v2-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.ap-alarm-overview-v2-card {
    min-width: 0;
    min-height: 112px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    color: var(--ds-text);
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-left-width: 4px;
    border-radius: 10px;
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.ap-alarm-overview-v2-card:hover:not(:disabled) {
    background: var(--ds-card-bg-hover);
    border-color: var(--ds-border-hover);
    transform: translateY(-1px);
}

.ap-alarm-overview-v2-card:disabled {
    opacity: 0.56;
    cursor: not-allowed;
}

.ap-alarm-overview-v2-card-head,
.ap-alarm-overview-v2-card-title,
.ap-alarm-overview-v2-card-foot {
    display: flex;
    align-items: center;
}

.ap-alarm-overview-v2-card-head,
.ap-alarm-overview-v2-card-foot {
    justify-content: space-between;
    gap: 8px;
}

.ap-alarm-overview-v2-card-title {
    min-width: 0;
    gap: 6px;
    color: var(--ds-text-strong);
    font-size: 0.78rem;
    font-weight: 700;
}

.ap-alarm-overview-v2-card-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ap-alarm-overview-v2-pill {
    flex: 0 0 auto;
    padding: 3px 7px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
}

.ap-alarm-overview-v2-card-main {
    display: flex;
    align-items: baseline;
    gap: 7px;
}

.ap-alarm-overview-v2-card-main strong {
    color: var(--ds-text-strong);
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1;
}

.ap-alarm-overview-v2-card-main small,
.ap-alarm-overview-v2-card-foot {
    color: var(--ds-text-muted);
    font-size: 0.62rem;
    line-height: 1.1;
}

.ap-alarm-overview-v2-composition {
    width: 100%;
    height: 8px;
    display: flex;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
}

.ap-alarm-overview-v2-segment {
    height: 100%;
    min-width: 0;
}

.ap-alarm-overview-v2-neutral {
    color: var(--mud-palette-success);
    background: rgb(11, 186, 131);
    border-left-color: rgb(11, 186, 131);
}

.ap-alarm-overview-v2-warning {
    color: var(--mud-palette-warning);
    background: rgb(119, 107, 231);
    border-left-color: rgb(119, 107, 231);
}

.ap-alarm-overview-v2-critical {
    color: var(--mud-palette-error);
    background: rgb(246, 78, 98);
    border-left-color: rgb(246, 78, 98);
}

.ap-alarm-overview-v2-catastrophic {
    color: var(--mud-palette-error);
    background: rgb(255, 64, 129);
    border-left-color: rgb(255, 64, 129);
}

.ap-alarm-overview-v2-card.ap-alarm-overview-v2-neutral,
.ap-alarm-overview-v2-card.ap-alarm-overview-v2-warning,
.ap-alarm-overview-v2-card.ap-alarm-overview-v2-critical,
.ap-alarm-overview-v2-card.ap-alarm-overview-v2-catastrophic,
.ap-alarm-overview-v2-state.ap-alarm-overview-v2-neutral,
.ap-alarm-overview-v2-state.ap-alarm-overview-v2-warning,
.ap-alarm-overview-v2-state.ap-alarm-overview-v2-critical,
.ap-alarm-overview-v2-state.ap-alarm-overview-v2-catastrophic,
.ap-alarm-overview-v2-pill.ap-alarm-overview-v2-neutral,
.ap-alarm-overview-v2-pill.ap-alarm-overview-v2-warning,
.ap-alarm-overview-v2-pill.ap-alarm-overview-v2-critical,
.ap-alarm-overview-v2-pill.ap-alarm-overview-v2-catastrophic {
    background: var(--ds-surface-0);
}

@media (max-width: 700px) {
    .ap-alarm-overview-v2 {
        overflow-y: auto;
    }

    .ap-alarm-overview-v2-grid,
    .ap-alarm-overview-v2-kpis {
        grid-template-columns: 1fr;
    }
}


/* ---------- AP CIRS overview V2 ---------- */
.ap-cirs-v2 {
    width: 100%;
    height: 100%;
    min-width: 0;
    padding: 10px;
    overflow: hidden;
    color: var(--ds-text);
}

.ap-cirs-v2-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.ap-cirs-v2-title {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ap-cirs-v2-title span,
.ap-cirs-v2-title small {
    color: var(--ds-text-muted);
    font-size: 0.68rem;
    line-height: 1.1;
}

.ap-cirs-v2-title strong {
    color: var(--ds-text-strong);
    font-size: 1.15rem;
    line-height: 1.15;
}

.ap-cirs-v2-score {
    flex: 0 0 auto;
    min-width: 78px;
    min-height: 58px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    color: var(--ds-text-strong);
    background: var(--ds-surface-0);
    border: 1px solid currentColor;
    border-radius: 10px;
}

.ap-cirs-v2-score span {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1;
}

.ap-cirs-v2-score small {
    color: var(--ds-text-muted);
    font-size: 0.72rem;
}

.ap-cirs-v2-meter {
    margin-bottom: 10px;
}

.ap-cirs-v2-meter-labels {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-top: 4px;
    color: var(--ds-text-muted);
    font-size: 0.58rem;
    line-height: 1;
}

.ap-cirs-v2-meter-labels span:nth-child(2),
.ap-cirs-v2-meter-labels span:nth-child(3) {
    text-align: center;
}

.ap-cirs-v2-meter-labels span:last-child {
    text-align: right;
}

.ap-cirs-v2-benchmarks {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.ap-cirs-v2-benchmark {
    min-width: 0;
    display: grid;
    gap: 6px;
    padding: 8px;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-left: 4px solid currentColor;
    border-radius: 8px;
}

.ap-cirs-v2-benchmark-title,
.ap-cirs-v2-benchmark-values {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ap-cirs-v2-benchmark-title {
    color: var(--ds-text-strong);
    font-size: 0.72rem;
    font-weight: 700;
}

.ap-cirs-v2-benchmark-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ap-cirs-v2-benchmark-values strong {
    color: var(--ds-text-strong);
    font-size: 1rem;
    line-height: 1;
}

.ap-cirs-v2-benchmark-values small {
    color: var(--ds-text-muted);
    font-size: 0.58rem;
    line-height: 1;
    white-space: nowrap;
}

.ap-cirs-v2-trend {
    height: 70px;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: end;
    gap: 4px;
    padding: 7px 7px 0;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 10px;
}

.ap-cirs-v2-trend > span {
    height: 100%;
    min-width: 0;
    display: grid;
    grid-template-rows: 1fr auto;
    align-items: end;
    gap: 3px;
}

.ap-cirs-v2-trend-bar {
    width: 100%;
    min-height: 4px;
    display: block;
    border-radius: 5px 5px 2px 2px;
    background: currentColor;
}

.ap-cirs-v2-trend small {
    color: var(--ds-text-muted);
    font-size: 0.5rem;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.ap-cirs-v2-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 4px;
}

.ap-cirs-v2 .is-low {
    color: var(--mud-palette-success);
}

.ap-cirs-v2 .is-elevated {
    color: var(--mud-palette-info);
}

.ap-cirs-v2 .is-high {
    color: var(--mud-palette-warning);
}

.ap-cirs-v2 .is-critical {
    color: var(--mud-palette-error);
}

@media (max-width: 700px) {
    .ap-cirs-v2 {
        overflow-y: auto;
    }

    .ap-cirs-v2-benchmarks {
        grid-template-columns: 1fr;
    }

    .ap-cirs-v2-trend {
        min-width: 620px;
    }
}


/* ---------- AP breach intelligence V2 ---------- */
.ap-breach-v2 {
    width: 100%;
    height: 100%;
    min-width: 0;
    padding: 10px;
    overflow: hidden;
    color: var(--ds-text);
}

.ap-breach-v2-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.ap-breach-v2-title {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ap-breach-v2-title span,
.ap-breach-v2-title small {
    color: var(--ds-text-muted);
    font-size: 0.68rem;
    line-height: 1.1;
}

.ap-breach-v2-title strong {
    color: var(--ds-text-strong);
    font-size: 1.05rem;
    line-height: 1.15;
}

.ap-breach-v2-tabs {
    flex: 0 0 auto;
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 10px;
}

.ap-breach-v2-tab {
    min-width: 84px;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--ds-text-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-size: 0.7rem;
    font-weight: 700;
}

.ap-breach-v2-tab.is-active,
.ap-breach-v2-tab:hover {
    color: var(--ds-text-strong);
    background: var(--ds-card-bg-hover);
    border-color: var(--ds-border-hover);
}

.ap-breach-v2-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.ap-breach-v2-kpis > div {
    min-width: 0;
    padding: 8px 10px;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
}

.ap-breach-v2-kpis span {
    display: block;
    color: var(--ds-text-muted);
    font-size: 0.62rem;
    line-height: 1.1;
}

.ap-breach-v2-kpis strong {
    display: block;
    margin-top: 3px;
    color: var(--ds-text-strong);
    font-size: 1rem;
    line-height: 1;
}

.ap-breach-v2-group-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.ap-breach-v2-group-card {
    min-width: 0;
    min-height: 158px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 9px;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 10px;
}

.ap-breach-v2-card-head {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.ap-breach-v2-card-head > span {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--ds-text-strong);
}

.ap-breach-v2-card-head strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.86rem;
    line-height: 1.15;
}

.ap-breach-v2-card-head em {
    flex: 0 0 auto;
    color: var(--ds-text-muted);
    font-size: 0.62rem;
    font-style: normal;
}

.ap-breach-v2-group-bars {
    flex: 1;
    min-height: 108px;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: end;
    gap: 3px;
}

.ap-breach-v2-group-bars > span {
    height: 100%;
    min-width: 0;
    display: grid;
    grid-template-rows: 1fr auto;
    align-items: end;
    gap: 3px;
}

.ap-breach-v2-bar {
    width: 100%;
    min-height: 4px;
    display: block;
    border-radius: 5px 5px 2px 2px;
    background: var(--mud-palette-primary);
}

.ap-breach-v2-group-bars small {
    color: var(--ds-text-muted);
    font-size: 0.58rem;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.ap-breach-v2-industry-list {
    display: grid;
    gap: 8px;
}

.ap-breach-v2-industry-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 58px;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 10px;
}

.ap-breach-v2-rank {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    color: var(--ds-text-strong);
    background: var(--ds-card-bg-hover);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 800;
}

.ap-breach-v2-industry-main {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.ap-breach-v2-industry-main strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ds-text-strong);
    font-size: 0.78rem;
}

.ap-breach-v2-industry-bar {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
}

.ap-breach-v2-industry-bar span {
    height: 100%;
    display: block;
    border-radius: inherit;
    background: var(--mud-palette-primary);
}

.ap-breach-v2-industry-count {
    display: grid;
    justify-items: end;
    gap: 2px;
}

.ap-breach-v2-industry-count strong {
    color: var(--ds-text-strong);
    font-size: 0.95rem;
    line-height: 1;
}

.ap-breach-v2-industry-count small {
    color: var(--ds-text-muted);
    font-size: 0.58rem;
    line-height: 1;
}

.ap-breach-v2-actions {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

@media (max-width: 1100px) {
    .ap-breach-v2-group-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .ap-breach-v2 {
        overflow-y: auto;
    }

    .ap-breach-v2-header {
        flex-direction: column;
    }

    .ap-breach-v2-tabs,
    .ap-breach-v2-tab {
        width: 100%;
    }

    .ap-breach-v2-kpis,
    .ap-breach-v2-group-grid {
        grid-template-columns: 1fr;
    }
}




/* ---------- AP world threat map V2 ---------- */
.ap-world-threat-v2 {
    width: 100%;
    height: 100%;
    min-width: 0;
    padding: 10px;
    overflow: hidden;
    color: var(--ds-text);
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 0;
    max-height: 100%;
    box-sizing: border-box;
}

.ap-world-threat-v2-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.ap-world-threat-v2-title {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ap-world-threat-v2-title span,
.ap-world-threat-v2-title small {
    color: var(--ds-text-muted);
    font-size: 0.68rem;
    line-height: 1.1;
}

.ap-world-threat-v2-title strong {
    color: var(--ds-text-strong);
    font-size: 1.08rem;
    line-height: 1.15;
}

.ap-world-threat-v2-state {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    color: var(--ds-text-strong);
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.ap-world-threat-v2-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.ap-world-threat-v2-kpis > div {
    min-width: 0;
    padding: 8px 10px;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
}

.ap-world-threat-v2-kpis span {
    display: block;
    color: var(--ds-text-muted);
    font-size: 0.62rem;
    line-height: 1.1;
}

.ap-world-threat-v2-kpis strong {
    display: block;
    margin-top: 3px;
    color: var(--ds-text-strong);
    font-size: 1rem;
    line-height: 1;
}

.ap-world-threat-v2-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.32fr);
    gap: 10px;
    min-height: 250px;
    height: 100%;
    max-height: min(640px, calc(100dvh - 245px));
    min-height: 0;
    overflow: hidden;
}

.ap-world-threat-v2-map-card,
.ap-world-threat-v2-panel {
    min-width: 0;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 10px;
}

.ap-world-threat-v2-map-card {
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 0;
    max-height: 100%;
}

.ap-world-threat-v2-earth {
    width: 100%;
    height: 100%;
    min-height: 250px;
    max-height: 100%;
    overflow: hidden;
}

.ap-world-threat-v2-legend {
    position: absolute;
    left: 10px;
    bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 6px 8px;
    background: var(--ds-dialog-bg);
    border: 1px solid var(--ds-border);
    border-radius: 999px;
    backdrop-filter: var(--ds-glass-blur);
    -webkit-backdrop-filter: var(--ds-glass-blur);
}

.ap-world-threat-v2-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--ds-text-muted);
    font-size: 0.58rem;
    line-height: 1;
}

.ap-world-threat-v2-legend i {
    width: 8px;
    height: 8px;
    display: block;
    border-radius: 999px;
}

.ap-world-threat-v2-legend .is-low { background: Bisque; }
.ap-world-threat-v2-legend .is-elevated { background: rgba(166, 135, 43, 0.85); }
.ap-world-threat-v2-legend .is-high { background: rgba(165, 42, 42, 0.9); }
.ap-world-threat-v2-legend .is-news { background: red; }

.ap-world-threat-v2-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    overflow: hidden;
}

.ap-world-threat-v2-panel-head {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--ds-text-strong);
    font-size: 0.78rem;
    font-weight: 700;
}

.ap-world-threat-v2-country {
    min-height: 110px;
    padding: 10px;
    background: var(--ds-card-bg);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
    overflow-y: auto;
}

.ap-world-threat-v2-country strong {
    display: block;
    margin-bottom: 6px;
    color: var(--ds-text-strong);
    font-size: 0.9rem;
    line-height: 1.15;
}

.ap-world-threat-v2-country p {
    margin: 0;
    color: var(--ds-text);
    font-size: 0.72rem;
    line-height: 1.35;
}

.ap-world-threat-v2-news {
    display: grid;
    gap: 6px;
}

.ap-world-threat-v2-news > span {
    color: var(--ds-text-muted);
    font-size: 0.64rem;
    text-transform: uppercase;
}

.ap-world-threat-v2-news > div {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--ds-text);
    font-size: 0.68rem;
    line-height: 1.15;
}

.ap-world-threat-v2-news > div span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .ap-world-threat-v2 {
        overflow-y: auto;
    }

    .ap-world-threat-v2-layout,
    .ap-world-threat-v2-kpis {
        grid-template-columns: 1fr;
    }

    .ap-world-threat-v2-earth {
        min-height: 320px;
    }
}


.ap-world-threat-v2-earth canvas,
.ap-world-threat-v2-earth > div {
    max-height: 100% !important;
}

@media (min-width: 901px) {
    .ap-world-threat-v2-earth {
        height: min(100%, calc(100dvh - 245px));
    }
}

/* ---------- AP world threat Earth V2 popup content ---------- */
.ap-world-threat-v2-country .earth-v2-score-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin: 8px 0;
}

.ap-world-threat-v2-country .earth-v2-score-grid span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 7px;
    color: var(--ds-text-muted);
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 7px;
    font-size: 0.64rem;
}

.ap-world-threat-v2-country .earth-v2-score-grid b {
    color: var(--ds-text-strong);
}

.ap-world-threat-v2-country .earth-v2-sanctioned {
    margin-bottom: 8px;
    padding: 6px 8px;
    color: var(--mud-palette-error);
    background: rgba(127, 29, 29, 0.18);
    border: 1px solid rgba(248, 113, 113, 0.45);
    border-radius: 7px;
    font-size: 0.68rem;
    font-weight: 700;
}

.ap-world-threat-v2-country ul {
    margin: 6px 0 0 16px;
    padding: 0;
}

.ap-world-threat-v2-country li {
    margin-bottom: 5px;
}


/* ---------- AP Watchtower summary V2 ---------- */
.ap-watchtower-summary-v2 {
    width: 100%;
    height: 100%;
    min-width: 0;
    padding: 10px;
    overflow: hidden;
    color: var(--ds-text);
}

.ap-watchtower-summary-v2-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.ap-watchtower-summary-v2-title {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ap-watchtower-summary-v2-title span,
.ap-watchtower-summary-v2-title small {
    color: var(--ds-text-muted);
    font-size: 0.68rem;
    line-height: 1.1;
}

.ap-watchtower-summary-v2-title strong {
    color: var(--ds-text-strong);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.ap-watchtower-summary-v2-state {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    color: var(--ds-text-strong);
    background: var(--ds-surface-0);
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.ap-watchtower-summary-v2-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.ap-watchtower-summary-v2-kpis > div {
    min-width: 0;
    padding: 8px 10px;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
}

.ap-watchtower-summary-v2-kpis span {
    display: block;
    color: var(--ds-text-muted);
    font-size: 0.62rem;
    line-height: 1.1;
}

.ap-watchtower-summary-v2-kpis strong {
    display: block;
    margin-top: 3px;
    color: var(--ds-text-strong);
    font-size: 1rem;
    line-height: 1;
}

.ap-watchtower-summary-v2-layout {
    display: grid;
    grid-template-columns: minmax(130px, 0.34fr) minmax(0, 1fr);
    gap: 12px;
    min-height: 190px;
}

.ap-watchtower-summary-v2-distribution {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.ap-watchtower-summary-v2-severity-row {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    padding: 7px 8px;
    color: var(--ds-text);
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-left: 4px solid currentColor;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.ap-watchtower-summary-v2-severity-row:hover {
    background: var(--ds-card-bg-hover);
    border-color: var(--ds-border-hover);
}

.ap-watchtower-summary-v2-severity-row span:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.72rem;
}

.ap-watchtower-summary-v2-severity-row strong {
    color: var(--ds-text-strong);
    font-size: 0.82rem;
}

.ap-watchtower-summary-v2-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: currentColor;
}

.ap-watchtower-summary-v2-timeline {
    min-width: 0;
    height: 190px;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: end;
    gap: 5px;
    padding: 8px 8px 0;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 10px;
}

.ap-watchtower-summary-v2-month {
    min-width: 0;
    height: 100%;
    display: grid;
    grid-template-rows: 1fr auto auto;
    align-items: end;
    gap: 3px;
    padding: 0;
    color: var(--ds-text);
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
}

.ap-watchtower-summary-v2-month:hover .ap-watchtower-summary-v2-bar {
    outline: 1px solid var(--ds-border-hover);
    filter: brightness(1.08);
}

.ap-watchtower-summary-v2-bar {
    width: 100%;
    min-height: 8px;
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-start;
    overflow: hidden;
    border-radius: 7px 7px 3px 3px;
    background: rgba(148, 163, 184, 0.14);
}

.ap-watchtower-summary-v2-segment {
    display: block;
    width: 100%;
    min-height: 3px;
}

.ap-watchtower-summary-v2-month strong {
    color: var(--ds-text-strong);
    font-size: 0.68rem;
    line-height: 1;
    text-align: center;
}

.ap-watchtower-summary-v2-month small {
    color: var(--ds-text-muted);
    font-size: 0.54rem;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.ap-watchtower-summary-v2-actions {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

.ap-watchtower-summary-v2 .is-neutral {
    color: rgb(11, 186, 131);
    background: var(--ds-surface-0);
}

.ap-watchtower-summary-v2 .is-warning {
    color: rgb(119, 107, 231);
    background: var(--ds-surface-0);
}

.ap-watchtower-summary-v2 .is-critical {
    color: rgb(246, 78, 98);
    background: var(--ds-surface-0);
}

.ap-watchtower-summary-v2 .is-catastrophic {
    color: rgb(255, 64, 129);
    background: var(--ds-surface-0);
}

.ap-watchtower-summary-v2-segment.is-neutral { background: rgb(11, 186, 131); }
.ap-watchtower-summary-v2-segment.is-warning { background: rgb(119, 107, 231); }
.ap-watchtower-summary-v2-segment.is-critical { background: rgb(246, 78, 98); }
.ap-watchtower-summary-v2-segment.is-catastrophic { background: rgb(255, 64, 129); }

@media (max-width: 900px) {
    .ap-watchtower-summary-v2 {
        overflow-y: auto;
    }

    .ap-watchtower-summary-v2-layout,
    .ap-watchtower-summary-v2-kpis {
        grid-template-columns: 1fr;
    }

    .ap-watchtower-summary-v2-timeline {
        min-width: 640px;
    }
}


/* ---------- AP Watchtower alerts V2 ---------- */
.ap-watchtower-alerts-v2 {
    position: relative;
    width: 100%;
    height: 100%;
    min-width: 0;
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    overflow: hidden;
    color: var(--ds-text);
}

.ap-watchtower-alerts-v2-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ap-watchtower-alerts-v2-title {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ap-watchtower-alerts-v2-title span,
.ap-watchtower-alerts-v2-title small {
    color: var(--ds-text-muted);
    font-size: 0.68rem;
    line-height: 1.1;
}

.ap-watchtower-alerts-v2-title strong {
    color: var(--ds-text-strong);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.ap-watchtower-alerts-v2-state {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    color: var(--ds-text-strong);
    background: var(--ds-surface-0);
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.ap-watchtower-alerts-v2-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.ap-watchtower-alerts-v2-kpis > div {
    min-width: 0;
    padding: 8px 10px;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
}

.ap-watchtower-alerts-v2-kpis span {
    display: block;
    color: var(--ds-text-muted);
    font-size: 0.62rem;
    line-height: 1.1;
}

.ap-watchtower-alerts-v2-kpis strong {
    display: block;
    margin-top: 3px;
    color: var(--ds-text-strong);
    font-size: 1rem;
    line-height: 1;
}

.ap-watchtower-alerts-v2-toolbar {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.ap-watchtower-alerts-v2-severity-filter {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
}

.ap-watchtower-alerts-v2-filter {
    min-width: 0;
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    padding: 7px 8px;
    color: var(--ds-text);
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-left: 4px solid currentColor;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-size: 0.68rem;
    text-align: left;
}

.ap-watchtower-alerts-v2-filter:hover,
.ap-watchtower-alerts-v2-filter.is-active {
    background: var(--ds-card-bg-hover);
    border-color: currentColor;
}

.ap-watchtower-alerts-v2-filter span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
}

.ap-watchtower-alerts-v2-filter strong {
    color: var(--ds-text-strong);
    font-size: 0.78rem;
}

.ap-watchtower-alerts-v2-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.ap-watchtower-alerts-v2-search {
    width: min(260px, 30vw);
}

.ap-watchtower-alerts-v2-table {
    min-height: 0;
    overflow: hidden;
}

.ap-watchtower-alerts-v2-table .mud-table-container {
    height: 100%;
}

.ap-watchtower-alerts-v2-chip {
    min-width: 92px;
    padding: 5px 8px;
    color: var(--ds-text-strong);
    background: var(--ds-surface-0);
    border: 1px solid currentColor;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    font-size: 0.66rem;
    font-weight: 700;
}

.ap-watchtower-alerts-v2-chip.is-closed {
    color: var(--ds-text-muted);
    border-color: var(--ds-border);
}

.ap-watchtower-alerts-v2-source {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ds-text);
    font-size: 0.72rem;
    white-space: nowrap;
}

.ap-watchtower-alerts-v2-alert-cell {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.ap-watchtower-alerts-v2-alert-cell strong {
    overflow: hidden;
    color: var(--ds-text-strong);
    font-size: 0.74rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ap-watchtower-alerts-v2-alert-cell span {
    overflow: hidden;
    color: var(--ds-text-muted);
    font-size: 0.64rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ap-watchtower-alerts-v2-date {
    color: var(--ds-text-muted);
    font-size: 0.68rem;
    white-space: nowrap;
}

.ap-watchtower-alerts-v2-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
}

.ap-watchtower-alerts-v2-detail {
    display: grid;
    gap: 10px;
    margin: 6px;
    padding: 12px;
    color: var(--ds-text);
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
}

.ap-watchtower-alerts-v2-detail > div:first-child {
    display: grid;
    gap: 2px;
}

.ap-watchtower-alerts-v2-detail span,
.ap-watchtower-alerts-v2-detail small {
    color: var(--ds-text-muted);
    font-size: 0.68rem;
    line-height: 1.2;
}

.ap-watchtower-alerts-v2-detail strong {
    color: var(--ds-text-strong);
    font-size: 0.9rem;
    line-height: 1.2;
}

.ap-watchtower-alerts-v2-detail section {
    color: var(--ds-text);
    font-size: 0.74rem;
    line-height: 1.45;
}

.ap-watchtower-alerts-v2-recommendation {
    justify-self: start;
}

.ap-watchtower-alerts-v2-recommendation-text {
    display: grid;
    gap: 5px;
    padding-top: 8px;
    border-top: 1px solid var(--ds-border);
}

.ap-watchtower-alerts-v2-recommendation-text div {
    color: var(--ds-text);
    font-size: 0.74rem;
    line-height: 1.45;
}

.ap-watchtower-alerts-v2 .is-neutral { color: rgb(11, 186, 131); }
.ap-watchtower-alerts-v2 .is-warning { color: rgb(119, 107, 231); }
.ap-watchtower-alerts-v2 .is-critical { color: rgb(246, 78, 98); }
.ap-watchtower-alerts-v2 .is-catastrophic { color: rgb(255, 64, 129); }

@media (max-width: 900px) {
    .ap-watchtower-alerts-v2 {
        overflow-y: auto;
    }

    .ap-watchtower-alerts-v2-kpis,
    .ap-watchtower-alerts-v2-toolbar,
    .ap-watchtower-alerts-v2-severity-filter {
        grid-template-columns: 1fr;
    }

    .ap-watchtower-alerts-v2-controls {
        justify-content: stretch;
    }

    .ap-watchtower-alerts-v2-search {
        width: 100%;
    }
}


/* ---------- AP Email table V2 ---------- */
.ap-email-table-v2,
.ap-user-alerts-v2 {
    position: relative;
    width: 100%;
    height: 100%;
    min-width: 0;
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    overflow: hidden;
    color: var(--ds-text);
}

.ap-email-table-v2-header,
.ap-user-alerts-v2-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ap-email-table-v2-title,
.ap-user-alerts-v2-title {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ap-email-table-v2-title span,
.ap-email-table-v2-title small,
.ap-user-alerts-v2-title span,
.ap-user-alerts-v2-title small {
    color: var(--ds-text-muted);
    font-size: 0.68rem;
    line-height: 1.1;
}

.ap-email-table-v2-title strong,
.ap-user-alerts-v2-title strong {
    color: var(--ds-text-strong);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.ap-email-table-v2-state,
.ap-user-alerts-v2-state {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    color: var(--ds-text-strong);
    background: var(--ds-surface-0);
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.ap-email-table-v2-kpis,
.ap-user-alerts-v2-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.ap-email-table-v2-kpis > div,
.ap-user-alerts-v2-kpis > div {
    min-width: 0;
    padding: 8px 10px;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
}

.ap-email-table-v2-kpis span,
.ap-user-alerts-v2-kpis span {
    display: block;
    color: var(--ds-text-muted);
    font-size: 0.62rem;
    line-height: 1.1;
}

.ap-email-table-v2-kpis strong,
.ap-user-alerts-v2-kpis strong {
    display: block;
    margin-top: 3px;
    color: var(--ds-text-strong);
    font-size: 1rem;
    line-height: 1;
}

.ap-email-table-v2-toolbar,
.ap-user-alerts-v2-toolbar {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.ap-email-table-v2-risk-filter,
.ap-user-alerts-v2-severity-filter {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.ap-user-alerts-v2-severity-filter {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ap-email-table-v2-risk-option,
.ap-user-alerts-v2-filter {
    min-width: 0;
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    padding: 7px 8px;
    color: var(--ds-text);
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-left: 4px solid currentColor;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-size: 0.68rem;
    text-align: left;
}

.ap-email-table-v2-risk-option:hover,
.ap-email-table-v2-risk-option.is-active,
.ap-user-alerts-v2-filter:hover,
.ap-user-alerts-v2-filter.is-active {
    background: var(--ds-card-bg-hover);
    border-color: currentColor;
}

.ap-email-table-v2-risk-option span,
.ap-user-alerts-v2-filter span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
}

.ap-email-table-v2-risk-option strong,
.ap-user-alerts-v2-filter strong {
    color: var(--ds-text-strong);
    font-size: 0.78rem;
}

.ap-email-table-v2-controls,
.ap-user-alerts-v2-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.ap-email-table-v2-search,
.ap-user-alerts-v2-search {
    width: min(260px, 30vw);
}

.ap-email-table-v2-table,
.ap-user-alerts-v2-table {
    min-height: 0;
    overflow: hidden;
}

.ap-email-table-v2-table .mud-table-container,
.ap-user-alerts-v2-table .mud-table-container {
    height: 100%;
}

.ap-email-table-v2-user,
.ap-user-alerts-v2-alert-cell {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.ap-email-table-v2-user strong,
.ap-user-alerts-v2-alert-cell strong {
    overflow: hidden;
    color: var(--ds-text-strong);
    font-size: 0.74rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ap-email-table-v2-user span,
.ap-user-alerts-v2-alert-cell span {
    overflow: hidden;
    color: var(--ds-text-muted);
    font-size: 0.64rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ap-email-table-v2-risk {
    display: grid;
    gap: 2px;
}

.ap-email-table-v2-risk strong {
    color: currentColor;
    font-size: 0.85rem;
    line-height: 1;
}

.ap-email-table-v2-risk span {
    color: var(--ds-text-muted);
    font-size: 0.62rem;
}

.ap-email-table-v2-signals {
    display: flex;
    gap: 5px;
}

.ap-email-table-v2-signals span {
    min-width: 30px;
    padding: 4px 6px;
    color: var(--ds-text);
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 999px;
    font-size: 0.64rem;
    text-align: center;
}

.ap-email-table-v2-status {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.ap-email-table-v2-status span {
    padding: 4px 7px;
    border: 1px solid var(--ds-border);
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
}

.ap-email-table-v2-status .is-active,
.ap-email-table-v2-status .is-vip {
    color: var(--ds-text-strong);
    background: var(--ds-surface-0);
}

.ap-email-table-v2-status .is-muted {
    color: var(--ds-text-muted);
}

.ap-email-table-v2-actions,
.ap-user-alerts-v2-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
}

.ap-user-alerts-v2-chip {
    min-width: 92px;
    padding: 5px 8px;
    color: var(--ds-text-strong);
    background: var(--ds-surface-0);
    border: 1px solid currentColor;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    font-size: 0.66rem;
    font-weight: 700;
}

.ap-user-alerts-v2-chip.is-closed {
    color: var(--ds-text-muted);
    border-color: var(--ds-border);
}

.ap-user-alerts-v2-date {
    color: var(--ds-text-muted);
    font-size: 0.68rem;
    white-space: nowrap;
}

.ap-user-alerts-v2-detail {
    display: grid;
    gap: 10px;
    margin: 6px;
    padding: 12px;
    color: var(--ds-text);
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
}

.ap-user-alerts-v2-detail > div:first-child {
    display: grid;
    gap: 2px;
}

.ap-user-alerts-v2-detail span,
.ap-user-alerts-v2-detail small {
    color: var(--ds-text-muted);
    font-size: 0.68rem;
    line-height: 1.2;
}

.ap-user-alerts-v2-detail strong {
    color: var(--ds-text-strong);
    font-size: 0.9rem;
    line-height: 1.2;
}

.ap-user-alerts-v2-detail section {
    color: var(--ds-text);
    font-size: 0.74rem;
    line-height: 1.45;
}

.ap-email-table-v2 .is-neutral,
.ap-user-alerts-v2 .is-neutral { color: rgb(11, 186, 131); }
.ap-email-table-v2 .is-warning,
.ap-user-alerts-v2 .is-warning { color: rgb(119, 107, 231); }
.ap-email-table-v2 .is-critical,
.ap-user-alerts-v2 .is-critical { color: rgb(246, 78, 98); }
.ap-email-table-v2 .is-catastrophic,
.ap-user-alerts-v2 .is-catastrophic { color: rgb(255, 64, 129); }

@media (max-width: 900px) {
    .ap-email-table-v2,
    .ap-user-alerts-v2 {
        overflow-y: auto;
    }

    .ap-email-table-v2-kpis,
    .ap-user-alerts-v2-kpis,
    .ap-email-table-v2-toolbar,
    .ap-user-alerts-v2-toolbar,
    .ap-email-table-v2-risk-filter,
    .ap-user-alerts-v2-severity-filter {
        grid-template-columns: 1fr;
    }

    .ap-email-table-v2-controls,
    .ap-user-alerts-v2-controls {
        justify-content: stretch;
    }

    .ap-email-table-v2-search,
    .ap-user-alerts-v2-search {
        width: 100%;
    }
}


/* ---------- AP alert and query tables V2 ---------- */
.ap-alert-table-v2,
.ap-query-table-v2 {
    position: relative;
    width: 100%;
    height: 100%;
    min-width: 0;
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    overflow: hidden;
    color: var(--ds-text);
}

.ap-alert-table-v2-header,
.ap-query-table-v2-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ap-alert-table-v2-title,
.ap-query-table-v2-title {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ap-alert-table-v2-title span,
.ap-alert-table-v2-title small,
.ap-query-table-v2-title span,
.ap-query-table-v2-title small {
    color: var(--ds-text-muted);
    font-size: 0.68rem;
    line-height: 1.1;
}

.ap-alert-table-v2-title strong,
.ap-query-table-v2-title strong {
    color: var(--ds-text-strong);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.ap-alert-table-v2-state,
.ap-query-table-v2-state {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    color: var(--ds-text-strong);
    background: var(--ds-surface-0);
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.ap-alert-table-v2-kpis,
.ap-query-table-v2-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.ap-alert-table-v2-kpis > div,
.ap-query-table-v2-kpis > div {
    min-width: 0;
    padding: 8px 10px;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
}

.ap-alert-table-v2-kpis span,
.ap-query-table-v2-kpis span {
    display: block;
    color: var(--ds-text-muted);
    font-size: 0.62rem;
    line-height: 1.1;
}

.ap-alert-table-v2-kpis strong,
.ap-query-table-v2-kpis strong {
    display: block;
    margin-top: 3px;
    color: var(--ds-text-strong);
    font-size: 1rem;
    line-height: 1;
}

.ap-alert-table-v2-toolbar,
.ap-query-table-v2-toolbar {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.ap-alert-table-v2-severity-filter,
.ap-query-table-v2-type-filter {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
}

.ap-query-table-v2-type-filter {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.ap-alert-table-v2-filter,
.ap-query-table-v2-filter {
    min-width: 0;
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    padding: 7px 8px;
    color: var(--ds-text);
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-left: 4px solid currentColor;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-size: 0.68rem;
    text-align: left;
}

.ap-alert-table-v2-filter:hover,
.ap-alert-table-v2-filter.is-active,
.ap-query-table-v2-filter:hover,
.ap-query-table-v2-filter.is-active {
    background: var(--ds-card-bg-hover);
    border-color: currentColor;
}

.ap-alert-table-v2-filter span,
.ap-query-table-v2-filter span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
}

.ap-alert-table-v2-filter strong,
.ap-query-table-v2-filter strong {
    color: var(--ds-text-strong);
    font-size: 0.78rem;
}

.ap-alert-table-v2-controls,
.ap-query-table-v2-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.ap-alert-table-v2-search,
.ap-query-table-v2-search {
    width: min(260px, 30vw);
}

.ap-alert-table-v2-grid,
.ap-query-table-v2-grid {
    min-height: 0;
    overflow: hidden;
}

.ap-alert-table-v2-grid .mud-table-container,
.ap-query-table-v2-grid .mud-table-container {
    height: 100%;
}

.ap-alert-table-v2-chip {
    min-width: 92px;
    padding: 5px 8px;
    color: var(--ds-text-strong);
    background: var(--ds-surface-0);
    border: 1px solid currentColor;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    font-size: 0.66rem;
    font-weight: 700;
}

.ap-alert-table-v2-chip.is-closed {
    color: var(--ds-text-muted);
    border-color: var(--ds-border);
}

.ap-alert-table-v2-alert-cell,
.ap-query-table-v2-query {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.ap-alert-table-v2-alert-cell strong,
.ap-query-table-v2-query strong {
    overflow: hidden;
    color: var(--ds-text-strong);
    font-size: 0.74rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ap-alert-table-v2-alert-cell span,
.ap-query-table-v2-query span,
.ap-alert-table-v2-date,
.ap-query-table-v2-date {
    overflow: hidden;
    color: var(--ds-text-muted);
    font-size: 0.64rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ap-alert-table-v2-actions,
.ap-query-table-v2-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
}

.ap-alert-table-v2-detail {
    display: grid;
    gap: 10px;
    margin: 6px;
    padding: 12px;
    color: var(--ds-text);
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
}

.ap-alert-table-v2-detail > div:first-child {
    display: grid;
    gap: 2px;
}

.ap-alert-table-v2-detail span,
.ap-alert-table-v2-detail small {
    color: var(--ds-text-muted);
    font-size: 0.68rem;
    line-height: 1.2;
}

.ap-alert-table-v2-detail strong {
    color: var(--ds-text-strong);
    font-size: 0.9rem;
    line-height: 1.2;
}

.ap-alert-table-v2-detail section,
.ap-alert-table-v2-recommendation-text div {
    color: var(--ds-text);
    font-size: 0.74rem;
    line-height: 1.45;
}

.ap-alert-table-v2-recommendation {
    justify-self: start;
}

.ap-alert-table-v2-recommendation-text {
    display: grid;
    gap: 5px;
    padding-top: 8px;
    border-top: 1px solid var(--ds-border);
}

.ap-query-table-v2-status {
    display: inline-flex;
    padding: 4px 7px;
    border: 1px solid var(--ds-border);
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
}

.ap-query-table-v2-status.is-active {
    color: rgb(11, 186, 131);
}

.ap-query-table-v2-status.is-muted {
    color: var(--ds-text-muted);
}

.ap-alert-table-v2 .is-neutral { color: rgb(11, 186, 131); }
.ap-alert-table-v2 .is-warning { color: rgb(119, 107, 231); }
.ap-alert-table-v2 .is-critical { color: rgb(246, 78, 98); }
.ap-alert-table-v2 .is-catastrophic { color: rgb(255, 64, 129); }

.ap-query-table-v2-filter.is-type-0 { color: rgb(11, 186, 131); }
.ap-query-table-v2-filter.is-type-1 { color: rgb(119, 107, 231); }
.ap-query-table-v2-filter.is-type-2 { color: rgb(246, 78, 98); }
.ap-query-table-v2-filter.is-type-3 { color: rgb(14, 165, 233); }
.ap-query-table-v2-filter.is-type-4 { color: rgb(245, 158, 11); }

@media (max-width: 900px) {
    .ap-alert-table-v2,
    .ap-query-table-v2 {
        overflow-y: auto;
    }

    .ap-alert-table-v2-kpis,
    .ap-query-table-v2-kpis,
    .ap-alert-table-v2-toolbar,
    .ap-query-table-v2-toolbar,
    .ap-alert-table-v2-severity-filter,
    .ap-query-table-v2-type-filter {
        grid-template-columns: 1fr;
    }

    .ap-alert-table-v2-controls,
    .ap-query-table-v2-controls {
        justify-content: stretch;
    }

    .ap-alert-table-v2-search,
    .ap-query-table-v2-search {
        width: 100%;
    }
}


/* ---------- AP DomainWatch V2 ---------- */
.ap-domain-table-v2,
.ap-domain-summary-v2,
.ap-domain-alerts-v2 {
    position: relative;
    width: 100%;
    height: 100%;
    min-width: 0;
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    overflow: hidden;
    color: var(--ds-text);
}

.ap-domain-summary-v2 { grid-template-rows: auto auto minmax(0, 1fr) auto; }
.ap-domain-alerts-v2 { display: block; }

.ap-domain-table-v2-header,
.ap-domain-summary-v2-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ap-domain-table-v2-title,
.ap-domain-summary-v2-title {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ap-domain-table-v2-title span,
.ap-domain-table-v2-title small,
.ap-domain-summary-v2-title span,
.ap-domain-summary-v2-title small {
    color: var(--ds-text-muted);
    font-size: 0.68rem;
    line-height: 1.1;
}

.ap-domain-table-v2-title strong,
.ap-domain-summary-v2-title strong {
    color: var(--ds-text-strong);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.ap-domain-table-v2-state,
.ap-domain-summary-v2-state {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    color: var(--ds-text-strong);
    background: var(--ds-surface-0);
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.ap-domain-table-v2-kpis,
.ap-domain-summary-v2-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.ap-domain-table-v2-kpis > div,
.ap-domain-summary-v2-kpis > div {
    min-width: 0;
    padding: 8px 10px;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
}

.ap-domain-table-v2-kpis span,
.ap-domain-summary-v2-kpis span {
    display: block;
    color: var(--ds-text-muted);
    font-size: 0.62rem;
    line-height: 1.1;
}

.ap-domain-table-v2-kpis strong,
.ap-domain-summary-v2-kpis strong {
    display: block;
    margin-top: 3px;
    color: var(--ds-text-strong);
    font-size: 1rem;
    line-height: 1;
}

.ap-domain-table-v2-toolbar {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.ap-domain-table-v2-view-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    color: var(--ds-text);
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
}

.ap-domain-table-v2-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.ap-domain-table-v2-search {
    width: min(280px, 34vw);
}

.ap-domain-table-v2-grid {
    min-height: 0;
    overflow: hidden;
}

.ap-domain-table-v2-grid .mud-table-container {
    height: 100%;
}

.ap-domain-table-v2-name {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.ap-domain-table-v2-name strong {
    overflow: hidden;
    color: var(--ds-text-strong);
    font-size: 0.74rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ap-domain-table-v2-name span {
    color: var(--ds-text-muted);
    font-size: 0.64rem;
}

.ap-domain-table-v2-pill,
.ap-domain-table-v2-risk {
    display: inline-flex;
    padding: 4px 7px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
}

.ap-domain-table-v2-pill.is-muted {
    color: var(--ds-text-muted);
    border-color: var(--ds-border);
}

.ap-domain-table-v2-signals,
.ap-domain-table-v2-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ap-domain-table-v2-actions { justify-content: flex-end; }

.ap-domain-table-v2-signals span {
    min-width: 30px;
    padding: 4px 6px;
    color: var(--ds-text);
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 999px;
    font-size: 0.64rem;
    text-align: center;
}

.ap-domain-table-v2-detail {
    display: grid;
    gap: 10px;
    margin: 6px;
    padding: 12px;
    color: var(--ds-text);
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
}

.ap-domain-table-v2-detail > div:first-child {
    display: grid;
    gap: 2px;
}

.ap-domain-table-v2-detail span,
.ap-domain-table-v2-detail small {
    color: var(--ds-text-muted);
    font-size: 0.68rem;
}

.ap-domain-table-v2-detail strong {
    color: var(--ds-text-strong);
    font-size: 0.9rem;
}

.ap-domain-table-v2-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.ap-domain-table-v2-detail-grid span,
.ap-domain-table-v2-detail-lists > div {
    display: grid;
    gap: 4px;
    padding: 8px;
    background: var(--ds-surface-1);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
}

.ap-domain-table-v2-detail-lists {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.ap-domain-summary-v2-layout {
    display: grid;
    grid-template-columns: minmax(140px, 0.32fr) minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
}

.ap-domain-summary-v2-distribution {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.ap-domain-summary-v2-severity-row {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    padding: 7px 8px;
    color: var(--ds-text);
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-left: 4px solid currentColor;
    border-radius: 8px;
    font: inherit;
    text-align: left;
}

.ap-domain-summary-v2-severity-row span:first-child {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: currentColor;
}

.ap-domain-summary-v2-timeline {
    min-width: 0;
    height: 190px;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: end;
    gap: 5px;
    padding: 8px 8px 0;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 10px;
}

.ap-domain-summary-v2-month {
    min-width: 0;
    height: 100%;
    display: grid;
    grid-template-rows: 1fr auto auto;
    align-items: end;
    gap: 3px;
}

.ap-domain-summary-v2-bar {
    width: 100%;
    min-height: 8px;
    display: flex;
    flex-direction: column-reverse;
    overflow: hidden;
    border-radius: 7px 7px 3px 3px;
    background: rgba(148, 163, 184, 0.14);
}

.ap-domain-summary-v2-segment {
    display: block;
    width: 100%;
    min-height: 3px;
}

.ap-domain-summary-v2-month strong,
.ap-domain-summary-v2-month small {
    text-align: center;
    line-height: 1;
}

.ap-domain-summary-v2-month strong { color: var(--ds-text-strong); font-size: 0.68rem; }
.ap-domain-summary-v2-month small { color: var(--ds-text-muted); font-size: 0.54rem; white-space: nowrap; }
.ap-domain-summary-v2-actions { display: flex; justify-content: center; gap: 6px; }

.ap-domain-table-v2 .is-neutral,
.ap-domain-summary-v2 .is-neutral { color: rgb(11, 186, 131); }
.ap-domain-table-v2 .is-warning,
.ap-domain-summary-v2 .is-warning { color: rgb(119, 107, 231); }
.ap-domain-table-v2 .is-critical,
.ap-domain-summary-v2 .is-critical { color: rgb(246, 78, 98); }
.ap-domain-table-v2 .is-catastrophic,
.ap-domain-summary-v2 .is-catastrophic { color: rgb(255, 64, 129); }

.ap-domain-summary-v2-segment.is-neutral { background: rgb(11, 186, 131); }
.ap-domain-summary-v2-segment.is-warning { background: rgb(119, 107, 231); }
.ap-domain-summary-v2-segment.is-critical { background: rgb(246, 78, 98); }
.ap-domain-summary-v2-segment.is-catastrophic { background: rgb(255, 64, 129); }

@media (max-width: 900px) {
    .ap-domain-table-v2,
    .ap-domain-summary-v2 {
        overflow-y: auto;
    }

    .ap-domain-table-v2-kpis,
    .ap-domain-summary-v2-kpis,
    .ap-domain-table-v2-toolbar,
    .ap-domain-summary-v2-layout,
    .ap-domain-table-v2-detail-grid,
    .ap-domain-table-v2-detail-lists {
        grid-template-columns: 1fr;
    }

    .ap-domain-table-v2-controls {
        justify-content: stretch;
    }

    .ap-domain-table-v2-search {
        width: 100%;
    }

    .ap-domain-summary-v2-timeline {
        min-width: 640px;
    }
}


/* ---------- AP Infrastructure tables V2 ---------- */
.ap-infra-table-v2 {
    position: relative;
    width: 100%;
    height: 100%;
    min-width: 0;
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    overflow: hidden;
    color: var(--ds-text);
}

.ap-infra-table-v2-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ap-infra-table-v2-title {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ap-infra-table-v2-title span,
.ap-infra-table-v2-title small {
    color: var(--ds-text-muted);
    font-size: 0.68rem;
    line-height: 1.1;
}

.ap-infra-table-v2-title strong {
    color: var(--ds-text-strong);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.ap-infra-table-v2-state {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    color: var(--ds-text-strong);
    background: var(--ds-surface-0);
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.ap-infra-table-v2-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.ap-infra-table-v2-kpis > div {
    min-width: 0;
    padding: 8px 10px;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
}

.ap-infra-table-v2-kpis span {
    display: block;
    color: var(--ds-text-muted);
    font-size: 0.62rem;
    line-height: 1.1;
}

.ap-infra-table-v2-kpis strong {
    display: block;
    margin-top: 3px;
    color: var(--ds-text-strong);
    font-size: 1rem;
    line-height: 1;
}

.ap-infra-table-v2-toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.ap-infra-table-v2-view-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    color: var(--ds-text);
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
}

.ap-infra-table-v2-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.ap-infra-table-v2-search {
    width: min(280px, 34vw);
}

.ap-infra-table-v2-grid {
    min-height: 0;
    overflow: hidden;
}

.ap-infra-table-v2-grid .mud-table-container {
    height: 100%;
}

.ap-infra-table-v2-name {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.ap-infra-table-v2-name strong {
    overflow: hidden;
    color: var(--ds-text-strong);
    font-size: 0.74rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ap-infra-table-v2-name span,
.ap-infra-table-v2-muted {
    overflow: hidden;
    color: var(--ds-text-muted);
    font-size: 0.64rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ap-infra-table-v2-signals {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.ap-infra-table-v2-signals span,
.ap-infra-table-v2-pill {
    display: inline-flex;
    padding: 4px 7px;
    color: var(--ds-text);
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
}

.ap-infra-table-v2-detail {
    display: grid;
    gap: 10px;
    margin: 6px;
    padding: 12px;
    color: var(--ds-text);
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
}

.ap-infra-table-v2-detail > div:first-child {
    display: grid;
    gap: 2px;
}

.ap-infra-table-v2-detail span,
.ap-infra-table-v2-detail small {
    color: var(--ds-text-muted);
    font-size: 0.68rem;
}

.ap-infra-table-v2-detail strong {
    color: var(--ds-text-strong);
    font-size: 0.9rem;
}

.ap-infra-table-v2-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.ap-infra-table-v2-detail-grid span,
.ap-infra-table-v2-detail-lists > div {
    display: grid;
    gap: 4px;
    padding: 8px;
    background: var(--ds-surface-1);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
}

.ap-infra-table-v2-detail-lists {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.ap-infra-table-v2-detail-lists.single {
    grid-template-columns: 1fr;
}

.ap-infra-table-v2-detail-lists button {
    padding: 0;
    color: var(--mud-palette-primary);
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.ap-infra-table-v2 .is-neutral { color: rgb(11, 186, 131); }
.ap-infra-table-v2 .is-critical { color: rgb(246, 78, 98); }

@media (max-width: 900px) {
    .ap-infra-table-v2 {
        overflow-y: auto;
    }

    .ap-infra-table-v2-kpis,
    .ap-infra-table-v2-toolbar,
    .ap-infra-table-v2-detail-grid,
    .ap-infra-table-v2-detail-lists {
        grid-template-columns: 1fr;
    }

    .ap-infra-table-v2-controls {
        justify-content: stretch;
    }

    .ap-infra-table-v2-search {
        width: 100%;
    }
}


/* ---------- AP Partner Supplier V2 ---------- */
.ap-ps-table-v2,
.ap-ps-line-v2,
.ap-ps-analytics-v2,
.ap-ps-report-v2 {
    position: relative;
    width: 100%;
    height: 100%;
    min-width: 0;
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    overflow: hidden;
    color: var(--ds-text);
}

.ap-ps-line-v2 { grid-template-rows: auto minmax(0, 1fr) auto; }
.ap-ps-report-v2 { grid-template-rows: auto auto minmax(0, 1fr); }

.ap-ps-table-v2-header,
.ap-ps-line-v2-header,
.ap-ps-analytics-v2-header,
.ap-ps-report-v2-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ap-ps-table-v2-title,
.ap-ps-line-v2-title,
.ap-ps-analytics-v2-title,
.ap-ps-report-v2-title {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ap-ps-table-v2-title span,
.ap-ps-table-v2-title small,
.ap-ps-line-v2-title span,
.ap-ps-line-v2-title small,
.ap-ps-analytics-v2-title span,
.ap-ps-analytics-v2-title small,
.ap-ps-report-v2-title span,
.ap-ps-report-v2-title small {
    color: var(--ds-text-muted);
    font-size: 0.68rem;
    line-height: 1.1;
}

.ap-ps-table-v2-title strong,
.ap-ps-line-v2-title strong,
.ap-ps-analytics-v2-title strong,
.ap-ps-report-v2-title strong {
    color: var(--ds-text-strong);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.ap-ps-table-v2-state,
.ap-ps-line-v2-state,
.ap-ps-analytics-v2-state,
.ap-ps-report-v2-state {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    color: var(--ds-text-strong);
    background: var(--ds-surface-0);
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.ap-ps-table-v2-kpis,
.ap-ps-analytics-v2-kpis,
.ap-ps-report-v2-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.ap-ps-table-v2-kpis > div,
.ap-ps-analytics-v2-kpis > div,
.ap-ps-report-v2-kpis > div {
    min-width: 0;
    padding: 8px 10px;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
}

.ap-ps-table-v2-kpis span,
.ap-ps-analytics-v2-kpis span,
.ap-ps-report-v2-kpis span {
    display: block;
    color: var(--ds-text-muted);
    font-size: 0.62rem;
}

.ap-ps-table-v2-kpis strong,
.ap-ps-analytics-v2-kpis strong,
.ap-ps-report-v2-kpis strong {
    display: block;
    margin-top: 3px;
    color: var(--ds-text-strong);
    font-size: 1rem;
}

.ap-ps-table-v2-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.ap-ps-table-v2-risk-filter {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.ap-ps-table-v2-risk-option {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    padding: 7px 8px;
    color: var(--ds-text);
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-left: 4px solid currentColor;
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    font-size: 0.68rem;
    text-align: left;
}

.ap-ps-table-v2-risk-option.is-active,
.ap-ps-table-v2-risk-option:hover {
    background: var(--ds-card-bg-hover);
    border-color: currentColor;
}

.ap-ps-table-v2-risk-option span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
}

.ap-ps-table-v2-controls,
.ap-ps-analytics-v2-panel-head,
.ap-ps-report-v2-layout {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.ap-ps-table-v2-search {
    width: min(260px, 30vw);
}

.ap-ps-table-v2-grid,
.ap-ps-analytics-v2-grid,
.ap-ps-line-v2-chart {
    min-height: 0;
    overflow: hidden;
}

.ap-ps-table-v2-grid .mud-table-container,
.ap-ps-analytics-v2-grid .mud-table-container {
    height: 100%;
}

.ap-ps-table-v2-name,
.ap-ps-analytics-v2-name {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.ap-ps-table-v2-name strong,
.ap-ps-analytics-v2-name strong {
    overflow: hidden;
    color: var(--ds-text-strong);
    font-size: 0.74rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ap-ps-table-v2-name span,
.ap-ps-table-v2-muted,
.ap-ps-analytics-v2-name span,
.ap-ps-analytics-v2-muted {
    overflow: hidden;
    color: var(--ds-text-muted);
    font-size: 0.64rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ap-ps-table-v2-risk,
.ap-ps-analytics-v2-risk {
    display: inline-flex;
    padding: 4px 7px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
}

.ap-ps-table-v2-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
}

.ap-ps-line-v2-caption {
    color: var(--ds-text-muted);
    font-size: 0.7rem;
    text-align: center;
}

.ap-ps-analytics-v2-layout {
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 10px;
}

.ap-ps-analytics-v2-panel,
.ap-ps-report-v2-panel {
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 10px;
    overflow: hidden;
}

.ap-ps-analytics-v2-wide {
    grid-column: 1 / -1;
}

.ap-ps-analytics-v2-panel-head {
    justify-content: space-between;
}

.ap-ps-analytics-v2-panel-head span {
    display: block;
    color: var(--ds-text-strong);
    font-size: 0.8rem;
    font-weight: 700;
}

.ap-ps-analytics-v2-panel-head small {
    color: var(--ds-text-muted);
    font-size: 0.64rem;
}

.ap-ps-analytics-v2-card-grid {
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    overflow: auto;
}

.ap-ps-analytics-v2-card {
    display: grid;
    gap: 3px;
    padding: 8px;
    color: var(--ds-text);
    background: var(--ds-surface-1);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.ap-ps-analytics-v2-card.is-active,
.ap-ps-analytics-v2-card:hover {
    border-color: var(--mud-palette-primary);
}

.ap-ps-analytics-v2-card span,
.ap-ps-analytics-v2-card small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ap-ps-analytics-v2-card span { color: var(--ds-text-muted); font-size: 0.64rem; }
.ap-ps-analytics-v2-card strong { color: var(--ds-text-strong); font-size: 1.05rem; }
.ap-ps-analytics-v2-card small { color: var(--ds-text-muted); font-size: 0.6rem; }

.ap-ps-report-v2-layout {
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 10px;
}

.ap-ps-report-v2-panel {
    padding: 0;
}

.ap-ps-table-v2 .is-neutral,
.ap-ps-analytics-v2 .is-neutral,
.ap-ps-line-v2-state,
.ap-ps-report-v2-state { color: rgb(11, 186, 131); }
.ap-ps-table-v2 .is-warning,
.ap-ps-analytics-v2 .is-warning { color: rgb(119, 107, 231); }
.ap-ps-table-v2 .is-critical,
.ap-ps-analytics-v2 .is-critical { color: rgb(246, 78, 98); }

@media (max-width: 900px) {
    .ap-ps-table-v2,
    .ap-ps-line-v2,
    .ap-ps-analytics-v2,
    .ap-ps-report-v2 {
        overflow-y: auto;
    }

    .ap-ps-table-v2-kpis,
    .ap-ps-analytics-v2-kpis,
    .ap-ps-report-v2-kpis,
    .ap-ps-table-v2-toolbar,
    .ap-ps-table-v2-risk-filter,
    .ap-ps-analytics-v2-layout,
    .ap-ps-analytics-v2-card-grid,
    .ap-ps-report-v2-layout {
        grid-template-columns: 1fr;
    }

    .ap-ps-table-v2-controls {
        justify-content: stretch;
    }

    .ap-ps-table-v2-search {
        width: 100%;
    }
}

/* ---------- AP Global Intelligence V2 ---------- */
.ap-global-intel-v2-page,
.ap-global-intel-v2-content {
    min-height: 0;
}

.ap-global-intel-v2-hero,
.ap-global-map-v2,
.ap-global-breach-v2,
.ap-global-industry-v2 {
    min-width: 0;
    color: var(--ds-text);
}

.ap-global-intel-v2-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    margin-bottom: 12px;
    background: var(--ds-glass-bg);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
    box-shadow: var(--ds-shadow-soft);
}

.ap-global-intel-v2-hero div:first-child,
.ap-global-map-v2-title,
.ap-global-breach-v2-title,
.ap-global-industry-v2-title {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ap-global-intel-v2-hero span,
.ap-global-intel-v2-hero small,
.ap-global-map-v2-title span,
.ap-global-map-v2-title small,
.ap-global-breach-v2-title span,
.ap-global-breach-v2-title small,
.ap-global-industry-v2-title span,
.ap-global-industry-v2-title small {
    color: var(--ds-text-muted);
    font-size: 0.68rem;
    line-height: 1.15;
}

.ap-global-intel-v2-hero strong,
.ap-global-map-v2-title strong,
.ap-global-breach-v2-title strong,
.ap-global-industry-v2-title strong {
    color: var(--ds-text-strong);
    font-size: 1.12rem;
    line-height: 1.15;
}

.ap-global-intel-v2-hero-state,
.ap-global-map-v2-state {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    color: rgb(11, 186, 131);
    background: rgba(11, 186, 131, 0.1);
    border: 1px solid rgba(11, 186, 131, 0.24);
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 700;
}

.ap-global-intel-v2-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
    grid-template-rows: minmax(620px, 1fr) minmax(360px, 0.56fr);
    gap: 12px;
    min-height: 0;
}

.ap-global-intel-v2-map {
    grid-row: 1 / span 2;
    min-height: 0;
}

.ap-global-intel-v2-panel {
    min-height: 0;
}

.ap-global-map-v2,
.ap-global-breach-v2,
.ap-global-industry-v2 {
    width: 100%;
    height: 100%;
    display: grid;
    gap: 10px;
    padding: 12px;
    overflow: hidden;
}

.ap-global-map-v2 {
    grid-template-rows: auto auto minmax(0, 1fr) minmax(260px, 0.62fr);
}

.ap-global-breach-v2,
.ap-global-industry-v2 {
    grid-template-rows: auto auto minmax(0, 1fr);
}

.ap-global-map-v2-header,
.ap-global-breach-v2-header,
.ap-global-industry-v2-header {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ap-global-map-v2-kpis,
.ap-global-breach-v2-kpis,
.ap-global-industry-v2-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.ap-global-breach-v2-kpis,
.ap-global-industry-v2-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ap-global-map-v2-kpis > div,
.ap-global-breach-v2-kpis > div,
.ap-global-industry-v2-kpis > div {
    min-width: 0;
    padding: 8px 10px;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
}

.ap-global-map-v2-kpis span,
.ap-global-breach-v2-kpis span,
.ap-global-industry-v2-kpis span {
    display: block;
    color: var(--ds-text-muted);
    font-size: 0.62rem;
    text-transform: uppercase;
}

.ap-global-map-v2-kpis strong,
.ap-global-breach-v2-kpis strong,
.ap-global-industry-v2-kpis strong {
    display: block;
    margin-top: 3px;
    color: var(--ds-text-strong);
    font-size: 1rem;
}

.ap-global-map-v2-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, 0.34fr);
    gap: 10px;
    min-height: 0;
}

.ap-global-map-v2-earth-card,
.ap-global-map-v2-detail,
.ap-global-map-v2-table-panel,
.ap-global-breach-v2-group,
.ap-global-industry-v2-row {
    min-width: 0;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
}

.ap-global-map-v2-earth-card {
    position: relative;
    overflow: hidden;
    min-height: 0;
}

.ap-global-map-v2-earth {
    width: 100%;
    height: min(100%, calc(100dvh - 330px));
    min-height: 330px;
    max-height: 560px;
}

.ap-global-map-v2-earth canvas,
.ap-global-map-v2-earth > div {
    max-height: 100% !important;
}

.ap-global-map-v2-legend {
    position: absolute;
    left: 10px;
    bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: calc(100% - 20px);
    padding: 7px 9px;
    background: var(--ds-glass-bg);
    border: 1px solid var(--ds-border);
    border-radius: 999px;
    backdrop-filter: blur(14px);
}

.ap-global-map-v2-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--ds-text-muted);
    font-size: 0.61rem;
    font-weight: 700;
}

.ap-global-map-v2-legend i {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 999px;
}

.ap-global-map-v2-legend .is-low { background: rgb(11, 186, 131); }
.ap-global-map-v2-legend .is-elevated { background: rgb(119, 107, 231); }
.ap-global-map-v2-legend .is-high { background: rgb(246, 78, 98); }
.ap-global-map-v2-legend .is-news { background: rgb(242, 180, 64); }

.ap-global-map-v2-detail {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px;
    overflow: auto;
}

.ap-global-map-v2-detail-head {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--ds-text-strong);
    font-size: 0.74rem;
    font-weight: 800;
}

.ap-global-map-v2-detail p {
    margin: 0;
    color: var(--ds-text-muted);
    font-size: 0.72rem;
    line-height: 1.35;
}

.ap-global-map-v2-country-card {
    display: grid;
    gap: 8px;
    padding: 10px;
    background: var(--ds-card-bg);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
}

.ap-global-map-v2-country-card > strong {
    color: var(--ds-text-strong);
    font-size: 1rem;
}

.ap-global-map-v2-country-card > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.ap-global-map-v2-country-card > div span,
.ap-global-map-v2-country-card > div b {
    padding: 6px 8px;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
}

.ap-global-map-v2-country-card > div span {
    color: var(--ds-text-muted);
    font-size: 0.62rem;
}

.ap-global-map-v2-country-card > div b {
    color: var(--ds-text-strong);
    font-size: 0.74rem;
    text-align: right;
}

.ap-global-map-v2-risk {
    display: inline-flex;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.64rem;
    font-weight: 800;
}

.ap-global-map-v2-risk.is-low { color: rgb(11, 186, 131); background: rgba(11, 186, 131, 0.1); }
.ap-global-map-v2-risk.is-elevated { color: rgb(119, 107, 231); background: rgba(119, 107, 231, 0.11); }
.ap-global-map-v2-risk.is-high,
.ap-global-map-v2-risk.is-critical { color: rgb(246, 78, 98); background: rgba(246, 78, 98, 0.12); }

.ap-global-map-v2-sanctions {
    padding: 8px 10px;
    color: rgb(246, 78, 98);
    background: rgba(246, 78, 98, 0.1);
    border: 1px solid rgba(246, 78, 98, 0.22);
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 800;
}

.ap-global-map-v2-notes,
.ap-global-map-v2-news {
    display: grid;
    gap: 6px;
}

.ap-global-map-v2-notes span,
.ap-global-map-v2-news > div {
    min-width: 0;
    padding: 7px 9px;
    color: var(--ds-text);
    background: var(--ds-card-bg);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
    font-size: 0.68rem;
    line-height: 1.25;
}

.ap-global-map-v2-news > span {
    color: var(--ds-text-muted);
    font-size: 0.62rem;
    text-transform: uppercase;
    font-weight: 800;
}

.ap-global-map-v2-news > div {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ap-global-map-v2-news > div span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ap-global-map-v2-table-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
    overflow: hidden;
}

.ap-global-map-v2-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ap-global-map-v2-search { flex: 1 1 260px; }
.ap-global-map-v2-select { flex: 0 0 180px; }

.ap-global-map-v2-grid {
    min-height: 0;
    overflow: hidden;
}

.ap-global-map-v2-grid .mud-table-container {
    max-height: 100%;
}

.ap-global-map-v2-country-name {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ap-global-map-v2-country-name strong {
    color: var(--ds-text-strong);
    font-size: 0.76rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ap-global-map-v2-country-name span,
.ap-global-map-v2-muted,
.ap-global-map-v2-signal {
    color: var(--ds-text-muted);
    font-size: 0.68rem;
}

.ap-global-breach-v2-group-grid,
.ap-global-industry-v2-list {
    min-height: 0;
    overflow: auto;
    display: grid;
    gap: 8px;
    align-content: start;
}

.ap-global-breach-v2-group {
    display: grid;
    gap: 10px;
    padding: 10px;
}

.ap-global-breach-v2-group > div:first-child,
.ap-global-industry-v2-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ap-global-breach-v2-group strong,
.ap-global-industry-v2-row strong {
    color: var(--ds-text-strong);
    font-size: 0.78rem;
}

.ap-global-breach-v2-group span,
.ap-global-industry-v2-row em {
    color: var(--ds-text-muted);
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 800;
}

.ap-global-breach-v2-bars {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: end;
    gap: 4px;
    height: 78px;
}

.ap-global-breach-v2-bars span {
    height: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 4px;
}

.ap-global-breach-v2-bars i {
    display: block;
    min-height: 5px;
    background: linear-gradient(180deg, rgb(246, 78, 98), rgb(119, 107, 231));
    border-radius: 6px 6px 2px 2px;
}

.ap-global-breach-v2-bars small {
    color: var(--ds-text-muted);
    font-size: 0.52rem;
    text-align: center;
}

.ap-global-industry-v2-row {
    padding: 10px;
}

.ap-global-industry-v2-row > span {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgb(11, 186, 131);
    background: rgba(11, 186, 131, 0.1);
    border-radius: 8px;
    font-size: 0.68rem;
    font-weight: 900;
}

.ap-global-industry-v2-row > div {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    gap: 6px;
}

.ap-global-industry-v2-row strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ap-global-industry-v2-row i {
    display: block;
    height: 7px;
    background: var(--ds-surface-1);
    border-radius: 999px;
    overflow: hidden;
}

.ap-global-industry-v2-row i b {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, rgb(11, 186, 131), rgb(119, 107, 231));
    border-radius: inherit;
}

.ap-global-company-v2 {
    position: relative;
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-rows: auto auto auto;
    gap: 10px;
    padding: 12px;
    margin-top: 12px;
    color: var(--ds-text);
    background: var(--ds-glass-bg);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
    box-shadow: var(--ds-shadow-soft);
    overflow: hidden;
}

.ap-global-company-v2-header,
.ap-global-company-v2-panel-head {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ap-global-company-v2-title,
.ap-global-company-v2-panel-head > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ap-global-company-v2-title span,
.ap-global-company-v2-title small,
.ap-global-company-v2-panel-head small {
    color: var(--ds-text-muted);
    font-size: 0.68rem;
    line-height: 1.15;
}

.ap-global-company-v2-title strong {
    color: var(--ds-text-strong);
    font-size: 1.12rem;
    line-height: 1.15;
}

.ap-global-company-v2-panel-head span {
    color: var(--ds-text-strong);
    font-size: 0.78rem;
    font-weight: 800;
}

.ap-global-company-v2-state {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    color: rgb(11, 186, 131);
    background: rgba(11, 186, 131, 0.1);
    border: 1px solid rgba(11, 186, 131, 0.24);
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 700;
}

.ap-global-company-v2-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.ap-global-company-v2-kpis > div,
.ap-global-company-v2-panel {
    min-width: 0;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
}

.ap-global-company-v2-kpis > div {
    padding: 8px 10px;
}

.ap-global-company-v2-kpis span {
    display: block;
    color: var(--ds-text-muted);
    font-size: 0.62rem;
    text-transform: uppercase;
}

.ap-global-company-v2-kpis strong {
    display: block;
    margin-top: 3px;
    color: var(--ds-text-strong);
    font-size: 1rem;
}

.ap-global-company-v2-panels {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.ap-global-company-v2-panel {
    min-height: 260px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    overflow: hidden;
}

.ap-global-company-v2-panel-head .mud-icon-root {
    flex: 0 0 auto;
    color: rgb(11, 186, 131);
}

.ap-global-company-v2-list {
    min-width: 0;
    min-height: 0;
    display: grid;
    gap: 7px;
    align-content: start;
    overflow: auto;
}

.ap-global-company-v2-row {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto 7px;
    align-items: center;
    gap: 5px 8px;
    padding: 7px 8px;
    background: var(--ds-card-bg);
    border: 1px solid rgba(0, 160, 160, 0.14);
    border-radius: 8px;
}

.ap-global-company-v2-row:hover {
    background: rgba(0, 90, 90, 0.16);
    border-color: rgba(0, 190, 190, 0.36);
}

.ap-global-company-v2-row div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.ap-global-company-v2-row strong,
.ap-global-company-v2-row small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ap-global-company-v2-row strong {
    color: var(--ds-text-strong);
    font-size: 0.72rem;
}

.ap-global-company-v2-row small,
.ap-global-company-v2-row span {
    color: var(--ds-text-muted);
    font-size: 0.64rem;
}

.ap-global-company-v2-row span {
    font-weight: 800;
}

.ap-global-company-v2-row i {
    grid-column: 1 / -1;
    display: block;
    height: 7px;
    background: var(--ds-surface-1);
    border-radius: 999px;
    overflow: hidden;
}

.ap-global-company-v2-row i b {
    display: block;
    height: 100%;
    min-width: 2px;
    background: linear-gradient(90deg, rgb(11, 186, 131), rgb(119, 107, 231));
    border-radius: inherit;
}

.ap-global-company-v2-loading,
.ap-global-company-v2-empty {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ds-text-muted);
    font-size: 0.72rem;
}

@media (max-width: 1180px) {
    .ap-global-intel-v2-grid,
    .ap-global-map-v2-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .ap-global-intel-v2-map {
        grid-row: auto;
    }

    .ap-global-map-v2 {
        overflow-y: auto;
    }

    .ap-global-map-v2-earth {
        height: 380px;
    }

    .ap-global-company-v2-panels {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .ap-global-intel-v2-hero,
    .ap-global-company-v2-header,
    .ap-global-map-v2-header,
    .ap-global-breach-v2-header,
    .ap-global-industry-v2-header,
    .ap-global-map-v2-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .ap-global-map-v2-kpis,
    .ap-global-company-v2-kpis,
    .ap-global-breach-v2-kpis,
    .ap-global-industry-v2-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ap-global-company-v2-panels {
        grid-template-columns: 1fr;
    }

    .ap-global-map-v2-select {
        flex-basis: auto;
    }
}

/* ---------- AP Vulnerability V2 ---------- */
.ap-vuln-v2-page,
.ap-vuln-v2-content,
.ap-vuln-v2-grid,
.ap-vuln-analytics-v2,
.ap-vuln-report-v2,
.ap-vuln-findings-v2,
.ap-vuln-reports-table-v2,
.ap-vuln-targets-v2,
.ap-vuln-plans-v2 {
    min-width: 0;
    min-height: 0;
}

.ap-vuln-v2-hero,
.ap-vuln-analytics-v2,
.ap-vuln-report-v2,
.ap-vuln-findings-v2,
.ap-vuln-reports-table-v2,
.ap-vuln-targets-v2,
.ap-vuln-plans-v2 {
    color: var(--ds-text);
}

.ap-vuln-v2-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    margin-bottom: 12px;
    background: var(--ds-glass-bg);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
    box-shadow: var(--ds-shadow-soft);
}

.ap-vuln-v2-hero div:first-child,
.ap-vuln-v2-title {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ap-vuln-v2-hero span,
.ap-vuln-v2-hero small,
.ap-vuln-v2-title span,
.ap-vuln-v2-title small {
    color: var(--ds-text-muted);
    font-size: 0.68rem;
    line-height: 1.15;
}

.ap-vuln-v2-hero strong,
.ap-vuln-v2-title strong {
    color: var(--ds-text-strong);
    font-size: 1.08rem;
    line-height: 1.15;
}

.ap-vuln-v2-hero-state,
.ap-vuln-v2-state {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 800;
}

.ap-vuln-v2-hero-state,
.ap-vuln-v2-state.is-neutral {
    color: rgb(11, 186, 131);
    background: rgba(11, 186, 131, 0.1);
    border: 1px solid rgba(11, 186, 131, 0.24);
}

.ap-vuln-v2-state.is-warning {
    color: rgb(119, 107, 231);
    background: rgba(119, 107, 231, 0.11);
    border: 1px solid rgba(119, 107, 231, 0.25);
}

.ap-vuln-v2-state.is-critical {
    color: rgb(246, 78, 98);
    background: rgba(246, 78, 98, 0.12);
    border: 1px solid rgba(246, 78, 98, 0.25);
}

.ap-vuln-v2-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.ap-vuln-v2-wide {
    grid-column: 1 / -1;
}

.ap-vuln-analytics-v2,
.ap-vuln-report-v2,
.ap-vuln-findings-v2,
.ap-vuln-reports-table-v2,
.ap-vuln-targets-v2,
.ap-vuln-plans-v2 {
    width: 100%;
    height: 100%;
    min-height: 430px;
    display: grid;
    gap: 10px;
    padding: 12px;
    overflow: hidden;
}

.ap-vuln-analytics-v2,
.ap-vuln-report-v2 {
    min-height: 520px;
    grid-template-rows: auto auto minmax(0, 1fr);
}

.ap-vuln-findings-v2,
.ap-vuln-reports-table-v2,
.ap-vuln-targets-v2,
.ap-vuln-plans-v2 {
    grid-template-rows: auto auto minmax(0, 1fr);
}

.ap-vuln-v2-header,
.ap-vuln-v2-panel-head {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ap-vuln-v2-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.ap-vuln-v2-kpis > div,
.ap-vuln-v2-panel {
    min-width: 0;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
}

.ap-vuln-v2-kpis > div {
    padding: 8px 10px;
}

.ap-vuln-v2-kpis span,
.ap-vuln-v2-panel-head small {
    display: block;
    color: var(--ds-text-muted);
    font-size: 0.62rem;
    text-transform: uppercase;
}

.ap-vuln-v2-kpis strong,
.ap-vuln-v2-panel-head span {
    display: block;
    color: var(--ds-text-strong);
    font-size: 0.8rem;
    font-weight: 800;
}

.ap-vuln-analytics-v2-layout,
.ap-vuln-report-v2-layout {
    min-height: 0;
    display: grid;
    gap: 10px;
}

.ap-vuln-analytics-v2-layout {
    grid-template-columns: minmax(220px, 0.3fr) minmax(220px, 0.3fr) minmax(0, 0.4fr);
}

.ap-vuln-report-v2-layout {
    grid-template-columns: minmax(300px, 0.38fr) minmax(0, 0.62fr);
}

.ap-vuln-v2-panel {
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
    overflow: hidden;
}

.ap-vuln-v2-severity-list,
.ap-vuln-v2-host-list {
    display: grid;
    gap: 7px;
    align-content: start;
    overflow: auto;
}

.ap-vuln-v2-severity-row,
.ap-vuln-v2-host-row {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(70px, 0.35fr) minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    color: var(--ds-text);
    background: var(--ds-card-bg);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
    cursor: pointer;
}

.ap-vuln-v2-severity-row.is-active,
.ap-vuln-v2-host-row.is-active,
.ap-vuln-v2-severity-row:hover,
.ap-vuln-v2-host-row:hover {
    border-color: rgba(11, 186, 131, 0.35);
    background: rgba(11, 186, 131, 0.08);
}

.ap-vuln-v2-severity-row span,
.ap-vuln-v2-host-row span,
.ap-vuln-v2-muted {
    min-width: 0;
    color: var(--ds-text-muted);
    font-size: 0.68rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ap-vuln-v2-severity-row strong,
.ap-vuln-v2-host-row strong {
    color: var(--ds-text-strong);
    font-size: 0.72rem;
}

.ap-vuln-v2-severity-row i,
.ap-vuln-v2-host-row i {
    display: block;
    height: 7px;
    background: var(--ds-surface-1);
    border-radius: 999px;
    overflow: hidden;
}

.ap-vuln-v2-severity-row i b,
.ap-vuln-v2-host-row i b {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgb(11, 186, 131), rgb(119, 107, 231));
}

.ap-vuln-v2-severity-row.critical i b { background: rgb(246, 78, 98); }
.ap-vuln-v2-severity-row.high i b { background: rgb(242, 127, 70); }
.ap-vuln-v2-severity-row.medium i b { background: rgb(242, 180, 64); }
.ap-vuln-v2-severity-row.low i b { background: rgb(11, 186, 131); }
.ap-vuln-v2-severity-row.info i b { background: rgb(64, 139, 242); }

.ap-vuln-v2-grid {
    min-height: 0;
    overflow: hidden;
}

.ap-vuln-v2-grid .mud-table-container {
    max-height: 100%;
}

.ap-vuln-v2-search {
    width: 100%;
}

.ap-vuln-v2-name {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ap-vuln-v2-name strong {
    color: var(--ds-text-strong);
    font-size: 0.76rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ap-vuln-v2-name span {
    color: var(--ds-text-muted);
    font-size: 0.64rem;
}

.ap-vuln-v2-severity-pill,
.ap-vuln-v2-status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.64rem;
    font-weight: 800;
}

.ap-vuln-v2-severity-pill.critical,
.ap-vuln-v2-status.is-critical { color: rgb(246, 78, 98); background: rgba(246, 78, 98, 0.12); }
.ap-vuln-v2-severity-pill.high { color: rgb(242, 127, 70); background: rgba(242, 127, 70, 0.12); }
.ap-vuln-v2-severity-pill.medium { color: rgb(242, 180, 64); background: rgba(242, 180, 64, 0.12); }
.ap-vuln-v2-severity-pill.low,
.ap-vuln-v2-status.is-neutral { color: rgb(11, 186, 131); background: rgba(11, 186, 131, 0.1); }
.ap-vuln-v2-severity-pill.info { color: rgb(64, 139, 242); background: rgba(64, 139, 242, 0.12); }

.ap-vuln-v2-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.ap-vuln-trend-v2 {
    width: 100%;
    height: 100%;
    min-height: 280px;
    background: transparent;
}

@media (max-width: 1180px) {
    .ap-vuln-v2-grid,
    .ap-vuln-analytics-v2-layout,
    .ap-vuln-report-v2-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .ap-vuln-v2-hero,
    .ap-vuln-v2-header,
    .ap-vuln-v2-panel-head {
        flex-direction: column;
        align-items: stretch;
    }

    .ap-vuln-v2-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---------- AP Vulnerability V2 fixes ---------- */
.ap-vuln-findings-v2 > .ap-vuln-v2-grid,
.ap-vuln-reports-table-v2 > .ap-vuln-v2-grid,
.ap-vuln-targets-v2 > .ap-vuln-v2-grid,
.ap-vuln-plans-v2 > .ap-vuln-v2-grid {
    width: 100%;
    min-width: 0;
    min-height: 0;
    display: flex !important;
    flex-direction: column;
    grid-template-columns: none;
    gap: 0;
    overflow: hidden;
}

.ap-vuln-findings-v2 > .ap-vuln-v2-grid .mud-table-root,
.ap-vuln-reports-table-v2 > .ap-vuln-v2-grid .mud-table-root,
.ap-vuln-targets-v2 > .ap-vuln-v2-grid .mud-table-root,
.ap-vuln-plans-v2 > .ap-vuln-v2-grid .mud-table-root {
    width: 100%;
}

.ap-vuln-findings-v2 > .ap-vuln-v2-grid .mud-table-container,
.ap-vuln-findings-v2 > .ap-vuln-v2-grid .mud-data-grid-table-container,
.ap-vuln-reports-table-v2 > .ap-vuln-v2-grid .mud-table-container,
.ap-vuln-reports-table-v2 > .ap-vuln-v2-grid .mud-data-grid-table-container,
.ap-vuln-targets-v2 > .ap-vuln-v2-grid .mud-table-container,
.ap-vuln-targets-v2 > .ap-vuln-v2-grid .mud-data-grid-table-container,
.ap-vuln-plans-v2 > .ap-vuln-v2-grid .mud-table-container,
.ap-vuln-plans-v2 > .ap-vuln-v2-grid .mud-data-grid-table-container {
    flex: 1 1 auto;
    width: 100%;
    max-height: none;
    min-height: 0;
}

.ap-vuln-findings-v2 > .ap-vuln-v2-grid .mud-table-pagination,
.ap-vuln-reports-table-v2 > .ap-vuln-v2-grid .mud-table-pagination,
.ap-vuln-targets-v2 > .ap-vuln-v2-grid .mud-table-pagination,
.ap-vuln-plans-v2 > .ap-vuln-v2-grid .mud-table-pagination {
    flex: 0 0 auto;
    width: 100%;
    justify-content: flex-end;
    border-top: 1px solid var(--ds-border);
}

.ap-vuln-trend-v2 {
    min-height: 340px;
    padding-bottom: 10px;
    overflow: visible;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 4px;
}

.ap-vuln-trend-v2-chart,
.ap-vuln-trend-v2 svg {
    overflow: visible;
}

.ap-vuln-trend-v2-chartwrap {
    min-width: 0;
    min-height: 0;
}

.ap-vuln-trend-v2-months {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 2px;
    padding: 0 10px 2px;
}

.ap-vuln-trend-v2-months span {
    min-width: 0;
    color: var(--ds-text-muted);
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---------- AP Vulnerability V2 timeline chart ---------- */
.ap-vuln-trend-v2 {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 240px;
    padding: 10px;
    overflow: hidden;
    color: var(--ds-text);
    background: transparent;
    display: block;
}

.ap-vuln-trend-v2-layout {
    width: 100%;
    height: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(120px, 0.34fr) minmax(0, 1fr);
    gap: 12px;
}

.ap-vuln-trend-v2-legend {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
}

.ap-vuln-trend-v2-legend-row {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    padding: 6px 8px;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
}

.ap-vuln-trend-v2-legend-row span:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ds-text);
    font-size: 0.7rem;
}

.ap-vuln-trend-v2-legend-row strong {
    color: var(--ds-text-strong);
    font-size: 0.78rem;
}

.ap-vuln-trend-v2-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
}

.ap-vuln-trend-v2-timeline {
    min-width: 0;
    height: 100%;
    min-height: 178px;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    align-items: end;
    gap: 5px;
    padding: 8px 8px 4px;
    background: var(--ds-surface-0);
    border: 1px solid var(--ds-border);
    border-radius: 8px;
}

.ap-vuln-trend-v2-month {
    min-width: 0;
    height: 100%;
    display: grid;
    grid-template-rows: 1fr auto auto;
    align-items: end;
    gap: 3px;
}

.ap-vuln-trend-v2-bar {
    width: 100%;
    min-height: 8px;
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-start;
    overflow: hidden;
    border-radius: 7px 7px 3px 3px;
    background: rgba(148, 163, 184, 0.16);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.14);
}

.ap-vuln-trend-v2-segment {
    display: block;
    width: 100%;
    min-height: 3px;
}

.ap-vuln-trend-v2-month strong,
.ap-vuln-trend-v2-month small {
    text-align: center;
    line-height: 1;
}

.ap-vuln-trend-v2-month strong {
    color: var(--ds-text-strong);
    font-size: 0.68rem;
}

.ap-vuln-trend-v2-month small {
    color: var(--ds-text-muted);
    font-size: 0.54rem;
    font-weight: 800;
    white-space: nowrap;
}

.ap-vuln-trend-v2-critical { background: rgb(246, 78, 98); }
.ap-vuln-trend-v2-high { background: rgb(242, 127, 70); }
.ap-vuln-trend-v2-medium { background: rgb(242, 180, 64); }
.ap-vuln-trend-v2-low { background: rgb(11, 186, 131); }
.ap-vuln-trend-v2-info { background: rgb(64, 139, 242); }

@media (max-width: 900px) {
    .ap-vuln-trend-v2-layout {
        grid-template-columns: 1fr;
    }

    .ap-vuln-trend-v2-legend {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

/* ---------- AP Vulnerability V2 surface alignment ---------- */
.ap-vuln-v2-page,
.ap-vuln-v2-content,
.ap-vuln-v2-grid {
    background: transparent !important;
}

.ap-vuln-v2-hero,
.ap-vuln-analytics-v2,
.ap-vuln-report-v2,
.ap-vuln-findings-v2,
.ap-vuln-reports-table-v2,
.ap-vuln-targets-v2,
.ap-vuln-plans-v2 {
    background: rgba(0, 90, 90, 0.15) !important;
    border: 1px solid rgba(0, 160, 160, 0.22);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16);
}

.ap-vuln-v2-kpis > div,
.ap-vuln-v2-panel,
.ap-vuln-v2-severity-row,
.ap-vuln-v2-host-row,
.ap-vuln-trend-v2,
.ap-vuln-trend-v2-timeline,
.ap-vuln-trend-v2-legend-row,
.ap-vuln-findings-v2 .mud-table,
.ap-vuln-reports-table-v2 .mud-table,
.ap-vuln-targets-v2 .mud-table,
.ap-vuln-plans-v2 .mud-table,
.ap-vuln-findings-v2 .mud-table-root,
.ap-vuln-reports-table-v2 .mud-table-root,
.ap-vuln-targets-v2 .mud-table-root,
.ap-vuln-plans-v2 .mud-table-root,
.ap-vuln-findings-v2 .mud-table-container,
.ap-vuln-reports-table-v2 .mud-table-container,
.ap-vuln-targets-v2 .mud-table-container,
.ap-vuln-plans-v2 .mud-table-container,
.ap-vuln-findings-v2 .mud-data-grid,
.ap-vuln-reports-table-v2 .mud-data-grid,
.ap-vuln-targets-v2 .mud-data-grid,
.ap-vuln-plans-v2 .mud-data-grid,
.ap-vuln-findings-v2 .mud-data-grid-table,
.ap-vuln-reports-table-v2 .mud-data-grid-table,
.ap-vuln-targets-v2 .mud-data-grid-table,
.ap-vuln-plans-v2 .mud-data-grid-table,
.ap-vuln-findings-v2 .mud-data-grid-table-container,
.ap-vuln-reports-table-v2 .mud-data-grid-table-container,
.ap-vuln-targets-v2 .mud-data-grid-table-container,
.ap-vuln-plans-v2 .mud-data-grid-table-container {
    background: transparent !important;
    box-shadow: none !important;
}

.ap-vuln-v2-panel,
.ap-vuln-v2-kpis > div,
.ap-vuln-trend-v2-timeline,
.ap-vuln-trend-v2-legend-row {
    border-color: rgba(0, 160, 160, 0.18);
}

.ap-vuln-v2-severity-row,
.ap-vuln-v2-host-row {
    border-color: rgba(0, 160, 160, 0.14);
}

.ap-vuln-v2-severity-row:hover,
.ap-vuln-v2-host-row:hover,
.ap-vuln-v2-severity-row.is-active,
.ap-vuln-v2-host-row.is-active {
    background: rgba(0, 90, 90, 0.18) !important;
    border-color: rgba(0, 190, 190, 0.36);
}

.ap-vuln-findings-v2 .mud-table-head,
.ap-vuln-reports-table-v2 .mud-table-head,
.ap-vuln-targets-v2 .mud-table-head,
.ap-vuln-plans-v2 .mud-table-head,
.ap-vuln-findings-v2 .mud-table-row,
.ap-vuln-reports-table-v2 .mud-table-row,
.ap-vuln-targets-v2 .mud-table-row,
.ap-vuln-plans-v2 .mud-table-row,
.ap-vuln-findings-v2 .mud-table-cell,
.ap-vuln-reports-table-v2 .mud-table-cell,
.ap-vuln-targets-v2 .mud-table-cell,
.ap-vuln-plans-v2 .mud-table-cell,
.ap-vuln-findings-v2 .mud-table-pagination,
.ap-vuln-reports-table-v2 .mud-table-pagination,
.ap-vuln-targets-v2 .mud-table-pagination,
.ap-vuln-plans-v2 .mud-table-pagination {
    background: transparent !important;
}

.ap-vuln-findings-v2 .mud-table-row:hover,
.ap-vuln-reports-table-v2 .mud-table-row:hover,
.ap-vuln-targets-v2 .mud-table-row:hover,
.ap-vuln-plans-v2 .mud-table-row:hover {
    background: rgba(0, 90, 90, 0.16) !important;
}

/* ---------- AP Global Intelligence V2 surface alignment ---------- */
.ap-global-intel-v2-page,
.ap-global-intel-v2-content,
.ap-global-intel-v2-grid,
.ap-global-intel-v2-map,
.ap-global-intel-v2-panel {
    background: transparent !important;
}

.ap-global-intel-v2-hero,
.ap-global-company-v2,
.ap-global-map-v2,
.ap-global-breach-v2,
.ap-global-industry-v2 {
    background: rgba(0, 90, 90, 0.15) !important;
    border: 1px solid rgba(0, 160, 160, 0.22);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16);
}

.ap-global-map-v2-kpis > div,
.ap-global-company-v2-kpis > div,
.ap-global-company-v2-panel,
.ap-global-company-v2-row,
.ap-global-breach-v2-kpis > div,
.ap-global-industry-v2-kpis > div,
.ap-global-map-v2-earth-card,
.ap-global-map-v2-detail,
.ap-global-map-v2-table-panel,
.ap-global-map-v2-country-card,
.ap-global-map-v2-notes span,
.ap-global-map-v2-news > div,
.ap-global-map-v2-js-panel,
.ap-global-breach-v2-group,
.ap-global-industry-v2-row,
.ap-global-map-v2-grid .mud-table,
.ap-global-map-v2-grid .mud-table-root,
.ap-global-map-v2-grid .mud-table-container,
.ap-global-map-v2-grid .mud-data-grid,
.ap-global-map-v2-grid .mud-data-grid-table,
.ap-global-map-v2-grid .mud-data-grid-table-container {
    background: transparent !important;
    box-shadow: none !important;
}

.ap-global-map-v2-kpis > div,
.ap-global-company-v2-kpis > div,
.ap-global-company-v2-panel,
.ap-global-company-v2-row,
.ap-global-breach-v2-kpis > div,
.ap-global-industry-v2-kpis > div,
.ap-global-map-v2-earth-card,
.ap-global-map-v2-detail,
.ap-global-map-v2-table-panel,
.ap-global-map-v2-country-card,
.ap-global-map-v2-notes span,
.ap-global-map-v2-news > div,
.ap-global-breach-v2-group,
.ap-global-industry-v2-row {
    border-color: rgba(0, 160, 160, 0.18);
}

.ap-global-map-v2-legend {
    background: rgba(0, 90, 90, 0.24);
    border-color: rgba(0, 160, 160, 0.22);
}

.ap-global-map-v2-grid .mud-table-head,
.ap-global-map-v2-grid .mud-table-row,
.ap-global-map-v2-grid .mud-table-cell,
.ap-global-map-v2-grid .mud-table-pagination {
    background: transparent !important;
}

.ap-global-map-v2-grid .mud-table-row:hover,
.ap-global-company-v2-row:hover,
.ap-global-industry-v2-row:hover,
.ap-global-breach-v2-group:hover {
    background: rgba(0, 90, 90, 0.16) !important;
}

.ap-global-map-v2-sanctions {
    background: rgba(246, 78, 98, 0.11) !important;
}

/* ---------- AP Reports V2 ---------- */
.ap-report-v2-page,
.ap-report-v2-content {
    background: transparent !important;
}

.ap-report-v2-hero,
.ap-report-v2-controls,
.ap-report-v2-card {
    color: var(--ds-text);
    background: rgba(0, 90, 90, 0.15) !important;
    border: 1px solid rgba(0, 160, 160, 0.22);
    border-radius: 8px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.16);
}

.ap-report-v2-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.ap-report-v2-hero div:first-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ap-report-v2-hero span,
.ap-report-v2-hero small,
.ap-report-v2-card p,
.ap-report-v2-card li,
.ap-report-v2-card-head span {
    color: var(--ds-text-muted);
}

.ap-report-v2-hero span,
.ap-report-v2-card-head span {
    font-size: 0.68rem;
    text-transform: uppercase;
    font-weight: 800;
}

.ap-report-v2-hero strong {
    color: var(--ds-text-strong);
    font-size: 1.08rem;
    line-height: 1.15;
}

.ap-report-v2-state {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    color: rgb(11, 186, 131);
    background: rgba(11, 186, 131, 0.1);
    border: 1px solid rgba(11, 186, 131, 0.24);
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 800;
}

.ap-report-v2-controls {
    display: grid;
    grid-template-columns: minmax(220px, 0.25fr) minmax(180px, 0.2fr) minmax(240px, 1fr);
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 12px;
}

.ap-report-v2-progress {
    padding: 12px 14px;
    margin-bottom: 12px;
    color: var(--ds-text);
    background: rgba(11, 186, 131, 0.09) !important;
    border: 1px solid rgba(11, 186, 131, 0.3);
    border-radius: 8px;
}

.ap-report-v2-progress .mud-typography-caption {
    color: var(--ds-text-muted);
}

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

.ap-report-v2-card {
    min-height: 300px;
    display: grid;
    grid-template-rows: auto auto 1fr auto auto;
    gap: 10px;
    padding: 14px;
}

.ap-report-v2-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ap-report-v2-card-head .mud-icon-root {
    color: rgb(11, 186, 131);
}

.ap-report-v2-card strong {
    color: var(--ds-text-strong);
    font-size: 0.95rem;
    line-height: 1.2;
}

.ap-report-v2-card p {
    margin: 0;
    font-size: 0.74rem;
    line-height: 1.35;
}

.ap-report-v2-card ul {
    margin: 0;
    padding-left: 18px;
}

.ap-report-v2-card li {
    margin-bottom: 5px;
    font-size: 0.68rem;
}

@media (max-width: 1180px) {
    .ap-report-v2-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .ap-report-v2-hero,
    .ap-report-v2-controls {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .ap-report-v2-grid {
        grid-template-columns: 1fr;
    }
}

.ap-token-dialog .mud-dialog-content {
    padding: 22px;
}

.ap-token-dialog-body {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 16px;
    align-items: flex-start;
}

.ap-token-dialog-body h3 {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 800;
    color: var(--ap-text, #e8f7f4);
}

.ap-token-dialog-body p {
    margin: 0 0 12px;
    color: var(--ap-muted, #9fb6bd);
}

.ap-token-dialog-cost {
    margin: 10px 0;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(20, 184, 166, 0.22);
    background: rgba(0, 90, 90, 0.15);
}

.ap-token-dialog-cost span,
.ap-token-dialog-cost small {
    display: block;
    color: var(--ap-muted, #9fb6bd);
}

.ap-token-dialog-cost strong {
    display: block;
    margin: 4px 0;
    font-size: 1.6rem;
    color: #5eead4;
}

.ap-token-dialog-balance {
    font-size: 0.82rem;
}
/* ---------- AP Tokens V2 ---------- */
.ap-token-page .ap-scroll-content {
    gap: 18px;
}

.ap-token-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    gap: 18px;
    align-items: stretch;
    padding: 22px;
    border: 1px solid rgba(20, 184, 166, 0.22);
    border-radius: 8px;
    background: rgba(0, 90, 90, 0.15);
}

.ap-token-eyebrow,
.ap-token-kpi span,
.ap-token-balance-card span,
.ap-token-plan span,
.ap-token-package span {
    display: block;
    color: var(--ap-muted, #7a8f99);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.ap-token-hero h2,
.ap-token-section h3 {
    margin: 4px 0 6px;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ap-text, #e8f7f4);
}

.ap-token-hero p,
.ap-token-section p,
.ap-token-kpi small,
.ap-token-balance-card small,
.ap-token-plan small,
.ap-token-package small {
    color: var(--ap-muted, #9fb6bd);
}

.ap-token-balance-card,
.ap-token-kpi,
.ap-token-plan,
.ap-token-package,
.ap-token-section {
    border: 1px solid rgba(20, 184, 166, 0.18);
    border-radius: 8px;
    background: rgba(0, 90, 90, 0.15);
}

.ap-token-balance-card {
    padding: 18px;
}

.ap-token-balance-card strong {
    display: block;
    margin-top: 6px;
    font-size: 2rem;
    color: #5eead4;
}

.ap-token-kpis,
.ap-token-plan-grid,
.ap-token-package-grid,
.ap-token-two-col {
    display: grid;
    gap: 14px;
}

.ap-token-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.ap-token-package-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.ap-token-kpi,
.ap-token-plan,
.ap-token-package,
.ap-token-section {
    padding: 16px;
}

.ap-token-kpi strong,
.ap-token-plan strong,
.ap-token-package strong {
    display: block;
    margin: 6px 0;
    color: var(--ap-text, #e8f7f4);
    font-size: 1.15rem;
}

.ap-token-plan.is-active {
    border-color: rgba(94, 234, 212, 0.65);
    box-shadow: inset 0 0 0 1px rgba(94, 234, 212, 0.35);
}

.ap-token-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.ap-token-table {
    width: 100%;
}

@media (max-width: 1100px) {
    .ap-token-plan-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .ap-token-hero,
    .ap-token-kpis,
    .ap-token-plan-grid,
    .ap-token-package-grid,
    .ap-token-two-col {
        grid-template-columns: 1fr;
    }
}
