/* Weather Alert Dashboard Styles */
:root {
    --wad-primary: #DC143C;
    --wad-secondary: #0C2340;
    --wad-accent: #B8860B;
    --wad-success: #28a745;
    --wad-warning: #ffc107;
    --wad-danger: #dc3545;
    --wad-info: #17a2b8;
    --wad-light: #f8f9fa;
    --wad-dark: #343a40;
    --wad-border: #dee2e6;
    --wad-shadow: 0 2px 8px rgba(0,0,0,0.1);
    --wad-radius: 8px;
}

/* Common Styles */
.wad-weather-alerts,
.wad-lightning-map,
.wad-weather-stats,
.wad-current-conditions {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--wad-dark);
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.wad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--wad-primary);
}

.wad-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--wad-secondary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.wad-icon {
    font-size: 32px;
}

.wad-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.wad-filter-select {
    padding: 8px 16px;
    border: 1px solid var(--wad-border);
    border-radius: var(--wad-radius);
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.wad-filter-select:hover,
.wad-filter-select:focus {
    border-color: var(--wad-primary);
    outline: none;
}

.wad-refresh-btn {
    padding: 8px 12px;
    background: var(--wad-primary);
    color: white;
    border: none;
    border-radius: var(--wad-radius);
    cursor: pointer;
    transition: background-color 0.2s;
}

.wad-refresh-btn:hover {
    background: #b0102d;
}

/* Loading State */
.wad-loading {
    text-align: center;
    padding: 60px 20px;
}

.wad-spinner {
    width: 48px;
    height: 48px;
    margin: 0 auto 20px;
    border: 4px solid var(--wad-light);
    border-top: 4px solid var(--wad-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Weather Alerts */
.wad-alerts-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wad-alert {
    background: white;
    border: 2px solid var(--wad-border);
    border-radius: var(--wad-radius);
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.wad-alert:hover {
    box-shadow: var(--wad-shadow);
}

.wad-alert-header {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    cursor: pointer;
    gap: 16px;
    background: var(--wad-light);
}

.wad-alert-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.wad-alert-title-section {
    flex: 1;
}

.wad-alert-title {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 200;
    color: var(--wad-secondary);
}

.wad-alert-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
}

.wad-alert-type {
    background: var(--wad-secondary);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
}

.wad-alert-severity {
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 600;
}

.wad-severity-Extreme { background: #8b0000; color: white; }
.wad-severity-Severe { background: var(--wad-danger); color: white; }
.wad-severity-Moderate { background: var(--wad-warning); color: var(--wad-dark); }
.wad-severity-Minor { background: var(--wad-info); color: white; }

.wad-alert-time {
    color: #6c757d;
}

.wad-alert-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--wad-secondary);
    transition: transform 0.2s;
}

.wad-alert-toggle.active {
    transform: rotate(180deg);
}

.wad-alert-body {
    padding: 0 20px 20px 68px;
}

.wad-alert-description {
    margin-bottom: 16px;
    line-height: 1.6;
}

.wad-alert-instruction {
    background: #fff3cd;
    border-left: 4px solid var(--wad-warning);
    padding: 12px;
    margin-bottom: 16px;
}

.wad-alert-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--wad-border);
    font-size: 13px;
    color: #6c757d;
}

/* Priority Borders */
.wad-priority-3 {
    border-left: 6px solid #8b0000;
}

.wad-priority-2 {
    border-left: 6px solid var(--wad-danger);
}

.wad-priority-1 {
    border-left: 6px solid var(--wad-warning);
}

.wad-priority-0 {
    border-left: 6px solid var(--wad-info);
}

/* No Alerts State */
.wad-no-alerts {
    text-align: center;
    padding: 60px 20px;
    background: var(--wad-light);
    border-radius: var(--wad-radius);
}

.wad-no-alerts-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.wad-no-alerts h3 {
    margin: 0 0 12px 0;
    color: var(--wad-secondary);
}

.wad-last-updated {
    color: #6c757d;
    font-size: 14px;
}

/* Lightning Map */
.wad-lightning-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.wad-stat-card {
    background: white;
    border: 1px solid var(--wad-border);
    border-radius: var(--wad-radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--wad-shadow);
    transition: transform 0.2s;
}

.wad-stat-card:hover {
    transform: translateY(-2px);
}

.wad-stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--wad-primary);
    margin-bottom: 8px;
}

