:root {
    --cp-card-bg: #ffffff;
    --cp-border: #c9d5e7;
    --cp-border-strong: #90a3c0;
    --cp-bg: #edf2f7;
    --cp-panel: #f7fafc;
    --cp-text: #142236;
    --cp-muted: #53627c;
    --cp-shell-bg: linear-gradient(180deg, #102033 0%, #172f4a 52%, #0d1826 100%);
    --cp-accent: #1f9d78;
    --cp-accent-soft: rgba(31, 157, 120, 0.16);
    --cp-link: #0f6ad6;
    --cp-shadow: 0 18px 45px rgba(16, 24, 40, 0.08);
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(31, 157, 120, 0.08), transparent 28%),
        linear-gradient(180deg, #f7fafc 0%, var(--cp-bg) 100%);
    color: var(--cp-text);
    font-family: "Segoe UI Variable Text", "Segoe UI", Arial, sans-serif;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.card {
    background: var(--cp-card-bg);
    border: 1px solid var(--cp-border);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--cp-shadow);
}

.cp-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.cp-summary-grid-kpi {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.cp-kpi {
    display: grid;
    gap: 6px;
    position: relative;
    overflow: hidden;
}

.cp-kpi::after {
    content: "";
    position: absolute;
    inset: auto -20px -34px auto;
    width: 88px;
    height: 88px;
    border-radius: 999px;
    background: var(--cp-accent-soft);
}

.cp-kpi-label {
    color: var(--cp-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.cp-kpi-value {
    font-size: 1.9rem;
    position: relative;
    z-index: 1;
}

.cp-risk-line,
.cp-health-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.cp-lead {
    margin: 0;
    font-size: 1.02rem;
    max-width: 72ch;
    color: var(--cp-muted);
}

.cp-meta-line {
    margin-top: 6px;
    color: var(--cp-muted);
    word-break: break-word;
}

.cp-provider-line {
    display: grid;
    gap: 4px;
    margin-bottom: 10px;
}

.cp-link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.cp-link-list a {
    color: var(--cp-link);
    font-weight: 600;
    text-decoration: none;
}

.cp-link-list a:hover {
    text-decoration: underline;
}

.cp-service-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--cp-border);
}

.cp-service-line:last-child {
    border-bottom: none;
}

.cp-service-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.cp-micro {
    color: var(--cp-muted);
    font-size: 0.82rem;
}

.cp-preview {
    margin-top: 10px;
    max-height: 220px;
    overflow: auto;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    font-size: 0.82rem;
}

.cp-list {
    margin: 0;
    padding-left: 18px;
}

.cp-list li {
    margin-bottom: 6px;
}

.cp-reference-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.cp-reference-list li {
    display: grid;
    gap: 4px;
}

.cp-reference-list span {
    color: #4d5b72;
    text-transform: lowercase;
    font-size: 0.82rem;
    font-weight: 700;
}

.cp-status {
    display: inline-block;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: lowercase;
}

.cp-status.found {
    background: #d7f4df;
    color: #155b2a;
}

.cp-status.missing {
    background: #fff2cd;
    color: #6c5303;
}

.cp-status.invalid {
    background: #ffd8d8;
    color: #721b1b;
}

.kanban-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.kanban-column {
    background: #f9fbff;
    border: 1px solid var(--cp-border);
    border-radius: 10px;
    padding: 10px;
}

.kanban-item {
    background: #fff;
    border: 1px solid var(--cp-border);
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 8px;
}

.badge {
    display: inline-block;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge.healthy {
    background: #d7f4df;
    color: #155b2a;
}

.badge.degraded {
    background: #fff2cd;
    color: #6c5303;
}

.badge.down {
    background: #ffd8d8;
    color: #721b1b;
}

.badge.unknown {
    background: #e6e8ed;
    color: #344054;
}

.cp-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 296px 1fr;
}

.cp-menu {
    background: var(--cp-shell-bg);
    color: #f5f7fb;
    padding: 24px 18px 28px;
    position: sticky;
    top: 0;
    min-height: 100vh;
    box-sizing: border-box;
}

.cp-content {
    padding: 28px 30px 36px;
}

.cp-brand {
    display: grid;
    gap: 8px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.cp-brand h2 {
    margin: 0;
    font-size: 1.7rem;
}

.cp-brand-eyebrow {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.76rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 700;
}

.cp-brand-subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.45;
    font-size: 0.92rem;
}

.cp-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 18px;
}

.cp-nav a {
    color: #f5f7fb;
    text-decoration: none;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 12px;
    transition: background 120ms ease, transform 120ms ease;
}

.cp-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(2px);
}

.cp-nav-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #d8f3e9;
}

.cp-nav-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cp-auth-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--cp-border);
    border-radius: 16px;
    box-shadow: var(--cp-shadow);
}

.cp-auth-summary {
    display: grid;
    gap: 8px;
}

.cp-auth-ident {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.cp-auth-ident span {
    color: var(--cp-muted);
}

.cp-auth-indicator {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    background: #d7f4df;
    color: #155b2a;
    font-size: 0.82rem;
    font-weight: 700;
}

.cp-auth-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cp-role-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    background: #eef2ff;
    color: #243b8a;
    font-size: 0.82rem;
    font-weight: 700;
}

.cp-link-button {
    border: none;
    background: #132033;
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
}

.cp-auth-splash,
.cp-signin {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.cp-signin-card {
    width: min(100%, 420px);
    background: #fff;
    border: 1px solid var(--cp-border);
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 18px 45px rgba(16, 24, 40, 0.08);
}

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

.cp-signin-card input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--cp-border);
    border-radius: 8px;
}

.cp-signin-card button {
    border: none;
    background: #155eef;
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

.cp-signin-help {
    margin-top: 12px;
    color: var(--cp-muted);
    font-size: 0.92rem;
}

.cp-auth-message {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #eef2ff;
    color: #243b8a;
    font-weight: 600;
}

.cp-error {
    color: #b42318;
    font-weight: 600;
}

.cp-hero {
    margin-bottom: 22px;
    padding: 22px 24px;
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(16, 32, 51, 0.98), rgba(23, 47, 74, 0.92)),
        radial-gradient(circle at top right, rgba(31, 157, 120, 0.25), transparent 30%);
    color: #f8fbff;
    box-shadow: 0 20px 55px rgba(16, 24, 40, 0.16);
}

.cp-hero h1 {
    margin: 6px 0 10px;
    font-size: clamp(2rem, 3vw, 2.8rem);
}

.cp-hero .cp-lead {
    color: rgba(248, 251, 255, 0.84);
}

.cp-hero-eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.76rem;
    font-weight: 700;
    color: rgba(248, 251, 255, 0.66);
}

.cp-section {
    margin-bottom: 8px;
}

.cp-section-head {
    display: grid;
    gap: 4px;
    margin: 24px 0 14px;
}

.cp-section-head h2 {
    margin: 0;
    font-size: 1.32rem;
}

.cp-section-tag {
    color: var(--cp-link);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 800;
}

@media (max-width: 960px) {
    .cp-shell {
        grid-template-columns: 1fr;
    }

    .cp-menu {
        position: static;
        min-height: auto;
    }

    .cp-content {
        padding: 20px 16px 28px;
    }

    .cp-auth-bar {
        flex-direction: column;
    }
}
