.pat-cockpit {
    --pat-ink: #0b1830;
    --pat-muted: #667085;
    --pat-line: #e7ebf1;
    --pat-soft: #f5f7fa;
    --pat-blue: #1d4ed8;
    --pat-blue-soft: #eef4ff;
    --pat-red: #dc2626;
    --pat-red-soft: #fff1f1;
    --pat-orange: #d97706;
    --pat-orange-soft: #fff7e8;
    --pat-green: #16845b;
    --pat-green-soft: #ecfdf5;
    --pat-purple: #7c3aed;
    --pat-purple-soft: #f5f0ff;

    display: flex;
    flex-direction: column;
    gap: 22px;
    margin-top: 18px;
    color: var(--pat-ink);
}

.pat-cockpit *,
.pat-cockpit *::before,
.pat-cockpit *::after {
    box-sizing: border-box;
}

.pat-cockpit a {
    color: inherit;
    text-decoration: none;
}

.pat-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(260px, .55fr);
    gap: 28px;
    overflow: hidden;
    min-height: 315px;
    padding: 42px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 30px;
    background:
        radial-gradient(
            circle at 85% 15%,
            rgba(70, 120, 255, .34),
            transparent 32%
        ),
        linear-gradient(
            135deg,
            #071426 0%,
            #0d1f3b 52%,
            #142d56 100%
        );
    box-shadow:
        0 28px 70px rgba(12, 28, 55, .20),
        inset 0 1px 0 rgba(255, 255, 255, .06);
    color: #fff;
}

.pat-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .33;
    background-image:
        linear-gradient(
            rgba(255, 255, 255, .025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, .025) 1px,
            transparent 1px
        );
    background-size: 42px 42px;
}

.pat-hero__content,
.pat-hero__pulse {
    position: relative;
    z-index: 1;
}

.pat-eyebrow {
    margin-bottom: 9px;
    color: #718096;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .13em;
    line-height: 1.2;
    text-transform: uppercase;
}

.pat-hero .pat-eyebrow {
    color: #a8b9d8;
}

.pat-hero h1 {
    max-width: 720px;
    margin: 0;
    font-size: clamp(38px, 5vw, 66px);
    font-weight: 790;
    letter-spacing: -.055em;
    line-height: .98;
}

.pat-hero h1 span {
    color: #9dbbff;
}

.pat-hero p {
    max-width: 670px;
    margin: 24px 0 0;
    color: #c8d4e8;
    font-size: 16px;
    line-height: 1.65;
}

.pat-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 29px;
}

.pat-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 0 17px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 750;
    transition:
        transform .18s ease,
        background .18s ease,
        border-color .18s ease;
}

.pat-button:hover {
    transform: translateY(-2px);
}

.pat-button--primary {
    background: #fff;
    color: #0b1830 !important;
}

.pat-button--soft {
    border-color: rgba(255, 255, 255, .16);
    background: rgba(255, 255, 255, .10);
    color: #fff !important;
}

.pat-button--ghost {
    color: #c8d4e8 !important;
}

.pat-hero__pulse {
    align-self: center;
    justify-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 215px;
    height: 215px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 50%;
    background: rgba(255, 255, 255, .055);
    box-shadow:
        inset 0 0 50px rgba(255, 255, 255, .04),
        0 0 0 18px rgba(255, 255, 255, .025);
    backdrop-filter: blur(10px);
}

.pat-pulse__halo {
    position: absolute;
    inset: -18px;
    border: 1px solid rgba(128, 167, 255, .14);
    border-radius: inherit;
}

.pat-pulse__value {
    font-size: 54px;
    font-weight: 780;
    letter-spacing: -.06em;
    line-height: 1;
}

.pat-pulse__label {
    margin-top: 8px;
    color: #cbd8ec;
    font-size: 13px;
    font-weight: 700;
}

.pat-pulse__meta {
    margin-top: 13px;
    color: #8298bb;
    font-size: 10px;
}

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

.pat-metric {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 138px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid var(--pat-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(15, 32, 60, .055);
    transition:
        transform .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

.pat-metric::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: #cbd5e1;
}

.pat-metric:hover {
    transform: translateY(-3px);
    border-color: #cbd5e1;
    box-shadow: 0 15px 35px rgba(15, 32, 60, .10);
}

.pat-metric__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pat-metric__label {
    color: #5f6b7c;
    font-size: 12px;
    font-weight: 760;
}

.pat-metric__arrow {
    color: #a0aabb;
    font-size: 13px;
}

.pat-metric__value {
    margin-top: 13px;
    color: var(--pat-ink);
    font-size: 32px;
    font-weight: 780;
    letter-spacing: -.045em;
    line-height: 1;
}

.pat-metric__hint {
    margin-top: auto;
    padding-top: 12px;
    color: #8a94a4;
    font-size: 11px;
}

.pat-tone--critical::before {
    background: var(--pat-red);
}

.pat-tone--warning::before {
    background: var(--pat-orange);
}

.pat-tone--success::before {
    background: var(--pat-green);
}

.pat-tone--information::before {
    background: var(--pat-blue);
}

.pat-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, .72fr);
    gap: 18px;
    align-items: start;
}

