/* login ke admin */
body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #a8e063 0%, #56ab2f 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow: hidden;
}

.auth-container {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 420px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
    font-weight: 600;
}

.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.2);
}

.form-group .icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 16px;
}

.btn-auth {
    width: 100%;
    padding: 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-auth:hover {
    background-color: #45a049;
    transform: scale(1.02);
}

.error-message {
    color: #e74c3c;
    text-align: center;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.auth-link {
    text-align: center;
    margin-top: 20px;
}

.auth-link a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-link a:hover {
    color: #45a049;
    text-decoration: underline;
}

/* Login MQTT dan Lokal */

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #a8e063 0%, #56ab2f 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow: hidden;
}

.auth-container {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 20px; 
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 500px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.auth-container h3 {
    text-align: center;
    margin-bottom: 10px; 
    color: #333;
    font-weight: 600;
    font-size: 24px;
}

.form-group {
    position: relative;
    margin-bottom: 8px; 
}

.form-group label {
    display: block;
    margin-bottom: 3px; 
    color: #555;
    font-size: 14px; 
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 6px 10px; 
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px; 
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.2);
}

.form-group input[type="text"][readonly],
.form-group input[type="number"][readonly] {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.form-group .icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px; 
}

.btn-auth {
    width: 100%;
    padding: 8px; 
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;  
    font-weight: 500;
    cursor: pointer;
    margin-top: 15px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-auth:hover {
    background-color: #45a049;
    transform: scale(1.02);
}

.error-message {
    color: #e74c3c;
    text-align: center;
    margin-bottom: 8px;  
    font-size: 14px; 
    font-weight: 500;
}

.auth-link {
    text-align: center;
    margin-top: 8px;  
}

.auth-link a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-link a:hover {
    color: #45a049;
    text-decoration: underline;
}

.config-section {
    margin-top: 6px;  
}

.config-section h2 {
    font-size: 18px;  
    color: #333;
    margin-bottom: 6px;  
    font-weight: 600;
}

.hidden {
    display: none;
}

/* Layout grid pada konfigurasi MQTT */
#mqtt_config .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px; 
}

#mqtt_config .form-group {
    margin-bottom: 0;
}

/* Background dengan animasi gradient */
body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(-45deg, #a8e063, #56ab2f, #43cea2, #185a9d);
    background-size: 400% 400%;
    animation: gradientMove 12s ease infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

/* Animasi background */
@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Container transparan (glass effect) */
.auth-container {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 400px;
    text-align: center;
    color: #fff;
    animation: fadeIn 0.8s ease;
}

/* Animasi fadeIn */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-container h2 {
    margin-bottom: 25px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Input dengan ikon */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.input-wrapper i {
    position: absolute;
    left: 12px;
    font-size: 18px;
    color: #ccc;
    transition: color 0.3s ease, transform 0.3s ease;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 12px rgba(76, 175, 80, 0.4);
}

/* Ikon aktif ikut nyala */
.input-wrapper input:focus + i,
.input-wrapper:hover i {
    color: #4CAF50;
    transform: scale(1.1);
}

/* Tombol login glowing */
.btn-auth {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #56ab2f, #43cea2);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.4);
}

.btn-auth:hover {
    background: linear-gradient(135deg, #43cea2, #185a9d);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.7);
}

/* Link daftar */
.auth-link a {
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-link a:hover {
    color: #4CAF50;
    text-decoration: underline;
}

/* Responsivitas untuk layar kecil */
@media (max-width: 768px) {
    #mqtt_config .form-grid {
        grid-template-columns: 1fr;
    }
    .auth-container {
        max-width: 90%;
    }
}