:root {
  color-scheme: light;
  --ink: #1e302b;
  --muted: #4c6059;
  --paper: #f6f7f4;
  --white: #fff;
  --line: #dce4dd;
  --green: #184436;
  --green-dark: #123328;
  --mint: #e6f2eb;
  --gold: #f0c865;
  --amber: #714c02;
  --amber-light: #fff2ca;
  --red: #892d24;
  --red-light: #f9e9e6;
  --shadow: 0 16px 56px #1b3e3020;
  font-family: "Instrument Sans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .58; }
a { color: var(--green); }
:focus-visible { outline: 3px solid #b77819; outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.75rem, 4.5vw, 2.9rem); line-height: 1.08; letter-spacing: -.045em; }
h2 { font-size: 1.26rem; letter-spacing: -.02em; line-height: 1.2; }
h3 { font-size: 1rem; line-height: 1.3; }
small { font-size: .875rem; }
strong { font-weight: 670; }
.muted { color: var(--muted); }
.loading { padding: 4rem 1rem; text-align: center; color: var(--muted); }
.empty { padding: 1.1rem; color: var(--muted); }
.right { text-align: right; }
.wordbreak { overflow-wrap: anywhere; }
.stack { display: grid; gap: 1rem; }
.frame { width: min(1390px, calc(100% - 3rem)); margin-inline: auto; }
.brand { display: inline-flex; align-items: center; gap: .7rem; font-weight: 700; white-space: nowrap; }
.brand-mark { width: 1.65rem; height: 1.65rem; flex: 0 0 auto; border: 1px solid var(--gold); border-radius: 10px 10px 3px 3px; position: relative; }
.brand-mark::before { content: ""; position: absolute; left: 5px; right: 5px; bottom: 0; height: 14px; border: 1px solid var(--gold); border-radius: 50% 50% 0 0; border-bottom: 0; }
.brand-mark::after { content: ""; position: absolute; inset: auto 0 4px; border-top: 1px solid var(--gold); }
.masthead { color: #fff; background: var(--green-dark); }
.masthead .frame { display: flex; min-height: 64px; align-items: center; justify-content: space-between; gap: .8rem; }
.account { display: flex; align-items: center; gap: .8rem; }
.account-label { color: #e1eee6; font-size: .87rem; max-width: 22ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn { border: 1px solid transparent; border-radius: 8px; font-weight: 650; min-height: 41px; padding: .55rem .8rem; line-height: 1.2; display: inline-flex; align-items: center; justify-content: center; gap: .42rem; text-align: center; }
.btn.primary { background: var(--green); color: #fff; }
.btn.primary:hover { background: #26644f; }
.btn.secondary { background: #fff; border-color: #cdd9d0; color: var(--green-dark); }
.btn.secondary:hover { background: var(--mint); }
.btn.quiet { color: inherit; border-color: #ffffff48; background: transparent; min-height: 36px; font-size: .875rem; }
.btn.quiet:hover { background: #fff2; }
.btn.danger { color: var(--red); background: var(--red-light); }
.btn.danger:hover { background: #f6d8d2; }
.btn.small { font-size: .875rem; min-height: 34px; padding: .42rem .61rem; }
.btn.link { color: var(--green); background: transparent; text-decoration: underline; text-underline-offset: .17em; padding-left: 0; padding-right: 0; }
.herohead { padding: 2rem 0 1.45rem; display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.herohead p { margin-top: .48rem; }
.nav { display: flex; gap: .4rem; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { white-space: nowrap; margin-bottom: -1px; padding: .8rem .9rem; border: 0; border-bottom: 3px solid transparent; color: var(--muted); font-weight: 650; background: transparent; }
.tab[aria-current="page"] { border-bottom-color: var(--green); color: var(--green-dark); }
.tab:hover { background: #eaf0eb; }
.tab-count { margin-left: .35rem; background: var(--amber-light); color: var(--amber); min-width: 1.3rem; display: inline-block; border-radius: 20px; padding: .1rem .28rem; font-size: .78rem; }
.content { padding: 1.45rem 0 3rem; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.toolbar .subline { margin-top: .3rem; color: var(--muted); }
.month-nav { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.month-nav input { width: auto; min-width: 8rem; }
.month-nav button { min-width: 42px; }
.month-nav .direction { font-size: 1.25rem; padding-inline: .45rem; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.panel-head { padding: .95rem 1.1rem; border-bottom: 1px solid var(--line); }
.panel-body { padding: 1rem 1.1rem; }
.legend { display: flex; gap: .95rem; flex-wrap: wrap; color: var(--muted); font-size: .875rem; }
.legend-item { display: inline-flex; align-items: center; gap: .35rem; }
.legend-swatch { width: 12px; height: 12px; border-radius: 4px; background: #cee9da; }
.legend-swatch.checkout { background: #f7e6b9; }
.legend-swatch.weekend { background: #e9ece8; }
.calendar-scroll { overflow-x: auto; scrollbar-color: #a7b8aa transparent; }
.calendar { display: grid; min-width: max-content; grid-template-columns: 105px repeat(var(--days), minmax(43px, 1fr)); grid-auto-rows: minmax(52px, auto); align-items: stretch; width: 100%; }
.cal-name, .cal-date, .cal-box { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.cal-name { text-align: center; position: sticky; left: 0; z-index: 2; display: grid; place-content: center; background: #f4f7f4; padding: .55rem; }
.cal-name strong { display: block; font-size: 1.12rem; }
.cal-name small { font-size: .76rem; color: var(--muted); }
.cal-date { display: grid; place-content: center; text-align: center; background: #f4f7f4; }
.cal-date small { color: var(--muted); font-size: .72rem; }
.cal-date.today { color: var(--green); box-shadow: inset 0 3px var(--green); }
.cal-date.weekend, .cal-box.weekend { background: #f2f4f1; }
.cal-box { min-height: 77px; padding: 3px; display: grid; gap: 3px; align-content: start; }
.cal-chip { border: 0; border-radius: 4px; padding: .22rem .12rem; min-height: 24px; width: 100%; color: #174735; background: #d9eee2; font-size: .75rem; font-weight: 700; }
.cal-chip.checkout { color: #614813; background: #faecc6; }
.cal-chip:hover { filter: brightness(.94); }
.cal-info { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.villas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.villa-band { background: #f6d780; padding: .8rem 1.05rem; color: #362c16; display: flex; justify-content: space-between; gap: .6rem; align-items: center; }
.list-table { border-collapse: collapse; width: 100%; text-align: left; }
.list-table th, .list-table td { padding: .76rem .9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list-table tbody tr:last-child td { border-bottom: 0; }
.list-table thead th { background: #f4f7f4; color: var(--muted); font-size: .82rem; font-weight: 720; }
.list-table tbody th { text-align: left; }
.list-table .status { display: inline-flex; width: fit-content; }
.table-scroll { overflow-x: auto; }
.table-scroll .list-table { min-width: 660px; }
.cell-detail { margin-top: .26rem; display: block; color: var(--muted); line-height: 1.4; }
.booked-word { color: var(--green-dark); font-weight: 750; font-size: .89rem; letter-spacing: .035em; }
.status { font-size: .78rem; white-space: nowrap; line-height: 1.2; border-radius: 16px; padding: .27rem .53rem; background: #eaeeea; color: #3e524b; font-weight: 700; width: fit-content; }
.status.confirmed { background: var(--mint); color: #204e38; }
.status.pending { color: var(--amber); background: var(--amber-light); }
.status.rejected, .status.cancelled { color: var(--red); background: var(--red-light); }
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.card-list { display: grid; gap: .75rem; }
.ticket { padding: .9rem 1rem; display: grid; grid-template-columns: minmax(150px, .8fr) minmax(140px, 1fr) auto; gap: .85rem; align-items: center; }
.ticket .second { display: block; margin-top: .24rem; color: var(--muted); font-size: .875rem; }
.space-between { display: flex; align-items: center; justify-content: space-between; gap: .7rem; }
.availability-banner { display: flex; justify-content: space-between; gap: 1rem; align-items: center; background: var(--mint); border: 1px solid #d1e5d7; border-radius: 12px; padding: .8rem 1rem; }
.availability-banner p { margin-top: .26rem; font-size: .92rem; }
form { margin: 0; }
.form-layout { display: grid; gap: .95rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.field { display: grid; gap: .35rem; align-content: start; min-width: 0; }
.field > span { font-size: .875rem; font-weight: 650; }
.field.full { grid-column: 1 / -1; }
.field small { font-size: .82rem; line-height: 1.4; }
input:not([type=checkbox]), select, textarea { border: 1px solid #bfcec4; border-radius: 7px; padding: .51rem .63rem; background: #fff; color: var(--ink); width: 100%; min-width: 0; min-height: 41px; }
input[type=checkbox] { accent-color: var(--green); width: 1rem; height: 1rem; }
input[type=date], input[type=month] { padding-right: .35rem; }
input[readonly] { background: #f1f6f2; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-size: 5px 5px; background-position: right 14px center, right 9px center; background-repeat: no-repeat; padding-right: 28px; }
textarea { resize: vertical; }
.choice { display: flex; align-items: center; gap: .45rem; font-weight: 620; }
.date-preview { display: grid; gap: .36rem; border: 1px solid #d4e8db; background: #f1f8f3; border-radius: 9px; padding: .65rem .75rem; font-size: .9rem; line-height: 1.3; }
.date-preview .preview-item { display: grid; grid-template-columns: 6.2rem auto; gap: .4rem; }
.preview-item .muted { font-size: .86rem; }
.breakfast-wrapper { display: grid; gap: .65rem; }
.breakfast-row { display: grid; grid-template-columns: minmax(115px, 1fr) 105px auto; gap: .45rem; align-items: end; }
.form-error { color: var(--red); font-weight: 600; font-size: .9rem; line-height: 1.45; }
.form-error:empty { display: none; }
.availability-result { background: var(--mint); color: var(--green-dark); padding: .7rem .8rem; border-radius: 8px; font-size: .9rem; }
.availability-result.unavailable { background: var(--red-light); color: var(--red); }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: .55rem; }
.detail-grid { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .55rem .9rem; margin: 0; }
.detail-grid dt { color: var(--muted); }
.detail-grid dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
dialog { border: 1px solid var(--line); border-radius: 14px; padding: 0; width: min(600px, calc(100% - 2rem)); max-height: min(90vh, 890px); color: var(--ink); box-shadow: var(--shadow); }
dialog::backdrop { background: #0c221bb0; }
.modal-top { position: sticky; top: 0; z-index: 3; padding: .9rem 1rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; border-bottom: 1px solid var(--line); background: #fff; }
.modal-content { padding: 1rem; }
.close-button { background: transparent; color: var(--muted); border: 0; font-size: 1.5rem; line-height: 1; padding: .25rem .4rem; border-radius: 5px; }
.close-button:hover { background: var(--paper); }
#alert { position: fixed; z-index: 5; right: 1rem; bottom: 1rem; border-radius: 10px; color: #fff; background: var(--green-dark); box-shadow: var(--shadow); max-width: min(390px, calc(100% - 2rem)); padding: .85rem 1rem; }
#alert:empty { display: none; }
#alert.error { background: var(--red); }
.signin { display: grid; min-height: 100vh; min-height: 100svh; grid-template-columns: minmax(0, 1fr) minmax(410px, .9fr); }
.signin-aside { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 6rem; background: var(--green-dark); color: #fff; padding: clamp(1.3rem, 6.2vw, 5rem); }
.signin-aside::before, .signin-aside::after { content: ""; position: absolute; z-index: -1; height: 76%; width: 76%; right: -12%; bottom: -23%; border: 1px solid #a9bf9c54; border-radius: 50% 50% 0 0; transform: rotate(-18deg); }
.signin-aside::after { right: -23%; bottom: -27%; filter: brightness(.75); }
.signin-aside .brand { color: #f5ebd0; }
.signin-aside h1 { color: #f7edcc; font-family: "Instrument Serif", Georgia, serif; font-weight: 400; font-size: clamp(3.4rem, 8vw, 7.5rem); max-width: 10ch; line-height: .92; }
.signin-aside .location { color: #d7e4d7; }
.signin-body { display: grid; place-items: center; padding: 2rem; }
.signin-form { width: min(100%, 380px); }
.signin-form h2 { font-size: 2rem; }
.signin-form p { line-height: 1.45; }
@media (max-width: 880px) {
  .frame { width: calc(100% - 2rem); }
  .herohead { padding-top: 1.4rem; }
}
@media (max-width: 690px) {
  .villas { grid-template-columns: minmax(0, 1fr); }
  .signin { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .signin-aside { min-height: 190px; gap: 1rem; padding: 1.3rem 1rem; }
  .signin-aside h1 { font-size: 3.4rem; max-width: none; }
  .signin-body { padding: 1.5rem 1rem 3rem; align-items: start; }
  .masthead .account-label { display: none; }
  .cal-name { font-size: .85rem; }
  .calendar { grid-template-columns: 71px repeat(var(--days), minmax(40px, 1fr)); }
  .ticket { grid-template-columns: 1fr 1fr; padding: .8rem; }
  .ticket .controls { grid-column: 1 / -1; }
}
@media (max-width: 450px) {
  .frame { width: calc(100% - 1.25rem); }
  .herohead { align-items: flex-start; }
  .herohead .btn { flex-shrink: 0; }
  .herohead p { font-size: .875rem; }
  .nav .tab { padding-inline: .55rem; font-size: .9rem; }
  .panel-head { padding: .75rem; }
  .list-table th, .list-table td { padding: .66rem .6rem; }
  .modal-content { padding: .8rem; }
  .form-grid { gap: .65rem .45rem; }
  .breakfast-row { grid-template-columns: minmax(105px, 1fr) 68px auto; }
  .availability-banner { align-items: flex-start; }
  .availability-banner p { max-width: 27ch; }
}
.calendar.days-28 { --days: 28; }
.calendar.days-29 { --days: 29; }
.calendar.days-30 { --days: 30; }
.calendar.days-31 { --days: 31; }
.availability-result .btn { display: flex; margin-top: .3rem; min-height: 32px; }
.view-switch { display: flex; align-items: center; gap: .4rem; }
.view-button[aria-pressed=true] { color: #fff; border-color: var(--green); background: var(--green); }
.color-table .list-table thead th { background: #f3f5f1; }
.color-table .list-table tbody tr:nth-child(even) { background: #fafbf8; }
.simple-villa .villa-band { color: var(--ink); background: #fff; border-bottom: 1px solid var(--line); }
.simple-reservations { list-style: none; margin: 0; padding: 0; }
.simple-reservations li { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .4rem .75rem; padding: .76rem 1rem; border-bottom: 1px solid var(--line); }
.simple-reservations li:last-child { border-bottom: 0; }
.simple-reservations .btn.link { min-height: 30px; padding-block: .15rem; }
.simple-reservations .status { color: var(--ink); background: #eef1ee; }
@media (max-width: 450px) { .simple-reservations li { display: grid; justify-content: start; } }
.language-menu { width: auto; justify-self: end; min-height: 38px; padding: .42rem 1.9rem .42rem .65rem; border: 1px solid #b9c9bf; border-radius: 8px; background-color: #fff; color: var(--green-dark); font: inherit; cursor: pointer; }
@media (max-width: 680px) {
  .masthead .frame { flex-wrap: wrap; padding-block: .6rem; }
  .account { flex-wrap: wrap; gap: .4rem; }
}
