:root {
  color-scheme: light;
  font: 15px/1.55 "Inter", ui-sans-serif, system-ui, sans-serif;
  color: #18202a;
  background: #f5f6f8;
  --ink: #18202a;
  --muted: #526073;
  --line: #dfe3e8;
  --surface: #fff;
  --nav: #171d26;
  --mint: #cce1db;
  --green: #214a42;
  --radius: 10px;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 3.7vw, 2.5rem); letter-spacing: -.042em; line-height: 1.12; }
h2 { font-size: 1.06rem; letter-spacing: -.015em; }
a { color: var(--green); text-underline-offset: .21em; }
:focus-visible { outline: 3px solid #248160; outline-offset: 3px; }
.skip { position: absolute; z-index: 5; top: 4px; left: 4px; transform: translateY(-150%); background: #fff; padding: .5rem; }
.skip:focus { transform: none; }
.masthead {
  grid-area: header;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .7rem;
  background: var(--nav);
  color: #fff;
  padding: .85rem clamp(.9rem, 3vw, 2rem);
  min-height: 67px;
  border-bottom: 1px solid #304358;
}
.brand {
  display: flex;
  align-items: center;
  gap: .28em;
  color: #fff;
  text-decoration: none;
  letter-spacing: -.04em;
  white-space: nowrap;
  font-size: 1.23rem;
}
.brand strong { color: var(--mint); }
.mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-right: .38rem;
  border-radius: .55rem;
  background: var(--mint);
  color: #102e24;
  font-weight: 900;
  line-height: 1;
}
.tools, .actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; }
.inline { margin: 0; }
.quiet {
  color: #e7eff6;
  background: transparent;
  border: 1px solid #536577;
  border-radius: .5rem;
  min-height: 38px;
  padding: .35rem .6rem;
  font-size: .82rem;
}
.quiet:hover { background: #304358; }
.workspace {
  min-height: 100vh;
  display: grid;
  grid-template: "header header" auto "sidebar main" 1fr / 235px minmax(0, 1fr);
}
.sidebar {
  grid-area: sidebar;
  background: var(--nav);
  color: #c4d2de;
  padding: 1.25rem .85rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.sidebar a { border-radius: .45rem; padding: .62rem .75rem; text-decoration: none; color: #dfebf5; font-size: .92rem; }
.sidebar a:hover { background: #252f3a; }
.sidebar a[aria-current] { background: #293c3b; color: #e8fbf4; font-weight: 700; }
.version { margin: auto .75rem .25rem; color: #b6c7d8; font-size: .8rem; }
.main { grid-area: main; min-width: 0; width: 100%; max-width: 1450px; padding: clamp(1rem, 3vw, 2.6rem); }
.entry .main { max-width: 45rem; margin: 1rem auto; }
.heading, .calendar-heading { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.eyebrow { margin-bottom: .35rem; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .86rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-bottom: 1.25rem; overflow: hidden; }
.metric { padding: 1rem 1.2rem; border-inline-end: 1px solid var(--line); text-decoration: none; display: flex; flex-direction: column; gap: .55rem; }
.metric:last-child { border-inline-end: 0; }
.metric:hover { background: #f2f6f5; }
.metric span { font-size: .83rem; color: var(--muted); }
.metric strong { color: var(--ink); font-weight: 650; letter-spacing: -.04em; font-size: 2.15rem; line-height: 1; font-variant-numeric: tabular-nums; }
.property-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: .8rem; }
.property, .form, .filters { padding: clamp(.9rem, 2vw, 1.45rem); }
.property p { color: var(--muted); margin: .4rem 0 .75rem; overflow-wrap: anywhere; }
.property h2 { overflow-wrap: anywhere; }
.form { display: grid; gap: .9rem; max-width: 660px; }
.form h2 { padding-bottom: .35rem; border-bottom: 1px solid var(--line); }
.form small { color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.filters { display: flex; align-items: end; flex-wrap: wrap; gap: .75rem; margin-bottom: .9rem; }
.field { display: grid; gap: .28rem; color: var(--ink); min-width: 0; font-size: .87rem; font-weight: 650; }
.field :is(input, select, textarea) {
  width: 100%;
  min-height: 2.6rem;
  padding: .45rem .6rem;
  background: #fff;
  color: var(--ink);
  border: 1px solid #a9bbca;
  border-radius: .5rem;
  font-weight: 400;
  font-size: 1rem;
}
textarea { resize: vertical; }
.button {
  display: inline-flex;
  align-items: center;
  min-height: 2.6rem;
  border: 1px solid transparent;
  border-radius: .55rem;
  padding: .48rem .85rem;
  background: var(--green);
  color: #fff;
  font-size: .88rem;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.3;
}
.button:hover { background: #0f5540; }
.button.secondary { background: #e5f5ee; color: #0b533d; border-color: #acd3c3; }
.button.secondary:hover { background: #d3ebdf; }
.text-link { font-size: .88rem; font-weight: 650; padding: .35rem .1rem; }
.notice, .empty { padding: .85rem 1rem; }
.notice { background: #e7f1f7; border-radius: .55rem; margin-bottom: 1rem; overflow-wrap: anywhere; }
.notice.error { background: #ffebeb; color: #842626; }
.notice.success { background: #def5e9; color: #15543b; }
.table-panel { overflow: hidden; }
.table-panel + .table-panel, .property + .table-panel { margin-top: .8rem; }
.table-panel > h2, .calendar-heading, .legend { padding: .85rem 1rem; }
.calendar-heading { margin: 0; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; font-size: .88rem; }
table :is(th, td) { padding: .7rem .8rem; border-top: 1px solid var(--line); }
table thead { background: #f0f5f7; }
table td { white-space: nowrap; }
table th[scope="row"] { overflow-wrap: anywhere; min-width: 8rem; }
.badge { display: inline-block; padding: .16rem .52rem; border-radius: .8rem; background: #edf1f5; color: #394c60; font-size: .75rem; font-weight: 700; }
.confirmed { background: #d9f3e4; color: #175440; }
.pending { background: #fff0cd; color: #71420c; }
.calendar { min-width: max-content; text-align: center; }
.calendar td { padding: .18rem; }
.calendar thead th { min-width: 2.5rem; padding: .35rem .25rem; }
.calendar thead th small { display: block; font-weight: 400; }
.calendar tr > :first-child { position: sticky; left: 0; background: #f3f7f9; padding: .5rem .7rem; max-width: 11rem; text-align: left; border-right: 1px solid var(--line); }
.calendar .today { background: #c0ecd4; }
.day { display: grid; place-items: center; min-height: 2.15rem; border-radius: .32rem; text-decoration: none; }
.day.open { color: #60768d; }
.day.open:hover { background: #e9f2f6; }
.day:focus-visible { outline-offset: -2px; }
.legend { display: flex; gap: .45rem; flex-wrap: wrap; }
.pagination { margin-top: .7rem; }
@media (max-width: 850px) {
  .workspace { grid-template: "header" auto "sidebar" auto "main" 1fr / minmax(0, 1fr); }
  .sidebar { flex-direction: row; padding: .55rem .7rem; overflow-x: auto; white-space: nowrap; }
  .sidebar a { padding: .45rem .6rem; }
  .version { display: none; }
}
@media (max-width: 560px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .brand { font-size: 1.06rem; }
  .mark { width: 1.65rem; height: 1.65rem; }
  .tools { gap: .35rem; }
  .calendar tr > :first-child { max-width: 8rem; }
}

.repull-section { margin-top: 1rem; }
.reservation-fields { display: grid; gap: .9rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.day.remote-state { color: #43566b; background: #e8edf3; }
.day.overlap { color: #842626; background: #ffebeb; }
.calendar .day + .day { margin-top: .2rem; }

.ops-columns, .photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 1rem; align-items: start; }
.audit-list { list-style: none; padding: 0; margin: 1rem 0 0; }
.audit-list li { border-top: 1px solid #e0e7ed; padding: .55rem 0; display: flex; gap: .75rem; justify-content: space-between; }
.audit-ok { color: #1e684f; }
.audit-missing { color: #754311; }
.photo-grid img { display: block; width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: .5rem; }
.photo-tools { display: grid; gap: .65rem; margin-top: .7rem; }
.photo-tools details label { display: block; margin: .5rem 0; }
.cleaning-card { margin-top: 1rem; }
.op-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.message-list { display: grid; gap: .65rem; max-width: 850px; }
.message-list .outbound { background: #eef7f2; }

.nav-group { display: flex; flex-direction: column; gap: .15rem; margin-bottom: .85rem; }
.nav-label { color: #a8b4c3; padding: .35rem .75rem; font-size: .72rem; font-weight: 650; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(13rem, .31fr); align-items: start; gap: 1rem; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: .55rem; padding: 1rem; }
.section-title a { font-size: .84rem; }
.dashboard-work strong { display: block; margin-top: .5rem; font-size: 2rem; font-weight: 650; line-height: 1.15; font-variant-numeric: tabular-nums; }
@media (max-width: 1050px) { .dashboard-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 850px) {
  .nav-group { flex-direction: row; margin: 0; }
  .nav-label { display: none; }
}
@media (max-width: 560px) {
  .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .metric:nth-child(2) { border-inline-end: 0; }
}

.calendar-heading { gap: 1rem; min-height: 75px; }
.calendar-heading h2 { font-size: 1.2rem; }
.calendar-heading p { margin-top: .1rem; font-size: .86rem; color: var(--muted); }
.calendar-filters { margin-bottom: 1.15rem; }
.calendar-month { table-layout: fixed; }
.calendar-month th { padding: .5rem; color: var(--muted); }
.calendar-month td { border-inline-end: 1px solid var(--line); padding: .45rem; height: 6rem; vertical-align: top; white-space: normal; }
.calendar-month td:last-child { border-inline-end: 0; }
.calendar-month time { display: inline-grid; place-items: center; width: 1.65rem; height: 1.65rem; margin-bottom: .25rem; font-weight: 650; }
.calendar-month time[aria-current] { color: #fff; background: var(--green); border-radius: 50%; }
.calendar-month .out-of-month { background: #f1f3f5; }
.is-weekend { background: #f8f9fb; }
.is-today { background: #edf5f1; }
.month-night, .calendar-timeline td { min-width: 0; }
.night-booking, .night-state, .night-free, .calendar-conflict { display: block; min-width: 0; padding: .22rem .4rem; border-radius: .3rem; overflow: hidden; }
.night-booking { font-weight: 650; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; margin-bottom: .15rem; }
.night-booking:hover { text-decoration: underline; }
.night-state { color: var(--muted); background: #eef0f3; font-size: .72rem; }
.night-state.repull_unknown { background: transparent; text-decoration: underline dotted; }
.night-free { width: fit-content; color: var(--green); text-decoration: none; min-width: 1.7rem; text-align: center; }
.night-free:hover, .calendar-free-label { background: #e6efeb; color: #285143; }
.calendar-conflict { background: #ffebeb; color: #842626; font-size: .77rem; }
.calendar-timeline { table-layout: fixed; width: 96rem; min-width: 100%; text-align: center; }
.calendar-timeline.is-fortnight { width: 49rem; }
.calendar-timeline th, .calendar-timeline td { padding: .35rem .25rem; vertical-align: middle; }
.calendar-timeline thead th { width: 2.35rem; }
.calendar-timeline thead small { display: block; color: var(--muted); font-weight: 500; }
.calendar-timeline thead .is-today { color: var(--green); box-shadow: inset 0 -2px var(--green); }
.calendar-timeline tr > :first-child { position: sticky; z-index: 1; left: 0; width: 10.5rem; padding-inline: .7rem; background: #f6f8fa; border-inline-end: 1px solid var(--line); text-align: start; white-space: normal; }
.calendar-timeline td { border-inline-end: 1px solid #edf0f3; min-height: 2.75rem; }
.calendar-timeline .night-free { margin: auto; }
.calendar-timeline .night-booking { text-align: start; }
.calendar-legend { border-top: 1px solid var(--line); }
@media (max-width: 600px) {
  .calendar-month td { padding: .25rem; height: 4.25rem; }
  .calendar-month :is(.night-booking,.night-state,.calendar-conflict) { font-size: .68rem; padding-inline: .2rem; }
}

.history-overview { border-block: 1px solid var(--line); padding-block: .8rem; margin-block: 1rem; }
.history-overview > p { margin: .2rem 0; color: var(--muted); }
.history-months { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .65rem; }
.history-months a { display: flex; align-items: center; gap: .55rem; padding: .3rem .55rem; background: #f1f5f8; border-radius: .3rem; }
.history-months strong { font-variant-numeric: tabular-nums; }
.booking-summary caption { text-align: start; padding: .7rem .85rem; color: var(--muted); font-size: .83rem; }
.booking-summary td, .booking-facts dd { font-variant-numeric: tabular-nums; }
.booking-hero { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1rem; }
.booking-hero h2 { margin: .35rem 0 .15rem; font-size: 1.5rem; }
.booking-hero p { color: var(--muted); }
.booking-workspace { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.booking-facts { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); margin: .65rem 0; font-size: .9rem; }
.booking-facts dt, .booking-facts dd { border-bottom: 1px solid var(--line); padding-block: .42rem; overflow-wrap: anywhere; }
.booking-facts dt { color: var(--muted); padding-inline-end: .5rem; }
.booking-facts dd { margin: 0; font-weight: 600; }
.day-calendar_available { background: #e9f6f1; }
.day-calendar_local { background: #edf3fb; color: #254263; }
.day-repull_closed { background: #eef0f4; }
.day-repull_unknown { background: repeating-linear-gradient(135deg, #faf8f2, #faf8f2 6px, #f2efe6 6px, #f2efe6 8px); }
.day-calendar_past { background: #f8f9fa; }
.day-calendar_past .night-state { background: transparent; }
.calendar-timeline td.has-booking { padding-inline: .18rem; }
.calendar-timeline td, .calendar-timeline th { height: 3.25rem; }
.calendar-month .night-state, .calendar-month .night-free { display: block; font-size: .75rem; text-align: start; width: auto; min-width: 0; }
.calendar-month .night-booking.continues-stay { color: transparent; }
.calendar-month .night-booking.continues-stay:focus { color: inherit; }
.calendar-note { padding: 0 .9rem .85rem; font-size: .8rem; color: var(--muted); }
.calendar-counts { display: flex; gap: .35rem 1.15rem; flex-wrap: wrap; border-top: 1px solid var(--line); margin: 0; padding: .6rem .9rem; }
.calendar-counts > div { display: flex; gap: .45rem; align-items: baseline; }
.calendar-counts dt { color: var(--muted); font-size: .8rem; }
.calendar-counts dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 680px) {
  .booking-workspace { grid-template-columns: 1fr; }
  .calendar-month .night-state, .calendar-month .night-free { padding-inline: .15rem; font-size: .65rem; overflow-wrap: anywhere; }
}
