:root{font-family:"Segoe UI",system-ui,sans-serif;color:#172c32;background:#f3f6f5;--dark:#464646;--button-yellow:#f9c428;--button-hover:#ffda61;--muted:#55706c;--line:#dbe6e2}
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button,select{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible{outline:1px solid currentColor;outline-offset:2px}
header{background:var(--dark);color:#fff}.bar{max-width:1320px;margin:auto;min-height:72px;padding:20px 36px;display:flex;align-items:center;gap:44px}.brand{white-space:nowrap;display:flex;align-items:center;gap:12px;font-weight:750;font-size:21px;letter-spacing:-.5px}.brand img{display:block;width:172px;height:auto}nav{display:flex;align-self:stretch;gap:7px;overflow:auto}nav button{border:0;background:none;color:#c4d7d4;padding:0 14px;border-bottom:3px solid transparent;font-size:15px;white-space:nowrap}nav button[aria-current=page]{color:white;border-bottom-color:var(--button-yellow)}nav button:hover{background:#ffffff12}.demo{margin-left:auto;white-space:nowrap;color:#cfe0dc;font-size:13px}
main{max-width:1320px;margin:auto;padding:38px 36px 64px}.heading{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:24px}h1{margin:0 0 5px;font-size:clamp(30px,4vw,42px);letter-spacing:-1.7px;line-height:1.1}p{margin:0;color:var(--muted)}.primary,.quiet{border:1px solid var(--line);border-radius:8px;padding:10px 15px;background:white;color:#23443d;font-weight:650;white-space:nowrap}.primary,.quiet{background:var(--button-yellow);color:#262626;border-color:var(--button-yellow)}.primary:hover,.quiet:hover{background:var(--button-hover)}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:23px}.card{background:white;padding:17px 19px;border:1px solid var(--line);border-radius:10px}.card span{display:block;color:var(--muted);font-size:14px;font-weight:600}.card strong{display:block;font-size:28px;margin-top:5px;letter-spacing:-.8px}.panel{border:1px solid var(--line);border-radius:12px;background:white;overflow:hidden}.panel-head{padding:17px 19px;display:flex;align-items:center;justify-content:space-between;gap:13px;flex-wrap:wrap}h2{margin:0;font-size:19px;letter-spacing:-.35px}.filters{display:flex;gap:9px;flex-wrap:wrap}input,select{border:1px solid #cbdad5;background:#fff;border-radius:7px;padding:9px 10px;color:#213e39;min-width:0}.scroll{overflow:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:14px}th,td{padding:13px 17px;border-top:1px solid #e5eeeb;white-space:nowrap}th{background:#eef4f2;color:#425c56;font-size:13px;font-weight:700}td small{display:block;margin-top:4px;color:var(--muted);font-size:13px}.time{font-weight:750;font-variant-numeric:tabular-nums}.text-button{background:none;border:0;font:inherit;font-weight:700;color:var(--dark);text-decoration:underline;text-underline-offset:3px;padding:0}.badge{display:inline-block;border-radius:20px;padding:4px 9px;background:#e8eeec;color:#3e5650;font-weight:650;font-size:13px}.booked{background:#e0f0e9;color:#145841}.quoted{background:#fff0d9;color:#7a4510}.completed{background:#e3edf8;color:#2a4d78}.foot{border-top:1px solid var(--line);padding:12px 19px;font-size:13px;color:var(--muted)}dialog{border:1px solid var(--line);border-radius:13px;padding:24px;width:min(92vw,480px);color:inherit}dialog::backdrop{background:#0d262a88}dialog form{display:grid;gap:12px}dialog label{display:grid;gap:5px;font-size:14px;font-weight:600}.actions{display:flex;justify-content:end;gap:9px;margin-top:8px}.empty{padding:24px}.detail{display:grid;grid-template-columns:auto 1fr;gap:10px 18px}.detail dt{color:var(--muted)}.detail dd{margin:0}
@media(max-width:800px){.bar{padding:20px 18px;min-height:0;gap:8px 15px;flex-wrap:wrap}nav{order:3;width:100%}nav button{padding:12px 11px}main{padding:27px 18px}.cards{grid-template-columns:repeat(2,1fr)}}@media(max-width:420px){.heading{align-items:start;flex-direction:column}.filters input{width:100%}.filters{width:100%}}

[hidden]{display:none!important}

nav a {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    color: #c4d7d4;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    text-decoration: none;
}

nav button:disabled {
    opacity: .55;
    cursor: default;
}

nav button:disabled:hover {
    background: none;
}

.diary-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.diary-pagination a {
    margin-left: 12px;
}

nav a[aria-current="page"] {
    color: #fff;
    border-bottom-color: var(--button-yellow);
}

nav a:hover {
    background: #ffffff12;
}

.logout {
    margin-left: auto;
}

a.primary, a.quiet {
    display: inline-block;
    text-decoration: none;
}

.edit-form {
    max-width: 800px;
    padding: 22px;
}

.edit-form, .edit-form label {
    display: grid;
    gap: 10px;
}

.edit-form label {
    gap: 5px;
    font-weight: 600;
}

.edit-form textarea {
    font: inherit;
    border: 1px solid #cbdad5;
    border-radius: 7px;
    padding: 9px 10px;
    width: 100%;
}

.edit-form .checkbox {
    display: flex;
    align-items: center;
}

.form-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.form-error {
    color: #8b2525;
}

th a, .record-link {
    color: inherit;
}

[data-record-row] {
    cursor: pointer;
}

[data-record-row]:hover, [data-record-row]:focus-within {
    background: #fff3c4;
}

.list-heading,
.list-controls {
    flex-wrap: wrap;
}

.list-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-left: auto;
}

.list-controls .filters {
    justify-content: flex-end;
}

.list-panel {
    --list-bar: var(--dark);
}

.list-panel thead th,
.list-panel .scroll:last-child tbody tr:last-child,
.list-panel .foot {
    background: var(--list-bar);
    color: #fff;
}

.list-panel .scroll:last-child tbody tr[data-record-row]:last-child:hover,
.list-panel .scroll:last-child tbody tr[data-record-row]:last-child:focus-within {
    background: #fff3c4;
    color: #262626;
}

.list-panel .scroll:last-child tbody tr[data-record-row]:last-child small,
.list-panel .scroll:last-child tbody tr[data-record-row]:last-child .diary-company-secondary,
.list-panel .foot a {
    color: #e2f0e9;
}

.list-panel .list-title {
    background: #fff;
}

.diary-table {
    table-layout: fixed;
}

.diary-table th,
.diary-table td {
    white-space: normal;
    overflow-wrap: anywhere;
}

.diary-table th:first-child {
    width: 23%;
}

.diary-table th:last-child {
    width: 18%;
}

.diary-company {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.diary-company-secondary {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 640px) {
    .diary-table th,
    .diary-table td {
        padding: 10px 6px;
    }

    .diary-table .badge {
        padding: 3px 5px;
    }
}

.login-page {
    display: grid;
    place-items: center;
    min-height: calc(100vh - 72px);
    padding-block: 32px;
}

.login-card {
    width: 50%;
    min-width: 0;
}

.login-card .heading {
    justify-content: center;
    text-align: center;
}

@media (max-width: 640px) {
    .login-card {
        width: 100%;
    }
}

.bookings-board {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

#bookings-message:not(:empty) {
    margin-bottom: 12px;
}

.booking-pane > .panel-head {
    background: var(--dark);
    color: #fff;
}

.message-thread-grid,
.booking-days {
    padding: 12px;
}

.message-thread-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.message-thread {
    width: 100%;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow-wrap: anywhere;
}

.message-heading {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 8px;
}

.message-heading h3 {
    flex: 1 1 110px;
    min-width: 0;
    margin: 0;
    font-size: 1rem;
}

.message-channel,
.message-time {
    flex: none;
    font-size: 0.8125rem;
}

.message-time {
    color: var(--muted);
}

.message-subject {
    margin-top: 8px;
    color: inherit;
    font-weight: 650;
}

.message-body {
    margin-top: 6px;
    white-space: pre-wrap;
}

.message-thread .message-count {
    font-size: 0.875rem;
}

.booking-days {
    display: grid;
    gap: 16px;
}

.booking-day {
    scroll-margin-top: 12px;
}

.booking-day-title {
    margin: 0;
    padding: 10px 12px;
    border-radius: 7px;
    background: var(--dark);
    color: #fff;
    font-size: 17px;
}

.booking-van {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.booking-van h4 {
    margin: 0;
    padding: 6px 4px;
    color: #425c56;
}

.booking-card {
    --booking-tone: #edf2f0;
    --booking-accent: #647b73;
    display: block;
    min-width: 0;
    border: 1px solid var(--line);
    border-left: 4px solid var(--booking-accent);
    border-radius: 8px;
    background: white;
    color: inherit;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.booking-card:hover {
    box-shadow: 0 0 0 1px var(--booking-accent);
}

.booking-status-0, .booking-status-3 { --booking-tone: #dcefe2; --booking-accent: #367348; }
.booking-status-1 { --booking-tone: #fff1c9; --booking-accent: #946000; }
.booking-status-2, .booking-status-7 { --booking-tone: #f9e2df; --booking-accent: #a24d43; }
.booking-status-4, .booking-status-6 { --booking-tone: #e2edf9; --booking-accent: #446f9e; }

.booking-card-heading {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 6px 12px;
    padding: 8px 10px;
    background: var(--booking-tone);
}

.booking-status {
    font-size: 14px;
    font-weight: 600;
}

.booking-card-details {
    display: grid;
    gap: 4px;
    padding: 8px 10px;
}

.booking-card-details .booking-quote {
    font-weight: 700;
}

.booking-notes {
    display: -webkit-box;
    overflow: hidden;
    white-space: pre-wrap;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.list-panel .scroll:last-child tbody tr[data-record-row]:last-child:hover :is(small, .diary-company-secondary),
.list-panel .scroll:last-child tbody tr[data-record-row]:last-child:focus-within :is(small, .diary-company-secondary) {
    color: var(--dark);
}

html:has(.bookings-page),
body:has(.bookings-page) {
    overflow: hidden;
}

body:has(.bookings-page) {
    display: grid;
    height: 100dvh;
    grid-template-rows: auto minmax(0, 1fr);
}

.bookings-page {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding-bottom: 16px;
}

.bookings-board {
    flex: 1;
    min-height: 0;
    grid-template-rows: minmax(0, 1fr);
}

.bookings-board > .booking-pane {
    min-height: 0;
    max-height: 100%;
    overflow: auto;
    overscroll-behavior: contain;
}

.booking-calendar-column > .booking-calendar-pane {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.booking-thread-pane {
    position: relative;
    align-self: stretch;
    min-height: 0;
}

.booking-thread-pane > .booking-pane {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.booking-thread-pane .booking-pane-title {
    flex: none;
}

.booking-thread-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.message-thread {
    position: relative;
}

.message-thread:hover,
.message-thread:focus-within {
    background: #fff3c4;
}

.message-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.message-heading .message-time {
    grid-column: 1;
    grid-row: 2;
}

.message-heading .message-channel {
    grid-column: 2;
    grid-row: 1;
}

.thread-open {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    text-align: left;
    overflow-wrap: anywhere;
}

.thread-open::after {
    content: "";
    position: absolute;
    inset: 0;
}

.booking-card,
.booking-card-heading {
    cursor: pointer;
}

a.booking-card-heading {
    color: inherit;
    text-decoration: none;
}

.conversation-panel {
    position: absolute;
    z-index: 1;
    inset: 0;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    background: white;
}

.conversation-panel > .panel-head {
    height: 64px;
    flex-wrap: nowrap;
    align-items: center;
    padding: 8px 10px;
    background: var(--dark);
    color: white;
}

.conversation-panel h2 {
    min-width: 0;
    max-height: 100%;
    overflow: auto;
    overflow-wrap: anywhere;
}

.conversation-panel > .panel-head button {
    flex: none;
}

.conversation-messages {
    min-height: 0;
    padding: 10px;
    overflow: auto;
    overscroll-behavior: contain;
}

.conversation-message {
    max-width: 93%;
    margin-bottom: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #f0f1f1;
    overflow-wrap: anywhere;
}

.conversation-message.outgoing {
    margin-left: auto;
    background: #fff3c4;
}

.conversation-reply {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 8px;
    padding: 8px;
    border-top: 1px solid var(--line);
}

#conversation-status {
    grid-column: 1 / -1;
    font-size: 13px;
}

#conversation-status {
    padding: 0 10px;
}

.conversation-reply textarea {
    min-width: 0;
    resize: none;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 6px;
    font: inherit;
}

.conversation-reply button:disabled {
    opacity: .55;
    cursor: default;
}

.booking-card-meta {
    display: grid;
    justify-items: end;
    flex: 0 1 auto;
    min-width: 0;
    text-align: right;
}

.booking-phone {
    font-size: 0.875rem;
}

.conversation-message-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.booking-contact {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.booking-phones {
    display: grid;
    margin-left: auto;
    text-align: right;
}

.conversation-send-status {
    font-size: 0.75rem;
    display: block;
    text-align: right;
    color: #245a46;
    font-weight: 700;
}

.conversation-send-status.failed,
.conversation-send-error {
    color: #8b2525;
    font-size: 0.875rem;
}

.message-url {
    position: relative;
    z-index: 1;
    color: inherit;
    text-decoration: underline;
}

.message-thread.awaiting-reply {
    animation: awaiting-reply-background 1.6s step-end infinite;
}

@keyframes awaiting-reply-background {
    0% { background-color: #dcf5e1; }
    50% { background-color: transparent; }
}

@media (prefers-reduced-motion: reduce) {
    .message-thread.awaiting-reply {
        animation: none;
        background-color: #dcf5e1;
    }
}

.booking-calendar-column {
    position: relative;
    align-self: stretch;
    min-height: 0;
}

.booking-calendar-column > .booking-calendar-pane {
    min-height: 0;
    overscroll-behavior: contain;
}

.booking-day-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.booking-day-title h3 {
    margin: 0;
    font: inherit;
    font-weight: 700;
}

.day-add {
    padding: 2px 10px;
    font-size: 1.25rem;
}

.calendar-add-panel {
    grid-template-rows: auto minmax(0, 1fr);
}

.calendar-add-form {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 0;
}

.calendar-add-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    overflow: auto;
}

.calendar-booking-details {
    display: grid;
    flex: none;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 8px;
}

.calendar-description {
    flex: 1 0 6rem;
    grid-template-rows: auto minmax(0, 1fr);
}

.calendar-description textarea {
    min-height: 0;
    resize: none;
}

.calendar-add-fields label {
    grid-column: span 3;
    display: grid;
    gap: 3px;
    min-width: 0;
}

.calendar-add-fields .calendar-add-half {
    grid-column: span 6;
}

.calendar-add-fields .calendar-add-wide {
    grid-column: 1 / -1;
}

.calendar-add-fields textarea {
    min-width: 0;
    font: inherit;
}

.calendar-add-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
}

#calendar-add-error {
    color: #8b2525;
}


.calendar-time-picker {
    grid-column: span 9;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 4px;
    margin: 0;
    padding: 0;
    border: 0;
}

.calendar-time-picker legend {
    padding: 0 0 3px;
}

.calendar-price-field {
    align-self: start;
}

.calendar-date-field {
    display: grid;
    min-width: 0;
}

.calendar-date-field > * {
    grid-area: 1 / 1;
}

.calendar-date-field > input {
    width: 100%;
}

#calendar-date-display {
    display: grid;
    align-items: center;
    padding: 0 6px;
    border: 1px solid #cbdad5;
    border-radius: 7px;
    background: #fff;
    color: #213e39;
    font-size: .875rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    pointer-events: none;
}

#calendar-date-display:not([hidden]) + input:not(:focus) {
    opacity: 0;
}

.calendar-date-field:focus-within #calendar-date-display {
    visibility: hidden;
}

.booking-day-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.calendar-contact-fields {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, min(15ch, 28%))) minmax(0, 1fr);
    gap: 8px;
}

.calendar-contact-fields label {
    grid-column: auto;
}

.calendar-contact-fields input {
    width: 100%;
    padding-inline: 7px;
}


.booking-update-confirmation {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.booking-update-confirmation:not(:empty) {
    display: grid;
    place-items: center;
    width: min(240px, calc(100% - 24px));
    aspect-ratio: 1;
    padding: 20px;
    border-radius: 18px;
    background: rgba(70, 70, 70, 0.88);
    color: #fff;
    font-size: 1.85rem;
    font-weight: 700;
    text-align: center;
}


.booking-pane-title {
    box-sizing: border-box;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    overflow: hidden;
    white-space: nowrap;
    position: sticky;
    z-index: 2;
    top: 0;
    margin: 0;
    padding: 10px 14px;
    background: var(--dark);
    color: #fff;
}

#thread-list,
#calendar-list {
    isolation: isolate;
}

.booking-calendar-pane .booking-pane-title {
    flex: none;
}

.booking-calendar-pane .booking-days {
    min-height: 0;
    overflow-y: scroll;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    align-content: start;
}

.booking-calendar-pane {
    position: relative;
}

#bookings-total {
    align-self: stretch;
    margin-block: -10px;
    background: transparent;
    color: inherit;
    border: 0;
    padding: 0;
    font: inherit;
    cursor: help;
}

.booking-stats {
    position: absolute;
    z-index: 4;
    top: 48px;
    right: 8px;
    width: min(320px, calc(100% - 16px));
    max-height: calc(100% - 54px);
    overflow: auto;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 16px #0003;
}

.booking-stats :is(h3, h4, p, ol) {
    margin: 0 0 6px;
}

.booking-stats ol {
    padding-left: 24px;
}

.booking-header-actions {
    display: flex;
    align-items: stretch;
    align-self: stretch;
    margin-block: -10px;
    gap: 10px;
}

.booking-header-actions #bookings-total {
    margin-block: 0;
}

#booking-search-toggle {
    align-self: center;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
}

.booking-search {
    display: grid;
    gap: 8px;
    font-size: 14px;
}

.booking-search label {
    display: grid;
    gap: 3px;
}

.booking-search-icon {
    position: relative;
    display: block;
    width: 12px;
    height: 12px;
    margin: 0 5px 4px 0;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.booking-search-icon::after {
    position: absolute;
    bottom: -4px;
    right: -5px;
    width: 7px;
    height: 2px;
    background: currentColor;
    transform: rotate(45deg);
    content: "";
}

#booking-search-toggle.filters-active {
    color: #262626;
    background: var(--button-yellow);
    border-radius: 4px;
}

.calendar-add-fields label,
.calendar-time-picker legend {
    font-size: 0.875rem;
    line-height: 1.15;
    white-space: nowrap;
}

.calendar-add-fields label {
    grid-template-columns: minmax(0, 1fr);
}

.calendar-add-fields :is(input, select, textarea) {
    font-size: 1rem;
    line-height: normal;
}

.booking-template-actions {
    display: flex;
    justify-content: flex-end;
}

.booking-template-trigger {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid #e4e4e4;
    border-radius: 8px;
    background: #e4e4e4;
    color: #292929;
    font-size: 1.35rem;
    line-height: 1;
}

.booking-template-trigger:hover,
.booking-template-trigger[aria-expanded="true"] {
    background: #d5d5d5;
    border-color: #d5d5d5;
}

.booking-template-trigger:disabled {
    cursor: default;
    opacity: .55;
}

.booking-template-menu {
    position: fixed;
    z-index: 1;
    inset: auto;
    margin: 0;
    padding: 5px;
    overflow-y: auto;
    border: 1px solid #cfd9d4;
    border-radius: 9px;
    background: #fff;
    color: #292929;
    box-shadow: 0 7px 24px #172e2633;
}

.booking-template-menu .booking-template-title {
    margin: 0;
    padding: 6px 9px;
    border-bottom: 1px solid #e3e8e5;
    font-size: .8125rem;
}

.booking-template-option {
    display: block;
    width: 100%;
    min-height: 40px;
    padding: 8px 9px;
    border: 0;
    border-radius: 5px;
    background: #fff;
    color: inherit;
    overflow-wrap: anywhere;
    text-align: left;
    font-size: .875rem;
}

.booking-template-option:hover,
.booking-template-option:focus-visible {
    background: #fff3c4;
}

.calendar-add-form :is(input, select, textarea):focus,
.diary-edit-form :is(input, select, textarea):focus {
    outline: 1px solid var(--dark);
    outline-offset: 0;
}

.booking-invoice-link.quiet {
    margin-right: auto;
    background: #e4e4e4;
    border-color: #e4e4e4;
    color: #292929;
    text-decoration: none;
}

.booking-invoice-link.quiet:hover {
    background: #d5d5d5;
    border-color: #d5d5d5;
}

.booking-invoice-link:focus-visible {
    outline: 1px solid var(--dark);
    outline-offset: 2px;
}

.calendar-address-fields {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) min(13ch, 24%) max(0px, calc((100% - 12ch - 24px) / 3.6 - 1ch)) 10ch;
    gap: 8px;
}

.calendar-add-fields .calendar-address-fields label {
    grid-column: auto;
}

.calendar-address-fields input {
    width: 100%;
}

.sales-report {
    width: 100%;
    max-width: none;
    padding: clamp(12px, 2vw, 32px);
}

.sales-report .panel-head,
.sales-report thead th {
    background: var(--dark);
    color: #fff;
}

.sales-report h1 {
    margin: 0;
    font-size: 1.25rem;
    letter-spacing: 0;
}

.sales-report th,
.sales-report td {
    padding: 10px clamp(6px, .8vw, 14px);
    border-top: 1px solid #fff;
    border-right: 1px solid #fff;
    font-variant-numeric: tabular-nums;
}

.sales-report td {
    background: #f0f0f0;
    text-align: right;
}

.sales-report tbody th {
    background: #e4e4e4;
    color: #292929;
}

.sales-report .sales-year-total > * {
    background: #d7d7d7;
    font-weight: 700;
}

.sales-report thead th:not(:first-child) {
    text-align: right;
}

.sales-share {
    display: inline-block;
    padding: 3px 5px;
    margin-right: 2px;
    border-radius: 3px;
    background: #3d7227;
    color: #fff;
    font-weight: 700;
}

@media (max-width: 800px) {
    body:has(.bookings-page) {
        grid-template-columns: minmax(0, 1fr);
    }

    .bar,
    .bar nav,
    .bookings-page,
    .bookings-board,
    .booking-thread-pane,
    .booking-calendar-column {
        min-width: 0;
        max-width: 100%;
    }

    .bar nav {
        flex: 0 0 100%;
    }

    .booking-days {
        grid-template-columns: minmax(0, 1fr);
    }

    .booking-day-title h3 {
        min-width: 0;
        overflow-wrap: anywhere;
    }
}

.bookings-mobile-switch {
    display: none;
}

@media (max-width: 760px) {
    .bookings-page {
        padding: 12px 12px 12px;
    }

    .bookings-page > .heading {
        display: none;
    }

    .bookings-mobile-switch {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        flex: none;
        gap: 5px;
        margin-bottom: 12px;
        padding: 4px;
        border-radius: 11px;
        background: #e5e8e7;
    }

    .bookings-mobile-switch button {
        min-height: 44px;
        border: 0;
        border-radius: 8px;
        background: transparent;
        color: #292929;
        font-weight: 700;
    }

    .bookings-mobile-switch button[aria-pressed="true"] {
        background: var(--button-yellow);
    }

    .bookings-board {
        grid-template-columns: minmax(0, 1fr);
    }

    .bookings-board[data-mobile-pane="threads"] > .booking-calendar-column,
    .bookings-board[data-mobile-pane="calendar"] > .booking-thread-pane {
        display: none;
    }
}

.calendar-name-fields {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 2fr);
    gap: 8px;
}

