/* Admin-Menü-View Styles */
.admin-menu-view {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 100;
  overflow: auto;
}

.admin-menu-view::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(147, 51, 234, 0.15), transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.1), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.admin-menu-view > * {
  position: relative;
  z-index: 1;
}

.admin-back-btn {
  width: 72px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid rgba(147, 51, 234, 0.55);
  background: var(--card-hover);
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  margin: 25px 0 16px 25px;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.admin-back-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
  background: var(--card);
  border-color: rgba(168, 85, 247, 0.7);
}

.admin-back-btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow);
}

.admin-back-btn svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.admin-tile-row {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 24px;
}

.admin-tile {
  background: var(--card-hover);
  padding: 36px 28px;
  border-radius: 18px;
  min-width: 200px;
  min-height: 120px;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text);
  transition: background 0.2s;
}

/* DB-Editor-View Styles */
.db-editor-view {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 110;
  overflow: hidden;
  flex-direction: column;
}

.db-editor-view::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(147, 51, 234, 0.15), transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.1), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.db-editor-view > * {
  position: relative;
  z-index: 1;
}

.db-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}

.db-editor-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.db-editor-close {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.db-editor-body {
  flex: 1;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
  padding: 0 24px 24px;
  min-height: 0;
}

.db-editor-nav {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  overflow: auto;
}

.db-nav-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.db-nav-title {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.db-nav-item {
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.db-nav-item.active {
  background: var(--card-hover);
  color: var(--accent);
  border-color: rgba(147, 51, 234, 0.35);
}

.db-editor-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}

.db-table-panel,
.db-form-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  min-height: 0;
}

.db-table-panel {
  flex: 0 0 32%;
  display: flex;
  flex-direction: column;
}

.db-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.db-panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.db-search {
  border: 1px solid var(--border);
  background: var(--bg-dark);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  width: 180px;
}

.db-panel-title {
  font-weight: 600;
}

.db-add-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(147, 51, 234, 0.5);
  background: var(--card-hover);
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.db-table-wrap {
  margin-top: 10px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
  overflow: auto;
}

.db-table-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.db-page-btn {
  border-radius: 8px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  background: var(--card-hover);
  color: var(--text);
  cursor: pointer;
}

.db-page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.db-page-info {
  font-size: 12px;
  color: var(--text-muted);
}

.db-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.db-table th,
.db-table td {
  padding: 8px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.db-table tbody tr {
  cursor: pointer;
}

.db-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.db-table tbody tr.selected {
  background: rgba(147, 51, 234, 0.15);
}

.db-table tbody tr.db-empty {
  cursor: default;
  color: var(--text-muted);
}

.db-form-panel {
  flex: 1;
  overflow: auto;
}

.db-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.db-form-message {
  min-height: 18px;
  font-size: 12px;
  color: var(--warning);
}

.db-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
}

.db-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}

.db-field input,
.db-field textarea,
.db-field select {
  background: #611ea0;
  border: 1px solid var(--border);
  color: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
}

.db-field select option {
  background: #611ea0;
  color: #fff;
}

.db-field textarea {
  resize: vertical;
}

.db-field span {
  color: var(--text-muted);
}

.db-field.span-2 {
  grid-column: span 2;
}

.db-field.db-checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.db-field.db-checkbox span {
  color: var(--text);
}

.db-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.db-btn {
  border-radius: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: var(--card-hover);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow);
}

.db-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.db-btn-primary {
  background: var(--accent);
  border-color: rgba(147, 51, 234, 0.6);
  color: #fff;
}

.db-btn-danger {
  background: var(--card);
  border-color: var(--border);
  color: var(--danger);
}

.db-btn-secondary {
  background: var(--card);
}
:root {
  --bg: #181c20;
  --bg-dark: #0f1214;
  --card: #1e2128;
  --card-hover: #252930;
  --text: #e8eaed;
  --text-muted: #9ca3af;
  --accent: #9333ea;
  --accent-light: #a855f7;
  --ok: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
}

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

