body{
    background:#111827;
    color:white;
    font-family:Arial, sans-serif;
    margin:0;
    padding:0;
}

.container{
    max-width:1100px;
    margin:auto;
    padding:30px;
}

h1{
    color:#60a5fa;
    font-size:40px;
}

h2{
    margin-top:0;
}

p{
    font-size:18px;
}

.dashboard-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:20px;
    margin-top:30px;
}

.card{
    background:#1f2937;
    border:1px solid #374151;
    border-radius:14px;
    padding:24px;
}

.card h2{
    color:#93c5fd;
    margin-top:0;
}

.card strong{
    display:block;
    font-size:32px;
    margin:10px 0 20px 0;
    color:white;
}

.form-card{
    background:#1f2937;
    border:1px solid #374151;
    border-radius:14px;
    padding:24px;
    margin-bottom:30px;
}

.form-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit, minmax(180px, 1fr));
    gap:15px;
    align-items:start;
}

.form-group{
    margin-bottom:20px;
}

.form-group label{
    display:block;
    font-weight:bold;
    margin-bottom:8px;
    line-height:1.3;
}

input,
select{
    width:100%;
    box-sizing:border-box;
    padding:12px;
    border-radius:10px;
    border:1px solid #374151;
    background:#111827;
    color:white;
    font-size:16px;
}

input:focus,
select:focus{
    outline:none;
    border-color:#3b82f6;
}

button{
    border:none;
    cursor:pointer;
}

.button-row{
    display:flex;
    gap:15px;
    margin-top:25px;
    flex-wrap:wrap;
}

.button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:13px 20px;
    border-radius:12px;
    text-decoration:none;
    font-weight:bold;
    transition:0.2s;
    border:none;
    cursor:pointer;
}

.button.primary{
    background:#3b82f6;
    color:white;
}

.button.primary:hover{
    background:#2563eb;
}

.button.secondary{
    background:#374151;
    color:white;
    border:1px solid #4b5563;
}

.button.secondary:hover{
    background:#4b5563;
}

.button.danger{
    background:#7f1d1d;
    color:white;
    border:1px solid #991b1b;
}

.button.danger:hover{
    background:#991b1b;
}

.table-card{
    background:#1f2937;
    border:1px solid #374151;
    border-radius:14px;
    padding:20px;
    margin-bottom:30px;
    overflow-x:auto;
}

table{
    width:100%;
    border-collapse:collapse;
}

th{
    text-align:left;
    color:#93c5fd;
    border-bottom:1px solid #374151;
    padding:14px 12px;
}

td{
    border-bottom:1px solid #374151;
    padding:14px 12px;
    vertical-align:middle;
}

.meterstanden-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:25px;
}

.melding{
    background:#064e3b;
    border:1px solid #10b981;
    color:#d1fae5;
    padding:14px 18px;
    border-radius:12px;
    margin-bottom:20px;
    font-weight:bold;
}

.top-nav{
    background:#1f2937;
    border-bottom:1px solid #374151;
    padding:15px 30px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    position:sticky;
    top:0;
    z-index:10;
}

.nav-title{
    font-weight:bold;
    color:#93c5fd;
    font-size:20px;
}

.nav-links{
    display:flex;
    gap:15px;
    flex-wrap:wrap;
}

.nav-links a{
    color:white;
    text-decoration:none;
    font-weight:bold;
    padding:8px 12px;
    border-radius:10px;
}

.nav-links a:hover{
    background:#374151;
}

.logout-link{
    color:#fca5a5 !important;
}

.actie-buttons{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    min-width:170px;
}

.actie-buttons .button{
    padding:6px 10px !important;
    font-size:14px !important;
    border-radius:10px;
}

.table-card td .button.danger{
    padding:3px 8px !important;
    font-size:12px !important;
    border-radius:7px !important;
    line-height:1 !important;
    min-height:unset !important;
    height:auto !important;
    width:auto !important;
    display:inline-flex !important;
    align-items:center;
    justify-content:center;
}

.small-danger{
    padding:3px 7px !important;
    font-size:11px !important;
    border-radius:6px !important;
    line-height:1 !important;
    min-height:0 !important;
    height:22px !important;
    min-width:0 !important;
    width:auto !important;
}

