/* Weather Dashboard Styles - DLS Dark Theme */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 100%);
    min-height: 100vh;
    padding-top: 44px;
    margin: 0;
    color: #e0e0e0;
}

/* Layout Shell (Sidebar + Main Content) */
.layout-shell {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    display: none;
    position: sticky;
    top: 60px;
    overflow-y: auto;
    width: 280px;
    background: #1a1a1a;
    border-right: 1px solid #2a2a2a;
    flex-shrink: 0;
    overflow-y: auto;
}

@media (min-width: 1024px) {
    .sidebar {
        display: block;
    }
}

.sidebar-header {
    padding: 2rem 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border-bottom: 1px solid #2a2a2a;
}

.sidebar-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.sidebar-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d5016;
    margin: 0 0 0.25rem 0;
}

.sidebar-subtitle {
    font-size: 0.875rem;
    color: #9ca3af;
    margin: 0;
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: #b0b0b0;
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-link:hover {
    background: #252525;
    color: #e0e0e0;
}

.sidebar-link.active {
    background: rgba(45, 80, 22, 0.2);
    color: #3d7a2e;
    border-left-color: #2d5016;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
}

/* Main Content Area */
.layout-main {
    flex: 1;
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding-top: 5px;
    min-height: 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Loading */
.loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #2a2a2a;
    border-top-color: #2d5016;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Error Message */
.error-message {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid #dc3545;
    color: #ff6b6b;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Section */
.weather-section {
    margin-bottom: 3rem;
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 2rem;
    color: #2d5016;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: #9ca3af;
    font-size: 0.95rem;
}

.last-updated {
    color: #9ca3af;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Current Conditions */
.current-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

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

/* Make weather details grid span both columns */
.weather-details-grid {
    grid-column: 1 / -1;
}

.weather-card {
    background: #1f1f1f;
    border: 1px solid #333333;
    border-left: 4px solid #2d5016;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.current-main {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.weather-icon-large {
    font-size: 5rem;
    margin-bottom: 1rem;
    color: #2d5016;
}

.current-temp {
    font-size: 4rem;
    font-weight: 700;
    color: #e0e0e0;
    margin-bottom: 0.5rem;
}

.current-condition {
    font-size: 1.25rem;
    color: #b0b0b0;
    margin-bottom: 1rem;
}

.feels-like {
    font-size: 0.95rem;
    color: #9ca3af;
}

/* Today's Forecast Card */
.today-forecast {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.forecast-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 1rem;
}

.today-forecast-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: #2d5016;
}

.today-temps {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.today-temp-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.today-temp-label {
    font-size: 0.875rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.today-temp-high {
    font-size: 2rem;
    font-weight: 700;
    color: #ef4444;
}

.today-temp-low {
    font-size: 2rem;
    font-weight: 700;
    color: #3b82f6;
}

.today-forecast-condition {
    font-size: 1rem;
    color: #b0b0b0;
    margin-bottom: 0.5rem;
}

.today-forecast-precip {
    font-size: 0.9rem;
    color: #3b82f6;
}

.weather-details-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 1024px) {
    .weather-details-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .weather-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .weather-details-grid {
        grid-template-columns: 1fr;
    }
}

.detail-card {
    background: #1f1f1f;
    border: 1px solid #333333;
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s;
}

.detail-card:hover {
    border-color: #2d5016;
    transform: translateY(-2px);
}

.detail-icon {
    font-size: 2rem;
    color: #2d5016;
    margin-bottom: 0.75rem;
}

.detail-label {
    font-size: 0.875rem;
    color: #9ca3af;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #e0e0e0;
}

/* Forecast Grid */
.forecast-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

/* Responsive forecast grid */
@media (max-width: 1024px) {
    .forecast-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .forecast-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.forecast-card {
    background: #1f1f1f;
    border: 1px solid #333333;
    border-radius: 0.75rem;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.2s;
}

.forecast-card:hover {
    border-color: #2d5016;
    transform: translateY(-2px);
}

.forecast-date {
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 0.5rem;
}

.forecast-icon {
    font-size: 2.5rem;
    color: #2d5016;
    margin: 1rem 0;
}

.forecast-temps {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.temp-high {
    color: #e0e0e0;
    font-weight: 600;
}

.temp-low {
    color: #9ca3af;
}

.forecast-condition {
    font-size: 0.875rem;
    color: #b0b0b0;
    margin-top: 0.5rem;
}

.forecast-precip {
    font-size: 0.8rem;
    color: #3b82f6;
    margin-top: 0.5rem;
}

/* Hourly Forecast */
.hourly-scroll {
    overflow-x: auto;
    padding-bottom: 1rem;
}

.hourly-grid {
    display: flex;
    gap: 1rem;
    min-width: min-content;
}

.hourly-card {
    background: #1f1f1f;
    border: 1px solid #333333;
    border-radius: 0.75rem;
    padding: 1.5rem 1rem;
    text-align: center;
    width: 130px;
    flex-shrink: 0;
    transition: all 0.2s;
}

.hourly-card:hover {
    border-color: #2d5016;
    transform: translateY(-2px);
}

.hourly-time {
    font-weight: 600;
    color: #e0e0e0;
    margin-bottom: 0.75rem;
}

.hourly-icon {
    font-size: 2rem;
    color: #2d5016;
    margin: 0.75rem 0;
}

.hourly-temp {
    font-size: 1.5rem;
    font-weight: 600;
    color: #e0e0e0;
    margin: 0.75rem 0;
}

.hourly-details {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 0.5rem;
}

/* Delivery Outlook */
.delivery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.delivery-card {
    background: #1f1f1f;
    border: 1px solid #333333;
    border-left: 4px solid;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.delivery-card.excellent {
    border-left-color: #10b981;
}

.delivery-card.good {
    border-left-color: #3d7a2e;
}

.delivery-card.fair {
    border-left-color: #f59e0b;
}

.delivery-card.poor {
    border-left-color: #ef4444;
}

.delivery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.delivery-date {
    font-weight: 600;
    color: #e0e0e0;
}

.delivery-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.delivery-badge.excellent {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.delivery-badge.good {
    background: rgba(61, 122, 46, 0.2);
    color: #3d7a2e;
}

.delivery-badge.fair {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.delivery-badge.poor {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.delivery-conditions {
    color: #b0b0b0;
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Scheduled Deliveries Section */
.delivery-scheduled {
    background: #1a3a0d;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 3px solid #2d5016;
}

.delivery-scheduled h4 {
    color: #4ade80;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-group {
    margin-bottom: 0.75rem;
}

.calendar-group:last-child {
    margin-bottom: 0;
}

.calendar-group strong {
    color: #2d5016;
    font-size: 0.875rem;
    display: block;
    margin-bottom: 0.25rem;
}

.calendar-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.calendar-group li {
    color: #d1d5db;
    font-size: 0.875rem;
    padding: 0.25rem 0 0.25rem 1rem;
    border-left: 2px solid #374151;
    margin-left: 0.5rem;
}

.delivery-recommendations {
    background: #252525;
    border-radius: 0.5rem;
    padding: 1rem;
}

.delivery-recommendations h4 {
    color: #2d5016;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.delivery-recommendations ul {
    list-style: none;
    padding: 0;
}

.delivery-recommendations li {
    color: #9ca3af;
    font-size: 0.875rem;
    padding: 0.25rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.delivery-recommendations li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #2d5016;
}

/* Correlation Analysis */
.correlation-controls {
    background: #1f1f1f;
    border: 1px solid #333333;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.date-range-picker {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.date-range-picker label {
    color: #e0e0e0;
    font-weight: 500;
}

.date-range-picker input[type="date"] {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 0.5rem;
    padding: 0.5rem;
    color: #e0e0e0;
    font-size: 0.9rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #2d5016;
    color: #f0f0f0;
}

.btn-primary:hover {
    background: #3d7a2e;
    transform: translateY(-1px);
}

.info-message {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid #3b82f6;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    color: #93c5fd;
}

.info-message i {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.correlation-results {
    margin-bottom: 2rem;
}

.chart-card {
    background: #1f1f1f;
    border: 1px solid #333333;
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.chart-card h3 {
    color: #2d5016;
    margin-bottom: 1.5rem;
}

.chart-card canvas {
    max-height: 400px;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.insight-card {
    background: #1f1f1f;
    border: 1px solid #333333;
    border-left: 4px solid #2d5016;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.insight-card h4 {
    color: #2d5016;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.insight-card h4 i {
    font-size: 1.25rem;
}

.insight-value {
    font-size: 2rem;
    font-weight: 700;
    color: #e0e0e0;
    margin-bottom: 0.5rem;
}

.insight-description {
    color: #9ca3af;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .current-temp {
        font-size: 3rem;
    }

    .weather-icon-large {
        font-size: 4rem;
    }

    .forecast-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .delivery-grid {
        grid-template-columns: 1fr;
    }

    .insights-grid {
        grid-template-columns: 1fr;
    }
}