.pat-panel {
    border: 1px solid var(--pat-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 34px rgba(15, 32, 60, .055);
}

.pat-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 24px 19px;
    border-bottom: 1px solid #edf0f4;
}

.pat-panel__header--compact {
    padding-bottom: 16px;
}

.pat-panel__header h2 {
    margin: 0;
    color: var(--pat-ink);
    font-size: 22px;
    font-weight: 770;
    letter-spacing: -.035em;
}

.pat-panel__header p {
    margin: 7px 0 0;
    color: var(--pat-muted);
    font-size: 12px;
}

.pat-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    background: var(--pat-soft);
    color: #4d5b70;
    font-size: 12px;
    font-weight: 800;
}

.pat-priorities {
    padding: 7px;
}

.pat-priority {
    display: grid;
    grid-template-columns: 34px 12px minmax(0, 1fr) auto;
    gap: 13px;
    align-items: center;
    padding: 15px 14px;
    border-bottom: 1px solid #eff2f5;
    border-radius: 13px;
    transition:
        background .16s ease,
        transform .16s ease;
}

.pat-priority:last-child {
    border-bottom: 0;
}

.pat-priority:hover {
    transform: translateX(2px);
    background: #f8fafc;
}

.pat-priority__rank {
    color: #b0b8c5;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
}

.pat-priority__signal {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pat-priority__signal span {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, .12);
}

.pat-priority--critical .pat-priority__signal span {
    background: var(--pat-red);
    box-shadow: 0 0 0 4px rgba(220, 38, 38, .11);
}

.pat-priority--warning .pat-priority__signal span {
    background: var(--pat-orange);
    box-shadow: 0 0 0 4px rgba(217, 119, 6, .11);
}

.pat-priority--information .pat-priority__signal span {
    background: var(--pat-blue);
    box-shadow: 0 0 0 4px rgba(29, 78, 216, .11);
}

.pat-priority__eyebrow {
    margin-bottom: 4px;
    color: #8791a2;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.pat-priority__content strong {
    display: block;
    color: #18243a;
    font-size: 13px;
    font-weight: 770;
}

.pat-priority__content p {
    margin: 5px 0 0;
    color: #687386;
    font-size: 11px;
    line-height: 1.45;
}

.pat-priority__meta {
    display: inline-block;
    margin-top: 7px;
    color: #9aa3b1;
    font-size: 10px;
}

.pat-priority__action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 12px;
    color: #35435a;
    font-size: 11px;
    font-weight: 760;
    white-space: nowrap;
}

.pat-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.pat-concordance {
    padding: 18px 20px 22px;
}

.pat-concordance__row {
    display: grid;
    grid-template-columns: 39px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
}

.pat-concordance__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 39px;
    height: 39px;
    border-radius: 12px;
    background: #0e203d;
    color: #fff;
    font-size: 12px;
    font-weight: 850;
}

.pat-concordance__row strong,
.pat-concordance__row span {
    display: block;
}

.pat-concordance__row strong {
    font-size: 12px;
}

.pat-concordance__row span {
    margin-top: 3px;
    color: #8a94a4;
    font-size: 10px;
}

.pat-concordance__status {
    padding: 6px 8px;
    border-radius: 8px;
    background: var(--pat-green-soft);
    color: var(--pat-green);
    font-size: 9px;
    font-weight: 800;
}

.pat-concordance__status--progress {
    background: var(--pat-blue-soft);
    color: var(--pat-blue);
}

.pat-concordance__status--future {
    background: var(--pat-soft);
    color: #7c8799;
}

.pat-concordance__line {
    width: 1px;
    height: 17px;
    margin: 4px 0 4px 19px;
    background: #dfe5ec;
}

.pat-panel--readiness {
    padding: 22px;
}

