html, body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
  color: #777777;
  width: 100%;
  height: 100%;
  background-image: url('../image/tlo.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  overflow: hidden; /* Zapobiega przewijaniu */
}

header {
    position: absolute; /* Pozycjonowanie absolutne */
    top: 5%; /* Od góry 5% */
    left: 50%; /* Punkt odniesienia w poziomie */
    transform: translateX(-50%) scale(0.5); /* Przesunięcie o połowę szerokości + skalowanie */
    transform-origin: top center; /* Skalowanie względem środka */
    text-align: center; /* Wyśrodkowanie zawartości */
    align-items: center;
}

header .text-container {
    filter: invert(1) brightness(1.2);
}

header .logo {
    width: 612px;
    height: auto;
}

header a {
    display: block;
    margin-bottom: 2vh; /* Odstęp między logo a tekstem */
}

header .text-container {
    display: flex; /* Ustawienie Flexboxa */
    justify-content: center; /* Wyśrodkowanie w poziomie */
    align-items: baseline; /* Wyrównanie elementów do ich linii bazowej */
    gap: 0.5rem; /* Odstęp między napisami */
}

header h3, header h2 {
    margin: 0; /* Usuń domyślne marginesy */
    padding: 0; /* Usuń domyślne odstępy */
    line-height: 1; /* Zapewnia spójne wyrównanie linii */
}

header h3 span {
    font-size: 2rem; /* Wielkość mniejszego tekstu */
    font-weight: bold;
    color: #333;
}

header h2 span {
    font-size: 2.5rem; /* Wielkość większego tekstu */
    font-weight: normal;
    color: #333;
}

header h4 span {
    font-size: 1.5rem; /* Wielkość większego tekstu */
    font-weight: normal;
    color: #8B0000;
}

body.menu-open {
  overflow: hidden; /* Blokada przewijania przy aktywnym menu */
}

.title {
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
}

.tryb {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  color: #1a5276;
}

.dom {
  filter: invert(1) brightness(1.2);
}

.time-remaining {
    text-align: center;
    position: relative;
    top: 83px; /* Obniża tekst w dół */
    font-size: 1.2em;
    font-weight: bold;
}

.card {
  margin-top: 15vh; 
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.card .percent {
  position: relative;
}

.card svg {
  position: relative;
  width: 310px;
  height: 310px;
  transform: rotate(120deg);
}

.card svg circle {
  fill: none;
  stroke: #f0f0f0;
  stroke-width: 20;
  stroke-linecap: round;
  stroke-dasharray: 625px;
  stroke-dashoffset: 95;
}

.card svg circle:last-of-type {
  stroke-dasharray: 625px;
  stroke-dashoffset: calc(625px - (625px * var(--percent)) / 100);
  stroke: #1a5276; /* Domyślnie niebieski */
  transition: stroke-dashoffset 3s ease, stroke 3s ease; /* Animacja zmiany koloru */
}

.card .number {
  position: absolute;
  top: 79%;
  left: 51%;
  transform: translate(-50%, -50%);
}

.card .ikona {
  position: absolute;
  top: 49%;
  left: 52%;
  transform: translate(-50%, -50%);
  filter: invert(1) brightness(1.2);
}

.card .number h3 {
  font-weight: 100;
  font-size: 1.5rem;
}

.card .number h3 span {
  font-size: 2rem;
}

.circle {
  position: relative;
  width: 310px;
  height: 310px;
  margin: 0 auto;
  border-radius: 50%;
}

.icon {
  position: absolute;
}

.icon img {
  width: 100%;
  height: 100%;
}

.circle .icon img {
  opacity: 0.5; /* Przyciemnienie ikony (0 - całkowicie przezroczyste, 1 - pełna widoczność) */
}

.left-top {
  top: -350px;
  left: -23px;
}

.right-top {
  top: -370px;
  right: -23px;
}

.left-bottom {
  bottom: 280px;
  left: -27px;
}

.right-bottom {
  bottom: 280px;
  right: -25px;
}

.hidden {
    visibility: hidden; /* Element niewidoczny, ale zachowuje miejsce */
    opacity: 0; /* Opcjonalnie: całkowite ukrycie */
}

.inactive {
    pointer-events: none; /* Wyłącza interakcje */
    opacity: 0.5; /* Zmniejsza widoczność, aby wyglądało na nieaktywne */
}

/****************************** Pola z temperaturą ******************************/
.inputs-container {
    position: relative; /* Ustawia kontener jako referencję dla pozycjonowania absolutnego */
}

.rounded-input {
    position: absolute; /* Pozwala na pozycjonowanie względem kontenera */
    padding: 10px;
    border-radius: 8px;
    width: 40px; /* Zmniejszona szerokość inputów, dostosuj wg potrzeb */
	  font-size: 16px; /* Zwiększona czcionka */
    text-align: center; /* Opcjonalne wyrównanie tekstu */
}

.left-temp-top {
    top: -250px;
    left: -7px;
}

.right-temp-top {
    top: -250px;
    right: -20px;
}

.left-temp-bottom {
    bottom: 70px;
    left: -7px;
}

.right-temp-bottom {
    bottom: 70px;
    right: -20px;
}

.zewnatrz {
  filter: invert(1) brightness(1.2);
  bottom: -40px;
  right: 125px;
 
}

/****************************** Menu wysuwane - ustawienia od góry ******************************/
#settings-menu {
  position: fixed;
  top: -100%; /* Ukryte nad ekranem */
  left: 30%;
  right: 30%;
  background-color: #000; /* Czarny kolor tła */
  color: #fff; /* Biały tekst */
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.5); /* Cieniowane białe obramowanie */
  z-index: 1000;
  transition: top 0.5s ease; /* Płynna animacja zmiany pozycji */
  border-radius: 0 0 10px 10px; /* Zaokrąglone dolne rogi */
  padding: 10px;
}

