html {
    overflow-y: scroll;
    /* Always show scrollbar to prevent layout shift */
    overflow-x: hidden;
}

body {
    margin: 0;
    min-height: 100vh;
    /* Allow natural growth beyond viewport */
    background: radial-gradient(circle at 20% 20%, rgba(36, 65, 120, 0.25), transparent 25%),
        radial-gradient(circle at 80% 0%, rgba(24, 44, 94, 0.3), transparent 28%),
        linear-gradient(135deg, #060b16, #0d1324 65%, #0b0f1a);
    color: #e9eefc;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

/* Splash screen shown before Blazor bootstraps */
.splash {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 100;
    background: radial-gradient(circle at 30% 20%, rgba(65, 105, 255, 0.18), transparent 40%),
        radial-gradient(circle at 80% 10%, rgba(88, 163, 255, 0.12), transparent 42%),
        linear-gradient(140deg, #050812 0%, #0b1226 50%, #0a1228 100%);
    animation: splash-fade-in 280ms ease-out;
}

.splash__background {
    position: absolute;
    inset: 0;
    background: radial-gradient(900px at 50% 10%, rgba(60, 122, 255, 0.14), transparent 60%),
        radial-gradient(520px at 70% 70%, rgba(110, 210, 255, 0.1), transparent 55%);
    filter: blur(30px) saturate(1.1);
    opacity: 0.9;
    pointer-events: none;
}

.splash__card {
    position: relative;
    width: min(440px, 86vw);
    padding: 2.6rem 2.4rem 2.1rem;
    border-radius: 24px;
    background: linear-gradient(160deg, rgba(17, 28, 56, 0.9), rgba(12, 19, 38, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 26px 60px rgba(4, 8, 18, 0.75);
    backdrop-filter: blur(6px);
    color: #eef3ff;
    text-align: center;
    overflow: hidden;
}

.splash__logo {
    width: 86px;
    height: 86px;
    margin: 0 auto 1rem;
    position: relative;
}

.splash__logo-orb {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #7ad0ff, #2b74ff 55%, #19336b 100%);
    box-shadow: 0 18px 32px rgba(28, 98, 255, 0.35);
}

.splash__logo-ring {
    position: absolute;
    inset: -8px;
    border-radius: 999px;
    border: 2px solid rgba(122, 208, 255, 0.45);
    opacity: 0.85;
    animation: ring-spin 3s linear infinite;
}

.splash__title {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    margin-bottom: 0.3rem;
}

.splash__subtitle {
    color: rgba(235, 242, 255, 0.75);
    font-size: 0.98rem;
    margin-bottom: 1.25rem;
}

.splash__progress {
    width: 100%;
    height: 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.splash__progress-bar {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #63b3ff, #8fd7ff, #63b3ff);
    background-size: 200% 100%;
    animation: progress-sheen 1.6s ease-in-out infinite;
}

@keyframes ring-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes progress-sheen {
    0% {
        transform: translateX(-50%);
        background-position: 0% 50%;
    }

    50% {
        transform: translateX(10%);
        background-position: 80% 50%;
    }

    100% {
        transform: translateX(120%);
        background-position: 160% 50%;
    }
}

@keyframes splash-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#blazor-error-ui {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 0.6rem 1rem;
    background: rgba(16, 18, 28, 0.95);
    color: #fff;
    box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.45);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: none;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    position: absolute;
    right: 1rem;
    top: 0.5rem;
    cursor: pointer;
    font-weight: 700;
}

#blazor-error-ui .reload {
    color: #9ad0ff;
    text-decoration: underline;
}

.panel {
    max-width: none;
    /* Remove max-width constraint */
    margin: 0;
    /* Remove auto margins that might conflict with grid */
    padding: 2.25rem;
    background: rgba(12, 18, 35, 0.9);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 24px 48px rgba(6, 10, 20, 0.55);
    overflow: visible;
    /* Prevent scrollbars */
    max-height: none;
    /* Remove any height limit */
}

.main-layout {
    display: grid;
    gap: 1.5rem;
    margin: 0;
    padding: 1.5rem 1.5rem 1.5rem 0;
    align-items: start;
    min-height: auto;
}

/* Rely on Home.razor.css for .latency-panel and .latency-panel.condensed styles */

.hero-banner {
    max-width: 1100px;
    margin: 2rem auto 0.5rem;
    padding: 1.1rem 1.5rem;
    border-radius: 18px;
    background: radial-gradient(circle at 20% 20%, rgba(76, 139, 255, 0.18), transparent 40%),
        linear-gradient(120deg, rgba(25, 84, 183, 0.5), rgba(17, 28, 56, 0.98));
    border: 1px solid rgba(85, 146, 255, 0.28);
    box-shadow: 0 18px 36px rgba(9, 17, 35, 0.5);
    display: flex;
    gap: 1rem;
    align-items: center;
}

.status-bar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.2rem;
    margin: 0.75rem auto 1.25rem;
    max-width: 1200px;
    background: linear-gradient(135deg, rgba(15, 118, 110, 0.22), rgba(59, 130, 246, 0.18));
    border: 1px solid rgba(94, 234, 212, 0.6);
    border-radius: 14px;
    box-shadow: 0 14px 42px rgba(14, 165, 233, 0.22);
    backdrop-filter: blur(6px);
}

.status-bar.connected {
    border-color: rgba(16, 199, 132, 0.35);
    box-shadow: 0 12px 30px rgba(16, 199, 132, 0.12);
}

.status-bar.violation {
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 12px 30px rgba(245, 158, 11, 0.12);
}

.status-bar.disconnected {
    border-color: rgba(239, 68, 68, 0.35);
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.14);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #e9eefc;
}

.status-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.04);
}