html {
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding: 20px;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Desktop: kein Scrollen erzwingen */
@media (min-width: 769px) {
  html, body {
    overflow: hidden;
    height: 100vh;
  }
}

/* Mobile: natürliches Scrollen erlauben */
@media (max-width: 768px) {
  html {
    overflow-y: auto;
  }
  
  body {
    overflow-y: auto;
  }
}

.bg-gradient {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(147, 51, 234, 0.15), transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.1), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 700;
  color: white;
  box-shadow: var(--shadow-lg);
}

.logo-img {
  width: 48px;
  height: 48px;
  padding: 2px;
  display: block;
  filter: drop-shadow(var(--shadow-lg));
}

.title {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
}

.subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.subtitle-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.plant-info-separator {
  font-size: 14px;
  color: var(--text-muted);
  opacity: 0.4;
  user-select: none;
}

.plant-info {
  display: inline;
  font-size: 14px;
  color: var(--text-muted);
}

.plant-info-text {
  font-variant-numeric: tabular-nums;
}

.plant-info.is-empty,
.plant-info.is-empty + .plant-info-separator {
  display: none;
}

.subtitle-row:has(.plant-info.is-empty) .plant-info-separator {
  display: none;
}

.header-right {
  display: flex;
  gap: 12px;
  align-items: center;
}

.time {
  font-size: 14px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.banner-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.alert-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 10px;
  color: var(--ok);
  font-size: 14px;
  font-weight: 500;
  flex: 1 1 0;
}

.alert-summary-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.16);
  color: #60a5fa;
  font-size: 14px;
  font-weight: 600;
  flex: 1 1 0;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}

.alert-summary-banner.warning {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.18);
  color: var(--warning);
}

.alert-summary-banner.critical {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.18);
  color: var(--danger);
}

.alert-summary-banner.hidden {
  display: none;
}

.alert-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.alert-modal.open {
  display: flex;
}

.alert-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 12, 0.7);
  backdrop-filter: blur(2px);
}

