* {
    box-sizing: border-box;
}


body {
    margin: 0;

    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: #f5f6f8;

    color: #20242a;
}


a {
    color: inherit;
}


nav {
    display: flex;

    gap: 16px;

    align-items: center;

    justify-content: space-between;

    padding: 12px 18px;

    background: #222831;

    color: #fff;
}


nav .links {
    display: flex;

    gap: 14px;

    align-items: center;

    flex-wrap: wrap;
}


.container {
    max-width: 1500px;

    margin: 24px auto;

    padding: 0 16px;
}


.card {
    background: #fff;

    border: 1px solid #dfe3e8;

    border-radius: 10px;

    padding: 18px;

    margin-bottom: 18px;
}


.notice {
    padding: 10px 12px;

    border-radius: 7px;

    background: #eef4ff;

    margin-bottom: 12px;
}


.error {
    background: #fff0f0;

    color: #8a1111;
}


.success {
    background: #edf9ef;

    color: #176b27;
}


.calendar-wrap {
    overflow-x: auto;
}


/*
 * max-content gør at kolonnerne
 * kan vokse efter event-teksten.
 */

.calendar {
    display: grid;

    grid-template-columns:
        repeat(7, max-content);

    width: max-content;

    min-width: 100%;

    gap: 1px;

    background: #cdd2d8;
}


.day-head,
.day-cell {
    background: #fff;

    min-width: 74px;
}


.day-head {
    padding: 9px 10px;

    font-weight: 700;

    text-align: center;
}


.day-cell {
    padding: 8px;

    vertical-align: top;
}


.day-cell.empty {
    min-width: 36px;
}


.event {
    display: block;

    width: max-content;

    min-width: 150px;

    max-width: 420px;

    padding: 9px 11px;

    margin-bottom: 7px;

    border-radius: 7px;

    text-decoration: none;

    color: #111;

    border: 1px solid
        rgba(0, 0, 0, .12);

    white-space: normal;
}


.event.free {
    background: #9be5a4;
}


.event.reserved {
    background: #f6bd73;
}


.event.confirmed {
    background: #ef7777;

    color: #fff;
}


.event.rejected {
    display: none;
}


.event .time {
    font-weight: 700;

    white-space: nowrap;
}


.event .title {
    font-weight: 600;

    overflow-wrap: anywhere;
}


.week-controls {
    display: flex;

    gap: 10px;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 14px;

    flex-wrap: wrap;
}


.btn,
button {
    border: 0;

    border-radius: 6px;

    padding: 9px 13px;

    cursor: pointer;

    background: #263238;

    color: #fff;

    text-decoration: none;

    display: inline-block;
}


.btn.secondary {
    background: #68737d;
}


.btn.danger {
    background: #a82828;
}


.btn.ok {
    background: #2c7b39;
}


form.inline {
    display: inline;
}


input,
select,
textarea {
    width: 100%;

    padding: 9px 10px;

    border: 1px solid #bcc4cc;

    border-radius: 6px;

    font: inherit;
}


textarea {
    min-height: 90px;

    resize: vertical;
}


.form-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(220px, 1fr)
        );

    gap: 12px;
}


table {
    width: 100%;

    border-collapse: collapse;
}


th,
td {
    padding: 8px;

    border-bottom:
        1px solid #e1e4e7;

    text-align: left;

    vertical-align: top;
}


.small {
    font-size: .9rem;

    color: #5d6670;
}


.badge {
    padding: 3px 7px;

    border-radius: 99px;

    font-size: .8rem;
}


.badge.reserved {
    background: #f6bd73;
}


.badge.confirmed {
    background: #ef7777;

    color: #fff;
}


.badge.rejected {
    background: #ddd;
}


.actions {
    display: flex;

    gap: 7px;

    flex-wrap: wrap;
}


@media (max-width: 700px) {

    .event {
        min-width: 130px;

        max-width: 300px;
    }


    .day-head,
    .day-cell {
        min-width: 64px;
    }
}