/* Zmiana stylu dla orientacji pionowej */
@media (orientation: portrait) {
  #settings-menu {
    left: 3%; /* Węższe marginesy poziome */
    right: 3%;
  }
}

#settings-menu ul {
  list-style-type: none;  /* Usunięcie punktorów */
  padding-left: 0;        /* Usunięcie domyślnego wcięcia */
}

#settings-menu.active {
  top: 0; /* Menu przesuwa się na górę ekranu */
}

#settings-menu ul li {
  padding: 10px 15px; /* Odstępy między opcjami i margines wewnętrzny */
  border-bottom: 1px solid rgba(255, 255, 255, 0.2); /* Linia oddzielająca opcje */
  font-size: 16px;
  text-align: left; /* Wyrównanie tekstu do lewej */
  cursor: pointer;
}

/* Efekt hover na opcjach */
#settings-menu ul li:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

#zamknij-li {
  color: #1a5276; 
}

.schedule-phaslo{
  font-family: Arial, sans-serif;
  background-color: black;
  color: white;
}

.schedule-settings table {
  width: 100%;
  border-collapse: collapse;
}

.schedule-settings th, .schedule-settings td {
  border: 1px solid #ccc;
  text-align: center;
  padding: 1px;
  color: white;
}

.schedule-settings input {
  width: 50px;
  text-align: center;
  background-color: black;
  color: white;
  font-size: 15px;
}

.table-container {
  max-width: 100%;
  max-height: 70vh; /* Wysokość kontenera ustawiona na 70% wysokości ekranu */
  overflow-y: auto;  /* Dodaj przewijanie w pionie */
  overflow-x: auto;  /* Dodaj przewijanie w poziomie, jeśli tabela jest szersza niż ekran */
}


.tryby-settings {
    font-family: Arial, sans-serif;
    background-color: black;      /* Tło czarne */
    color: white;                 /* Kolor czcionki biały */
    padding: 10px;                /* Odstęp wewnętrzny */
    border-radius: 8px;           /* Zaokrąglenie rogów */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtelny cień */
}

.tryby-settings table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;             /* Odstęp od góry */
}

.tryby-settings th, .tryby-settings td {
    border: 1px solid #ccc;   /* Obramowanie komórek */
    text-align: center;
    padding: 8px;             /* Większe odstępy */
    font-size: 14px;          /* Rozmiar czcionki */
    color: white;             /* Kolor czcionki biały */
}

.tryby-settings th {
    font-weight: bold;      /* Pogrubiony tekst */
}



