/* style.css - Final Fixed Version */
:root {
    --primary-amber: #ffbf00;
    --primary-glow: rgba(255, 191, 0, 0.4);
    --tech-navy: #0f172a;
    --bg-light: #f6f8fb;
    --white: #ffffff;
    --text-muted: #64748b;
    --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background: var(--bg-light); color: var(--tech-navy); line-height: 1.5; }

/* --- LOGIN PAGE (FIXED CENTER & SPACING) --- */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--tech-navy);
}

.login-card {
    background: var(--white);
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    text-align: center;
}

.logo-circle { margin-bottom: 25px; display: inline-block; }

.login-header h1 { 
    font-size: 28px; 
    margin-bottom: 12px; /* Jarak bawah judul SmartLamp */
}

.login-header p { 
    color: var(--text-muted); 
    font-size: 15px; 
    margin-bottom: 35px; /* Jarak besar sebelum input Username */
}

/* FORM SPACING */
.input-group { 
    text-align: left; 
    margin-bottom: 25px; /* Jarak antar blok input */
}

.input-group label { 
    display: block; 
    font-weight: 600; 
    font-size: 14px;
    margin-bottom: 10px; /* Jarak label ke kotak input */
}

.input-group input { 
    width: 100%; 
    padding: 12px 16px; 
    border: 1px solid #d1d5db; 
    border-radius: 8px; 
    outline: none;
    transition: 0.2s;
}

/* --- DASHBOARD PAGE (FIXED LAYOUT) --- */
.container { 
    max-width: 1200px; 
    margin: 40px auto; 
    padding: 0 20px; 
}

header { margin-bottom: 30px; }
header h1 { margin-bottom: 8px; }

.cards { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 20px; 
    margin-bottom: 30px; 
}

.card { 
    background: var(--white); 
    padding: 24px; 
    border-radius: var(--radius); 
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); 
    border-bottom: 4px solid #e5e7eb;
    transition: 0.3s;
}

/* Glow Animasi Lampu ON */
.card-lamp.on { 
    border-bottom: 4px solid var(--primary-amber); 
    box-shadow: 0 10px 20px var(--primary-glow);
    transform: translateY(-5px);
}

.btn { 
    padding: 14px 24px; 
    border: none; 
    border-radius: 8px; 
    cursor: pointer; 
    font-weight: 700; 
    transition: 0.2s;
}

.button-on { background: var(--primary-amber); color: var(--tech-navy); }
.status-on { color: #10b981; font-weight: bold; }
.status-off { color: #ef4444; font-weight: bold; }

/* Table Dashboard */
.log-table-container { margin-top: 30px; background: white; padding: 20px; border-radius: var(--radius); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid #f1f5f9; }