/* ==========
   Design tokens (pas kleuren hier aan of overschrijf via layout.php)
   ========== */
:root {
    /* Header/Footer */
    --brand-bg: #1e293b;
    /* achtergrondkleur header & footer */
    --brand-text: #e5e7eb;
    /* tekstkleur header & footer */

    /* Content/typografie */
    --text: #f3f4f6;
    /* basistekst (hoog contrast) */
    --text-muted: #d1d5db;
    /* secundaire tekst */
    --heading: #f9fafb;
    /* koppen */

    /* Accenten/knoppen */
    --accent: #38bdf8;
    /* links/primary */
    --accent-contrast: #ffffff;
    /* tekst op primary */

    /* Achtergrond (pagina) */
    --body-bg: #0b1020;
    --body-grad-1: #0b1020;
    --body-grad-2: #111827;

    /* Glass card (verhoog alpha voor minder doorzichtig) */
    --glass-bg: rgba(15, 23, 42, 0.50);
    --glass-border: rgba(255, 255, 255, 0.28);
    --glass-shadow: rgba(0, 0, 0, 0.45);

    /* Achtergrondafbeelding (dynamisch via layout.php) */
    --bg-blur: 0px;
    /* wordt vanuit DB overschreven */
    /* --bg-image: url('/uploads/backgrounds/...') wordt in layout.php gezet */
}

/* ====== Global ====== */
* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body.app-body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
    color: var(--text);
    background:
        radial-gradient(1200px 800px at 80% 10%, var(--body-grad-2), transparent 60%),
        radial-gradient(800px 600px at 10% 80%, var(--body-grad-2), transparent 50%),
        linear-gradient(180deg, var(--body-grad-1), var(--body-grad-2));
    background-attachment: fixed;
}

/* ====== Header ====== */
.app-header {
    background: var(--brand-bg) !important;
    color: var(--brand-text);
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-header__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 18px;
    position: relative;
    /* nodig voor absolute positie header-buttons */
    display: flex;
    align-items: center;
}

.brand__title {
    font-size: 1.5rem;
    /* zelfde als Inloggen in glass card */
    font-weight: 800;
    /* bold */
    letter-spacing: .3px;
    color: var(--brand-text);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
    margin: 0;
    /* netjes uitlijnen */
    line-height: 1.2;
}

/* Knoppen rechts in de header (Home + Uitloggen) */
.header-buttons {
    position: absolute;
    right: 18px;
    bottom: -50%;
    transform: translateY(50%);
    /* centreer op onderrand header */
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 0;
}

.logout-form {
    margin: 0;
}

/* ====== Knoppen ====== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .55rem .9rem;
    border-radius: .75rem;
    border: 1px solid transparent;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform .05s ease, border-color .2s ease, background-color .2s ease, color .2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn--ghost {
    color: var(--brand-text);
    background: transparent;
    border-color: rgba(255, 255, 255, 0.18);
}

.btn--ghost:hover {
    background: rgba(255, 255, 255, 0.06);
}

.btn--primary {
    background: var(--accent);
    color: var(--accent-contrast);
    border: none;
    font-weight: 800;
    letter-spacing: .2px;
    width: 100%;
    padding: 12px 13px;
    border-radius: 12px;
}

.btn--primary:hover {
    filter: brightness(1.05);
}

/* ====== Achtergrondlagen ====== */
/* Onderste laag: foto (indien geconfigureerd) */
.bg-image {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(var(--bg-blur));
    transform: translateZ(0);
    /* performance hint */
}

/* Boven foto: decor + donkere overlay voor leesbaarheid */
.bg-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)),
        /* donkere film */
        radial-gradient(600px 400px at 20% 15%, rgba(14, 165, 233, 0.16), transparent 50%),
        radial-gradient(700px 500px at 80% 80%, rgba(99, 102, 241, 0.10), transparent 60%);
    z-index: -1;
}

/* ====== Main & Container ====== */
.app-main {
    position: relative;
    z-index: 1;
    padding: 28px 16px 40px;
    min-height: calc(100vh - 110px);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

/* ====== Glass Card ====== */
.glass-card {
    backdrop-filter: blur(10px) saturate(120%);
    -webkit-backdrop-filter: blur(10px) saturate(120%);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    box-shadow: 0 10px 30px var(--glass-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    padding: 24px 22px;
}

/* ====== Auth (login/2FA gecentreerd) ====== */
.auth-wrap {
    min-height: calc(100vh - 160px);
    display: grid;
    place-items: center;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    padding: 28px 24px;
}

/* ====== Typografie & Links ====== */
h1,
h2,
h3 {
    margin: 0 0 .6rem;
    line-height: 1.2;
    color: var(--heading);
    font-weight: 800;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.45);
}

p {
    color: var(--text);
    opacity: 0.96;
}

a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

a:hover {
    text-decoration: underline;
}

/* ====== Formulieren ====== */
form .field {
    margin: 10px 0 14px;
}

.input {
    width: 100%;
    padding: 12px 13px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(0, 0, 0, 0.35);
    /* hogere dekking voor leesbaarheid */
    color: var(--text);
    outline: none;
}

.input::placeholder {
    color: rgba(243, 244, 246, 0.75);
}

.input:focus {
    border-color: rgba(56, 189, 248, 0.7);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
}

/* ====== Footer ====== */
.app-footer {
    background: var(--brand-bg) !important;
    color: var(--brand-text);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.app-footer__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 18px;
}

/* Footer grid (3 kolommen) */
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    gap: 12px;
}

.footer-col--left {
    text-align: left;
}

.footer-col--center {
    text-align: center;
}

.footer-col--right {
    text-align: right;
}

/* ====== Responsive ====== */
@media (max-width: 720px) {

    .app-header__inner,
    .app-footer__inner {
        padding: 12px;
    }

    .glass-card {
        padding: 16px 14px;
    }

    .auth-card {
        padding: 22px 18px;
    }

    .header-buttons {
        right: 12px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .footer-col--left,
    .footer-col--center,
    .footer-col--right {
        text-align: left;
    }
}
