@import url('https://fonts.googleapis.com/css2?family=Titillium+Web:wght@200;300;400;600;700;900&display=swap');

*{
    box-sizing:border-box;
}

html
,body{
    margin:0;
    padding:0;
    width:100%;
    height:100%;
    font-family:'Titillium Web', sans-serif;
}


.layouts{
    width:100%;
    max-width:500px;
    margin:auto;
    min-height:100vh;

    display:flex;
    flex-direction:column;

    background:#fff;
    box-shadow:0 0 15px rgba(0,0,0,.08);
}


/* ================= CONTENT SCROLL ================= */
.content{
    flex:1;
    min-height:0;
}
/* ================= BOTTOM MENU ================= */

.logout-wrapper{
    padding:16px;
}

.bottom-menu{
    padding:16px;
    border-top:1px solid #ddd;
    background:#fff;
    margin-top:20px;
}

.history-btn{
    display:block;
    width:100%;
    text-align:center;
    padding:12px;
    background:#579fff;
    color:white;
    text-decoration:none;
    border-radius:8px;
    margin-bottom:10px;
}

.bottom-menu .led-submit{
    display:block;
    text-align:center;
    text-decoration:none;
    margin-bottom:10px;
}

.bottom-menu .led-submit:last-child{
    margin-bottom:0;
}

/* ================= NAVBAR MENU ================= */

