
/* templates/style.css */
:root {
  --bg: #0f172a;
  --card: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #3b82f6;
  --accent-2: #10b981;
  --danger: #ef4444;
  --btn: #1f2937;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: rgba(0,0,0,1);
  color: var(--text);
}

.container {
  max-width: 1054px;
  margin: 15px auto;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  backdrop-filter: blur(6px);
}

h1 { margin-top: 0; font-size: 26px; }
h2 { margin-top: 24px; font-size: 18px; color: #d1d5db; }

.tabsRow {
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.grid {
  display: flex;
  align-items: center;            /* vertikal ausrichten */
  justify-content: space-between; /* H1 nach links, Button ganz rechts */
  gap: 1rem;                      /* optionaler Abstand */
}


label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}

input {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  outline: none;
}
input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.25);
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

button {
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.08);
  background: var(--btn);
  color: var(--text);
  font-size: 18px;
}
button:hover { transform: translateY(-1px); background: #111827; }
button.secondary { background: transparent; }

.hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.hidden { display: none; }

.buttons {
  display: grid;
  width: 100%;
  gap: 15px;
  margin-top: 15px;
  margin-bottom: 15px;
}

.tabs {
  display: flex;
  gap: 8px;
}
.tabButton {
  margin-bottom: -1px;
  border-radius: 10px 10px 0 0;
  border-bottom-color: transparent;
  color: var(--muted);
}
.tabButton[aria-selected="true"] {
  color: var(--text);
  border-color: rgba(255,255,255,0.12);
  border-bottom-color: var(--card);
  background: var(--card);
}
.tabButton:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
#logoutBtn {
  margin-left: auto;
}
.tabPanel[hidden] {
  display: none;
}
.microgridWrapper {
  position: relative;
  margin-top: 15px;
}
.microgridImage {
  display: block;
  width: 100%;
  height: auto;
}
.microgridOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}



/* dynamisch aufgebaute Actions -------------------------*/
.rcRow {
  display: flex;
  align-items: center;
  gap: 30px;
  margin: 4px 0;
}
.rcRowIcon {
  width : 2.2em;
  height: 2.2em;
  /* fill in den svg-Files überschreiben zu hellgrau */
  filter: invert(60%) sepia(3%) saturate(0%) hue-rotate(207deg) brightness(90%) contrast(90%);
}
.rcRowLabel {
  flex: 1 1 auto;            /* kann wachsen und schrumpfen */
  min-width: 0;              /* wichtig, damit Text-Überlauf funktioniert */
  font-size: 1.1rem;
  color: var(--text);
  line-height: 1.1;
}
.rcRowRolloLabel {
  font-size: 40px;
  font-weight: bold;
  text-align: left;
  display: block;      /* wichtig, damit text-align wirkt */
  color: yellow; 
  animation: blinkColor 1s step-start infinite;
}
@keyframes blinkColor {
  0%   { color: yellow; }
  50%  { color: red; }
  100% { color: yellow; }
}
.rcRowButton {
  background: linear-gradient(180deg, rgba(16,185,129,0.15), rgba(16,185,129,0.05));
  border-color: rgba(16,185,129,0.35);
  width: 63px;
  font-weight: bold;
  font-size: 16px;
}
.rcRowButton:hover {
  background: linear-gradient(180deg, rgba(59,130,246,0.2), rgba(59,130,246,0.08));
  border-color: rgba(59,130,246,0.45);
}
.rcRowSwitcher {
  position: relative;
  display: inline-block;
  width:  60px;
  height: 35px;
}
.rcRowSwitcher input {
  opacity: 0;
  width: 0;
  height: 0;
}
.rcRowSwitcher .slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #ccc;
  border-radius: 34px;
  transition: 0.3s;
}
.rcRowSwitcher .slider:before {
  content: "";
  position: absolute;
  height: 29px;
  width:  29px;
  left:    3px;
  bottom:  3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}
.rcRowSwitcher input:checked + .slider {
  background-color: #35de51; /* iOS Grün */
}
.rcRowSwitcher input:checked + .slider:before {
  transform: translateX(25px);
}
.rcRowSpacer {
  width: 100%;
}



/* Login Sachen -----------------------------------------------------*/
.form {
  display: flex;
  flex-direction: column;   /* Untereinander anordnen */
  gap: 12px;                /* Abstände zwischen den Elementen */
  max-width: 360px;         /* Optional: feste max. Breite für das Formular */
}

.form label {
  display: flex;
  flex-direction: column;   /* Label über dem Input */
  gap: 6px;
  font-weight: 600;
}

.form input {
  padding: 8px 10px;
  font-size: 14px;
}

#loginBtn {
  align-self: flex-end;     /* Button rechts ausrichten */
  width: auto;              /* Nicht volle Breite */
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
}

#loginBtn:hover {
  background: rgba(112, 249, 112, 0.3);      /* Hellgrün */
}

#logoutBtn.secondary {
  width: 28px;
  height: 28px;
  padding: 0;               /* bei fixer Größe padding entfernen */
  display: inline-grid;
  place-items: center;      /* "X" zentrieren */
  font-size: 1.2rem;
}

#logoutBtn.secondary:hover {
  background: rgba(244, 132, 132, 0.3);
}
