/* Base Theme & Variables */
:root {
    --color-primary: #2e7d32;
    --color-primary-dark: #1b5e20;
    --color-bg: #f4f7f6;
    --color-text: #333;
    --color-border: #ccc;
    --color-temp-normal: #4caf50;
    --color-temp-warn: #ff9800;
    --color-temp-critical: #f44336;
    --radius-sm: 6px;
    --radius-md: 12px; /* Smoother corners */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.4;
    padding-bottom: 40px; /* Space at bottom for scrolling */
}

/* --- Navigation & Header --- */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background-color: var(--color-primary);
    color: #fff;
    box-shadow: var(--shadow-md);
}

.navbar h1 { font-size: 1.1rem; font-weight: 600; }

.tab-navigation {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    background: #ffffff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.tab-btn {
    flex: 1;
    max-width: 160px;
    padding: 10px;
    border: 2px solid var(--color-primary);
    background: transparent;
    color: var(--color-primary);
    font-weight: bold;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    text-transform: uppercase;
    transition: 0.2s;
}

.tab-btn.active {
    background: var(--color-primary);
    color: #fff;
}

/* --- Layout --- */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 15px;
}

/* Status Badges */
.status-badge {
    padding: 4px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 20px;
    background: #fff;
    color: var(--color-primary);
}
.status-badge--offline { color: var(--color-temp-critical); }

/* --- Weather Horizontal Scroll --- */
.weather-grid {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding: 5px 2px 10px 2px;
}
.weather-card {
    flex: 0 0 110px;
    padding: 12px;
    text-align: center;
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid #eee;
}

/* --- Forms --- */
.form-card {
    background: #fff;
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.form-group { margin-bottom: 15px; }
.row { display: flex; gap: 12px; }
.form-group--half { flex: 1; }
label { display: block; margin-bottom: 5px; font-size: 0.85rem; font-weight: 600; color: #555; }
input, select, textarea {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #fafafa;
}

/* --- History Cards (The New Look) --- */
.history-card {
    background: #fff;
    margin-bottom: 12px;
    padding: 15px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border-left: 5px solid var(--color-primary);
}
.history-card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}
.history-card-body p {
    font-size: 0.95rem;
    font-weight: 600;
    color: #444;
}

/* Mobile Tweaks */
@media (max-width: 480px) {
    .tab-btn { font-size: 0.75rem; padding: 8px; }
    .container { padding: 10px; }
}