@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
    --green: #294c3b;
    --bg: #f3f5ef;
    --line: #e1e6de;
    --muted: #718075
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    color: #243329;
    font: 14px 'DM Sans', sans-serif
}

header {
    height: 68px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5vw
}

.brand {
    font-weight: 700;
    letter-spacing: 2px;
    text-decoration: none;
    color: #243329
}

.brand small {
    display: block;
    font-size: 9px;
    color: var(--muted);
    margin-top: 3px
}

header button,
.panelhead button,
.editor button,
.login button {
    background: var(--green);
    color: white;
    border: 0;
    padding: 11px 16px;
    border-radius: 3px;
    cursor: pointer
}

main {
    max-width: 1250px;
    margin: 35px auto;
    padding: 0 24px
}

.card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 24px
}

.login {
    max-width: 420px;
    margin: 8vh auto
}

.login h1,
.welcome h1 {
    font: 600 34px 'Playfair Display';
    margin: 0 0 10px
}

.login p,
.hint {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6
}

.eyebrow {
    font-size: 10px;
    letter-spacing: 2px;
    color: #7a8d77;
    font-weight: 700
}

.login label,
.editor label {
    display: grid;
    gap: 7px;
    font-size: 12px;
    font-weight: 600;
    margin: 14px 0
}

.login input,
.editor input,
select {
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 3px;
    font: 13px 'DM Sans';
    width: 100%
}

.login button {
    width: 100%
}

.welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px
}

.welcome a {
    color: var(--green);
    font-weight: 600
}

.stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 13px;
    margin-bottom: 22px
}

.stat {
    background: white;
    border: 1px solid var(--line);
    padding: 18px;
    border-radius: 5px
}

.stat span {
    display: block;
    color: var(--muted);
    font-size: 11px
}

.stat strong {
    font-size: 27px;
    display: block;
    margin-top: 7px
}

.tabs {
    display: flex;
    gap: 8px;
    margin: 20px 0
}

.tab {
    padding: 11px 17px;
    border: 1px solid var(--line);
    background: white;
    cursor: pointer;
    border-radius: 3px
}

.tab.active {
    background: var(--green);
    color: white
}

.panelhead {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px
}

.panel h2 {
    font: 600 24px 'Playfair Display';
    margin: 0
}

.tablewrap {
    overflow-x: auto
}

table {
    border-collapse: collapse;
    width: 100%;
    min-width: 850px
}

th,
td {
    text-align: left;
    padding: 13px 10px;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    vertical-align: top
}

th {
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .7px
}

.muted {
    color: var(--muted);
    font-size: 11px
}

.status {
    display: inline-block;
    padding: 5px 8px;
    border-radius: 20px;
    background: #edf2e9;
    font-size: 10px
}

.actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap
}

.actions button {
    border: 1px solid var(--line);
    background: white;
    padding: 6px 8px;
    border-radius: 3px;
    font-size: 10px;
    cursor: pointer
}

.actions button:hover {
    border-color: var(--green)
}

.editor {
    border-top: 1px solid var(--line);
    margin-top: 22px;
    padding-top: 20px
}

.editor h3 {
    font: 600 21px 'Playfair Display'
}

.fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 18px
}

.fields .wide {
    grid-column: 1/-1
}

.fields label:has(input[type=checkbox]) {
    display: flex;
    align-items: center;
    gap: 8px
}

.fields input[type=checkbox] {
    width: auto
}

.secondary {
    background: #fff !important;
    color: var(--green) !important;
    border: 1px solid var(--green) !important;
    margin-left: 8px
}

.discount-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 10px 0
}

.discount-row input {
    max-width: 180px
}

.discount-row button {
    background: #fff;
    color: #9a3d3d;
    border: 1px solid var(--line);
    padding: 9px;
    cursor: pointer
}

@media(max-width:800px) {
    .stats {
        grid-template-columns: repeat(2, 1fr)
    }

    .welcome {
        align-items: flex-start;
        gap: 15px;
        flex-direction: column
    }

    .card {
        padding: 16px
    }

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

    .fields .wide {
        grid-column: auto
    }
}

.month-controls {
    display: flex;
    align-items: center;
    gap: 12px
}

.month-controls strong {
    min-width: 145px;
    text-align: center;
    text-transform: capitalize
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 10px 0 18px
}

.legend span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--muted)
}

.legend i {
    width: 11px;
    height: 11px;
    border-radius: 3px;
    display: inline-block
}

.legend .free {
    background: #edf2e9;
    border: 1px solid #d8e2d3
}

.legend .pending {
    background: #f9e6b8
}

.legend .confirmed {
    background: #cfe2d2
}

.legend .rented {
    background: #d8d4ed
}

.legend .blocked {
    background: #f0cccc
}

.calendar-wrap {
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 4px
}

.calendar-table {
    border-collapse: separate;
    border-spacing: 0;
    min-width: 980px;
    width: 100%
}

.calendar-table th,
.calendar-table td {
    padding: 0;
    text-align: center;
    border-right: 1px solid #edf0eb;
    border-bottom: 1px solid #edf0eb;
    min-width: 27px;
    height: 34px;
    font-size: 10px
}

.calendar-table th {
    position: sticky;
    top: 0;
    background: #f7f8f5;
    z-index: 1
}

.calendar-table .unit-col {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
    min-width: 165px;
    text-align: left;
    padding: 8px 10px;
    font-size: 11px
}

.calendar-table thead .unit-col {
    z-index: 3;
    background: #f7f8f5
}

.calendar-cell {
    cursor: default;
    background: #f6f8f4
}

.calendar-cell.pending {
    background: #f9e6b8;
    color: #76551a
}

.calendar-cell.confirmed {
    background: #cfe2d2;
    color: #245a35
}

.calendar-cell.in_progress {
    background: #d8d4ed;
    color: #40366e
}

.calendar-cell.blocked {
    background: #f0cccc;
    color: #813c3c
}

.calendar-cell.completed,
.calendar-cell.cancelled {
    background: #f6f8f4
}

.calendar-cell.today {
    outline: 2px solid var(--green);
    outline-offset: -2px
}

.calendar-head .hint {
    margin: 7px 0 0
}

.calendar-unit-name {
    font-weight: 700
}

.calendar-unit-sub {
    font-size: 9px;
    color: var(--muted);
    margin-top: 3px
}

@media(max-width:700px) {
    .calendar-head {
        align-items: flex-start;
        gap: 12px;
        flex-direction: column
    }

    .month-controls {
        width: 100%;
        justify-content: space-between
    }
}