:root {
    --brand-dark: #0c1c2e;
    --brand-mid: #11263b;
    --brand-accent: #3bd4c8;
    --brand-accent-2: #7c6cff;
    --brand-light: #f6f9fc;
    --text-main: #e8edf4;
    --text-dark: #1b2533;
    --text-muted: #8aa0b6;
    --card-bg: #111f32;
    --card-border: rgba(255, 255, 255, 0.08);
    --status-running: #22c55e;
    --status-warning: #f59e0b;
    --status-fault: #ef4444;
}

html, body {
    font-family: "Manrope", "Segoe UI", sans-serif;
    background: var(--brand-dark);
    color: var(--text-main);
}

a {
    color: inherit;
    text-decoration: none;
}

.page-shell {
    min-height: 100vh;
    background: radial-gradient(circle at 20% 20%, rgba(124, 108, 255, 0.2), transparent 40%),
        radial-gradient(circle at 80% 10%, rgba(59, 212, 200, 0.22), transparent 35%),
        linear-gradient(180deg, #0b1725 0%, #0d1f33 45%, #0f233a 100%);
}

.top-nav {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(14px);
    background: rgba(12, 28, 46, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.top-nav .container {
    padding-left: 16px;
    padding-right: 16px;
}

.top-nav .nav-link {
    color: var(--text-main);
    font-weight: 600;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    transition: all 0.2s ease-in-out;
}

.top-nav .nav-link:hover,
.top-nav .nav-link.active {
    background: rgba(59, 212, 200, 0.18);
    color: #ffffff;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-box {
    display: inline-flex;
    align-items: center;
    padding: 0.9rem 1.2rem 1.1rem;
    margin-left: 0px;
    margin-top: -26px;
    margin-bottom: -18px;
    border-radius: 0 0 12px 12px;
    background: #ffffff;
    border: 1px solid rgba(12, 28, 46, 0.12);
    box-shadow: 0 16px 30px rgba(6, 14, 24, 0.28);
}

.brand-logo {
    height: 78px;
    width: auto;
    display: block;
}

.brand-name {
    font-weight: 700;
    color: #0c1c2e;
    font-size: 1rem;
    letter-spacing: 0.01em;
}

.hero {
    padding: 5rem 0 4rem;
}

.hero-title {
    font-size: clamp(2.6rem, 4vw, 4.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.page-shell .text-muted {
    color: #9fb3c8 !important;
}

.cta-primary {
    background: linear-gradient(135deg, var(--brand-accent), var(--brand-accent-2));
    color: #0b1626;
    border: none;
    border-radius: 999px;
    padding: 0.8rem 1.8rem;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(59, 212, 200, 0.25);
}

.section {
    padding: 3.5rem 0;
}

.card-glow {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    padding: 1.6rem;
    box-shadow: 0 20px 40px rgba(5, 12, 20, 0.45);
}

.stat-tile {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 1.2rem;
}

.stat-tile--running {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.22), rgba(34, 197, 94, 0.10));
    border: 1px solid rgba(34, 197, 94, 0.25);
    box-shadow: 0 16px 30px rgba(34, 197, 94, 0.08);
}

.stat-tile--warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(245, 158, 11, 0.10));
    border: 1px solid rgba(245, 158, 11, 0.25);
    box-shadow: 0 16px 30px rgba(245, 158, 11, 0.08);
}

.stat-tile--fault {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.22), rgba(239, 68, 68, 0.10));
    border: 1px solid rgba(239, 68, 68, 0.25);
    box-shadow: 0 16px 30px rgba(239, 68, 68, 0.08);
}

.stat-tile--running .stat-label,
.stat-tile--warning .stat-label,
.stat-tile--fault .stat-label {
    color: rgba(232, 237, 244, 0.88);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
}

.windpark-map {
    width: 100%;
    height: 520px;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(12, 28, 46, 0.5);
}

.windpark-map canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.windpark-svg .windpark-bg {
    fill: rgba(15, 35, 58, 0.85);
    stroke: rgba(255, 255, 255, 0.08);
}

.turbine-marker {
    cursor: pointer;
}

.turbine-marker .bubble {
    stroke: rgba(255, 255, 255, 0.6);
    stroke-width: 1.2;
    fill: #7e8ea4;
}

.turbine-marker .turbine-iso {
    stroke-linejoin: round;
}

