body{
    margin:0;
    font-family:Arial,Helvetica,sans-serif;
    color:#111;
    min-height:100vh;
    overflow:auto;

    background:#fff url("/static/achtergrond.png") center center/cover no-repeat;

    position:relative;
}


.container{
    width:min(1100px,95vw);
    margin:20px auto;
    text-align:center;
    position:relative;
    z-index:2;
    padding:20px;
    box-sizing:border-box;
}

.logo{
    width:220px;
    margin-top:10px;
}

h1{
    font-size:clamp(34px,4vw,60px);
    margin:10px 0;
    color:#1d2b3a;
}

h2{
    font-size:38px;
    margin:10px 0;
    color:#333;
}

#clock{
    font-size:54px;
    font-weight:bold;
    color:#1f4e79;
    margin-top:10px;
}

#date{
    font-size:24px;
    color:#666;
    margin-bottom:25px;
}

#code{
    width:260px;
    height:80px;
    font-size:42px;
    font-weight:bold;
    text-align:center;
    border:none;
    border-radius:18px;
    background:#ffffff;
    color:#1d2b3a;
    box-shadow:0 8px 20px rgba(0,0,0,.18);
    letter-spacing:12px;
}

.codebalk{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:15px;
    margin:0 auto 20px;
    width:fit-content;
}

.codebalk .start,
.codebalk .stop{
    width:220px;
    height:80px;
    font-size:28px;
    display:flex;
    justify-content:center;
    align-items:center;
}

.keypad{
    display:grid;
    grid-template-columns:repeat(3,90px);
    gap:12px;
    width:294px;
    margin:0 auto;
}

.keypad button{
    width:90px;
    height:90px;
    font-size:34px;
    font-weight:bold;
    border:none;
    border-radius:20px;
    background:#ffffff;
    cursor:pointer;
    transition:.2s;
    box-shadow:0 6px 14px rgba(0,0,0,.15);
}

.keypad button:hover{
    background:#f8f8f8;
    transform:translateY(-3px);
    box-shadow:0 10px 22px rgba(0,0,0,.20);
}

.start,
.stop{
    width:180px;
    height:80px;
    font-size:28px;
    font-weight:bold;
    border:none;
    border-radius:20px;
    color:white;
    opacity:.55;
    cursor:not-allowed;
    transition:.25s;
    box-shadow:0 8px 20px rgba(0,0,0,.18);
}

.start{
    background:linear-gradient(#33c45d,#1f8e42);
}

.stop{
    background:linear-gradient(#f04d4d,#c62828);
}

.start.active,
.stop.active{
    opacity:1;
    cursor:pointer;
    transform:translateY(-2px);
    box-shadow:0 12px 24px rgba(0,0,0,.25);
}

.functie{
    background:#e4e4e4 !important;
}

@media only screen
and (min-width: 769px)
and (max-width: 1366px)
and (orientation: portrait) {

    body{
        background:#fff url("/static/tablet_achtergrond.png") center top/contain no-repeat;
    }

    .codebalk{
        position:relative;
        left:-21px;
    }

}

@media (max-width: 768px) {

.container{
    width:98vw;
    padding:5px;
    margin:5px auto;
}

.logo{
    width:100px;
}

h1{
    font-size:24px;
}

h2{
    font-size:18px;
}

#clock{
    font-size:28px;
}

#date{
    font-size:16px;
}

p{
    margin:5px 0 10px;
    font-size:16px;
}

.codebalk{
    flex-direction:column;
    gap:12px;
}

.codebalk .start,
.codebalk .stop{
    width:180px;
    height:60px;
    font-size:22px;
    display:flex;
    justify-content:center;
    align-items:center;
}

#code{
    width:210px;
    height:60px;
    font-size:34px;
    font-weight:bold;
    text-align:center;
    border:none;
    border-radius:18px;
    background:#ffffff;
    color:#1d2b3a;
    box-shadow:0 8px 20px rgba(0,0,0,.18);
    letter-spacing:12px;
}

.keypad{
    transform:scale(.72);
    transform-origin:top center;
    margin-top:-10px;
}
body{
    background:#fff url("/static/achtergrond_portret.png") center top/contain no-repeat;
}

}

#melding{
    position:fixed;
    inset:0;
    display:none;
    justify-content:center;
    align-items:center;
    flex-direction:column;
    background:rgba(255,255,255,.94);
    font-size:64px;
    font-weight:bold;
    color:#1d2b3a;
    z-index:9999;
    text-align:center;
}

#melding .naam{
    margin-top:20px;
    color:#1f4e79;
    font-size:52px;

}

