/* Dark theme for Glucose Sensor Viewer */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a2e;
    color: #e0e0e0;
    min-height: 100vh;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #16213e;
    border-bottom: 1px solid #0f3460;
}

header h1 {
    font-size: 1.5rem;
    color: #e94560;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.status-indicator .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator.connected .dot {
    background-color: #4ecca3;
    box-shadow: 0 0 6px #4ecca3;
}

.status-indicator.disconnected .dot {
    background-color: #e94560;
    box-shadow: 0 0 6px #e94560;
}

main {
    padding: 1.5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Status Cards Grid */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.card {
    background-color: #16213e;
    border-radius: 8px;
    padding: 1.25rem;
    border: 1px solid #0f3460;
}

.card h3 {
    font-size: 0.85rem;
    color: #a0a0b0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.card .value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #e0e0e0;
}

#trend-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#trend-arrow {
    font-size: 2rem;
}

#trend-text {
    font-size: 1rem;
    color: #a0a0b0;
}

/* Chart */
.chart-container {
    background-color: #16213e;
    border-radius: 8px;
    padding: 1.25rem;
    border: 1px solid #0f3460;
    margin-bottom: 1.5rem;
    height: 350px;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Config Panel */
.config-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: #a0a0b0;
    margin-bottom: 0.3rem;
}

.form-group input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    border: 1px solid #0f3460;
    background-color: #1a1a2e;
    color: #e0e0e0;
    font-size: 0.95rem;
}

.form-group input:focus {
    outline: none;
    border-color: #4ecca3;
}

.btn {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 4px;
    background-color: #e94560;
    color: #fff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: #c73652;
}