/* Geavanceerde opties */
.advanced-options{
    margin-top:18px;
    padding-top:14px;
    border-top:1px solid #374151;
}

.advanced-options summary{
    cursor:pointer;
    color:#93c5fd;
    font-weight:bold;
    font-size:14px;
    user-select:none;
}

.advanced-options[open] summary{
    margin-bottom:12px;
}

.checkbox-row{
    display:flex;
    align-items:center;
    gap:10px;
    font-size:14px;
    color:#d1d5db;
}

.checkbox-row input{
    width:auto;
    margin:0;
}

/* =========================
   MOBILE
========================= */

@media(max-width:700px){

    html,
    body{
        width:100%;
        max-width:100%;
        overflow-x:hidden;
    }

    body{
        font-size:15px;
    }

    .container{
        width:100%;
        max-width:100%;
        padding:16px;
        margin:0;
        box-sizing:border-box;
    }

    h1{
        font-size:32px;
        line-height:1.1;
        margin:20px 0;
    }

    h2{
        font-size:24px;
    }

    p{
        font-size:15px;
    }

    .top-nav{
        padding:10px 16px;
        flex-direction:column;
        align-items:flex-start;
        gap:8px;
    }

    .nav-title{
        font-size:16px;
    }

    .nav-links{
        display:flex;
        flex-wrap:wrap;
        gap:6px 14px;
        width:100%;
    }

    .nav-links a{
        padding:4px 0;
        font-size:14px;
        border-radius:6px;
    }

    .dashboard-grid,
    .meterstanden-grid{
        grid-template-columns:1fr;
        gap:18px;
    }

    .card,
    .form-card,
    .table-card{
        width:100%;
        max-width:100%;
        padding:16px;
        margin-bottom:20px;
        box-sizing:border-box;
        overflow-x:auto;
    }

    .form-grid{
        grid-template-columns:1fr;
        gap:14px;
        align-items:start;
    }

    input,
    select,
    button{
        width:100%;
        box-sizing:border-box;
        font-size:16px;
    }

    input,
    select{
        padding:12px;
    }

    .button-row{
        display:flex;
        flex-wrap:wrap;
        gap:10px;
        margin-top:18px;
    }

    .button-row .button{
        flex:1 1 calc(50% - 10px);
        text-align:center;
        padding:11px 10px;
        font-size:14px;
    }

    canvas{
        max-height:240px;
    }

    table{
        width:max-content;
        min-width:100%;
    }

    th,
    td{
        padding:10px 10px;
        font-size:13px;
        white-space:nowrap;
    }

    .small-danger{
        padding:2px 6px !important;
        font-size:10px !important;
        border-radius:6px !important;
        height:20px !important;
        line-height:1 !important;
    }
}

/* =========================
   LOGIN / AUTH
========================= */

.auth-wrapper{
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:20px;
    box-sizing:border-box;
}

.auth-card{
    width:100%;
    max-width:420px;
    background:#1f2937;
    border:1px solid #374151;
    border-radius:18px;
    padding:34px;
    box-shadow:0 10px 30px rgba(0,0,0,0.35);
}

.auth-card h1{
    margin-top:0;
    margin-bottom:10px;
}

.auth-subtitle{
    color:#9ca3af;
    margin-bottom:24px;
    font-size:15px;
    line-height:1.5;
}

.auth-button{
    width:100%;
    margin-top:10px;
    display:flex;
    justify-content:center;
    align-items:center;
}

.auth-footer{
    margin-top:24px;
    text-align:center;
    color:#d1d5db;
    font-size:15px;
}

.auth-footer a{
    color:#60a5fa;
    text-decoration:none;
    font-weight:bold;
}

.auth-footer a:hover{
    text-decoration:underline;
}

.error-melding{
    background:#7f1d1d;
    border:1px solid #991b1b;
    color:#fecaca;
    margin-bottom:20px;
}

@media(max-width:700px){

    .auth-card{
        padding:24px;
        border-radius:16px;
    }

    .auth-card h1{
        font-size:34px;
    }
}