/* ============================================
   FILE: public/assets/css/dashboard.css
   Dashboard Specific Styles — LIGHT THEME
   Matches finkele.com brand identity
============================================ */

/* Dashboard Body — light clean background */
.dashboard-body {
    background: #F7FAF8;
    min-height: 100vh;
    color: #141F20;
}

/* Dashboard Header — frosted white nav */
.dashboard-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(3, 140, 80, 0.1);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.header-container {
    max-width: 1400px;
    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: #5A6B68;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.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.08);
    border: 1px solid rgba(3, 140, 80, 0.2);
    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.4);
}

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

.current-time {
    color: #5A6B68;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.fullscreen-btn {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #5A6B68;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

/* Dashboard Main */
.dashboard-main {
    padding: 2rem;
    max-width: 1400px;
    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: #FFFFFF;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    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(-4px);
    box-shadow: 0 8px 24px rgba(3, 140, 80, 0.12);
    border-color: rgba(3, 140, 80, 0.15);
}

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

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

.metric-label {
    color: #5A6B68;
    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: #5A6B68;
}

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

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

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

.value-updated {
    animation: valueFlash 0.5s ease;
}

@keyframes valueFlash {
    0%   { opacity: 1; }
    50%  { opacity: 0.6; transform: scale(1.02); }
    100% { opacity: 1; transform: scale(1); }
}

/* 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: #FFFFFF;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

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

.chart-card:hover {
    border-color: rgba(3, 140, 80, 0.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

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

.chart-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #141F20;
}

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

.chart-select {
    background: #F7FAF8;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #141F20;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

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

.chart-download {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #5A6B68;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

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

.chart-btn {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #5A6B68;
    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: #5A6B68;
    font-size: 0.85rem;
    cursor: pointer;
}

.toggle-label input[type="checkbox"] {
    cursor: pointer;
    accent-color: var(--finkele-green);
}

.world-map-container {
    width: 100%;
    height: 100%;
    min-height: 300px;
    background: radial-gradient(ellipse at center, rgba(3, 140, 80, 0.05) 0%, transparent 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

/* 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: #FFFFFF;
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

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

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

.feed-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #141F20;
}

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

.feed-badge.info {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.2);
    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-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #F7FAF8;
    border-radius: 8px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: rgba(3, 140, 80, 0.04);
    transform: translateX(4px);
}

.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: #5A6B68; }
.activity-text { color: #141F20; margin-top: 0.25rem; font-size: 0.9rem; }

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

.prediction-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #F7FAF8;
    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(3, 140, 80, 0.04);
    transform: translateX(4px);
}

.prediction-icon { font-size: 1.5rem; }
.prediction-content h4 { font-size: 0.95rem; font-weight: 600; color: #141F20; margin-bottom: 0.25rem; }
.prediction-content p  { font-size: 0.85rem; color: #5A6B68; margin-bottom: 0.25rem; }
.prediction-time       { font-size: 0.75rem; color: #5A6B68; }

/* 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: #F7FAF8;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    color: #5A6B68;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: rgba(3, 140, 80, 0.06);
    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(0, 0, 0, 0.06);
}

.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: #5A6B68; 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); }

/* Footer */
.dashboard-footer {
    margin-top: 3rem;
    padding: 1.5rem;
    background: #FFFFFF;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

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

.footer-content p { color: #5A6B68; font-size: 0.85rem; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: #5A6B68; text-decoration: none; font-size: 0.85rem; transition: color 0.3s ease; }
.footer-links a:hover { color: var(--finkele-green); }

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

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

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

/* Dashboard Preview */
.dashboard-preview {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.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: #F7FAF8; padding: 1.5rem; border-radius: 12px; text-align: center; transition: all 0.3s ease;
}

.dashboard-preview .metric-card:hover { transform: translateY(-4px); background: rgba(3, 140, 80, 0.06); }
.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: #5A6B68; text-transform: uppercase; letter-spacing: 1px; }

/* Responsive */
@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; }
}

/* Legacy chart-box + stat-card */
.dashboard-container { padding: 2rem 0; }
.climate-charts-container { margin: 3rem 0; padding: 2rem 0; }

.chart-box {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    min-height: 300px;
}

.chart-box:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); }
.chart-box canvas { max-height: 280px; }

.live-monitoring {
    background: #F7FAF8;
    border-radius: 15px;
    padding: 2rem;
    margin-top: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

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

.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 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.stat-card .stat-label { font-size: 0.875rem; color: #5A6B68; margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-card .stat-value { font-size: 2rem; font-weight: bold; color: #141F20; }
.stat-card .temp-value { color: #e53e3e; }
.stat-card .co2-value  { color: #3182ce; }
.stat-card .risk-value { color: #d69e2e; }

@media (max-width: 992px) { .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; }
}