.wad-stat-label {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

.wad-chart-container {
    background: white;
    border: 1px solid var(--wad-border);
    border-radius: var(--wad-radius);
    padding: 20px;
    margin-bottom: 24px;
}

.wad-lightning-list {
    background: white;
    border: 1px solid var(--wad-border);
    border-radius: var(--wad-radius);
    padding: 20px;
}

.wad-lightning-list h3 {
    margin-top: 0;
    color: var(--wad-secondary);
}

.wad-lightning-table-wrapper {
    overflow-x: auto;
}

.wad-lightning-table {
    width: 100%;
    border-collapse: collapse;
}

.wad-lightning-table th {
    background: var(--wad-light);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--wad-secondary);
    border-bottom: 2px solid var(--wad-border);
}

.wad-lightning-table td {
    padding: 12px;
    border-bottom: 1px solid var(--wad-border);
}

.wad-lightning-table tbody tr:hover {
    background: var(--wad-light);
}

/* Section Titles */
.wad-section-title {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--wad-secondary);
}

/* Pool Safety Banner */
.wad-pool-safety {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: var(--wad-radius);
    margin-bottom: 24px;
    border: 2px solid;
    transition: all 0.3s ease;
}

.wad-pool-safety-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.wad-pool-safety-content {
    flex: 1;
}

.wad-pool-safety-content strong {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
}

.wad-pool-safety-content p {
    margin: 0;
    font-size: 14px;
}

.wad-pool-safety-badge {
    font-size: 14px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex-shrink: 0;
}

