body,
input,
section,
.header-grid,
.card,
button {
    transition:
        background-color 0.2s ease-in-out,
        color 0.2s ease-in-out,
        border-color 0.2s ease-in-out;
}

/* --------- Reset --------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family:
        "Roboto",
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

/* --------- Body --------- */

body {
    color: var(--text-main);
}

/* --------- Navlint --------- */

.header-grid {
    height: 5vh;
    display: grid;
    padding: 5px;
    grid-template-columns: 1fr 95px;
    align-items: center;
    justify-items: center;
    background-color: var(--bg-page);
}

/* --------- Page --------- */
.grid-layout {
    min-height: 95vh;
    background-color: var(--bg-page);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --------- Container --------- */
.container {
    width: 100%;
    max-width: 470px;
    padding: 2rem 1.5rem;
    text-align: center;
}

/* --------- Logo --------- */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 1.7rem;
    font-weight: 900;
    color: var(--text-main);
    text-decoration: none;
}

.logo img {
    height: 35px;
}

/* --------- Card --------- */
.card {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* --------- Card body --------- */
.card-body {
    padding: 2rem;
}

.card-body h1 {
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-main);
    text-align: left;
}

/* --------- Form --------- */
.field {
    margin-bottom: 1rem;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-main);
}

input {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius);
    color: var(--text-muted);
    border: 1px solid var(--border);
    background-color: var(--bg-tint);
    font-size: 0.875rem;
    transition: 0.3s outline ease-in-out;
}

input:focus {
    outline: none;
    border-color: var(--btn-border);
    background-color: var(--bg-card);
}

/* --------- Button --------- */
.btn {
    width: 100%;
    padding: 0.65rem;
    border-radius: var(--radius);
    border: none;
    background-color: var(--btn-primary);
    color: var(--btn-text-primary);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s background-color ease-in-out;
}

.btn:hover {
    background-color: var(--btn-primary-hover);
}

/* --------- Dark light button --------- */
.mode-switch {
    font-size: 20px;
    line-height: 1;
    color: var(--text-main);
    border: none;
    padding: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* --------- Responsive --------- */
@media (max-height: 500px) {
    .grid-layout {
        padding: 1rem;
    }

    .card {
        width: 100%;
        max-width: none;
        margin: 0 auto; /* horizontaal gecentreerd */
        border-radius: 0;
    }
}

/* --------- Error afhandelen --------- */

.message {
    padding: 10px;
    border-radius: 0.2rem;
    margin-bottom: 10px;
}

.error {
    opacity: 0;
    background: var(--error);
    color: var(--error-text-color);
    border: 2px solid color-mix(in oklab, var(--error) 80%, white);
    transform: translateY(-6px);
}

.error.animate {
    animation: slideDown 0.3s ease-in-out forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
