:root {
    --bg-gradient: radial-gradient(circle at center, #0a0f24 0%, #030510 100%);
    --accent-blue-desat: #4cc7e0; 
    --accent-green-desat: #52d683; 
    --accent-red-orange: #ff6b55; 
    --glass-color: rgba(205, 213, 232, 0.20); 
    --text-default: #CDD5E8; 
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Manrope', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-default);
    min-height: 100vh;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    overflow-x: hidden;
}

.dashboard-container {
    width: 1228px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card {
    background: linear-gradient(135deg, rgba(9, 13, 34, 0.85) 0%, rgba(53, 95, 154, 0.65) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 35px 0 rgba(0, 0, 0, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.2);
    padding: 24px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card h3 {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-default);
    margin-bottom: 2px;
}

.card .subtitle {
    font-size: 11px;
    color: var(--text-default);
    opacity: 0.75;
    margin-bottom: 14px;
}

.top-box {
    height: 70px;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 32px;
}

.glow-title {
    font-size: 34px; 
    font-weight: 800;
    color: var(--text-default);
    text-shadow: 0 0 10px rgba(205, 213, 232, 0.65), 0 0 25px rgba(205, 213, 232, 0.35);
    filter: drop-shadow(0 0 5px rgba(205, 213, 232, 0.4));
}

.status-badge {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 14px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-badge.stable {
    background: rgba(82, 214, 131, 0.1);
    border: 1px solid var(--accent-green-desat);
    color: var(--accent-green-desat);
    text-shadow: 0 0 8px rgba(82, 214, 131, 0.3);
}

.status-badge.anomaly-detected {
    background: rgba(255, 107, 85, 0.12);
    border: 1px solid var(--accent-red-orange);
    color: var(--accent-red-orange);
    text-shadow: 0 0 8px rgba(255, 107, 85, 0.3);
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.stable .status-dot { background: var(--accent-green-desat); }
.anomaly-detected .status-dot { background: var(--accent-red-orange); }

.central-box {
    border-radius: 16px;
    height: 310px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
}

.fog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0;
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.fog-overlay.active {
    opacity: 1;
    backdrop-filter: blur(7px) saturate(40%);
    -webkit-backdrop-filter: blur(7px) saturate(40%);
    background: radial-gradient(circle at center, rgba(148, 163, 184, 0.25) 0%, rgba(9, 13, 34, 0.6) 100%);
}

.central-info {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.central-info .date {
    font-size: 30px; 
    font-weight: 800;
    color: var(--text-default);
}

.central-info .metric {
    font-size: 15px;
    color: var(--text-default);
}

.central-info .metric span {
    color: #ffffff;
    font-weight: 700;
}

.no-anomalies {
    color: var(--accent-green-desat) !important;
    font-weight: bold;
}

.star-field {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.star-field.dimmed { opacity: 0.12; }

.bg-star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    animation: pulseBg var(--duration, 3s) infinite ease-in-out;
    opacity: var(--opacity, 0.5);
}

@keyframes pulseBg {
    0%, 100% { opacity: 0.2; transform: scale(0.9); }
    50% { opacity: 0.9; transform: scale(1.1); }
}

.center-star-container {
    position: absolute;
    top: 50%;
    left: 65%;
    transform: translate(-50%, -50%);
    z-index: 2;
    transition: all 0.6s ease;
}

.center-star-container.dimmed {
    opacity: 0.25;
    transform: translate(-50%, -50%) scale(0.85);
    filter: blur(2px);
}

.main-star-svg {
    width: 85px;
    height: 85px;
    fill: #ffffff;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 35px var(--accent-blue-desat));
}

.bottom-row {
    display: flex;
    gap: 16px;
    height: 340px;
}

.meteo-box {
    flex: 1;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
}

.meteo-content {
    margin-top: auto;
    margin-bottom: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.meteo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
}

.meteo-label {
    font-size: 13px;
    color: var(--text-default);
}

.meteo-value {
    font-size: 18px;
    font-weight: 700;
}

.meteo-value.highlight { color: var(--accent-green-desat); }
.text-default { color: var(--text-default) !important; }

.archivio-box {
    width: 285px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
}

.select-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 10px;
}

.styled-select {
    background: var(--glass-color);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--text-default);
    padding: 8px 36px 8px 14px; 
    border-radius: 18px; 
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 600;
    width: 100%;
    outline: none;
    cursor: pointer;
    backdrop-filter: blur(12px) brightness(95%);
    -webkit-backdrop-filter: blur(12px) brightness(95%);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.15), 0 4px 15px rgba(0, 0, 0, 0.35);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.styled-select option {
    background: #090d22;
    color: var(--text-default);
}

.custom-arrow-glass {
    position: absolute;
    right: 14px; 
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: rgba(205, 213, 232, 0.15); 
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; 
    color: rgba(205, 213, 232, 0.70); 
    backdrop-filter: blur(4px); 
    -webkit-backdrop-filter: blur(4px);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.1), 0 2px 5px rgba(0,0,0,0.2); 
}

.custom-arrow-glass svg {
    width: 11px;
    height: 11px;
}

.calendar-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-default);
    opacity: 0.7;
    margin-bottom: 2px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-cell {
    position: relative;
    background: var(--glass-color);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px; 
    height: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.25s ease;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 2;
}

.calendar-cell.glow-strong::before {
    content: '';
    position: absolute;
    top: 4px; left: 4px; right: 4px; bottom: 4px;
    border-radius: 8px;
    background: radial-gradient(circle, rgba(205, 213, 232, 0.55) 0%, transparent 75%);
    filter: blur(3px);
    z-index: -1;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.calendar-cell.glow-weak::before {
    content: '';
    position: absolute;
    top: 4px; left: 4px; right: 4px; bottom: 4px;
    border-radius: 8px;
    background: radial-gradient(circle, rgba(71, 85, 105, 0.25) 0%, transparent 65%);
    filter: blur(4px);
    z-index: -1;
    pointer-events: none;
}

.calendar-cell.empty {
    background: transparent;
    border-color: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    cursor: default;
}
.calendar-cell.empty::before { display: none; }

.calendar-cell:not(.empty):hover {
    background: rgba(205, 213, 232, 0.35);
    border-color: rgba(255, 255, 255, 0.4);
}

.calendar-cell.selected-day {
    border-color: #CDD5E8;
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.4), 0 0 12px rgba(205, 213, 232, 0.3);
}

.calendar-cell .day-num {
    color: var(--text-default);
    font-weight: 700;
    font-size: 9px;
    line-height: 1;
    position: relative;
    z-index: 3;
}

.cal-star-svg {
    width: 11px;
    height: 11px;
    margin-top: 1px;
    position: relative;
    z-index: 3;
}

.cal-star-svg .star-shape {
    stroke-linejoin: round;
    stroke-linecap: round;
}

.cal-star-svg.filled .star-shape {
    fill: #CDD5E8;
    stroke: #CDD5E8;
    stroke-width: 1px;
}

.cal-star-svg.empty .star-shape {
    fill: transparent;
    stroke: #CDD5E8;
    stroke-width: 1px;
}

/* BOX COSTELLAZIONE ORIENTATO AI PNG */
.costellazione-box {
    width: 530px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
}

.constellation-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.completion-rate {
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-blue-desat); 
    background: rgba(76, 199, 224, 0.08);
    padding: 3px 8px;
    border-radius: 20px;
    border: 1px solid rgba(76, 199, 224, 0.18);
}

.constellation-canvas {
    flex-grow: 1;
    width: 100%;
    position: relative;
    margin-top: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.constellation-bg-stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.micro-star {
    position: absolute;
    background: #ffffff;
    border-radius: 50%;
}

.micro-star.layer-deep { opacity: 0.13; }
.micro-star.layer-mid { opacity: 0.38; }
.micro-star.layer-front {
    opacity: 0.70;
    background: #f0f7ff;
    box-shadow: 0 0 2px rgba(255,255,255,0.4);
}

/* STILE DELLA TUA ILLUSTRAZIONE PNG */
.constellation-png {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain; /* Evita qualsiasi distorsione */
    z-index: 2;
    pointer-events: none;
    /* Opzionale: un leggerissimo effetto bagliore astronomico soffuso sull'immagine */
    filter: drop-shadow(0 0 8px rgba(205, 213, 232, 0.25));
    transition: opacity 0.3s ease;
}