body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

h2 {
    color: #333;
    text-align: center;
    margin-bottom: 20px;
}

.box {
    width: 100%;
    max-width: 400px;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);

    display: flex;
    flex-direction: column;
    gap: 12px;
    /* khoảng cách đều giữa các phần tử */
}

.boxform {
    width: 100%;
    max-width: 400px;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);

}

.form-disabled {
  pointer-events: none;
  opacity: 0.6;
}

.hidden {
    display: none;
}


label {
    display: block;
    margin-bottom: 8px;
    color: #555;
}

input[type="text"],
input[type="password"] {
    flex: 1;
    padding: 10px;
    border: none;
    font-size: 16px;
    box-sizing: border-box;
    width: 100%;
    outline: none;
    background: transparent;
    margin: 0;
}

.input-container {
    display: flex;
    align-items: center;
    padding: 4px 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    width: 100%;
}

.input-container i {
    cursor: pointer;
    font-size: 18px;
    padding-left: 10px;
    color: #888;
}


.btn {
    width: 100%;
    padding: 12px;
    border: none;
    background-color: #4CAF50;
    color: white;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
}

.btn:hover {
    background-color: #45a049;
}

.btnconnect {
    width: 100%;
    padding: 12px;
    border: none;
    background-color: #007BFF;
    color: white;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
}

.btnconnect:hover {
    background-color: #0069d9;
}

.btnconnected {
    width: 100%;
    padding: 12px;
    border: none;
    background-color: #4CAF50;
    color: white;
    font-size: 16px;
    border-radius: 4px;
    cursor: default;

}

.btnconnected:hover {
    background-color: #45a049;
    cursor: default;
}

footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.8rem;
    color: #777;
}

footer p {
    margin: 5px 0;
}

@media (max-width: 600px) {
    body {
        padding: 15px;
    }

    h2 {
        font-size: 20px;
    }

    form {
        padding: 15px;
    }

    input[type="text"],
    input[type="submit"] {
        font-size: 14px;
    }
}

.toggle-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    font-family: sans-serif;
}

.toggle-group label {
    font-weight: 600;
    font-size: 16px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    background-color: #ccc;
    border-radius: 34px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: 0.3s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}

.switch input:checked+.slider {
    background-color: #4CAF50;
}

.switch input:checked+.slider:before {
    transform: translateX(22px);
}

/* Style for form and inputs */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

label {
    font-weight: bold;
    margin-bottom: 8px;
}

.custom-select {
    padding: 10px;
    font-size: 14px;
    border-radius: 5px;
    border: 1px solid #ccc;
    outline: none;
    transition: border-color 0.3s ease;
}

.custom-select:focus {
    border-color: #4CAF50;
}

small.note {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

.custom-select:hover {
    background-color: #f0f0f0;
}

.underline {
    text-decoration: underline;
}

.scanwifi {
    width: 100%;
    padding: 2px;
    border: none;
    background-color: #007BFF;
    color: white;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
}

.scanwifi:hover {
    background-color: #0069d9;
}