.alert-modal-panel {
  position: relative;
  width: min(980px, 92vw);
  max-height: 85vh;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.alert-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.alert-modal-title {
  font-size: 16px;
  font-weight: 600;
}

.alert-modal-close {
  border: 1px solid var(--border);
  background: var(--card-hover);
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.alert-modal-close svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.alert-modal-body {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(320px, 2fr);
  gap: 16px;
  padding: 16px 20px 20px;
  min-height: 0;
  flex: 1;
}

.alert-modal-list,
.alert-modal-detail {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.alert-modal-list-header {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.alert-modal-list-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  padding-right: 4px;
}

.alert-modal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  border: 1px solid transparent;
}

.alert-modal-item.active {
  border-color: rgba(147, 51, 234, 0.35);
  background: rgba(147, 51, 234, 0.12);
}

.alert-modal-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.alert-modal-item-btn {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
}

.alert-modal-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.alert-modal-detail-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.alert-modal-action-btn {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.alert-modal-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.alert-modal-detail-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
}

.alert-modal-detail-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.alert-modal-detail-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.alert-modal-detail-value {
  font-size: 14px;
  color: var(--text);
}

@media (max-width: 768px) {
  .alert-modal-body {
    grid-template-columns: 1fr;
  }
}

.alert-banner svg {
  flex-shrink: 0;
}

.dashboard {
  position: relative;
  z-index: 1;
  max-width: 1800px;
  margin: 0 auto;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
}

.metric-card:hover {
  background: var(--card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.metric-card.primary {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.15), rgba(168, 85, 247, 0.05));
  border-color: rgba(147, 51, 234, 0.3);
}

.metric-icon {
  font-size: 32px;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: rgba(147, 51, 234, 0.15);
  border-radius: 10px;
}

.metric-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.metric-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.metric-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.metric-status {
  font-size: 12px;
  font-weight: 500;
}

.metric-status.ok {
  color: var(--ok);
}

.metric-status.warning {
  color: var(--warning);
}

.metric-status.danger {
  color: var(--danger);
}

.main-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
  align-items: start;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-header h2 {
  font-size: 18px;
  font-weight: 600;
}

.tabs {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  border-radius: 8px;
}

.tab {
  background: transparent;
  border: none;
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
  font-weight: 500;
}

.tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.tab.active {
  background: var(--accent);
  color: white;
}

.chart-container {
  height: 200px;
  margin-bottom: 16px;
}

.chart-container svg {
  width: 100%;
  height: 100%;
}

.chart-stats {
  display: flex;
  gap: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-value {
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.actor-list,
.events {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.control-card,
.events-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  align-self: start;
}

.events-card .events {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

.events-card .events::-webkit-scrollbar {
  display: none;
  width: 0px;
  height: 0px;
}

.actor-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  transition: background 0.2s;
}

.actor-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.actor-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.actor-name {
  font-weight: 600;
  font-size: 14px;
}

.actor-detail {
  font-size: 13px;
  color: var(--text-muted);
}

.custom-select-wrapper {
  position: relative;
  display: inline-block;
}

.custom-select-display {
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.custom-select-display:hover {
  color: var(--text);
  text-decoration: underline;
}


.custom-select-options {
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 4px;
  background: var(--card) !important;
  background-color: var(--card) !important;
  opacity: 1 !important;
  box-shadow: 0 10px 25px 0 rgba(24,28,32,0.98), 0 2px 8px 0 rgba(0,0,0,0.18);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  min-width: 180px;
  display: none;
  opacity: 1;
}

.custom-select-options.open {
  display: block;
}

.custom-option {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

.custom-option:hover {
  background: rgba(147, 51, 234, 0.15);
}

.custom-option.selected {
  color: var(--accent);
  font-weight: 600;
}

.actor-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.actor-status.on {
  background: rgba(16, 185, 129, 0.15);
  color: var(--ok);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.actor-value {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.zones {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.zone-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.zone-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-muted);
}

.zone-values {
  display: flex;
  gap: 16px;
}

.zone-temp,
.zone-hum {
  font-weight: 600;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.zone-temp {
  color: var(--accent-light);
}

.zone-hum {
  color: var(--ok);
}

.event-item {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.event-time {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 45px;
  font-variant-numeric: tabular-nums;
}

.event-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.event-title {
  font-weight: 600;
  font-size: 14px;
}

.event-detail {
  font-size: 13px;
  color: var(--text-muted);
}

.footer {
  text-align: center;
  padding: 32px 0 16px;
  color: var(--text-muted);
  font-size: 13px;
}

@media (max-width: 1200px) {
  .chart-card {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  body {
    padding: 16px;
  }

  .banner-row {
    flex-direction: column;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .main-grid {
    grid-template-columns: 1fr;
  }
}

/* Abluft Control Styles */
.abluft-control-auto,
.abluft-control-manual {
  display: flex;
  align-items: center;
}

.abluft-slider-container {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.abluft-slider {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.abluft-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: all 0.2s;
}

.abluft-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: all 0.2s;
}

.abluft-slider::-moz-range-track {
  background: transparent;
  border: none;
  box-shadow: none;
}

.abluft-slider-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 40px;
  text-align: right;
}

/* Luftbefeuchter Manual Controls */
.luftbefeuchter-manual-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
}

.manual-toggle-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 28px;
  text-align: center;
}

.manual-toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 48px;
  height: 18px;
}

.manual-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.manual-toggle-track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 9px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  transition: all 0.2s;
  box-shadow: var(--shadow);
  transform: translateY(-50%);
}

.manual-toggle-track::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
  transform: translateY(-50%);
}

.manual-toggle-switch input:checked + .manual-toggle-track::after {
  transform: translate(30px, -50%);
}