.tryby-settings input {
    width: 60px;            /* Szerokość pola wejściowego */
    text-align: center;
    color: white;           /* Kolor tekstu biały */
    background-color: black; /* Tło czarne dla inputów */
    border: 1px solid #ccc;  /* Obramowanie */
    border-radius: 4px;      /* Zaokrąglenie rogów */
    font-size: 15px;         /* Rozmiar czcionki */
    padding: 2px;            /* Odstępy wewnętrzne */
}

.czujniki-settings {
    font-family: Arial, sans-serif;
    background-color: black;
    color: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.czujniki-settings table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.czujniki-settings th, .czujniki-settings td {
    border: 1px solid #ccc;
    text-align: center;
    padding: 8px;
    font-size: 14px;
    color: white;
}

.czujniki-settings th {
    font-weight: bold;
}



.czujniki-settings input[type="number"],
.czujniki-settings select {
    color: white;
    background-color: black;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.temperatury-settings {
    font-family: Arial, sans-serif;
    background-color: black;
    color: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.temperatury-settings table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.temperatury-settings th, .temperatury-settings td {
    border: 1px solid #ccc;
    text-align: center;
    padding: 8px;
    font-size: 14px;
    color: white;
}

.temperatury-settings th {
    font-weight: bold;
}

.temperatury-settings input[type="number"],
.temperatury-settings select {
    color: white;
    background-color: black;
    border: 1px solid #ccc;
    border-radius: 4px;
}


/****************************** Menu wysuwane - login od prawej ******************************/
#login-menu {
  position: fixed;
  right: -100%; /* Ukryte za ekranem */
  background-color: #000; /* Czarny kolor tła */
  color: #fff; /* Biały tekst */
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.5); /* Cieniowane białe obramowanie */
  z-index: 1000;
  transition: right 0.5s ease; /* Płynna animacja zmiany pozycji */
  border-radius: 0 0 10px 10px; /* Zaokrąglone dolne rogi */
  padding: 20px;
  width: 250px;
  height: calc(100% - 100px); /* Wysokość menu z uwzględnieniem marginesu od dołu */
  top: 30px;
  bottom: 10vh;

  /* Ustawienie kontenera jako CSS Grid */
  display: grid;
  grid-template-columns: 1fr; /* Jedna kolumna */
  justify-items: center; /* Wyrównanie w poziomie do środka */
  align-items: center; /* Wyrównanie w pionie do środka */
  gap: 10px; /* Stały odstęp między elementami */
}


#login-menu.active {
   right:0; /* Menu przesuwa się do środka ekranu */
}

.settingsItem {
  width: 80%;
  height: 40px;
  background-color: aliceblue;
  border: 1px solid #667;
  color: #333;
  border-radius: 5px;
  box-shadow: 1px 1px 2px #aaa;
}

.usersImg {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 150px; /* Rozmiar ramki dla obrazu */
  height: 150px;
  border: 2px solid #fff;
  border-radius: 50%; /* Okrągły kontener */
  overflow: hidden; /* Ukryj nadmiar obrazu */
}

.imageUser {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Skalowanie obrazu */
}

.loginBtn, .logoutBtn, .debugBtn{
    background-color: #004080; /* Ciemnoniebieski */
    color: #ffffff; /* Biały tekst */
    border: none; /* Brak obramowania */
    border-radius: 5px; /* Lekko zaokrąglone rogi */
    padding: 10px 20px; /* Wewnętrzne odstępy */
    font-size: 16px; /* Rozmiar tekstu */
    cursor: pointer; /* Zmiana kursora */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Subtelny cień */
    transition: background-color 0.3s ease, transform 0.2s ease; /* Płynne przejścia */

}

.debugBtn{
	margin-top: 50px;
}


.loginBtn:hover, .logoutBtn:hover,  .debugBtn:hover{
   background-color: #0059b3; /* Jaśniejszy odcień na hover */
}

.loginBtn:active, .logoutBtn:active,  .debugBtn:active {
    background-color: #00264d; /* Ciemniejszy odcień po kliknięciu */
    transform: scale(0.98); /* Subtelne wciśnięcie */
}

.loginBtn:disabled, .logoutBtn:disabled,  .debugBtn:disabled {
    background-color: #b3c6e0; /* Wyblakły niebieski dla wyłączonego przycisku */
    cursor: not-allowed; /* Nieaktywne */
}

