@import url("design-tokens.css");
@import url("fluent-theme.css");

html,
body.console-fluent-theme {
    margin: 0;
    min-height: 100%;
    background: var(--console-bg);
    color: var(--console-text);
    font-family: var(--console-font-sans);
    font-size: var(--font-size-base);
    line-height: 1.5;
    color-scheme: dark;
}

#app {
    min-height: 100vh;
    background: radial-gradient(circle at top, var(--console-color-hero-glow), transparent 45%), var(--console-bg);
}

.console-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at top, var(--console-color-hero-glow), transparent 45%), var(--console-bg);
}

.console-header {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: var(--space-3) var(--space-4) 0;
}

.console-glass-nav {
    max-width: var(--console-content-max-width);
    margin: 0 auto;
    background: var(--console-color-glass);
    backdrop-filter: blur(25px);
    border: 1px solid var(--console-color-glass-border);
    border-radius: var(--console-radius-lg);
    padding: var(--space-3) var(--space-4);
    box-shadow: var(--console-shadow);
}

.console-eyebrow {
    margin: 0 0 var(--space-1);
    color: var(--console-color-brand);
    font-size: var(--font-size-xs);
    font-weight: 700;
    letter-spacing: 0.4em;
    text-transform: uppercase;
}

.console-brand-title {
    margin: 0;
    font-family: var(--console-font-display);
    font-size: var(--font-size-3xl);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: var(--line-height-3xl);
    color: var(--console-color-accent);
}

.console-brand-link {
    color: inherit;
    text-decoration: none;
}

.console-lede,
.band-hint,
.muted {
    color: var(--console-muted);
}

.console-lede {
    margin: 0;
    max-width: 52rem;
    line-height: 1.7;
    font-weight: 500;
}

.console-content {
    flex: 1;
    width: 100%;
    max-width: var(--console-content-max-width);
    margin: 0 auto;
    padding: var(--space-4) var(--space-4) var(--space-7);
}

.console-section-title {
    margin: 0 0 var(--space-2);
    font-family: var(--console-font-display);
    font-size: var(--font-size-xl);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.console-loading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    color: var(--console-muted);
}

.error-banner {
    color: var(--status-unhealthy);
    font-weight: 600;
}

.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-3);
}

.product-map {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(120px, auto));
    column-gap: var(--product-map-column-gap);
    row-gap: var(--product-map-row-gap);
}

.tile {
    display: block;
    min-height: 140px;
    min-width: var(--hit-target);
    padding: var(--space-3);
    border: 1px solid var(--console-color-glass-border);
    border-left: 4px solid var(--console-color-brand);
    border-radius: var(--console-radius-lg);
    background: var(--tile-bg);
    backdrop-filter: blur(20px);
    color: inherit;
    text-decoration: none;
    position: relative;
    box-shadow: var(--console-shadow);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tile-product {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.tile-product.tile-soon {
    cursor: not-allowed;
}

.tile h3,
.tile-product h3 {
    margin: 0 0 var(--space-2);
    font-family: var(--console-font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.tile-product h3 {
    margin: 0;
}

.tile p {
    margin: 0 0 var(--space-1);
}

.tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--console-glow);
}

.tile:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--console-bg), 0 0 0 4px var(--console-accent);
}

.tile:active {
    transform: scale(0.99);
}

.tile-soon {
    opacity: 0.65;
    cursor: not-allowed;
    border-left-color: var(--status-warning);
    transform: none;
    box-shadow: none;
}

.tile-soon:hover,
.tile-soon:active {
    transform: none;
    box-shadow: none;
}

.tile-azure {
    border-left-color: var(--console-color-brand-dark);
}

.tile-azure-platform {
    width: 100%;
    min-height: 120px;
    background: var(--console-color-azure);
    border-color: var(--console-color-azure);
    border-left-color: var(--console-color-azure);
    color: var(--console-color-azure-ink);
}

.tile-azure-platform h3,
.tile-azure-platform:hover,
.tile-azure-platform:active {
    color: var(--console-color-azure-ink);
    background: var(--console-color-azure);
}

.tile-node-supersend {
    background: var(--tile-supersend);
    border-color: var(--tile-supersend-edge);
    border-left-color: var(--tile-supersend-edge);
}

.tile-node-superstream {
    background: var(--tile-superstream);
    border-color: var(--tile-superstream-edge);
    border-left-color: var(--tile-superstream-edge);
}

.tile-node-supertrust {
    background: var(--tile-supertrust);
    border-color: var(--tile-supertrust-edge);
    border-left-color: var(--tile-supertrust-edge);
    color: var(--tile-supertrust-ink);
    box-shadow: var(--tile-supertrust-glow);
}

.tile-node-supertrust.tile-soon {
    opacity: 1;
    border-left-color: var(--tile-supertrust-edge);
}

.tile-node-supertrust h3 {
    color: var(--tile-supertrust-ink);
    font-size: var(--font-size-xl);
}

.tile-node-bankhost {
    background: var(--tile-bankhost);
    border-color: var(--tile-bankhost-edge);
    border-left-color: var(--tile-bankhost-edge);
}

.tile-node-bankstream {
    background: var(--tile-bankstream);
    border-color: var(--tile-bankstream-edge);
    border-left-color: var(--tile-bankstream-edge);
}

.tile-node-lifestream {
    background: var(--tile-lifestream);
    border-color: var(--tile-lifestream-edge);
    border-left-color: var(--tile-lifestream-edge);
}

.tile-node-life-office {
    background: var(--tile-life-office);
    border-color: var(--tile-life-office-edge);
    border-left-color: var(--tile-life-office-edge);
}

.tile-node-fund-manager {
    background: var(--tile-fund-manager);
    border-color: var(--tile-fund-manager-edge);
    border-left-color: var(--tile-fund-manager-edge);
}

.tile-node-fundstream {
    background: var(--tile-fundstream);
    border-color: var(--tile-fundstream-edge);
    border-left-color: var(--tile-fundstream-edge);
}

.tile-node-issuer {
    background: var(--tile-issuer);
    border-color: var(--tile-issuer-edge);
    border-left-color: var(--tile-issuer-edge);
}

.tile-node-custodian {
    background: var(--tile-custodian);
    border-color: var(--tile-custodian-edge);
    border-left-color: var(--tile-custodian-edge);
}

.entity-link {
    color: inherit;
    text-decoration: underline;
}

.entity-link:hover {
    color: var(--console-color-link-hover);
}

.health-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-bottom: var(--space-2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tile-product .health-dot {
    width: 18px;
    height: 18px;
    margin-bottom: var(--space-3);
    flex-shrink: 0;
}

.health-healthy {
    background: var(--status-healthy);
    animation: console-pulse 1.6s ease-in-out infinite;
}

.health-unhealthy { background: var(--status-unhealthy); }
.health-unknown { background: var(--status-unknown); }
.health-notdeployed { background: var(--status-notdeployed); }

@keyframes console-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

.azure-badge {
    display: inline-block;
    font-size: var(--font-size-xs);
    line-height: var(--line-height-xs);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--console-color-brand);
    margin-bottom: var(--space-2);
}

@media (prefers-reduced-motion: reduce) {
    .tile,
    .tile:hover,
    .tile:active {
        transform: none;
        transition: none;
    }

    .health-healthy {
        animation: none;
    }
}

#blazor-error-ui {
    display: none;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--status-unhealthy);
    color: var(--console-color-text-primary);
    z-index: 50;
}

#blazor-error-ui .reload {
    color: var(--console-color-text-primary);
    text-decoration: underline;
    margin-left: var(--space-3);
}