/* Pool Safety States */
.wad-pool-safe {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: #43a047;
}
.wad-pool-safe .wad-pool-safety-content strong { color: #2e7d32; }
.wad-pool-safe .wad-pool-safety-content p { color: #33691e; }
.wad-pool-safe .wad-pool-safety-badge { background: #43a047; color: white; }

.wad-pool-caution {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-color: #f9a825;
    animation: wadPulseWarning 2s ease-in-out infinite;
}
.wad-pool-caution .wad-pool-safety-content strong { color: #e65100; }
.wad-pool-caution .wad-pool-safety-content p { color: #bf360c; }
.wad-pool-caution .wad-pool-safety-badge { background: #f9a825; color: #333; }

.wad-pool-danger {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    border-color: #c62828;
    animation: wadPulseDanger 1s ease-in-out infinite;
}
.wad-pool-danger .wad-pool-safety-content strong { color: #b71c1c; }
.wad-pool-danger .wad-pool-safety-content p { color: #c62828; }
.wad-pool-danger .wad-pool-safety-badge { background: #c62828; color: white; }

.wad-pool-closed {
    background: linear-gradient(135deg, #eceff1 0%, #cfd8dc 100%);
    border-color: #78909c;
}
.wad-pool-closed .wad-pool-safety-content strong { color: #455a64; }
.wad-pool-closed .wad-pool-safety-content p { color: #607d8b; }
.wad-pool-closed .wad-pool-safety-badge { background: #78909c; color: white; }

@keyframes wadPulseWarning {
    0%, 100% { box-shadow: 0 0 0 0 rgba(249, 168, 37, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(249, 168, 37, 0); }
}

@keyframes wadPulseDanger {
    0%, 100% { box-shadow: 0 0 0 0 rgba(198, 40, 40, 0.5); }
    50% { box-shadow: 0 0 0 12px rgba(198, 40, 40, 0); }
}

/* Lightning Visual Row (Radar + Scatter side by side) */
.wad-lightning-visual-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.wad-radar-container,
.wad-scatter-container {
    background: white;
    border: 1px solid var(--wad-border);
    border-radius: var(--wad-radius);
    padding: 20px;
    box-shadow: var(--wad-shadow);
}

/* Radar */
.wad-radar-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 12px;
}

#wad-lightning-radar {
    max-width: 100%;
    height: auto;
}

.wad-radar-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    font-size: 12px;
    color: #6c757d;
}

.wad-radar-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.wad-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.wad-dot-immediate { background: #ff3333; }
.wad-dot-warning   { background: #ff9900; }
.wad-dot-watch     { background: #ffdd00; }
.wad-dot-distant   { background: #66aaff; }

/* Scatter Chart */
.wad-chart-no-margin {
    margin-bottom: 0;
    border: none;
    box-shadow: none;
    padding: 0;
}

.wad-chart-hint {
    text-align: center;
    font-size: 12px;
    color: #6c757d;
    margin: 8px 0 0 0;
    font-style: italic;
}

/* Alert Level Badges */
.wad-alert-level {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wad-level-danger  { background: #ffebee; color: #c62828; }
.wad-level-warning { background: #fff8e1; color: #e65100; }
.wad-level-info    { background: #e1f5fe; color: #01579b; }
.wad-level-success { background: #e8f5e9; color: #2e7d32; }

/* Trend card */
.wad-stat-trend-card .wad-stat-value {
    font-size: 20px;
}

/* Responsive: Lightning Visual Row */
@media (max-width: 900px) {
    .wad-lightning-visual-row {
        grid-template-columns: 1fr;
    }
    
    .wad-pool-safety {
        flex-direction: column;
        text-align: center;
    }
    
    .wad-pool-safety-badge {
        align-self: center;
    }
}

/* Weather Stats */
.wad-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.wad-stat-large {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
}

.wad-stat-icon {
    font-size: 48px;
}

.wad-stat-content {
    flex: 1;
}

.wad-stat-large .wad-stat-value {
    font-size: 42px;
}

.wad-stat-danger {
    border: 2px solid var(--wad-danger);
}

.wad-stat-danger .wad-stat-value {
    color: var(--wad-danger);
}

.wad-charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.wad-chart-card {
    background: white;
    border: 1px solid var(--wad-border);
    border-radius: var(--wad-radius);
    padding: 20px;
}

.wad-chart-wide {
    grid-column: 1 / -1;
}

.wad-chart-card h3 {
    margin-top: 0;
    color: var(--wad-secondary);
}

.wad-recent-activity {
    background: white;
    border: 1px solid var(--wad-border);
    border-radius: var(--wad-radius);
    padding: 20px;
}

.wad-activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wad-activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--wad-light);
    border-radius: 6px;
}

.wad-activity-icon {
    font-size: 24px;
}

.wad-activity-content {
    flex: 1;
}

.wad-activity-title {
    font-weight: 600;
    color: var(--wad-secondary);
    margin-bottom: 4px;
}

.wad-activity-time {
    font-size: 13px;
    color: #6c757d;
}

/* Current Conditions */
.wad-conditions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.wad-condition-card {
    background: white;
    border: 1px solid var(--wad-border);
    border-radius: var(--wad-radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--wad-shadow);
    transition: transform 0.2s;
}

.wad-condition-card:hover {
    transform: translateY(-2px);
}

.wad-condition-icon {
    font-size: 48px;
}

.wad-condition-content {
    flex: 1;
}

.wad-condition-label {
    font-size: 13px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.wad-temp-card {
    grid-column: span 2;
    background: linear-gradient(135deg, var(--wad-primary) 0%, #8b0000 100%);
    color: white;
    border: none;
}

.wad-temp-main {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 12px;
}

.wad-temp-value {
    font-size: 64px;
    font-weight: 700;
    line-height: 1;
}

.wad-temp-unit {
    font-size: 32px;
    opacity: 0.8;
}

.wad-humidity {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    opacity: 0.9;
}

.wad-wind-speed,
.wad-pressure-value,
.wad-uv-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--wad-secondary);
    margin-bottom: 8px;
}

.wad-wind-direction,
.wad-wind-gust,
.wad-pressure-trend,
.wad-solar,
.wad-lightning-status,
.wad-lightning-distance,
.wad-battery-level {
    font-size: 14px;
    color: #6c757d;
}
.wad-pressure-trend {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85em;
    margin-top: 5px;
}

.wad-trend-icon {
    font-size: 1.2em;
    font-weight: bold;
}

.wad-trend-rising {
    color: #28a745; /* Green - good weather coming */
}

.wad-trend-falling {
    color: #dc3545; /* Red - storms possible */
}

.wad-trend-steady {
    color: #6c757d; /* Gray - stable */
}

.wad-trend-text {
    color: #666;
}

.wad-freeze-protection {
    background: linear-gradient(135deg, #e0f2ff 0%, #bae6fd 100%);
    border: 2px solid #0ea5e9;
    border-radius: var(--wad-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.wad-freeze-icon {
    font-size: 48px;
}

.wad-freeze-content strong {
    display: block;
    font-size: 18px;
    color: var(--wad-secondary);
    margin-bottom: 4px;
}

.wad-freeze-content p {
    margin: 0;
    color: #334155;
}

/* Error States */
.wad-error {
    text-align: center;
    padding: 60px 20px;
    background: #fff5f5;
    border: 2px solid var(--wad-danger);
    border-radius: var(--wad-radius);
}

.wad-error-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.wad-error h3 {
    margin: 0 0 12px 0;
    color: var(--wad-danger);
}

.wad-retry-btn {
    padding: 12px 24px;
    background: var(--wad-primary);
    color: white;
    border: none;
    border-radius: var(--wad-radius);
    font-size: 16px;
    cursor: pointer;
    margin-top: 16px;
    transition: background-color 0.2s;
}

.wad-retry-btn:hover {
    background: #b0102d;
}

/* Status Dots */
.wad-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.wad-status-online { background: var(--wad-success); }
.wad-status-offline { background: var(--wad-danger); }
.wad-status-unknown { background: #6c757d; }

/* Responsive Design */
@media (max-width: 768px) {
    .wad-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .wad-temp-card {
        grid-column: span 1;
    }
    
    .wad-alert-body {
        padding: 0 20px 20px 20px;
    }
    
    .wad-alert-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .wad-charts-section {
        grid-template-columns: 1fr;
    }
}

/* Accessibility */
.wad-alert-toggle:focus,
.wad-refresh-btn:focus,
.wad-filter-select:focus,
.wad-retry-btn:focus {
    outline: 2px solid var(--wad-primary);
    outline-offset: 2px;
}

/* ============================================
   ACTIVITY TIMELINE STYLES
   Add these to the end of your existing CSS file
   ============================================ */

/* Activity Timeline List Styles */
#wad-activity-list,
.wad-activity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 0;
}

.wad-activity-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid var(--wad-theme-color, #dc143c);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
}

.wad-activity-item:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wad-activity-icon {
    font-size: 28px;
    margin-right: 16px;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wad-activity-icon img.emoji {
    width: 28px;
    height: 28px;
    display: block;
}

.wad-activity-content {
    flex: 1;
    min-width: 0;
}

.wad-activity-title {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 4px;
    line-height: 1.4;
}

.wad-activity-time {
    font-size: 12px;
    color: #6c757d;
    line-height: 1.4;
}

/* Responsive adjustments for Activity Timeline */
@media (max-width: 768px) {
    .wad-activity-item {
        padding: 10px 12px;
    }
    
    .wad-activity-icon {
        font-size: 24px;
        min-width: 28px;
        margin-right: 12px;
    }
    
    .wad-activity-icon img.emoji {
        width: 24px;
        height: 24px;
    }
    
    .wad-activity-title {
        font-size: 13px;
    }
    
    .wad-activity-time {
        font-size: 11px;
    }
}
/* ============================================
   ALERT HISTORY BROWSER
   ============================================ */

.wad-alert-history {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--wad-dark);
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Filter Bar */
.wad-history-filters {
    background: white;
    border: 1px solid var(--wad-border);
    border-radius: var(--wad-radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--wad-shadow);
}

.wad-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.wad-filter-row:last-of-type {
    margin-bottom: 16px;
}

.wad-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
    flex: 1;
}

.wad-filter-search-group {
    flex: 2;
}

.wad-filter-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
}

.wad-filter-input {
    padding: 8px 12px;
    border: 1px solid var(--wad-border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    transition: border-color 0.2s;
}

.wad-filter-input:focus {
    outline: none;
    border-color: var(--wad-primary);
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

.wad-filter-actions {
    display: flex;
    gap: 8px;
    padding-top: 4px;
    border-top: 1px solid var(--wad-border);
    padding-top: 16px;
}

.wad-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.wad-btn-primary {
    background: var(--wad-primary);
    color: white;
}
.wad-btn-primary:hover { background: #b0102d; }

.wad-btn-secondary {
    background: var(--wad-light);
    color: var(--wad-dark);
    border: 1px solid var(--wad-border);
}
.wad-btn-secondary:hover { background: #e2e6ea; }

.wad-btn-accent {
    background: var(--wad-secondary);
    color: white;
}
.wad-btn-accent:hover { background: #0a1c33; }

.wad-btn-page {
    background: white;
    color: var(--wad-secondary);
    border: 1px solid var(--wad-border);
    padding: 6px 16px;
}
.wad-btn-page:hover:not(:disabled) { background: var(--wad-light); }
.wad-btn-page:disabled { opacity: 0.4; cursor: not-allowed; }

/* Summary Bar */
.wad-history-summary {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.wad-summary-item {
    flex: 1;
    text-align: center;
    padding: 12px;
    background: white;
    border: 1px solid var(--wad-border);
    border-radius: var(--wad-radius);
    border-top: 3px solid var(--wad-border);
}

.wad-summary-extreme { border-top-color: #8b0000; }
.wad-summary-severe  { border-top-color: #dc3545; }
.wad-summary-moderate { border-top-color: #ffc107; }
.wad-summary-minor   { border-top-color: #17a2b8; }

.wad-summary-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--wad-secondary);
}

.wad-summary-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Results Table */
.wad-history-table-wrap {
    background: white;
    border: 1px solid var(--wad-border);
    border-radius: var(--wad-radius);
    overflow: hidden;
    box-shadow: var(--wad-shadow);
    margin-bottom: 16px;
}

.wad-history-table {
    width: 100%;
    border-collapse: collapse;
}

.wad-history-table thead th {
    background: var(--wad-secondary);
    color: white;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: left;
    white-space: nowrap;
    user-select: none;
}

.wad-sortable {
    cursor: pointer;
    transition: background 0.2s;
}

.wad-sortable:hover {
    background: #0f2d52 !important;
}

.wad-sort-icon {
    font-size: 10px;
    margin-left: 4px;
    opacity: 0.7;
}

.wad-history-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    vertical-align: middle;
}

.wad-history-row {
    cursor: pointer;
    transition: background 0.15s;
}

.wad-history-row:hover {
    background: #f8f9fa;
}

.wad-history-row.wad-row-expanded {
    background: #f0f4f8;
}

/* Date column */
.wad-date-primary {
    font-weight: 600;
    color: var(--wad-secondary);
}

.wad-date-time {
    font-size: 12px;
    color: #6c757d;
}

/* Type column */
.wad-type-icon {
    font-size: 16px;
}

.wad-col-headline {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Severity Badges */
.wad-severity-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.wad-sev-extreme  { background: #8b0000; color: white; }
.wad-sev-severe   { background: #dc3545; color: white; }
.wad-sev-moderate { background: #fff3cd; color: #856404; }
.wad-sev-minor    { background: #d1ecf1; color: #0c5460; }
.wad-sev-unknown  { background: #e2e3e5; color: #383d41; }

/* Status Badges */
.wad-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.wad-status-active  { background: #d4edda; color: #155724; }
.wad-status-expired { background: #e2e3e5; color: #6c757d; }
.wad-status-test    { background: #cce5ff; color: #004085; }

/* Expand button */
.wad-row-toggle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--wad-border);
    background: white;
    color: var(--wad-secondary);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.wad-row-toggle:hover {
    background: var(--wad-secondary);
    color: white;
}

.wad-toggle-open {
    background: var(--wad-secondary);
    color: white;
}

.wad-col-expand {
    width: 40px;
    text-align: center;
}

/* Detail Row */
.wad-detail-row td {
    padding: 0 !important;
    border-bottom: 2px solid var(--wad-primary) !important;
}

.wad-detail-panel {
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #eef1f5 100%);
    animation: wadSlideDown 0.25s ease-out;
}

@keyframes wadSlideDown {
    from { max-height: 0; opacity: 0; padding: 0 24px; }
    to   { max-height: 600px; opacity: 1; padding: 20px 24px; }
}

.wad-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.wad-detail-section h4 {
    margin: 0 0 8px 0;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--wad-primary);
    padding-bottom: 6px;
    border-bottom: 1px solid var(--wad-border);
}

.wad-detail-section p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.wad-detail-main {
    grid-column: 1 / -1;
}

.wad-detail-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 16px;
    margin: 0;
    font-size: 13px;
}

.wad-detail-list dt {
    font-weight: 600;
    color: #6c757d;
}

.wad-detail-list dd {
    margin: 0;
    color: #333;
    word-break: break-word;
}

/* Pagination */
.wad-history-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
}

.wad-page-info {
    font-size: 14px;
    color: #6c757d;
}

/* History Result Count */
.wad-history-result-count {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .wad-filter-row {
        flex-direction: column;
    }
    
    .wad-filter-group {
        min-width: 100%;
    }
    
    .wad-history-summary {
        flex-wrap: wrap;
    }
    
    .wad-summary-item {
        min-width: calc(50% - 8px);
    }
    
    .wad-col-headline {
        max-width: 150px;
    }
    
    .wad-detail-grid {
        grid-template-columns: 1fr;
    }
    
    .wad-history-table {
        font-size: 13px;
    }
    
    .wad-history-table thead th,
    .wad-history-table tbody td {
        padding: 8px 10px;
    }
}
