/* Overview Dashboard Styles */
.overview-dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem;
    color: #e0e6ed;
    font-family: 'Inter', sans-serif;
}

.overview-dashboard .panel {
    background: #1a2332;
    border-radius: 8px;
    padding: 1.2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid #2a3548;
}

.zone-title {
    margin: 2rem 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-left: 5px solid var(--neon-cyan, #00fff9);
    padding: 0.8rem 1.2rem;
    background: linear-gradient(90deg, rgba(0, 255, 249, 0.1) 0%, transparent 100%);
    cursor: pointer;
    transition: all 0.2s ease;
}

.zone-title:hover {
    background: linear-gradient(90deg, rgba(0, 255, 249, 0.2) 0%, transparent 100%);
}

.zone-title .toggle-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    opacity: 0.7;
}

.zone-title.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.zone-title.collapsed+.zone-content {
    display: none !important;
}

.zone-content {
    transition: all 0.3s ease;
}

/* Header */
.overview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #151b28;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    border: 1px solid #2a3548;
}

.overview-title {
    margin: 0;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.overview-header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #a0aec0;
}

.overview-refresh-btn {
    background: rgba(0, 255, 249, 0.1);
    border: 1px solid rgba(0, 255, 249, 0.3);
    color: var(--neon-cyan, #00fff9);
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.overview-refresh-btn:hover {
    background: rgba(0, 255, 249, 0.2);
    border-color: var(--neon-cyan, #00fff9);
    box-shadow: 0 0 10px rgba(0, 255, 249, 0.3);
    transform: translateY(-1px);
}

.overview-refresh-btn:active {
    transform: translateY(0);
}

.overview-refresh-btn span {
    font-size: 1.1rem;
}

.overview-refresh-btn.refreshing span {
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.overview-cluster-select {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #1a2332;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    border: 1px solid #2a3548;
}

/* Main Status */
.overview-main-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.status-sunny {
    color: #f6ad55;
    text-shadow: 0 0 10px rgba(246, 173, 85, 0.5);
}

.status-operational {
    color: #48bb78;
}

.status-uptime {
    color: #48bb78;
}

/* Grid */
.overview-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.2fr;
    gap: 1.5rem;
}

.overview-card h3 {
    margin: 0 0 1.2rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    border-bottom: 1px solid #2a3548;
    padding-bottom: 0.5rem;
}

/* 1. Weather Card */
.weather-content {
    display: flex;
    gap: 1.5rem;
}

.weather-graphic {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 120px;
}

.weather-graphic span.overview-weather-icon {
    font-size: 5rem;
    line-height: 1;
    filter: drop-shadow(0 0 15px rgba(246, 173, 85, 0.4));
}

.weather-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 0.5rem;
    text-transform: uppercase;
}

.weather-stats {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.weather-stat-row {
    display: flex;
    justify-content: space-between;
}

.weather-stat-link {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.weather-stat-link:hover {
    opacity: 0.8;
}

.health-good {
    color: #48bb78;
}

.health-warning {
    color: #ecc94b;
}

.health-critical {
    color: #f56565;
}

.detailed-resources-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.resource-gauge-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(26, 32, 44, 0.4);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #2d3748;
}

.resource-gauge-block .resource-title {
    font-size: 1rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 1rem;
}

.gauge-container {
    position: relative;
    width: 160px;
    height: 160px;
    margin-bottom: 1.5rem;
}

.resource-gauge-legend {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #a0aec0;
    margin-bottom: 0.5rem;
}

.legend-item span:first-child {
    margin-right: 8px;
}

.legend-color {
    width: 10px;
    height: 10px;
    display: inline-block;
    border-radius: 2px;
}

.legend-usage {
    background-color: #d53f8c;
}

.legend-requests {
    background-color: #48bb78;
}

.legend-limits {
    background-color: #319795;
}

.legend-allocatable {
    background-color: #2b6cb0;
}

.legend-capacity {
    background-color: #4a5568;
}

.legend-item span[id^="overview-"] {
    margin-left: auto;
    color: #e2e8f0;
}

/* 2. Cost Card */
.cost-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.cost-label {
    font-size: 0.85rem;
    color: #a0aec0;
}

.cost-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
}

.cost-chart-container {
    position: relative;
    height: 180px;
    width: 100%;
    display: flex;
    justify-content: center;
}

/* 3. Namespace Cost */
.namespace-chart-container {
    position: relative;
    height: 600px;
    width: 100%;
}

/* 4. Security Score */
.security-score-gauge {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}

.security-score-gauge span:first-child {
    font-size: 0.9rem;
    color: #a0aec0;
    margin-bottom: 0.2rem;
}

.security-score-value {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
}

.security-details {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.security-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.8rem;
    background: #151b28;
    border-radius: 6px;
    border: 1px solid #2a3548;
}

.security-detail-row span:first-child {
    font-size: 0.85rem;
    color: #a0aec0;
}

.security-detail-row span:last-child {
    font-weight: 700;
}

.security-formula {
    font-size: 0.75rem;
    color: #718096;
    background: rgba(45, 55, 72, 0.4);
    padding: 0.8rem;
    border-radius: 6px;
    border: 1px solid rgba(74, 85, 104, 0.3);
}

.formula-title {
    font-weight: 700;
    color: #e2e8f0;
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.8rem;
}

.formula-text {
    line-height: 1.4;
    display: block;
}

.formula-note {
    margin-top: 0.5rem;
    font-style: italic;
    color: #a0aec0;
    display: block;
}

/* Applications Health */

.app-card {
    background: #1a2332;
    border-radius: 6px;
    padding: 0.8rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #2a3548;
}

.app-card-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.app-status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-green {
    background: #48bb78;
    box-shadow: 0 0 8px #48bb78;
}

.dot-yellow {
    background: #ecc94b;
    box-shadow: 0 0 8px #ecc94b;
}

.dot-red {
    background: #f56565;
    box-shadow: 0 0 8px #f56565;
}

.app-name {
    font-weight: 500;
    color: #e2e8f0;
}

.app-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.8rem;
    color: #a0aec0;
}

.app-weather-icons {
    display: flex;
    gap: 0.3rem;
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

@media (max-width: 1200px) {
    .overview-grid {
        grid-template-columns: 1fr 1fr;
    }

    .apps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 850px) {
    .overview-grid {
        grid-template-columns: 1fr;
    }

    .overview-main-status {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
        font-size: 1.1rem;
    }

    .overview-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .overview-header-actions {
        width: 100%;
        justify-content: space-between;
        gap: 1rem;
    }
}

@media (max-width: 600px) {
    .apps-grid {
        grid-template-columns: 1fr;
    }

    .weather-content {
        flex-direction: column;
        align-items: center;
    }

    .weather-stats {
        width: 100%;
    }

    .cost-header {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Timeframe Toggle */
.card-header-with-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-header-with-actions h3 {
    margin-bottom: 0;
}

.timeframe-toggle {
    display: flex;
    background: #1a202c;
    border-radius: 6px;
    padding: 2px;
    border: 1px solid #2d3748;
}

.toggle-btn {
    background: transparent;
    border: none;
    color: #a0aec0;
    padding: 2px 10px;
    font-size: 0.75rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.toggle-btn:hover {
    color: #edf2f7;
}

.toggle-btn.active {
    background: #4A5568;
    color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 5. Pipelines Section Updated */
.pipelines-summary-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pipeline-repo-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #151b28;
    padding: 0.8rem;
    border-radius: 6px;
    border: 1px solid #2a3548;
}

.pipeline-repo-name {
    font-weight: 600;
    color: #e2e8f0;
    font-size: 0.9rem;
}

.pipeline-status-icons {
    display: flex;
    gap: 0.5rem;
}

.pipeline-mini-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.75rem;
    background: #1a2332;
    border: 1px solid #2a3548;
}

/* 6. ArgoCD Health Summary */
.argocd-health-summary {
    background: #151b28;
    border-radius: 6px;
    border: 1px solid #2a3548;
    padding: 1rem;
}

.argocd-health-header {
    font-size: 0.75rem;
    color: #a0aec0;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.argocd-health-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.argocd-health-item {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #e2e8f0;
    text-decoration: none;
    padding: 0.4rem;
    margin: -0.4rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.argocd-health-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.argocd-health-item .argocd-icon {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.argocd-health-item .argocd-val {
    margin-left: auto;
    font-weight: 700;
}

.argocd-icon.healthy {
    color: #48bb78;
}

.argocd-icon.degraded {
    color: #f56565;
}

.argocd-icon.progressing {
    color: #4299e1;
}

.argocd-icon.suspended {
    color: #a0aec0;
}

.argocd-icon.synced {
    color: #48bb78;
}

.argocd-icon.outofsync {
    color: #ecc94b;
}

.degraded-apps-list {
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px dashed #2a3548;
    max-height: 140px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.degraded-app-entry {
    color: #f56565;
    background: rgba(245, 101, 101, 0.08);
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    border: 1px solid rgba(245, 101, 101, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.degraded-app-name {
    font-weight: 600;
    font-size: 0.85rem;
}

.degraded-app-ns {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Failed Jobs Alert Card */
.overview-alert-card {
    border-left: 4px solid #f56565 !important;
    background: rgba(245, 101, 101, 0.05) !important;
}

.overview-alert-card h3 {
    color: #f56565 !important;
    border-bottom: 1px solid rgba(245, 101, 101, 0.2) !important;
    margin-bottom: 0.8rem !important;
}

/* Collapsible Zone Support */
.overview-alert-card.collapsed .zone-content {
    display: none;
}

.failed-jobs-full-list {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 8px;
}

.failed-job-full-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: #151b28;
    border: 1px solid #2a3548;
    border-radius: 4px;
    font-size: 0.85rem;
}

.failed-job-full-item .job-name {
    color: #f56565;
    font-weight: 600;
}

.failed-job-full-item .job-ns {
    color: #a0aec0;
    font-size: 0.75rem;
}

/* Zone Business KPI Styles */
.business-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.kpi-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 80px;
    padding: 0.8rem;
    position: relative;
    overflow: hidden;
}

.kpi-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #ecc94b;
}

.kpi-label {
    font-size: 0.75rem;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ecc94b;
}

.kpi-subtext {
    font-size: 0.7rem;
    color: #718096;
    margin-top: 0.3rem;
}

.business-chart-card {
    grid-column: span 2;
    min-height: 100px !important;
    max-height: 150px !important;
    padding: 0.5rem !important;
}

.business-chart-card h3 {
    font-size: 0.8rem !important;
    margin-bottom: 5px !important;
}

#biz-users-chart {
    height: 80px !important;
}

/* Business Intelligence Zone Styles */
.bi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.bi-map-card,
.bi-data-card {
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.bi-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #2a3548;
}

.bi-icon {
    font-size: 1.5rem;
    color: var(--neon-cyan);
}

.world-map-container {
    flex: 1;
    background: #0d1117;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #a0aec0;
    font-size: 0.9rem;
}

.map-legend {
    display: flex;
    gap: 1.5rem;
    font-size: 0.8rem;
    color: #a0aec0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.legend-yellow {
    background-color: #f6e05e;
    box-shadow: 0 0 5px #f6e05e;
}

.legend-orange {
    background-color: #ed8936;
    box-shadow: 0 0 5px #ed8936;
}

/* Leaflet Overrides */
.leaflet-container {
    background: #0d1117 !important;
    font-family: inherit;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background: #1a2332 !important;
    color: #fff !important;
    border: 1px solid #2a3548;
}

.leaflet-control-attribution {
    background: rgba(13, 17, 23, 0.7) !important;
    color: #718096 !important;
}

.bi-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(0, 255, 249, 0.2);
}

.bi-card-header h3 {
    margin: 0 !important;
    border: none !important;
    padding: 0 !important;
}

.bi-icon {
    font-size: 1.4rem;
    color: var(--neon-cyan);
    opacity: 0.8;
}

.world-map-container {
    flex: 1;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    min-height: 300px;
}

.map-loading {
    color: var(--neon-cyan);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    animation: flash 1.5s infinite;
}

/* SVG Map Country Styling */
.country {
    fill: #1a2332;
    stroke: #2a3548;
    stroke-width: 0.5;
    transition: all 0.3s ease;
    cursor: pointer;
}

.country:hover {
    stroke: var(--neon-cyan);
    stroke-width: 1;
    filter: drop-shadow(0 0 5px var(--neon-cyan));
}

/* BI Table Styling */
.bi-table-container {
    overflow-x: auto;
}

.bi-data-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
}

.bi-data-table th {
    text-align: left;
    padding: 0.8rem;
    color: #a0aec0;
    font-weight: 600;
    border-bottom: 2px solid #2a3548;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

.bi-data-table td {
    padding: 0.8rem;
    border-bottom: 1px solid #2a3548;
    color: #e2e8f0;
}

.bi-data-table tr:hover {
    background: rgba(0, 255, 249, 0.05);
}

.bi-data-table .country-name {
    font-weight: 700;
    color: var(--neon-cyan);
}

.bi-data-table .finance-value {
    font-family: 'JetBrains Mono', monospace;
    color: #ecc94b;
}

.bi-data-table .bi-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    background: rgba(0, 255, 249, 0.1);
    border: 1px solid rgba(0, 255, 249, 0.3);
}

@keyframes flash {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

@media (max-width: 1000px) {
    .bi-grid {
        grid-template-columns: 1fr;
    }

    .bi-data-card {
        grid-column: span 1;
    }
}

/* Release Operations Styling */
.release-ops-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1rem;
}

.release-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem !important;
    background: linear-gradient(135deg, rgba(159, 122, 234, 0.05) 0%, rgba(159, 122, 234, 0.1) 100%);
    border: 1px solid rgba(159, 122, 234, 0.2);
}

.release-info h3 {
    color: var(--neon-purple, #9f7aea);
    margin-bottom: 0.5rem;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.5rem;
}

.release-info p {
    color: #a0aec0;
    margin: 0;
    font-size: 0.95rem;
}

.btn-action {
    background: var(--neon-purple, #9f7aea);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 0 15px rgba(159, 122, 234, 0.3);
}

.btn-action:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(159, 122, 234, 0.5);
    filter: brightness(1.1);
}

.btn-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #4a5568;
}

.release-status {
    margin-top: 1rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-success {
    color: #48bb78;
}

.status-error {
    color: #f56565;
}