/* AirChain Styles - Corporate Light Theme */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    /* Core Palette - Clean White & Corporate Blue/Green */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --card-bg: #ffffff;
    --card-border: #e2e8f0;

    /* Text */
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --text-tertiary: #a0aec0;

    /* Brand Accents */
    --accent-primary: #48bb78;
    /* Brand Green */
    --accent-secondary: #4299e1;
    /* Brand Blue */
    --accent-tertiary: #38b2ac;
    /* Teal */

    /* Status Colors (Muted for light mode) */
    --good: #38a169;
    --moderate: #d69e2e;
    --sensitive: #dd6b20;
    --unhealthy: #e53e3e;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--accent-secondary), var(--accent-primary));
    --gradient-glow: linear-gradient(180deg, rgba(72, 187, 120, 0.1) 0%, rgba(255, 255, 255, 0) 100%);

    /* Spacing & Radius */
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 6px;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 15px rgba(66, 153, 225, 0.15);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

/* Utilities */
.glass-panel {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header & Navigation */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 40px;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
    padding: 15px 30px;
    border-radius: var(--radius-md);
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 8px;
    font-size: 1.2rem;
}

.nav-links {
    display: flex;
    background: var(--bg-primary);
    padding: 4px;
    border-radius: var(--radius-md);
    gap: 4px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.nav-links a:hover {
    color: var(--accent-secondary);
    background: rgba(66, 153, 225, 0.05);
}

.nav-links a.active {
    color: var(--accent-secondary);
    background: white;
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-secondary);
    color: white;
    box-shadow: 0 2px 4px rgba(66, 153, 225, 0.3);
}

.btn-primary:hover {
    background: #3182ce;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(66, 153, 225, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--text-secondary);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
    border-color: var(--text-tertiary);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 80px 20px;
    margin-bottom: 40px;
    position: relative;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 0 0 20px 0;
    line-height: 1.1;
    color: var(--text-primary);
}

.hero h1 span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    color: var(--text-secondary);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.stat-card {
    background: white;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat-value {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

/* Sensors */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 1.75rem;
    margin: 0;
}

.sensors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
}

.sensor-card {
    background: white;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.sensor-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.sensor-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.sensor-name {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.sensor-location {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.aqi-badge {
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 100px;
    font-weight: 600;
}

.aqi-badge.good {
    background: #E6FFFA;
    color: #2C7A7B;
}

.aqi-badge.moderate {
    background: #FFFFF0;
    color: #B7791F;
}

.aqi-badge.sensitive {
    background: #FFFAF0;
    color: #C05621;
}

.aqi-badge.unhealthy {
    background: #FFF5F5;
    color: #C53030;
}

.sensor-readings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid var(--card-border);
}

.reading-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.reading-value span {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-weight: 400;
    margin-left: 2px;
}

/* Dashboard Widgets */
.dashboard-header {
    background: white;
    border: 1px solid var(--card-border);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    border-radius: var(--radius-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget {
    background: white;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    color: var(--text-primary);
}

.widget-subtitle {
    color: var(--text-secondary);
}

.widget-remove {
    color: var(--text-tertiary);
}

.widget-remove:hover {
    color: var(--unhealthy);
}

/* Modal */
.modal {
    background: white;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--card-border);
}

.modal-header .modal-title {
    color: var(--text-primary);
}

.modal-close {
    color: var(--text-secondary) !important;
}

.modal-close:hover {
    color: var(--text-primary) !important;
}

.sensor-list li {
    border-color: var(--card-border) !important;
}

.sensor-list li:hover {
    background: var(--bg-primary) !important;
}

/* Footer */
footer {
    margin-top: auto;
    padding: 40px 0;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.9rem;
    border-top: 1px solid var(--card-border);
}

@media (max-width: 768px) {
    .stats-section {
        grid-template-columns: 1fr;
    }
}