/* ==========================================================================
   Teamhub — gedeelde basisstijl
   Onderdeel van de refactor uit de implementatiebrief (§2, stap 1):
   de basisstijl (.card, .btn-varianten, tabellen, .alert) die verspreid
   over planner.php, trainings.php en stats.php stond, staat nu hier.
   Pagina-specifieke opmaak (containerbreedte, padding, badges, layout)
   blijft bewust in de eigen <style>-blokken van elke pagina staan.
   ========================================================================== */

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f1f5f9;
    color: #0f172a;
    margin: 0;
}

/* Kaarten */
.card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Tabellen */
table { width: 100%; border-collapse: collapse; }
th { background: #e2e8f0; color: #0f172a; font-weight: 700; text-align: left; border-bottom: 2px solid #cbd5e1; }
td { text-align: left; border-bottom: 1px solid #cbd5e1; color: #0f172a; }
tbody tr:nth-child(even) { background-color: #f8fafc; }
tbody tr:nth-child(odd) { background-color: #ffffff; }
tbody tr:hover { background-color: #e2e8f0; }

/* Knoppen */
.btn {
    color: #ffffff;
    background: #1e3a8a;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
}
.btn-success, .btn-green { background: #10b981; }
.btn-success:hover, .btn-green:hover { background: #059669; }
.btn-danger { background: #ef4444; }

/* Meldingen */
.alert {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
    border-radius: 6px;
    font-weight: bold;
}
.alert-danger { background: #fee2e2; color: #991b1b; border: 1px solid #f87171; }


/* ==========================================================================
   Mobiel (smal scherm): tabellen met class "mobile-cards" worden kaarten.
   De labels komen uit de kolomkoppen (zie mobile_cards_init in de pagina).
   ========================================================================== */
@media (max-width: 700px) {
    table.mobile-cards, table.mobile-cards tbody { display: block; width: 100%; white-space: normal; }
    table.mobile-cards thead { display: none; }
    table.mobile-cards tr {
        display: block; background: #ffffff !important; border: 1px solid #e2e8f0;
        border-radius: 10px; padding: 8px 12px; margin-bottom: 10px;
    }
    table.mobile-cards td {
        display: flex; justify-content: space-between; align-items: center; gap: 12px;
        border: 0; border-bottom: 1px solid #f1f5f9; padding: 6px 0;
        text-align: right !important; width: auto !important; max-width: none !important;
        white-space: normal; overflow: visible; text-overflow: clip;
    }
    table.mobile-cards td:last-child { border-bottom: 0; }
    table.mobile-cards td::before {
        content: attr(data-label); flex: 0 0 38%; text-align: left;
        font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase;
    }
    table.mobile-cards td[data-label=""]::before { display: none; }
    table.mobile-cards td[data-label=""]:not(.mc-title) { justify-content: flex-end; }
    table.mobile-cards td.mc-title {
        font-size: 15px; justify-content: flex-start; text-align: left !important;
        border-bottom: 2px solid #e2e8f0; padding-bottom: 8px; margin-bottom: 2px;
    }
    .table-scroll.mc-wrap { border: 0; overflow: visible; }
}
