/* Dashboard Panel */
#dashboard-toggle {
    position: relative;
    float: left;
    clear: both;
    margin-top: 8px;
    margin-left: 8px;
    z-index: 5;
}

#dashboard-toggle button {
    width: 34px;
    height: 34px;
    background-color: #f8f8f8;
    color: #444;
    border: none;
    cursor: pointer;
    font-size: 16px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
}

#dashboard-toggle button:hover {
    background-color: rgba(248, 248, 248, 0.7);
}

#dashboard-panel {
    position: fixed;
    top: 0;
    right: -480px;
    width: 460px;
    height: 100%;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: -3px 0 14px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    font-size: 13px;
    color: #333;
}

#dashboard-panel.open {
    right: 0;
}

#dashboard-panel .dash-header {
    background: linear-gradient(135deg, #1a237e, #283593);
    color: white;
    padding: 18px 20px;
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#dashboard-panel .dash-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

#dashboard-panel .dash-header .dash-close {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0.8;
    line-height: 1;
}

#dashboard-panel .dash-header .dash-close:hover {
    opacity: 1;
}

#dashboard-panel .dash-subtitle {
    font-size: 11px;
    opacity: 0.85;
    margin-top: 4px;
    font-weight: 400;
}

#dashboard-panel .dash-section {
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
}

#dashboard-panel .dash-section:last-child {
    border-bottom: none;
    padding-bottom: 30px;
}

#dashboard-panel .dash-section h3 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1a237e;
    display: flex;
    align-items: center;
    gap: 8px;
}

#dashboard-panel .dash-section h3 .fas,
#dashboard-panel .dash-section h3 .far,
#dashboard-panel .dash-section h3 .fa {
    font-size: 14px;
    opacity: 0.7;
}

/* Summary Stats Row */
.dash-stats-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.dash-stat-card {
    flex: 1;
    background: #f5f7ff;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    border: 1px solid #e8eaf6;
}

.dash-stat-card .stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #1a237e;
    display: block;
    margin-bottom: 2px;
}

.dash-stat-card .stat-label {
    font-size: 10px;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 0.5px;
}

/* Tables */
#dashboard-panel table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

#dashboard-panel table thead th {
    background: #f5f5f5;
    padding: 8px 10px;
    text-align: right;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #ddd;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

#dashboard-panel table thead th:first-child {
    text-align: left;
}

#dashboard-panel table tbody td {
    padding: 8px 10px;
    text-align: right;
    border-bottom: 1px solid #eee;
    color: #444;
}

#dashboard-panel table tbody td:first-child {
    text-align: left;
    font-weight: 500;
}

#dashboard-panel table tbody tr:hover {
    background: #f8f9ff;
}

#dashboard-panel table tbody tr:last-child td {
    border-bottom: none;
}

/* Ring indicator dots */
.ring-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    border: 2px solid;
}

.ring-0-5 {
    background: rgba(66, 133, 244, 0.3);
    border-color: rgba(66, 133, 244, 0.8);
}

.ring-5-10 {
    background: rgba(52, 168, 83, 0.3);
    border-color: rgba(52, 168, 83, 0.8);
}

.ring-10-20 {
    background: rgba(251, 188, 4, 0.3);
    border-color: rgba(251, 188, 4, 0.8);
}

.ring-20-plus {
    background: rgba(234, 67, 53, 0.3);
    border-color: rgba(234, 67, 53, 0.8);
}

/* Totals row */
#dashboard-panel table tbody tr.totals-row td {
    border-top: 2px solid #1a237e;
    font-weight: 700;
    color: #1a237e;
    background: #f5f7ff;
}

/* Time period rank badge */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #1a237e;
    color: white;
    font-size: 11px;
    font-weight: 700;
    margin-right: 6px;
}

/* Percentage bar */
.pct-bar-container {
    width: 100%;
    height: 6px;
    background: #e8eaf6;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 3px;
}

.pct-bar {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #1a237e, #3f51b5);
    transition: width 0.3s ease;
}

/* Suburb distance badge */
.dist-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    background: #fff3e0;
    color: #e65100;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    #dashboard-panel {
        width: 100%;
        right: -100%;
    }

    .dash-stats-row {
        flex-wrap: wrap;
    }

    .dash-stat-card {
        min-width: calc(50% - 10px);
    }
}

/* Ring layer toggle checkbox */
.ring-toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 12px;
    color: #666;
}

.ring-toggle-container input[type="checkbox"] {
    accent-color: #1a237e;
}

/* Map overlay for concentric rings label */
.ring-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.5);
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
    pointer-events: none;
}