/****************************** Menu tryb - z lewej**************************************/
.menu-grid-fields {
  display: flex;
  justify-content: space-between; /* Rozciąganie pól wewnątrz kontenera */
  align-items: center; /* Wyśrodkowanie w osi pionowej */
  gap: 0.1vw; /* Odstępy między polami, proporcjonalne */
  margin: 0; /* Brak marginesów */
  padding: 0; /* Brak paddingu */
  position: absolute; /* Pozycjonowanie absolutne względem rodzica */
  bottom: 5vh; /* Proporcjonalna odległość od dołu */
  left: 50%; /* Środek strony */
  transform: translateX(-50%); /* Wyśrodkowanie w poziomie */
  width: 360px; /* Proporcjonalna szerokość */
  height: 50px; /* Automatyczna wysokość */
}

.menu-grid-fields img {
  max-width: 50%; /* Zapewnienie, że ikony się skalują */
  height: auto;
}

.menu-grid-fields img {
  margin: 10px 10px 10px 10px;
  filter: invert(1) brightness(1.5);
}

.field {
  flex: 1; /* Każde pole zajmuje równą szerokość */
  height: 80px; /* Wysokość pola */
  border: 3px solid #2e2e2e; /* Obramowanie zgodne z linią */
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 1.2rem;
  color: #777; /* Kolor tekstu */
  background-color: #000; /* Tło pól */
  transition: background-color 0.3s ease, transform 0.3s ease; /* Płynny efekt zmiany */
  cursor: pointer; /* Kursor wskazujący możliwość interakcji */
  box-sizing: border-box; /* Uwzględnia obramowanie w rozmiarze pola */
  text-transform: uppercase; /* Zamienia tekst na wielkie litery */
}

/* Efekt po najechaniu */
.field:hover {
  background-color: #2e2e2e; /* Ciemniejsze tło */
  color: #fff; /* Zmiana koloru tekstu */
  transform: scale(1); /* Delikatne powiększenie */
  overflow: hidden; /* Zapobiega "wychodzeniu" elementu */
}

.menu {
  position: fixed;
  top: 30px;
  bottom: 10vh;
  left: -100%; /* Domyślnie poza ekranem */
  width: 300px;
  height: calc(100% - 100px); /* Wysokość menu z uwzględnieniem marginesu od dołu */
  background-color: #000;
  color: #fff;
  overflow-y: auto; /* Pionowy przewijak, gdy zawartość jest większa */
  transition: left 0.5s ease; /* Animacja wysuwania */
  z-index: 1000;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.5); /* Cieniowane białe obramowanie */
}

.menu.active {
  left: 0;
}

.menu img {
  margin: 10px 20px 10px 10px;
  filter: invert(1) brightness(1.5);
}

.menu::before {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
}

/* Kontener siatki */
.menu-grid {
  display: grid; /* Aktywacja CSS Grid */
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); /* Kolumny z auto-dopasowaniem */
  gap: 15px; /* Odstępy między elementami */
}

/* Styl dla każdego elementu menu */
.menu-item {
  text-align: center; /* Wyśrodkowanie tekstu i grafiki */
  background-color: #000; /* Tło elementu */
  border: 2px solid #555; /* Obramowanie elementu */
  border-radius: 10px; /* Zaokrąglenie rogów */
  padding: 10px;
  transition: transform 0.5s ease, background-color 0.2s ease;
}

/* Efekt hover dla elementu menu */
.menu-item:hover {
  transform: scale(1.05); /* Powiększenie przy najechaniu */
  background-color: #555;
}

/* Styl dla nagłówków w menu */
.menu-item h3 {
  font-size: 1rem;
  color: #fff;
  margin: 10px 0;
}

/* Styl dla obrazków w menu */
.menu-item img {
  max-width: 100%; /* Dopasowanie do szerokości kontenera */
  height: auto; /* Zachowanie proporcji */
  border-radius: 5px; /* Zaokrąglenie rogów grafik */
}

.menu-item.demo-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

.menu-item.demo-disabled:hover {
  transform: none;
  background-color: #000;
}

#settings-menu input:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.cdebug {
  font-size: clamp(8px, 3vw, 18px);
  font-weight: 120;
  text-align: center;
  color: #edeee7;
  margin-top: -250px;
}