.status-dot.connected {
    background: #16c784;
    box-shadow: 0 0 0 6px rgba(22, 199, 132, 0.15);
}

.status-dot.violation {
    background: #f59e0b;
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.15);
}

.status-dot.disconnected {
    background: #ef4444;
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.18);
}

.status-text {
    font-size: 0.95rem;
    color: #e9eefc;
}

.status-meta {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 700;
    color: #cde8ff;
}

.badge-chip {
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.85rem;
}

.badge-chip.subtle {
    padding: 0 0.25rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
}

.badge-chip.accent {
    background: linear-gradient(135deg, #16c784, #0ea5e9);
    border-color: rgba(22, 199, 132, 0.4);
    color: #0b1120;
    box-shadow: 0 6px 14px rgba(14, 165, 233, 0.35);
}

.generator-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.65rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.banner-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #f3f7ff;
    letter-spacing: 0.35px;
}

.banner-subtitle {
    color: rgba(233, 238, 252, 0.78);
    font-size: 0.95rem;
    margin-top: 0.1rem;
}

.hero-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(46, 119, 255, 0.25), rgba(4, 11, 28, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(9, 17, 35, 0.45);
}

.hero-icon svg {
    width: 34px;
    height: 34px;
}

.logo-ring {
    fill: none;
    stroke: #8db9ff;
    stroke-width: 2;
    opacity: 0.9;
}

.logo-cross {
    fill: #8be0ff;
    opacity: 0.85;
}

.logo-core {
    fill: #1f97ff;
    opacity: 0.85;
}

.logo-ray {
    stroke: #6ec6ff;
    stroke-width: 2;
    stroke-linecap: round;
    opacity: 0.8;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(420px, 1fr) minmax(520px, 1.2fr);
    gap: 1.5rem;
    max-width: 1200px;
    margin: 1.5rem auto 3rem;
}

