/* ==========================================================
   GLOBAL THEME
========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #12121b;
    color: #e0e0e0;
}

/* ==========================================================
   NAVIGATION
========================================================== */

nav a:hover {
    color: #00a8cc;
}

header {
    background: #162447;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu {
    display: flex;
    gap: 10px;
}

.menu button {
    background: #1f4068;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.menu button:hover {
    background: #3a5ba0;
}

/* ==========================================================
   CONTAINERS
========================================================== */

.container {
    max-width: 1200px;
    margin: 25px auto;
    padding: 25px;
    background-color: #162447;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}

.container h1 {
    margin-bottom: 20px;
    color: #e0e0e0;
}

/* ==========================================================
   UNIFORM FORM SYSTEM (✨ belangrijkste deel)
========================================================== */

/* Kaart rondom bewerkformulieren */
.edit-container,
.form-card {
    max-width: 700px;
    margin: 0 auto 30px auto;
    background: #23395d;
    border-radius: 14px;
    padding: 25px;
    border: 1px solid #3a5ba0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.35);
}

/* 2-koloms form layout */
.form-row,
.oefening-form-container {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

/* Form labels */
.form-row > label,
.oefening-form-container > label {
    font-weight: 600;
    color: #fff;
    margin: 0;
}

/* Inputs & selects */
.form-row input,
.form-row select,
.form-row textarea,
.oefening-form-container input,
.oefening-form-container select,
.oefening-form-container textarea {
    width: 100%;
    padding: 9px 12px;
    border-radius: 6px;
    border: 1px solid #3a5ba0;
    background-color: #1b1b38;
    color: #fff;
    box-sizing: border-box;
}

/* Checkbox-row */
.form-row-checkbox {
    grid-template-columns: 220px auto;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Submit buttons */
button,
.btn-save {
    background-color: #3a5ba0;
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: 0.2s;
}

button:hover,
.btn-save:hover {
    background-color: #1f4068;
}

/* ==========================================================
   TABLES
========================================================== */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #162447;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}

th {
    background: #b0b0b0;
    color: #000;
    font-weight: bold;
    padding: 12px;
}

td {
    padding: 12px;
    border-bottom: 1px solid #1a1a2e;
}

tbody tr {
    background-color: #23395d;
}

tbody tr:hover {
    background-color: #3a5ba0;
}

/* ==========================================================
   DAY-BLOCKS
========================================================== */

.day-block {
    border: 2px solid #3a5ba0;
    background-color: #23395d;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: 0.25s;
}

.day-block:hover {
    background-color: #3a5ba0;
}

/* ==========================================================
   MATRIX (progress overzicht)
========================================================== */

.matrix-wrapper {
    overflow-x: auto;
    padding: 10px 0;
}

table.matrix {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}

.matrix th,
.matrix td {
    border: 1px solid #1a1a2e;
    padding: 10px 12px;
    text-align: center;
}

.matrix thead th {
    background-color: #b0b0b0;
    color: black;
}

.day-cell {
    background-color: #1f4068;
    font-weight: bold;
    color: white;
}

.oef-naam {
    background-color: #23395d;
    color: white;
    text-align: left;
}

.set-box-wrapper {
    display: flex;
    gap: 8px;
}

.set-box {
    background: #1b1b38;
    padding: 6px 10px;
    min-width: 40px;
    border-radius: 6px;
    border: 1px solid #3a5ba0;
    text-align: center;
    color: #fff;
    font-weight: 600;
}

.set-fail {
    background: orange;
    border-color: #ffa500;
    color: black;
    font-weight: bold;
}

/* ==========================================================
   TOAST NOTIFICATIONS
========================================================== */

.toast {
    background-color: #1f4068;
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: inline-block;
    font-weight: 600;
}

/* ==========================================================
   RESPONSIVE LAYOUT
========================================================== */

@media (max-width: 800px) {

    .form-row,
    .oefening-form-container,
    .form-row-checkbox {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 15px;
    }

    table.matrix {
        min-width: 700px;
    }
}
/* Tabellen – consistente uitlijning */
table th,
table td {
    text-align: left;
    vertical-align: middle;
}

/* Gecentreerde kolommen (Tijd, Reps) */
table th.center,
table td.center {
    text-align: center;
}

/* Acties rechts */
table th.actions,
table td.actions {
    text-align: right;
    white-space: nowrap;
}
.sync-ok {
    color: #2e7d32;
    font-weight: 500;
}
.sync-error {
    color: #c62828;
    font-weight: 600;
}
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

/* nav neemt zijn eigen hoogte */
nav {
    flex-shrink: 0;
}

/* main krijgt ALLE resterende hoogte */
.page-main {
    flex: 1;
    display: flex;
}

/* container vult main */
.page-main .container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* chart card vult resterende ruimte */
.fitness-card {
    flex: 0 0 auto;   /* 🔥 NIET meer stretchen */
    display: flex;
    flex-direction: column;
}
.chart-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;     /* 🔥 voorkomt flex-resize */
}
main.page-main .container {
    display: flex;
    flex-direction: column;
}