#adminPopup{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.55);
    justify-content:center;
    align-items:center;
    z-index:99999;
}

.adminBox{
    width:360px;
    background:white;
    border-radius:20px;
    padding:30px;
    text-align:center;
    box-shadow:0 20px 40px rgba(0,0,0,.35);
}

.adminBox h2{
    margin-top:0;
}

#adminCode{
    width:180px;
    height:55px;
    font-size:32px;
    text-align:center;
    border-radius:12px;
    border:2px solid #ccc;
}

#adminOk,
#adminCancel{
    width:140px;
    height:50px;
    border:none;
    border-radius:12px;
    font-size:18px;
    cursor:pointer;
    margin:8px;
}

#adminOk{
    background:#2fa84f;
    color:white;
}

#adminCancel{
    background:#d9534f;
    color:white;
}

#adminPanel{
    display:none;
    position:fixed;
    inset:0;
    background:#f5f7fa;
    z-index:99999;
    justify-content:center;
    align-items:center;
}

.adminMenu{
    width:520px;
    background:white;
    border-radius:20px;
    padding:40px;
    box-shadow:0 20px 40px rgba(0,0,0,.25);
    text-align:center;
}

.adminKnop{
    width:100%;
    height:70px;
    margin:10px 0;
    border:none;
    border-radius:14px;
    font-size:24px;
    cursor:pointer;
    background:#1f4e79;
    color:white;
}

.adminKnop:hover{
    background:#2f6aa2;
}

#sluitAdmin{
    width:100%;
    height:60px;
    margin-top:20px;
    border:none;
    border-radius:14px;
    background:#d9534f;
    color:white;
    font-size:22px;
    cursor:pointer;
}

html,
html,
body{
    -webkit-user-select:none;
    user-select:none;
    -webkit-touch-callout:none;
}

@media (min-width:768px){

html,
body{
    touch-action:manipulation;
}

}

button,
input{
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

#adminBtn{
    position:fixed;
    top:20px;
    right:20px;

    width:120px;
    height:50px;

    border:none;
    border-radius:12px;

    background:#1f4e79;
    color:white;

    font-size:18px;
    font-weight:bold;

    cursor:pointer;

    z-index:999999;
}
/* ===== DASHBOARD ===== */

body{
    margin:0;
    font-family:Arial,sans-serif;
}

.sidebar{
    position:fixed;
    left:0;
    top:0;
    bottom:0;
    width:250px;
    background:rgba(255,255,255,.94);
    box-shadow:4px 0 15px rgba(0,0,0,.12);
    z-index:1000;
}

.sidebar .logo{
    text-align:center;
    margin-bottom:20px;
}

.sidebar .logo-img{
    width:250px;
    height:250px;
    object-fit:contain;
}

.sidebar a{
    display:block;
    padding:16px 22px;
    color:#1f4e79;
    text-decoration:none;
    font-size:18px;
    font-weight:bold;
}

.sidebar a:hover{
    background:#eaf2f8;
}

.content{
    margin-left:250px;
    min-height:100vh;
    padding:30px;
}

.topbar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    font-size:24px;
    font-weight:bold;
    color:#1f4e79;
    margin-bottom:35px;
}

#clock{
    font-size:22px;
}

.cards{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:22px;
    margin-bottom:30px;
}

.card{
    background:rgba(255,255,255,.94);
    border-radius:20px;
    padding:25px;
    box-shadow:0 8px 25px rgba(0,0,0,.12);
}

.card h3{
    margin:0 0 15px;
    font-size:20px;
    color:#1f2937;
}

.card .number{
    font-size:42px;
    font-weight:bold;
    color:#1f4e79;
}

.dashboard-section{
    background:rgba(255,255,255,.94);
    border-radius:20px;
    padding:25px;
    box-shadow:0 8px 25px rgba(0,0,0,.12);
}

.recent h2{
    margin-top:0;
    font-size:26px;
    color:#1f2937;
}

.recent table{
    width:100%;
    border-collapse:collapse;
}

.recent th,
.recent td{
    padding:14px;
    text-align:left;
    border-bottom:1px solid #ddd;
}

.recent th{
    background:#1f4e79;
    color:white;
}

@media(max-width:900px){
    .sidebar{
        position:relative;
        width:100%;
        height:auto;
    }

    .sidebar .logo-img{
        width:180px;
        height:180px;
    }

    .content{
        margin-left:0;
    }

    .cards{
        grid-template-columns:repeat(2,1fr);
    }
}

@media(max-width:600px){
    .cards{
        grid-template-columns:1fr;
    }
}

