body {
            font-family: Arial, sans-serif;
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
            background-color: #f5f5f5;
        }
        :root {
            --plant-1: #1f6feb;
            --plant-1-soft: #e8f1ff;
            --plant-2: #2f9e44;
            --plant-2-soft: #eaf8ee;
            --neutral-border: #dbe2ea;
        }
        h1 {
            color: #333;
            text-align: center;
        }
        .tabs {
            display: flex;
            background-color: #ffffff;
            border-radius: 8px 8px 0 0;
            overflow-x: auto;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        .tab-button {
            flex: 1;
            padding: 15px 20px;
            border: none;
            background-color: transparent;
            color: #666;
            font-size: 14px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s;
            border-bottom: 3px solid transparent;
            min-width: 120px;
        }
        .tab-button:hover {
            background-color: #f5f5f5;
            color: #333;
        }
        .tab-button.active {
            color: #2196F3;
            border-bottom: 3px solid #2196F3;
            background-color: #ffffff;
        }
        .tab-content {
            display: none;
            background-color: white;
            border-radius: 0 0 8px 8px;
            padding: 20px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }
        .tab-content.active {
            display: block;
        }
        .sensor-container {
            background-color: white;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 15px;
        }
        .sensor-item {
            display: flex;
            justify-content: space-between;
            padding: 10px 0;
            border-bottom: 1px solid #eee;
        }
        .sensor-item:last-child {
            border-bottom: none;
        }
        .sensor-label {
            font-weight: bold;
            color: #555;
        }
        .sensor-value {
            color: #2196F3;
            font-size: 1.1em;
        }
        .sensor-value.plant-1-text {
            color: var(--plant-1);
        }
        .sensor-value.plant-2-text {
            color: var(--plant-2);
        }
        .no-data {
            color: #999;
            font-style: italic;
        }
        .legend {
            display: flex;
            gap: 14px;
            flex-wrap: wrap;
            margin: 0 0 15px 0;
            align-items: center;
        }
        .legend-item {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 13px;
            color: #444;
            font-weight: bold;
        }
        .legend-swatch {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            display: inline-block;
        }
        .legend-swatch.plant-1 {
            background: var(--plant-1);
        }
        .legend-swatch.plant-2 {
            background: var(--plant-2);
        }
        .plant-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 16px;
        }
        .plant-card {
            border-radius: 10px;
            padding: 16px;
            border: 2px solid var(--neutral-border);
            background: #fff;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        }
        .plant-card.plant-1 {
            border-color: var(--plant-1);
            background: linear-gradient(180deg, var(--plant-1-soft) 0%, #ffffff 34%);
        }
        .plant-card.plant-2 {
            border-color: var(--plant-2);
            background: linear-gradient(180deg, var(--plant-2-soft) 0%, #ffffff 34%);
        }
        .plant-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            gap: 8px;
        }
        .plant-title {
            margin: 0;
            font-size: 20px;
            color: #223;
        }
        .plant-badge {
            font-size: 12px;
            font-weight: bold;
            padding: 4px 10px;
            border-radius: 999px;
            color: #fff;
        }
        .plant-badge.plant-1 {
            background: var(--plant-1);
        }
        .plant-badge.plant-2 {
            background: var(--plant-2);
        }
        .plant-subtitle {
            margin: 0 0 12px 0;
            color: #506070;
            font-size: 13px;
        }
        .status-pill {
            display: inline-flex;
            align-items: center;
            padding: 4px 9px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: bold;
        }
        .status-pill.active {
            background: #dff5e5;
            color: #136c2a;
        }
        .status-pill.inactive {
            background: #f1f3f5;
            color: #6c757d;
        }
        .plant-form.plant-1 {
            border-left: 5px solid var(--plant-1);
        }
        .plant-form.plant-2 {
            border-left: 5px solid var(--plant-2);
        }
        .pump-container {
            background-color: white;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 15px;
        }
        .pump-controls {
            display: flex;
            gap: 10px;
            margin-top: 10px;
        }
        .pump-button {
            flex: 1;
            padding: 12px 24px;
            font-size: 16px;
            border-radius: 4px;
            cursor: pointer;
            border: none;
            font-weight: bold;
        }
        .pump-start-button {
            background-color: #2196F3;
            color: white;
        }
        .pump-start-button:hover {
            background-color: #1976D2;
        }
        .pump-stop-button {
            background-color: #f44336;
            color: white;
        }
        .pump-stop-button:hover {
            background-color: #d32f2f;
        }
        .controller-container {
            background-color: white;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 15px;
        }
        .controller-form {
            margin-bottom: 20px;
            padding: 15px;
            border: 1px solid #ddd;
            border-radius: 4px;
            background-color: #fafafa;
        }
        .form-group {
            margin-bottom: 15px;
        }
        .form-label {
            display: block;
            font-weight: bold;
            margin-bottom: 5px;
            color: #555;
        }
        .form-input {
            width: 100%;
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 14px;
            box-sizing: border-box;
        }
        .form-radio-group {
            display: flex;
            gap: 15px;
            margin-top: 5px;
        }
        .form-radio {
            display: flex;
            align-items: center;
            gap: 5px;
        }
        .form-submit-button {
            background-color: #4CAF50;
            color: white;
            border: none;
            padding: 10px 20px;
            font-size: 14px;
            border-radius: 4px;
            cursor: pointer;
            margin-top: 10px;
        }
        .form-submit-button:hover {
            background-color: #45a049;
        }
        .terminal-container {
            background-color: #1e1e1e;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 15px;
            color: #ffffff;
        }
        .terminal-container h2 {
            color: #ffffff;
            margin-top: 0;
            margin-bottom: 15px;
        }
        .terminal-output {
            background-color: #0d0d0d;
            border: 1px solid #333;
            border-radius: 4px;
            padding: 15px;
            font-family: 'Courier New', monospace;
            font-size: 12px;
            color: #00ff00;
            height: 400px;
            overflow-y: auto;
            overflow-x: auto;
            white-space: pre-wrap;
            word-wrap: break-word;
        }
        .terminal-controls {
            display: flex;
            gap: 10px;
            margin-bottom: 10px;
        }
        .terminal-button {
            padding: 8px 16px;
            font-size: 14px;
            border-radius: 4px;
            cursor: pointer;
            border: none;
            background-color: #4CAF50;
            color: white;
            font-weight: bold;
        }
        .terminal-button:hover {
            background-color: #45a049;
        }
        .terminal-button.paused {
            background-color: #ff9800;
        }
        .terminal-log-line {
            margin-bottom: 2px;
        }
        .data-panel {
            background-color: #ffffff;
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 15px;
            border: 1px solid #e8e8e8;
        }
        .data-controls {
            display: flex;
            gap: 10px;
            align-items: center;
            margin-bottom: 12px;
            flex-wrap: wrap;
        }
        .data-header {
            margin-bottom: 15px;
        }
        .chart-wrap {
            width: 100%;
            overflow-x: auto;
        }
        .moisture-chart {
            width: 100%;
            max-width: 100%;
            height: 260px;
            border: 1px solid #ddd;
            border-radius: 6px;
            background: #fff;
        }
        .live-metrics {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 8px;
            margin-bottom: 12px;
        }
        .live-metric {
            background: rgba(255,255,255,0.75);
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            padding: 8px;
        }
        .live-metric strong {
            display: block;
            font-size: 12px;
            color: #51606f;
            margin-bottom: 4px;
        }
        .insight-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
            gap: 8px;
            margin-top: 10px;
        }
        .insight-item {
            background: #f7f9fc;
            border: 1px solid #e7edf7;
            border-radius: 6px;
            padding: 8px;
        }
        .events-list {
            max-height: 220px;
            overflow-y: auto;
            border: 1px solid #ddd;
            border-radius: 6px;
        }
        .events-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
        }
        .events-table th,
        .events-table td {
            border-bottom: 1px solid #eee;
            padding: 8px;
            text-align: left;
        }