.calendar-add-fields .calendar-name-fields label {
    grid-column: auto;
}

.calendar-name-fields input {
    width: 100%;
}

.calendar-editing :is(.calendar-name-fields, .calendar-contact-fields, .calendar-address-fields):has(input[data-filled]) {
    display: flex;
    align-items: end;
}

.calendar-editing :is(.calendar-name-fields, .calendar-contact-fields, .calendar-address-fields):has(input[data-filled]) > label {
    flex: 0 1 8ch;
    min-width: 0;
}

.calendar-editing :is(.calendar-name-fields, .calendar-contact-fields, .calendar-address-fields) > label:has(input[data-filled]) {
    flex: 1 1 9ch;
}

.calendar-editing .calendar-address-fields:has(input[data-filled]) > label:has([name="address_1"][data-filled]),
.calendar-editing .calendar-contact-fields:has(input[data-filled]) > label:has([name="email"][data-filled]),
.calendar-editing .calendar-name-fields:has(input[data-filled]) > label:has([name="company"][data-filled]) {
    flex-grow: 2;
}

.calendar-editing .calendar-address-fields:has(input[data-filled]) > label:has([name="postcode"][data-filled]) {
    flex: 0 1 10ch;
}

.calendar-editing .calendar-address-fields:not(:has(input[data-filled]:not([name="postcode"]))) {
    display: grid;
}

@media (max-width: 760px) {
    .calendar-add-fields :is(input, select, textarea) {
        font-size: .9375rem;
    }
}
