:root {
    font-family: Inter, system-ui, sans-serif;
    color: #172033;
    background: #f4f7fb;
    line-height: 1.5;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

/* Header */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 4%;
    color: #ffffff;
    background: #10233f;
}

.brand {
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 800;
    text-decoration: none;
}

nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

nav a {
    color: #dce8ff;
    text-decoration: none;
}

nav a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Main content */

.container {
    max-width: 1200px;
    min-height: 75vh;
    margin: 2rem auto;
    padding: 0 1rem;
}

.auth {
    display: grid;
    min-height: 100vh;
    padding: 1rem;
    place-items: center;
}

.auth .card {
    width: min(430px, 100%);
}

.card {
    margin-bottom: 1.2rem;
    padding: 1.25rem;
    background: #ffffff;
    border: 1px solid #dfe6ef;
    border-radius: 12px;
    box-shadow: 0 5px 20px #14213d12;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Forms */

label {
    display: block;
    margin: 0.75rem 0;
    font-weight: 650;
}

input,
select,
textarea {
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.72rem;
    font: inherit;
    border: 1px solid #bdc7d5;
    border-radius: 7px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #1967d2;
    outline: 2px solid #1967d233;
}

button {
    padding: 0.7rem 1rem;
    color: #ffffff;
    font-weight: 700;
    background: #1967d2;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
}

button:hover {
    filter: brightness(0.92);
}

.secondary {
    background: #64748b;
}

.danger {
    background: #b42318;
}

.actions,
.inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.inline input,
.inline select {
    width: auto;
}

/* Alert messages */

.alert {
    margin-bottom: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 7px;
}

.success {
    color: #166534;
    background: #dcfce7;
}

.error {
    color: #991b1b;
    background: #fee2e2;
}

/* Tables */

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

table {
    width: 100%;
    background: #ffffff;
    border-collapse: collapse;
}

th,
td {
    padding: 0.75rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #e5eaf0;
}

small {
    display: block;
    color: #64748b;
}

/* Reservation status labels */

.status {
    display: inline-block;
    padding: 0.25rem 0.55rem;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 99px;
}

.status.pending {
    color: #92400e;
    background: #fef3c7;
}

.status.approved {
    color: #166534;
    background: #dcfce7;
}

.status.rejected,
.status.cancelled {
    color: #991b1b;
    background: #fee2e2;
}

/* Calendar color legend */

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin: 0 0 15px;
    padding: 12px 15px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 2px 8px #14213d0d;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #1f2937;
    font-size: 14px;
    font-weight: 600;
}

.legend-color {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 1px solid #374151;
    border-radius: 4px;
}

/* Orange: reservation is waiting for approval */

.pending-color {
    background-color: #f59e0b;
}

/* Green: reservation has been approved */

.approved-color {
    background-color: #22c55e;
}

/* Red: blocked lunch period */

.lunch-color {
    background-color: #ff0000;
}

/* Gray: vehicle or equipment is unavailable */

.unavailable-color {
    background-color: #6b7280;
}

/* FullCalendar adjustments */

.fc {
    font-size: 0.95rem;
}

.fc .fc-button {
    background: #1967d2;
    border-color: #1967d2;
}

.fc .fc-button:hover {
    background: #1558b0;
    border-color: #1558b0;
}

.fc .fc-button-primary:not(:disabled).fc-button-active {
    background: #10233f;
    border-color: #10233f;
}

.fc .fc-day-today {
    background: #fff8d6 !important;
}

/*
 * Background events marked with the lunch-block class.
 * Use classNames: ['lunch-block'] on the lunch event.
 */

.fc .lunch-block {
    background-color: #ff0000 !important;
    border-color: #ff0000 !important;
    opacity: 0.35;
}

/* Reservation dialog */

dialog {
    width: min(520px, 94%);
    border: 0;
    border-radius: 12px;
    box-shadow: 0 20px 60px #0005;
}

dialog::backdrop {
    background: #10182899;
}

/* Footer */

footer {
    padding: 2rem;
    color: #64748b;
    text-align: center;
}

/* Tablet and phone layout */

@media (max-width: 750px) {
    header,
    .toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    nav {
        font-size: 0.9rem;
    }

    .calendar-legend {
        gap: 10px 16px;
    }

    .fc .fc-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .fc .fc-toolbar-title {
        font-size: 1.25rem;
    }
}