:root {
    --md-sys-color-primary: #FF9800; /* Orange Material */
    --md-sys-color-on-primary: #ffffff;
    --md-sys-color-background: #fdfcff;
    --md-sys-color-on-background: #1a1c1e;
    --md-sys-color-surface: #fdfcff;
    --md-sys-color-on-surface: #1a1c1e;
    --md-sys-color-surface-variant: #e1e2ec;
    --md-sys-color-on-surface-variant: #44474f;
    --md-sys-color-success: #4CAF50;
    --md-sys-color-error: #F44336;
    
    --shadow-1: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-2: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
    
    --border-radius: 12px;
}

[data-theme="dark"] {
    --md-sys-color-primary: #FFB74D;
    --md-sys-color-on-primary: #4e2600;
    --md-sys-color-background: #1a1c1e;
    --md-sys-color-on-background: #e3e2e6;
    --md-sys-color-surface: #1a1c1e;
    --md-sys-color-on-surface: #e3e2e6;
    --md-sys-color-surface-variant: #44474f;
    --md-sys-color-on-surface-variant: #c4c6d0;
    
    --shadow-1: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: var(--md-sys-color-background);
    color: var(--md-sys-color-on-background);
    transition: background-color 0.3s, color 0.3s;
}

.app-bar {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    padding: 16px 24px;
    box-shadow: var(--shadow-2);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.icon-button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: inline-flex;
    transition: background-color 0.2s;
}

.icon-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.container {
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 16px;
}

.summary-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.card {
    background-color: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-on-surface-variant);
    padding: 24px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-1);
}

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

.stat-card.primary { border-top: 4px solid var(--md-sys-color-primary); }
.stat-card.success { border-top: 4px solid var(--md-sys-color-success); }
.stat-card.warning { border-top: 4px solid var(--md-sys-color-error); }

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-top: 8px;
}

.content-section {
    margin-bottom: 32px;
}

.content-section h2 {
    margin-bottom: 16px;
    font-size: 1.5rem;
    font-weight: 500;
}

.grid-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.releve-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.releve-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 1.1rem;
}

.releve-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge {
    padding: 4px 8px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: bold;
    color: white;
}

.badge.ok { background-color: var(--md-sys-color-success); }
.badge.hs { background-color: var(--md-sys-color-error); }

.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    background-color: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-on-surface-variant);
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-1);
}

.empty-state {
    text-align: center;
    padding: 48px;
    color: var(--md-sys-color-on-surface-variant);
    grid-column: 1 / -1;
}

.empty-state .material-icons {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}
