* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: sans-serif; background: #0f1419; color: #fff; padding: 15px; }
.container { max-width: 1200px; margin: 0 auto; }
.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
h1 { font-size: 20px; margin: 0; }
.menu-wrapper { position: relative; }
.menu-btn { background: #3b82f6; color: white; border: none; padding: 10px 16px; border-radius: 4px; cursor: pointer; }
.menu-dropdown { display: none; position: absolute; top: 100%; right: 0; background: #1a1f2e; border: 1px solid #2a3142; border-radius: 4px; min-width: 200px; z-index: 1000; margin-top: 5px; }
.menu-dropdown.active { display: block; }
.menu-item { display: block; width: 100%; padding: 12px 16px; color: #fff; cursor: pointer; border-bottom: 1px solid #2a3142; background: none; border-left: none; border-right: none; border-top: none; text-align: left; font-size: 14px; }
.menu-item:last-child { border-bottom: none; }
.menu-item:hover { background: #2a3142; }
.page { display: none; }
.page.active { display: block; }
.tanks { display: grid; gap: 15px; }
.tank { background: #1a1f2e; border: 1px solid #2a3142; border-radius: 8px; padding: 15px; cursor: pointer; }
.tank:hover { border-color: #3b82f6; }
.tank-name { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.metric { background: #0f1419; padding: 10px 6px; border-radius: 6px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: space-between; min-height: 110px; }
.metric-label { font-size: 14px; font-weight: 600; color: #888; width: 100%; }
.metric-icon { display: flex; align-items: center; justify-content: center; height: 42px; }
.metric-number { font-size: 24px; font-weight: 600; width: 100%; }
.metric-dot { display: none; }
.status { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.status.ok { background: #4ade80; }
.status.warning { background: #facc15; }
.status.error { background: #ef4444; }
.edit-btn { background: #3b82f6; color: white; border: none; padding: 10px 16px; border-radius: 4px; cursor: pointer; margin-top: 12px; width: 100%; }
.modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.8); z-index: 1000; align-items: center; justify-content: center; }
.modal.active { display: flex; }
.modal-content { background: #1a1f2e; padding: 20px; border-radius: 8px; width: 90%; max-width: 350px; max-height: 90vh; overflow-y: auto; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; margin-bottom: 5px; font-size: 13px; color: #aaa; }
.form-group input, .form-group select { width: 100%; padding: 10px; background: #0f1419; border: 1px solid #2a3142; border-radius: 4px; color: #fff; }
.form-buttons { display: flex; gap: 10px; margin-top: 15px; }
.btn-save { background: #4ade80; color: #000; flex: 1; padding: 10px; border: none; border-radius: 4px; cursor: pointer; }
.btn-cancel { background: #666; color: #fff; flex: 1; padding: 10px; border: none; border-radius: 4px; cursor: pointer; }
.btn-delete { background: #ef4444; color: #fff; width: 100%; padding: 10px; border: none; border-radius: 4px; cursor: pointer; margin-top: 10px; }
.back-btn { background: #666; color: white; border: none; padding: 10px 16px; border-radius: 4px; cursor: pointer; margin-bottom: 20px; }
.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 10px; flex-wrap: wrap; }
.view-toggle { display: flex; gap: 10px; }
.toggle-btn { background: #2a3142; color: #fff; border: none; padding: 8px 16px; border-radius: 4px; cursor: pointer; }
.toggle-btn.active { background: #3b82f6; }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.chart-container { background: #1a1f2e; padding: 20px; border-radius: 8px; border: 1px solid #2a3142; cursor: pointer; position: relative; }
.chart-container:hover { border-color: #3b82f6; }
.chart-container h3 { margin-bottom: 15px; }
.chart-full { grid-column: 1 / -1; }
.chart-hint { font-size: 11px; color: #555; margin-bottom: 8px; }
canvas { max-height: 300px; }
.measurement-form { background: #1a1f2e; border: 1px solid #2a3142; border-radius: 8px; padding: 20px; max-width: 500px; }
.measurement-form h2 { margin-bottom: 20px; }
.field-error { color: #ef4444; font-size: 11px; margin-top: 4px; display: block; min-height: 16px; }
.field-ok { color: #4ade80; font-size: 11px; margin-top: 4px; display: block; min-height: 16px; }
input.input-error { border-color: #ef4444 !important; }
input.input-ok { border-color: #4ade80 !important; }
.recipe-card { background: #1a1f2e; border: 1px solid #2a3142; border-radius: 8px; padding: 15px; margin-bottom: 12px; cursor: pointer; transition: border-color 0.2s; }
.recipe-card:hover { border-color: #3b82f6; }
.recipe-card-title { font-size: 16px; font-weight: 600; color: #4ade80; margin-bottom: 10px; }
.recipe-card-row { display: flex; justify-content: space-between; font-size: 13px; color: #aaa; padding: 4px 0; border-bottom: 1px solid #2a3142; }
.recipe-card-row:last-child { border-bottom: none; }
.recipe-card-row span:last-child { color: #fff; font-weight: 500; }
.recipe-empty { color: #555; font-size: 14px; text-align: center; padding: 30px; }
.brew-empty { border-color: #facc15 !important; }
.empty-hint { color: #facc15; font-size: 12px; margin-bottom: 10px; }
@media (max-width: 480px) {
  .metric-number {
    font-size: 19px !important;
  }
}

.metric-value {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
}

.metric-number {
  font-size: 20px !important;
  font-weight: 700;
  line-height: 1;
}

.metric-unit {
  font-size: 13px;
  font-weight: 400;
  margin-left: 3px;
  color: #aaa;
}
