* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: "Open Sans", Arial, sans-serif;
    background: #f4f6fa;
    color: #222;
}


/* ==========================
   CMS HEADER
   ========================== */

.cms-header {
    background: #0D4EA5;
    color: white;
    padding: 20px;
    width: 100%;
}

.cms-header h1 {
    margin: 0;
}


/* ==========================
   CMS MENU
   ========================== */

.cms-menu {
    background: #ffffff;
    padding: 15px 30px;
    border-bottom: 1px solid #ddd;
    width: 100%;
}

.cms-menu a {
    margin-right: 20px;
    color: #0D4EA5;
    text-decoration: none;
    font-weight: bold;
}


/* ==========================
   CMS CONTAINER
   ========================== */

.cms-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px;
}


/* ==========================
   CMS DASHBOARD
   ========================== */

.cms-dashboard {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}


/* ==========================
   CMS CARD
   ========================== */

.cms-card {
    background: white;
    padding: 25px;
    margin: 0;
    width: 100%;
    min-width: 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.cms-card:hover {
    border-left: 5px solid #FF7300;
}


/* ==========================
   BUTTON
   ========================== */

.button {
    display: inline-block;
    background: #FF7300;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.button:hover {
    opacity: .9;
}


/* ==========================
   MEDIA MODULE
   ========================== */

.media-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.media-item {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    max-width: 100%;
}

.media-item img {
    display: block;
    width: 220px;
    max-width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 6px;
}


/* ==========================
   CMS LOGIN
   ========================== */

.cms-login {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0D4EA5;
    padding: 20px;
}

.login-box {
    background: white;
    width: 350px;
    max-width: 100%;
    padding: 35px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,.2);
    text-align: center;
}

.login-box h1 {
    color: #0D4EA5;
    margin-bottom: 10px;
}

.login-box input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.login-box .button {
    border: none;
    cursor: pointer;
    margin-top: 15px;
}

.login-error {
    background: #f8d7da;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}


/* ==========================
   TABELLEN
   ========================== */

table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 10px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #ddd;
}

th {
    font-weight: bold;
}


/* ==========================
   TABLET
   ========================== */

@media (max-width: 1100px) {

    .cms-dashboard {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}


/* ==========================
   MOBIEL
   ========================== */

@media (max-width: 700px) {

    .cms-container {
        padding: 15px;
    }

    .cms-menu {
        padding: 10px 15px;
    }

    .cms-menu a {
        display: block;
        margin: 10px 0;
    }

    .cms-dashboard {
        display: block;
    }

    .cms-card {
        display: block;
        width: 100%;
        margin: 0 0 15px 0;
    }

    select,
    input,
    textarea {
        width: 100%;
        max-width: 100%;
    }

    .button {
        display: block;
        width: 100%;
        box-sizing: border-box;
        text-align: center;
        margin-bottom: 8px;
    }


    /* ==========================
       MEDIA GALERIJ
       ========================== */

    .media-grid {
        display: block;
    }

    .media-item {
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 20px;
    }

    .media-item img {
        width: 100%;
        height: auto;
    }


    /* ==========================
       DOCUMENTEN / TABELLEN
       ========================== */

    table {
        width: 100%;
        max-width: 100%;
        display: block;
        overflow: hidden;
    }

    thead {
        display: none;
    }

    tbody {
        display: block;
        width: 100%;
    }

    tr {
        display: block;
        width: 100%;
        box-sizing: border-box;
        background: #f5f5f5;
        margin-bottom: 15px;
        padding: 15px;
        border-radius: 8px;
    }

    td {
        display: block;
        width: 100%;
        box-sizing: border-box;
        border: none;
        padding: 5px 0;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    td:nth-child(1)::before {
        content: "Documenttype: ";
        font-weight: bold;
    }

    td:nth-child(2)::before {
        content: "Bestandsnaam: ";
        font-weight: bold;
    }

    td:nth-child(3)::before {
        content: "Grootte: ";
        font-weight: bold;
    }

    td:nth-child(4)::before {
        content: "Datum: ";
        font-weight: bold;
    }

    td:nth-child(5) {
        margin-top: 10px;
    }

    td:nth-child(5) .button {
        display: block;
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }

}