.tech-panel {
    background: rgba(12, 18, 35, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(6, 10, 20, 0.55);
    overflow: visible;
    /* Prevent scrollbars */
}

.tech-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tech-header h2 {
    margin: 0.2rem 0 0;
    color: #f6f8ff;
}

.tech-meta {
    font-size: 0.9rem;
    color: rgba(233, 238, 252, 0.7);
}

.preset-row {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.preset-row select {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #f6f8ff;
    padding: 0.6rem 0.8rem;
}

.gauges {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.gauge {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 0.9rem;
}

.gauge-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gauge-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #f6f8ff;
    margin-top: 0.1rem;
}

.pill {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(233, 238, 252, 0.8);
    font-size: 0.8rem;
}

.gauge-controls {
    margin-top: 0.7rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
}

.gauge-controls button {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #f6f8ff;
    border-radius: 10px;
    padding: 0.55rem;
    font-weight: 700;
}

.gauge-controls button.primary {
    background: linear-gradient(135deg, #1c4dff, #2e8bff);
    border: 1px solid rgba(46, 139, 255, 0.5);
}

.tech-stats {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.8rem;
    align-items: end;
}

.tech-stats input {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #f6f8ff;
    padding: 0.55rem;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #e9eefc;
}

.actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.6rem;
}

.actions button {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
    color: #f6f8ff;
    font-weight: 800;
}

.actions button.primary {
    background: linear-gradient(135deg, #2a3650, #1e2638);
    border-color: rgba(255, 255, 255, 0.08);
}

.actions button.accent {
    background: linear-gradient(135deg, #14b8a6, #10b981);
    border-color: rgba(16, 185, 129, 0.6);
}

.confirm-bar {
    margin-top: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.panel-header h1 {
    margin: 0;
    font-size: 2.4rem;
    color: #f6f8ff;
    letter-spacing: -0.02em;
}

.panel-header p {
    margin: 0.2rem 0 0 0;
    color: rgba(233, 238, 252, 0.78);
}

.overall {
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    overflow: visible;
}

.overall.compact {
    /* Remove any height restrictions */
    max-height: none;
}

.grid.compact-grid {
    /* Remove any height restrictions */
    max-height: none;
    overflow: visible;
}

.card.compact {
    /* Remove any height restrictions */
    max-height: none;
    overflow: visible;
}

.overall h2 {
    margin: 0.2rem 0;
    font-size: 1.9rem;
    color: #f6f8ff;
}

.overall .eyebrow {
    margin: 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: rgba(233, 238, 252, 0.65);
    font-weight: 700;
}

.overall .muted {
    margin: 0;
    color: rgba(233, 238, 252, 0.6);
}

.overall-status {
    padding: 0.65rem 1.1rem;
    border-radius: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border: 1px solid transparent;
}

.overall-status.ready {
    background: rgba(46, 204, 133, 0.22);
    color: #2de2a8;
    border-color: rgba(46, 204, 133, 0.5);
}

.overall-status.violation {
    background: rgba(255, 82, 82, 0.18);
    color: #ff9b9b;
    border-color: rgba(255, 82, 82, 0.35);
}

.status {
    padding: 0.55rem 1rem;
    border-radius: 999px;
    text-transform: uppercase;
    font-weight: 800;
    font-size: 0.82rem;
    letter-spacing: 0.6px;
    border: 1px solid transparent;
}

.status.online {
    background: rgba(46, 204, 133, 0.2);
    color: #34d399;
    border-color: rgba(52, 211, 153, 0.4);
}

.status.offline {
    background: rgba(244, 67, 54, 0.18);
    color: #ff8b8b;
    border-color: rgba(255, 139, 139, 0.4);
}

.grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    overflow: visible;
}

.card {
    background: linear-gradient(180deg, rgba(17, 27, 47, 0.95), rgba(12, 20, 36, 0.98));
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
    color: #e5ecff;
    overflow: visible;
    /* No scrollbars in cards */
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.card h3 {
    margin-top: 0;
    margin-bottom: 0.4rem;
    color: #f1f4ff;
    letter-spacing: 0.01em;
}

.readiness {
    margin-top: 0.5rem;
}

.badge {
    display: inline-block;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
}

.badge.ready {
    background: rgba(46, 204, 133, 0.22);
    color: #2de2a8;
    border-color: rgba(46, 204, 133, 0.5);
}

.badge.violation {
    background: rgba(255, 82, 82, 0.22);
    color: #ff9b9b;
    border-color: rgba(255, 82, 82, 0.4);
}

.badge.idle {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(233, 238, 252, 0.75);
    border-color: rgba(255, 255, 255, 0.08);
}

.metrics {
    margin: 0.6rem 0 0;
    color: rgba(229, 236, 255, 0.78);
    font-weight: 500;
}

.chart {
    margin-top: 1rem;
    background: rgba(255, 255, 255, 0.015);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0.75rem;
    min-height: 220px;
}

.chart-title {
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
    color: #dce6ff;
    font-weight: 700;
}

.chart svg {
    width: 100%;
    height: 180px;
    display: block;
    overflow: visible;
}

.chart-line {
    stroke: #6ec6ff;
    stroke-width: 2.5;
    fill: none;
    filter: drop-shadow(0 0 6px rgba(110, 198, 255, 0.3));
}

.chart-threshold {
    stroke: rgba(255, 82, 82, 0.55);
    stroke-width: 1.6;
    stroke-dasharray: 6 6;
}

.chart-point {
    fill: #8bd4ff;
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 1;
}

.chart-point.lead {
    animation: pulse 1s ease-in-out infinite;
    filter: drop-shadow(0 0 6px rgba(139, 212, 255, 0.6));
}

@keyframes pulse {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

.chart-legend {
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: rgba(229, 236, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.chart-legend .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #6ec6ff;
    display: inline-block;
}

.exposure-blocked-reason {
    margin-top: 0.75rem;
    padding: 0.65rem 1rem;
    border-radius: 10px;
    background: rgba(255, 152, 0, 0.12);
    border: 1px solid rgba(255, 152, 0, 0.3);
    color: #ffb74d;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    letter-spacing: 0.2px;
}

.expose-button {
    flex: 1;
    padding: 1rem 1.5rem;
    border-radius: 14px;
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.expose-button.ready {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: rgba(16, 185, 129, 0.6);
    color: #fff;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35);
}

.expose-button.ready:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 10px 26px rgba(16, 185, 129, 0.45);
    transform: translateY(-1px);
}

.expose-button.notready,
.expose-button:disabled {
    background: rgba(120, 120, 120, 0.25);
    border-color: rgba(120, 120, 120, 0.3);
    color: rgba(200, 200, 200, 0.5);
    cursor: not-allowed;
    box-shadow: none;
}

.image-viewer {
    background: rgba(12, 18, 35, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(6, 10, 20, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    overflow: visible;
    /* Prevent scrollbars */
}

.image-viewer img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.image-placeholder {
    text-align: center;
    color: rgba(233, 238, 252, 0.5);
}

.image-placeholder-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.image-placeholder-subtext {
    font-size: 0.9rem;
    color: rgba(233, 238, 252, 0.4);
.image-placeholder-subtext {
    font-size: 0.9rem;
    color: rgba(233, 238, 252, 0.4);
}

/* [AzureAdAuth] Authentication header and login display styles */
.app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(12, 18, 35, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.5rem 0;
    backdrop-filter: blur(10px);
}

.app-header .container-fluid {
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: flex-end;
}

.login-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #e9eefc;
}

.login-display .user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: rgba(233, 238, 252, 0.9);
}

.login-display .btn-link {
    background: transparent;
    border: none;
    color: #6ec6ff;
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

.login-display .btn-link:hover {
    text-decoration: underline;
    color: #8bd4ff;
}

.login-display a {
    color: #6ec6ff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.login-display a:hover {
    text-decoration: underline;
    color: #8bd4ff;
}
