/* ============================================
   FILE: public/assets/css/dashboard.css
   Dashboard Specific Styles
============================================ */

/* Dashboard Body */
.dashboard-body {
    background: linear-gradient(135deg, #0A0E0F 0%, #141F20 100%);
    min-height: 100vh;
    color: white;
}

/* Dashboard Header */
.dashboard-header {
    background: rgba(20, 31, 32, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(3, 140, 80, 0.2);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--finkele-green);
}

.dashboard-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--finkele-green), var(--finkele-light-green));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(3, 140, 80, 0.1);
    border: 1px solid rgba(3, 140, 80, 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--finkele-green);
    font-weight: 600;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: var(--finkele-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px rgba(3, 140, 80, 0.6);
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1); 
    }
    50% { 
        opacity: 0.6; 
        transform: scale(1.2); 
    }
}

.current-time {
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.fullscreen-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fullscreen-btn:hover {
    background: rgba(3, 140, 80, 0.1);
    border-color: var(--finkele-green);
    color: var(--finkele-green);
}

/* Dashboard Main */
.dashboard-main {
    padding: 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

/* Metrics Section */
.metrics-section {
    margin-bottom: 2rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.metric-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--finkele-green), var(--finkele-light-green));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.metric-card:hover::before {
    transform: scaleX(1);
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(3, 140, 80, 0.2);
    border-color: var(--finkele-green);
}

.metric-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.metric-icon {
    width: 24px;
    height: 24px;
}

.metric-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.metric-body {
    margin-bottom: 1rem;
}

.metric-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--finkele-green);
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.metric-change {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.metric-change.positive {
    color: var(--finkele-green);
}

.metric-change.negative {
    color: #DC2626;
}

.metric-sparkline {
    height: 40px;
    margin-top: 0.5rem;
}

/* Charts Section */
.charts-section {
    margin-bottom: 2rem;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 1.5rem;
}

.chart-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.chart-card.large {
    grid-column: span 2;
}

.chart-card:hover {
    border-color: rgba(3, 140, 80, 0.3);
}

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

.chart-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
}

.chart-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.chart-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chart-select:hover,
.chart-select:focus {
    background: rgba(3, 140, 80, 0.1);
    border-color: var(--finkele-green);
    outline: none;
}

.chart-download {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chart-download:hover {
    background: rgba(3, 140, 80, 0.1);
    border-color: var(--finkele-green);
    color: var(--finkele-green);
}

.chart-body {
    min-height: 300px;
    position: relative;
}

.chart-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.chart-btn.active,
.chart-btn:hover {
    background: var(--finkele-green);
    border-color: var(--finkele-green);
    color: white;
}

.layer-toggles {
    display: flex;
    gap: 1rem;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    cursor: pointer;
}

.toggle-label input[type="checkbox"] {
    cursor: pointer;
}

/* World Map Container */
.world-map-container {
    width: 100%;
    height: 100%;
    min-height: 300px;
    background: radial-gradient(ellipse at center, rgba(3, 140, 80, 0.1) 0%, transparent 70%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Feed Section */
.feed-section {
    margin-bottom: 2rem;
}

.feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.feed-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.feed-card:hover {
    border-color: rgba(3, 140, 80, 0.3);
}

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

.feed-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

.feed-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.8rem;
    background: rgba(3, 140, 80, 0.1);
    border: 1px solid rgba(3, 140, 80, 0.3);
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--finkele-green);
    font-weight: 600;
}

.feed-badge.info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: #3B82F6;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: var(--finkele-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.feed-body {
    max-height: 300px;
    overflow-y: auto;
}

/* Activity Feed Items */
.activity-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.activity-item.alert {
    border-left-color: #DC2626;
}

.activity-item.warning {
    border-left-color: #F59E0B;
}

.activity-item.info {
    border-left-color: var(--finkele-green);
}

.activity-time {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.activity-text {
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.25rem;
}

/* Predictions List */
.predictions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.prediction-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.prediction-item.high {
    border-left-color: #DC2626;
}

.prediction-item.medium {
    border-left-color: #F59E0B;
}

.prediction-item.low {
    border-left-color: var(--finkele-green);
}

.prediction-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(5px);
}

.prediction-icon {
    font-size: 1.5rem;
}

.prediction-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.25rem;
}

.prediction-content p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.25rem;
}

.prediction-time {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Actions Grid */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: rgba(3, 140, 80, 0.1);
    border-color: var(--finkele-green);
    color: var(--finkele-green);
    transform: translateY(-3px);
}

.action-btn svg {
    width: 24px;
    height: 24px;
}

.action-btn span {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Stats Section */
.stats-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--finkele-green);
}

/* Dashboard Footer */
.dashboard-footer {
    margin-top: 3rem;
    padding: 1.5rem;
    background: rgba(20, 31, 32, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-content p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--finkele-green);
}

/* Notification Container */
.notification-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notification {
    padding: 1rem 1.5rem;
    background: rgba(3, 140, 80, 0.9);
    color: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.3s ease;
    max-width: 300px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Dashboard Preview for Main Site */
.dashboard-preview {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.dashboard-preview .dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 0;
    background: transparent;
    border: none;
    position: static;
}

.dashboard-preview h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--finkele-green);
}

.dashboard-preview .metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.dashboard-preview .metric-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.dashboard-preview .metric-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

.dashboard-preview .metric-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--finkele-green);
    margin-bottom: 0.5rem;
}

.dashboard-preview .metric-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-card.large {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .feed-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        flex-direction: column;
        align-items: center;
    }
    
    .dashboard-preview .metrics-grid {
        grid-template-columns: 1fr;
    }
}

/* Climate Analytics Charts Styling */
.dashboard-container {
    padding: 2rem 0;
}

.climate-charts-container {
    margin: 3rem 0;
    padding: 2rem 0;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.chart-box {
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    min-height: 300px;
}

.chart-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.chart-box canvas {
    max-height: 280px;
}

/* Live monitoring section styling */
.live-monitoring {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
}

.live-monitoring h3 {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    color: #2d3748;
}

.live-indicator {
    display: inline-block;
    background: #48bb78;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(72, 187, 120, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(72, 187, 120, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(72, 187, 120, 0);
    }
}

/* Climate stats styling */
.climate-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: #718096;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #2d3748;
}

.stat-card .temp-value {
    color: #e53e3e;
}

.stat-card .co2-value {
    color: #3182ce;
}

.stat-card .risk-value {
    color: #d69e2e;
}

/* Responsive design for charts */
@media (max-width: 992px) {
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .climate-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .climate-stats {
        grid-template-columns: 1fr;
    }
    
    .chart-box {
        padding: 1rem;
        min-height: 250px;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card .stat-value {
        font-size: 1.5rem;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .chart-box {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .live-monitoring {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
        color: #e2e8f0;
    }
    
    .stat-card {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .stat-card .stat-label {
        color: #a0aec0;
    }
    
    .stat-card .stat-value {
        color: #e2e8f0;
    }
}