.pat-readiness {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.pat-readiness__circle {
    --progress: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background:
        radial-gradient(
            closest-side,
            #fff 73%,
            transparent 74% 99%
        ),
        conic-gradient(
            #1d4ed8 calc(var(--progress) * 1%),
            #e8edf4 0
        );
}

.pat-readiness__circle strong {
    font-size: 18px;
    letter-spacing: -.04em;
}

.pat-readiness h3 {
    margin: 0;
    font-size: 17px;
}

.pat-readiness p {
    margin: 8px 0;
    color: #687386;
    font-size: 11px;
    line-height: 1.5;
}

.pat-readiness a {
    color: var(--pat-blue);
    font-size: 10px;
    font-weight: 780;
}

.pat-panel__link {
    color: var(--pat-blue) !important;
    font-size: 11px;
    font-weight: 760;
}

.pat-buildings {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: #edf0f4;
}

.pat-building {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto 24px;
    gap: 13px;
    align-items: center;
    padding: 18px 20px;
    background: #fff;
    transition: background .16s ease;
}

.pat-building:hover {
    background: #f8fafc;
}

.pat-building__visual {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: #eef3fa;
    color: #203a60;
    font-size: 19px;
}

.pat-building__main {
    min-width: 0;
}

.pat-building__main strong,
.pat-building__main span,
.pat-building__main small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pat-building__main strong {
    font-size: 13px;
}

.pat-building__main span {
    margin-top: 4px;
    color: #687386;
    font-size: 10px;
}

.pat-building__main small {
    margin-top: 4px;
    color: #9aa3b1;
    font-size: 9px;
}

.pat-building__stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    color: #7a8596;
    font-size: 9px;
}

.pat-building__stats span {
    white-space: nowrap;
}

.pat-building__stats strong {
    color: #344056;
}

.pat-building__stats .is-alert {
    color: var(--pat-red);
    font-weight: 750;
}

.pat-building__arrow {
    color: #a1aabb;
}

.pat-shortcuts {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--pat-line);
    border-radius: 16px;
    background: #fff;
}

.pat-shortcuts a {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 48px;
    padding: 0 14px;
    border-right: 1px solid #edf0f4;
    color: #475569;
    font-size: 11px;
    font-weight: 720;
    transition: background .16s ease;
}

.pat-shortcuts a:last-child {
    border-right: 0;
}

.pat-shortcuts a:hover {
    background: #f8fafc;
}

.pat-shortcuts span {
    color: #a0aabb;
    font-size: 9px;
    font-weight: 850;
}

.pat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    padding: 24px;
    text-align: center;
}

.pat-empty__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 43px;
    height: 43px;
    margin-bottom: 12px;
    border-radius: 13px;
    background: var(--pat-green-soft);
    color: var(--pat-green);
    font-weight: 850;
}

.pat-empty strong {
    font-size: 13px;
}

.pat-empty span {
    margin-top: 5px;
    color: #8a94a4;
    font-size: 11px;
}

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

    .pat-layout {
        grid-template-columns: 1fr;
    }

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

    .pat-shortcuts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pat-shortcuts a:nth-child(3) {
        border-right: 0;
    }
}

@media (max-width: 760px) {
    .pat-hero {
        grid-template-columns: 1fr;
        padding: 28px 22px;
        border-radius: 23px;
    }

    .pat-hero__pulse {
        display: none;
    }

    .pat-hero h1 {
        font-size: 40px;
    }

    .pat-metrics,
    .pat-side,
    .pat-buildings {
        grid-template-columns: 1fr;
    }

    .pat-priority {
        grid-template-columns: 25px 10px minmax(0, 1fr);
    }

    .pat-priority__action {
        display: none;
    }

    .pat-building {
        grid-template-columns: 42px minmax(0, 1fr) 20px;
    }

    .pat-building__stats {
        display: none;
    }

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

    .pat-shortcuts a:nth-child(3) {
        border-right: 1px solid #edf0f4;
    }

    .pat-shortcuts a:nth-child(2n) {
        border-right: 0;
    }
}

html[data-theme="dark"] .pat-cockpit,
body.dark-mode .pat-cockpit {
    --pat-ink: #ecf2ff;
    --pat-muted: #9aa9bf;
    --pat-line: rgba(255, 255, 255, .09);
    --pat-soft: rgba(255, 255, 255, .055);
}

html[data-theme="dark"] .pat-panel,
html[data-theme="dark"] .pat-metric,
html[data-theme="dark"] .pat-building,
html[data-theme="dark"] .pat-shortcuts,
body.dark-mode .pat-panel,
body.dark-mode .pat-metric,
body.dark-mode .pat-building,
body.dark-mode .pat-shortcuts {
    background: #111c2f;
}

html[data-theme="dark"] .pat-panel__header,
html[data-theme="dark"] .pat-priority,
body.dark-mode .pat-panel__header,
body.dark-mode .pat-priority {
    border-color: rgba(255, 255, 255, .07);
}

html[data-theme="dark"] .pat-priority:hover,
html[data-theme="dark"] .pat-building:hover,
html[data-theme="dark"] .pat-shortcuts a:hover,
body.dark-mode .pat-priority:hover,
body.dark-mode .pat-building:hover,
body.dark-mode .pat-shortcuts a:hover {
    background: rgba(255, 255, 255, .035);
}
