@import url('https://fonts.googleapis.com/css2?family=Titillium+Web:wght@200;300;400;600;700;900&display=swap');

*,
html{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Titillium Web', sans-serif;
}

/* ================= BODY ================= */
body{
    background:#f4f7fb;
    min-height:100vh;
}

/* ================= LAYOUT ================= */
.layouts{
    width:100%;
    max-width:500px;
    min-height:100vh;

    margin:auto;
    background:white;

    box-shadow:0 0 15px rgba(0,0,0,0.08);

    display:flex;
    flex-direction:column;
}

/* ================= CONTENT SCROLL ================= */
.content{
    flex:1;
}

/* ================= BOTTOM MENU ================= */
.bottom-menu{
    background:white;
    padding:16px;
    border-top:1px solid #ddd;

    flex-shrink:0;
    position: sticky;
    bottom: 0;
    box-shadow:0 -2px 10px rgba(0,0,0,0.08);
}

.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;
}

/* ================= 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;

    max-height:55vh;
    overflow-y:auto;
}

.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:hover{
    transform:translateY(-3px);
}

.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%;
    padding:12px;
    border:1px solid #ddd;
    border-radius:10px;
    outline:none;
}

.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%;
    text-align:center;
    padding:12px;
    margin-top:12px;
    border-radius:10px;
    background:#ff4d4d;
    color:white;
    text-decoration:none;
    font-weight:700;
    transition:0.3s;
}

.back-btn:hover{
    background:#e60000;
}

/* ================= LOGIN PAGE ================= */
.login-card{
    width:100%;
    max-width:420px;
    background:white;
    margin:60px auto;
    padding:35px 28px;
    border-radius:18px;
    box-shadow:0 8px 18px rgba(0,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 ================= */
@media(max-width:600px){

    .layouts{
        max-width:100%;
        min-height:100vh;
    }

    .navbar h3{
        font-size:24px;
    }

    .page-title h3{
        font-size:24px;
    }

    .leds{
        grid-template-columns:1fr;
    }

    .led-image{
        width:80px;
        height:80px;
    }

    .history-actions{
        flex-direction:column;
    }

    .page-wrap{
        padding:22px 18px;
    }

    .page-wrap h2,
    .page-wrap h3{
        font-size:24px;
    }

    .login-card{
        margin:30px 15px;
        padding:28px 22px;
    }

    table{
        font-size:13px;
    }

    table th,
    table td{
        padding:8px;
    }

     .history-list{
        max-height:50vh;
    }

    .history-actions{
        flex-direction:row;
        gap:10px;
    }

    .filter-btn,
    .reset-btn{
        flex:1;
    }
}