/* 🌟 Resetowanie marginesów */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

/* 📱 Tło strony */
body {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* 🎯 Kontener logowania */
.login-container {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

/* 🖼️ Logo */
.logo {
    max-width: 180px;
    display: block;
    margin: 0 auto 15px;
}

/* 📝 Pola formularza */
input {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

/* 🔘 Przycisk logowania */
button {
    width: 100%;
    padding: 12px;
    margin-top: 2px;
    background: #1e3c72;
    color: white;
    font-size: 18px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* 🔘 Efekt hover */
button:hover {
    background: #2a5298;
}

/* 📱 Responsywność dla iPhone */
@media screen and (max-width: 600px) {
    .login-container {
        width: 95%;
        padding: 20px;
    }

    input, button {
        font-size: 16px;
    }
}

/* 🌟 Naprawa centrowania loga */
/* 🎨 Białe tło tylko dla panelu – Naprawa układu */
body.panel {
    background: #fff;
    color: #222;
    display: block !important; /* Usuwamy flexbox z body */
    height: auto; /* Usunięcie wymuszonej wysokości */
    text-align: center; /* Zapewnia centrowanie tekstu */
}

/* 🌟 Naprawa centrowania loga */
.panel-logo-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

/* 🖼️ LOGO - idealnie na środku */
.panel-logo {
    height: 120px !important;
    width: auto !important;
    max-width: 150px !important;
    display: block !important;
}

/* 🎯 Naprawa układu treści */
.panel-container {
    width: 100%;
    max-width: 500px;
    margin: 20px auto; /* Centrowanie kontenera */
    text-align: center;
}


/* 📱 Dostosowanie dla iPhone */

@media screen and (max-width: 600px) {
    .panel-container {
        width: 95%;
        padding: 15px;
    }

    .panel-logo {
        height: 160px !important;
        max-width: 160px !important;
    }

    .door-status {
        font-size: 0.5em;
        padding: 10px;
    }

    .control-btn {
        width: 100%;
        max-width: 250px;
        height: 80px;
        font-size: 1.2em;
    }

    .logout-link {
        font-size: 1em;
        padding: 10px;
    }
}




/* 🎨 Białe tło tylko dla panelu */
body.panel {
    background: #fff;
    color: #222;
}

.switch {
  position: relative;
  display: inline-block;
  width: 120px;
  height: 60px;
  margin: 20px auto;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  background-color: #ccc;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 48px;
  width: 48px;
  left: 6px;
  bottom: 6px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #3498db;
}

input:checked + .slider:before {
  transform: translateX(60px);
}
.gate-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2em auto;
    cursor: pointer;
}

.gate-button {
    width: 120px;
    height: 200px;
    border-radius: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5em;
    transition: all 0.3s ease-in-out;
}

.gate-button.open {
    background-color: #8e44ad; /* fioletowy */
    box-shadow: 0 0 15px rgba(142, 68, 173, 0.6);
    color: white;
}

.gate-button.closed {
    background-color: #2c3e50; /* ciemny */
    box-shadow: 0 0 15px rgba(44, 62, 80, 0.6);
    color: white;
}