.turbine-marker .iso-base {
    fill: rgba(255, 255, 255, 0.8);
    stroke: rgba(12, 28, 46, 0.35);
    stroke-width: 1;
}

.turbine-marker .iso-tower {
    fill: #f6f9fc;
    stroke: rgba(12, 28, 46, 0.45);
    stroke-width: 1;
}

.turbine-marker .iso-hub {
    fill: #0c1c2e;
    stroke: none;
}

.turbine-marker .iso-blade {
    fill: #0c1c2e;
    opacity: 0.85;
}

.turbine-marker.status-running .bubble {
    fill: #3bd4c8 !important;
}

.turbine-marker.status-warning .bubble {
    fill: #f0b849 !important;
}

.turbine-marker.status-fault .bubble {
    fill: #ff6b6b !important;
}

.turbine-marker.status-idle .bubble {
    fill: #7e8ea4 !important;
}

.turbine-dot {
    stroke: rgba(255, 255, 255, 0.6);
    stroke-width: 1.2;
    cursor: pointer;
}

.turbine-dot.status-running {
    fill: #3bd4c8;
}

.turbine-dot.status-warning {
    fill: #f0b849;
}

.turbine-dot.status-fault {
    fill: #ff6b6b;
}

.turbine-dot.status-idle {
    fill: #7e8ea4;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 0.85; }
}

.windpark-svg text.label {
    fill: var(--text-muted);
    font-size: 0.75rem;
}

.windpark-svg .windpark-debug {
    fill: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    letter-spacing: 0.08em;
}

.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2.5rem 0;
    color: var(--text-muted);
}

.content-surface {
    background: #f6f9fc;
    color: var(--text-dark);
}

.content-surface .text-muted {
    color: #5f6f82 !important;
}

.content-surface .card-glow {
    background: #ffffff;
    color: var(--text-dark);
    box-shadow: 0 20px 40px rgba(10, 24, 41, 0.08);
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 999px;
    padding: 0.4rem 0.9rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    font-size: 0.85rem;
}

.badge-pill.status-running,
.badge-pill.status-warning,
.badge-pill.status-fault,
.badge-pill.status-idle {
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.badge-pill.status-running {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.28);
}

.badge-pill.status-warning {
    background: rgba(245, 158, 11, 0.18);
    border-color: rgba(245, 158, 11, 0.28);
}

.badge-pill.status-fault {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.28);
}

.badge-pill.status-idle {
    background: rgba(126, 142, 164, 0.18);
    border-color: rgba(126, 142, 164, 0.28);
}

.badge-pill.status-running::before,
.badge-pill.status-warning::before,
.badge-pill.status-fault::before,
.badge-pill.status-idle::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.badge-pill.status-running::before { background: var(--status-running); box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18); }
.badge-pill.status-warning::before { background: var(--status-warning); box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18); }
.badge-pill.status-fault::before { background: var(--status-fault); box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18); }
.badge-pill.status-idle::before { background: #7e8ea4; box-shadow: 0 0 0 3px rgba(126, 142, 164, 0.18); }

.content-surface .badge-pill {
    background: #eef2f7;
    color: #2b3a4a;
}

.status-bar {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #3bd4c8;
}

.status-dot.disconnected {
    background: #ff6b6b;
}

.table-lite {
    color: inherit;
}

/* DevExpress chart axis readability on dark background */
.page-shell .dx-chart .dxc-axis-labels text,
.page-shell .dx-chart .dxc-axis-title text,
.page-shell .dx-chart .dxc-axis-title,
.page-shell .dx-chart .dxc-axis-labels {
    fill: var(--text-main);
    color: var(--text-main);
    opacity: 0.95;
}

.page-shell .dx-chart svg text {
    fill: var(--text-main);
}

.page-shell .dx-chart .dxc-grid line,
.page-shell .dx-chart .dxc-grid path,
.page-shell .dx-chart .dxc-axis path,
.page-shell .dx-chart .dxc-axis line {
    stroke: rgba(255, 255, 255, 0.18);
}

.page-shell .chart-contrast text {
    fill: #e8edf4 !important;
    opacity: 1 !important;
}

/* Funding image: keep small and centered */
.funding-image {
    max-width: min(320px, 50%) !important;
    width: auto !important;
    height: auto !important;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
