/* DASHBOARD STYLES */
.dashboard-header .live-indicator {
    background: #e74c3c;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
}

.blink-dot {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }

    100% {
        opacity: 1;
    }
}

/* CALENDAR STYLES (Ported and Genericized from finances.css) */
.dp-grid {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(7, 1fr);
    /* Default for Days */
    gap: 5px;
}

/* Specific grids might need different columns */
.dp-grid[id*="Months"],
.dp-grid[id*="Years"] {
    grid-template-columns: repeat(3, 1fr);
}

.dp-cell {
    width: 100%;
    aspect-ratio: 1;
    /* Square cells */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    transition: all 0.2s;
}

.dp-cell:hover:not(.empty) {
    background-color: #f8f9fa;
    color: var(--vino);
    font-weight: 700;
}

.dp-cell.selected {
    background-color: var(--vino);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(94, 28, 38, 0.3);
}

.dp-cell.in-range {
    background-color: #fdf2f4;
    color: var(--vino);
}

.dp-cell.empty {
    cursor: default;
    pointer-events: none;
}

.day-header {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: #aaa;
    padding-bottom: 5px;
}

.dash-grid-kpi {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.kpi-card-dash {
    background: white;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid #edf2f7;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
}

.kpi-card-dash .val {
    font-size: 32px;
    font-weight: 900;
    color: #2d3748;
    margin: 5px 0;
}

.kpi-card-dash .val.sm {
    font-size: 20px;
}

.kpi-card-dash .lbl {
    font-size: 11px;
    font-weight: 700;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-card-dash .trend {
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.trend.positive {
    color: #27ae60;
}

.trend.negative {
    color: #e74c3c;
}

.trend.neutral {
    color: #cbd5e0;
}

.dash-grid-charts {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.dash-grid-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.chart-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #edf2f7;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
}

.chart-card .card-head h3 {
    margin: 0;
    font-size: 16px;
    color: #2d3748;
    font-weight: 700;
}

.chart-area {
    height: 250px;
    margin-top: 15px;
    position: relative;
    width: 100%;
}

.activity-feed {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    overflow-y: auto;
    max-height: 250px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #f7fafc;
    padding-bottom: 8px;
}

.btn-refresh {
    background: white;
    border: 1px solid #e2e8f0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    color: #718096;
    transition: 0.2s;
}

.btn-refresh:hover {
    background: #f7fafc;
    color: #2d3748;
}

/* Switch Toggle */
.switch-toggle {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e0;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #5e1c26;
}

input:checked+.slider:before {
    transform: translateX(18px);
}

/* Geo Table */
.geo-table-container {
    height: 100%;
    overflow-y: auto;
    padding: 0 5px;
}

.geo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-family: 'Montserrat', sans-serif;
}

.geo-table th {
    text-align: left;
    padding: 10px 8px;
    color: #a0aec0;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #edf2f7;
    position: sticky;
    top: 0;
    background: white;
}

.geo-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #f7fafc;
    color: #2d3748;
    vertical-align: middle;
}

.geo-table tr:last-child td {
    border-bottom: none;
}

.geo-table tr:hover {
    background-color: #f8fafc;
}

.col-flag {
    width: 40px;
    text-align: center;
    font-size: 18px;
}

.col-city {
    font-weight: 700;
}

.col-count {
    text-align: right;
    font-weight: 800;
    color: #5e1c26;
}

/* Responsive */
@media (max-width: 1024px) {
    .dash-grid-kpi {
        grid-template-columns: 1fr 1fr;
    }

    .dash-grid-charts,
    .dash-grid-bottom {
        grid-template-columns: 1fr;
    }
}