.navbar-top{
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.navbar-menu-btn{
    background:none;
    border:none;
    color:white;
    font-size:24px;
    cursor:pointer;
}

.navbar-user{
    margin-top:8px;
}

/* ================= HAMBURGER MENU ================= */

.admin-menu{
    display:none;
    background:white;
    border-bottom:1px solid #ddd;
}

.admin-menu.show{
    display:block;
}

.admin-menu a{
    display:block;
    padding:14px;
    text-decoration:none;
    color:#333;
    border-bottom:1px solid #eee;
}

.admin-menu a:hover{
    background:#f4f7fb;
}

/* ================= NAVBAR ================= */
.navbar{
    background:#579fff;
    padding:18px;
    text-align:center;
    color:white;
}

.navbar h3{
    font-size:28px;
    font-weight:700;
}

.navbar p{
    margin-top:8px;
    font-size:14px;
}

.dashboard-page{
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    background:#f4f7fb;
    padding:20px;
}

/* ================= PAGE TITLE ================= */
.page-title{
    padding:20px;
    text-align:center;
}

.page-title h3{
    align-items: center;
    font-size:28px;
    color:#579fff;
    font-weight:700;
}

/* ================= LED GRID ================= */
.leds{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:16px;
    padding:16px;
    height:calc(100vh - 230px);
    overflow-y:auto;
}

.device-status{
    background:#fff;
    padding:15px;
    margin:15px;
    border-radius:10px;
    box-shadow:0 2px 5px rgba(0,0,0,.15);
}

.led:hover{
    transform:translateY(-5px);
    box-shadow:0 8px 18px rgba(0,0,0,.12);
}

.leds::-webkit-scrollbar{
    width:6px;
}

.leds::-webkit-scrollbar-thumb{
    background:#999;
    border-radius:10px;
}

.leds::-webkit-scrollbar-track{
    background:#f1f1f1;
}

.led{
    background:white;
    border-radius:16px;
    padding:18px;
    text-align:center;
    box-shadow:0 4px 12px rgba(0,0,0,0.08);
    transition:0.3s;
}

.led-image{
    width:90px;
    height:90px;
    object-fit:contain;
}

.led-location-text{
    margin:12px 0;
    font-weight:700;
    color:#333;
}

/* ================= BUTTON ================= */
.item-submit,
.led-submit,
.login-btn{
    width:100%;
    padding:12px;
    border:none;
    border-radius:10px;
    background:#579fff;
    color:white;
    font-weight:700;
    font-size:15px;
    cursor:pointer;
    transition:0.3s;
}

.item-submit:hover,
.led-submit:hover,
.login-btn:hover{
    background:#2d7dff;
}

/* ================= HISTORY ================= */
.history{
    padding:16px;
}

.history-btn{
    display:block;
    width:100%;
    padding:12px;
    text-align:center;
    text-decoration:none;
    border-radius:10px;
    background:#579fff;
    color:white;
    font-weight:700;
}

.history-list{
    max-height:60vh;
    overflow-y:auto;
    margin-top:15px;
    border-radius:10px;
    background:white;
    box-shadow:0 4px 10px rgba(0,0,0,0.05);
}

.history-item{
    padding:12px;
    border-bottom:1px solid #eee;
    font-size:14px;
    
}

.back-wrapper{
    padding:16px;
    margin-top:20px;
}

/* ================= FILTER ================= */
.filter-history{
    padding:16px;
}

.filter-history form{
    display:flex;
    flex-direction:column;
    gap:12px;
}

.filter-history input[type="date"]{
     width:100%;
    height:48px;
    padding:0 12px;
    font-size:15px;
    border:1px solid #ddd;
    border-radius:10px;
    outline:none;
    background:#fff;
    box-sizing:border-box;
}

.filter-history input[type="date"]:focus{
    border-color:#579fff;
}

/* ================= FILTER BUTTON ================= */
.history-actions{
    display:flex;
    justify-content:center;
    gap:12px;
    margin-top:10px;
}

 .filter-btn{
    flex:1;
    padding:12px;
    border:none;
    border-radius:10px;
    background:#579fff;
    color:white;
    font-weight:700;
    cursor:pointer;
} 

.filter-btn:hover{
    background:#2d7dff;
}

.reset-btn{
    flex:1;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:12px;
    border-radius:10px;
    background:#ff4d4d;
    color:white;
    text-decoration:none;
    font-weight:700;
    transition:0.3s;
}

.reset-btn:hover{
    background:#e60000;
}

/* ================= FORM ================= */
.page-wrap{
    padding:30px 24px;
}

.page-wrap h2,
.page-wrap h3{
    text-align:center;
    color:#579fff;
    margin-bottom:25px;
    font-size:28px;
}

/* ================= FORM GROUP ================= */
.form-group{
    display:flex;
    flex-direction:column;
    margin-bottom:18px;
}

.form-group label{
    margin-bottom:8px;
    font-weight:600;
    color:#333;
}

.form-group input,
.form-group select{
    padding:12px;
    border:1px solid #ddd;
    border-radius:10px;
    outline:none;
    font-size:15px;
    transition:0.3s;
}

.form-group input:focus,
.form-group select:focus{
    border-color:#579fff;
    box-shadow:0 0 0 3px rgba(87,159,255,0.2);
}

/* ================= BACK BUTTON ================= */
.back-btn{
    display:block;
    width:100%;
    padding:12px;
    margin-top:12px;
    text-align:center;
    text-decoration:none;
    border-radius:10px;
    background:#ff4d4d;
    color:#fff;
    font-weight:700;
    box-sizing:border-box;
}

.back-btn:hover{
    background:#e60000;
}

/* ================= LOGIN PAGE ================= */

.login-page{
    display:flex;
    justify-content:center;
    align-items:center;
    min-height:100vh;
    width:100%;
    background:#f4f7fb;
    padding:20px;
    overflow:hidden;
}

.login-card{
    width:100%;
    max-width:420px;
    margin:0;
    background:#fff;
    padding:35px 28px;
    border-radius:18px;
    box-shadow:0 8px 18px rgba(0,0,0,.08);
}

.login-card h2{
    text-align:center;
    color:#579fff;
    margin-bottom:10px;
}

.subtitle{
    text-align:center;
    color:#666;
    margin-bottom:25px;
}

/* ================= MESSAGE ================= */
.msg{
    background:#e8f3ff;
    color:#0056b3;
    padding:12px;
    border-radius:10px;
    margin-bottom:18px;
    text-align:center;
}

/* ================= TABLE ================= */
table{
    width:100%;
    border-collapse:collapse;
    background:white;
    margin-top:15px;
}

table th{
    background:#579fff;
    color:white;
    padding:12px;
}

table td{
    padding:10px;
    border-bottom:1px solid #eee;
    text-align:center;
}

/* ================= ADMIN HAMBURGER MENU ================= */

.admin-menu-container{
    margin-top:10px;
}

.menu-toggle{
    width:100%;
    padding:12px;

    border:none;
    border-radius:10px;

    background:#579fff;
    color:white;

    font-weight:700;
    font-size:15px;

    cursor:pointer;
}

.admin-menu{
    display:none;
    margin-top:10px;
}

.admin-menu.show{
    display:block;
}

.admin-menu a{
    display:block;

    padding:12px;
    margin-bottom:8px;

    background:#f4f7fb;

    border-radius:10px;

    text-decoration:none;
    text-align:center;

    color:#333;
    font-weight:600;

    border:1px solid #ddd;
}

.admin-menu a:hover{
    background:#e9f2ff;
}

/* ================= MOBILE RESPONSIVE ================= */

@media screen and (max-width:600px){

   .login-page{
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:20px;
    background:#f4f7fb;
}

.layouts{
    width:100%;
    max-width:500px;
    margin:auto;
    min-height:100vh;

    display:flex;
    flex-direction:column;

    background:#fff;
    box-shadow:0 0 15px rgba(0,0,0,.08);
}
    

    /* Navbar */

    .navbar{
        padding:18px 15px;
    }

    .navbar h3{
        font-size:24px;
    }

    .navbar p{
        font-size:13px;
    }

    /* Judul */

    .page-title{
        padding:18px 10px;
    }

    .page-title h3{
        font-size:28px;
    }

    /* Card Lampu */

    .leds{

        grid-template-columns:1fr ;
        height:calc(100vh - 220px);
        overflow-y:auto;
        gap:12px;

    }

    .led{
        
        padding:15px;
        border-radius:15px;
        box-shadow:0 3px 10px rgba(0,0,0,.08);

    }

    .led-image{
        width:90px;
        height:90px;
        object-fit:contain;
    }

    .led-location-text{

        font-size:15px;
        margin:10px 0;

    }

    /* Button */

    .login-btn,
    .led-submit,
    .item-submit,
    .filter-btn,
    .reset-btn,
    .back-btn{

        padding:13px;

        font-size:15px;

        border-radius:12px;

    }
    
    .logout-wrapper{

    padding:15px;

    border-top:1px solid #eee;

    background:white;

}

    /* Form */

    .page-wrap{

        padding:20px;

    }

    .page-wrap h2,
    .page-wrap h3{

        font-size:24px;

    }

    .form-group{

        margin-bottom:15px;

    }

    .form-group input,
    .form-group select{

        font-size:15px;

        padding:12px;

    }

    /* Table */

    table{

        font-size:13px;

        border-radius:10px;

        overflow:hidden;

    }

    table th{

        padding:10px;

    }

    table td{

        padding:10px 6px;

    }

    table tr:nth-child(even){

        background:#f8fbff;

    }

    /* History */

    .history{

        padding:15px;

    }

    .history-list{

        max-height:55vh;

        border-radius:12px;

    }

    .history-item{

        font-size:13px;

        padding:10px;

    }

    .history-actions{

        display:flex;

        flex-direction:row;

        gap:10px;

    }

    /* Bottom */

    .bottom-menu{

        padding:15px;

    }

}