/* Palma Bay Hotel - lagoon palette, Young Serif + Figtree */
:root {
  --ink: #0d2b36;
  --lagoon: #0a6c7a;
  --lagoon-dark: #07505b;
  --lagoon-soft: #d9eef0;
  --mist: #eef4f5;
  --paper: #ffffff;
  --line: #d3e0e3;
  --muted: #566f77;
  --brass: #c8922e;
  --brass-soft: #f8ecd3;
  --ok: #2b7a4b;
  --ok-soft: #dcf0e4;
  --bad: #b3402f;
  --bad-soft: #f8e0dc;
  --radius: 10px;
  --font-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Young Serif', Georgia, 'Times New Roman', serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--mist); color: var(--ink); font: 400 1rem/1.55 var(--font-body); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--lagoon-dark); }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
.container { width: min(1120px, 100% - 2rem); margin-inline: auto; }
main.container { padding-block: 2rem 3rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
.grid { display: grid; gap: 1rem; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

/* Header */
.site-header { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 20; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: .7rem; }
.brand { font-family: var(--font-display); font-size: 1.35rem; color: #fff; text-decoration: none; }
.topnav { display: flex; gap: .25rem; flex-wrap: wrap; align-items: center; }
.topnav a, .topnav button { color: #d5e6ea; text-decoration: none; padding: .4rem .75rem; border-radius: 6px; font: inherit; background: none; border: 0; cursor: pointer; }
.topnav a:hover, .topnav button:hover { background: rgba(255,255,255,.1); color: #fff; }
.topnav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--brass); border-radius: 0; }
.topnav .cta { background: var(--brass); color: var(--ink); font-weight: 600; }
.topnav .cta:hover { background: #d9a542; color: var(--ink); }
.subnav { background: var(--lagoon-dark); }
.subnav .container { display: flex; gap: .25rem; overflow-x: auto; padding-block: .3rem; align-items: center; }
.subnav a { color: #d9eef0; text-decoration: none; padding: .35rem .8rem; border-radius: 6px; white-space: nowrap; font-size: .95rem; }
.subnav a:hover { background: rgba(255,255,255,.12); }
.subnav a[aria-current="page"] { background: #fff; color: var(--lagoon-dark); font-weight: 600; }
.subnav .who { margin-left: auto; color: #b9dade; font-size: .875rem; white-space: nowrap; padding-left: 1rem; }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .6rem 1.1rem; border-radius: 8px; border: 1.5px solid var(--lagoon); background: var(--lagoon); color: #fff; font: 600 .95rem var(--font-body); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--lagoon-dark); border-color: var(--lagoon-dark); }
.btn.secondary { background: transparent; color: var(--lagoon-dark); }
.btn.secondary:hover { background: var(--lagoon-soft); }
.btn.brass { background: var(--brass); border-color: var(--brass); color: var(--ink); }
.btn.brass:hover { background: #d9a542; }
.btn.danger { background: var(--bad); border-color: var(--bad); }
.btn.danger.secondary { background: transparent; color: var(--bad); }
.btn.danger.secondary:hover { background: var(--bad-soft); }
.btn.sm { padding: .3rem .65rem; font-size: .85rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.icon-btn { background: none; border: 0; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--muted); padding: .2rem .5rem; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .25rem; }
input, select, textarea { width: 100%; padding: .6rem .75rem; border: 1.5px solid var(--line); border-radius: 8px; font: inherit; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { border-color: var(--lagoon); outline: none; box-shadow: 0 0 0 3px var(--lagoon-soft); }
textarea { min-height: 96px; resize: vertical; }
input[type="checkbox"] { width: auto; }
.field { margin-bottom: 1rem; }
.hint { font-size: .82rem; color: var(--muted); margin-top: .25rem; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.check input { width: 1.1rem; height: 1.1rem; }
.form-error { background: var(--bad-soft); color: var(--bad); border-radius: 8px; padding: .6rem .8rem; margin-bottom: 1rem; font-size: .92rem; }

/* Cards & panels */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; }
.card.flat { padding: 0; overflow: hidden; }
.page-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: end; margin-bottom: 1.25rem; }
.page-head h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.stat .n { font: 400 2rem/1.1 var(--font-display); }
.stat .l { color: var(--muted); font-size: .9rem; }
.stat.warn { border-left: 5px solid var(--brass); }
.stat.good { border-left: 5px solid var(--ok); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: .82rem; padding: .7rem .9rem; border-bottom: 1px solid var(--line); background: #f7fafa; white-space: nowrap; }
td { padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.actions { white-space: nowrap; text-align: right; }
td.actions .btn + .btn { margin-left: .3rem; }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); }
.filters { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filters > * { flex: 1 1 150px; width: auto; }
.filters .grow { flex: 2 1 220px; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: .8rem .9rem; border-top: 1px solid var(--line); gap: .5rem; flex-wrap: wrap; }

/* Badges */
.badge { display: inline-block; padding: .12rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; background: #e4ecee; color: #33505a; white-space: nowrap; }
.b-approved, .b-active, .b-paid, .b-completed { background: var(--ok-soft); color: var(--ok); }
.b-pending, .b-unpaid, .b-in-progress { background: var(--brass-soft); color: #8a5f10; }
.b-partial { background: var(--brass-soft); color: #8a5f10; }
.b-refunded { background: var(--lagoon-soft); color: var(--lagoon-dark); }
.b-submitted { background: var(--lagoon-soft); color: var(--lagoon-dark); }
.b-declined, .b-rejected { background: var(--bad-soft); color: var(--bad); }
.b-inactive, .b-cancelled { background: #e4e7e8; color: #5b6b70; }
.b-available { background: var(--ok-soft); color: var(--ok); }
.b-booked { background: var(--brass-soft); color: #8a5f10; }
.b-occupied { background: var(--bad-soft); color: var(--bad); }
.b-unavailable { background: #e4e7e8; color: #5b6b70; }

/* Room availability */
.room-legend { margin: -0.5rem 0 1.25rem; }
.dashboard-rooms { margin-top: 2rem; }
.section-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap; margin-bottom: .8rem; }
.section-head h2 { margin: 0; font-size: 1.3rem; }
.room-status-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .7rem; }
.room-status-item { display: flex; justify-content: space-between; align-items: center; gap: .8rem; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: .8rem 1rem; }
.room-status-item strong, .room-status-item .muted { display: block; }

/* Billing */
.billing-inquiry { padding: 1rem; margin-bottom: 1rem; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.billing-inquiry input { flex: 1 1 300px; }
.billing-inquiry-results { margin-bottom: 1rem; padding: 1rem; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.billing-inquiry-results h2 { font-size: 1.2rem; margin-bottom: .7rem; }
.billing-filters input, .billing-filters select { min-width: 130px; }
.billing-tabs { display: flex; gap: .5rem; margin-bottom: .8rem; }
.folio-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .6rem; padding: .8rem; background: var(--mist); border-radius: 8px; }
.folio-summary > div { display: flex; flex-direction: column; gap: .2rem; }
.folio-summary strong { font-size: 1.2rem; }
.billing-form-submit { display: flex; align-items: end; }

/* Guest status operations */
.guest-status-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.guest-count { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; min-height: 76px; padding: .65rem .85rem; background: #fff; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); text-align: left; cursor: pointer; }
.guest-count:hover, .guest-count[aria-pressed="true"] { border-color: var(--lagoon); background: var(--lagoon-soft); }
.guest-count-value { font: 400 1.6rem/1 var(--font-display); }
.guest-count-label { color: var(--muted); font-size: .82rem; }
.guest-status-anomalies { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .6rem; margin-bottom: 1.25rem; }
.anomaly-stat { display: flex; align-items: center; gap: .7rem; padding: .65rem .8rem; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: 6px; }
.anomaly-stat.warn { border-left-color: var(--bad); background: var(--bad-soft); }
.anomaly-stat strong { font: 400 1.35rem/1 var(--font-display); }
.anomaly-stat span { color: var(--muted); font-size: .82rem; }
.personnel-workload { margin-bottom: 1rem; padding: .8rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.personnel-workload .section-head { margin-bottom: .25rem; }
.personnel-workload h2 { font-size: 1.2rem; }
.guest-status-filters { margin-top: 1rem; }
.guest-status-filters input, .guest-status-filters select { min-width: 135px; }
.guest-row-overdue td:first-child { box-shadow: inset 4px 0 0 var(--bad); }
.guest-status-filters + .card select { min-width: 130px; margin-top: .25rem; padding: .3rem .4rem; font-size: .82rem; }
.b-due-to-arrive, .b-due-to-depart { background: var(--brass-soft); color: #8a5f10; }
.b-checked-in { background: var(--lagoon-soft); color: var(--lagoon-dark); }
.b-checked-out { background: var(--ok-soft); color: var(--ok); }
.b-no-show, .b-maintenance { background: var(--bad-soft); color: var(--bad); }
.b-ready { background: var(--ok-soft); color: var(--ok); }
.b-cleaning { background: var(--lagoon-soft); color: var(--lagoon-dark); }
.b-not-ready { background: var(--brass-soft); color: #8a5f10; }

/* Graphical reports */
.report-filters label { flex: 1 1 145px; }
.report-filters input, .report-filters select { margin-top: .25rem; }
.reports-page > .page-head { align-items: center; }
.report-summary { margin-bottom: .8rem; }
.report-metric { font-size: 1.35rem !important; overflow-wrap: anywhere; }
.report-analysis { margin: 0 0 1rem; padding: 1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.report-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; flex-wrap: wrap; margin-bottom: .6rem; }
.report-section-head h2 { margin: 0; font-size: 1.15rem; }
.report-section-head p { margin: 0; }
.analysis-summary { gap: .55rem; }
.analysis-note { margin: .7rem 0 0; color: var(--muted); font-size: .9rem; }
.report-meta { display: flex; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.report-chart { min-width: 0; padding: 1rem; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.report-chart h2 { margin: 0 0 .2rem; font-size: 1.15rem; }
.report-chart > p { margin-bottom: .5rem; }
.chart-frame { position: relative; height: 280px; min-width: 0; }
.chart-frame canvas { max-width: 100%; }
.chart-insight { min-height: 2.5em; margin: .6rem 0 0; color: var(--muted); font-size: .88rem; }
.chart-empty { margin: 0; min-height: 160px; display: grid; place-items: center; }
.report-chart-wide { grid-column: 1 / -1; }

@media (max-width: 760px) {
  .report-grid { grid-template-columns: 1fr; }
  .report-chart-wide { grid-column: auto; }
  .chart-frame { height: 240px; }
}

@media print {
  .reports-page > .page-head .row, .report-filters, #site-header, #site-footer, #toasts { display: none !important; }
  .reports-page { width: 100%; padding: 0; }
  .report-grid { grid-template-columns: 1fr 1fr; gap: .35rem; }
  .report-chart { break-inside: avoid; padding: .4rem; }
  .report-analysis { break-inside: avoid; }
  .chart-frame { height: 220px; }
}

/* Toasts & dialogs */
#toasts { position: fixed; right: 1rem; bottom: 1rem; display: grid; gap: .5rem; z-index: 100; max-width: min(92vw, 380px); }
.toast { background: var(--ink); color: #fff; padding: .75rem 1rem; border-radius: 8px; box-shadow: 0 6px 20px rgba(13,43,54,.3); border-left: 5px solid var(--ok); }
.toast.error { border-left-color: var(--bad); }
dialog.modal { border: 0; border-radius: 12px; padding: 0; width: min(520px, 94vw); max-height: 92vh; overflow: auto; color: var(--ink); }
dialog.modal.wide { width: min(860px, 96vw); }
dialog.modal::backdrop { background: rgba(13,43,54,.55); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1; }
.modal-head h2 { margin: 0; font-size: 1.3rem; }
.modal-body { padding: 1.25rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1.25rem; flex-wrap: wrap; }

/* Homepage */
.hero { background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: auto -10% -60% 30%; height: 100%; background: radial-gradient(closest-side, rgba(10,108,122,.55), transparent); pointer-events: none; }
.hero .container { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; padding-block: 4.5rem; position: relative; z-index: 1; }
.hero p.lead { font-size: 1.15rem; color: #c4dde2; max-width: 34rem; }
.ticket { background: #fff; color: var(--ink); border-radius: 14px; padding: 1.4rem 1.5rem 1.5rem; transform: rotate(1.6deg); box-shadow: 0 24px 60px rgba(0,0,0,.35); position: relative; }
.ticket::before, .ticket::after { content: ""; position: absolute; top: 4.6rem; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); }
.ticket::before { left: -11px; } .ticket::after { right: -11px; }
.ticket-head { display: flex; justify-content: space-between; border-bottom: 2px dashed var(--line); padding-bottom: 1.1rem; margin-bottom: 1rem; font-size: .9rem; color: var(--muted); }
.ticket-head strong { display: block; color: var(--ink); font-size: 1.05rem; }
.ticket ul { list-style: none; margin: 0 0 1rem; padding: 0; }
.ticket li { display: flex; justify-content: space-between; padding: .3rem 0; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: .3rem; font-size: .72rem; text-align: center; color: var(--muted); }
.steps span::before { content: ""; display: block; height: 6px; border-radius: 3px; background: var(--line); margin-bottom: .35rem; }
.steps .done::before { background: var(--lagoon); }
.steps .now { color: var(--ink); font-weight: 700; }
.steps .now::before { background: var(--brass); }
.section { padding-block: 3.5rem; }
.section.alt { background: #fff; border-block: 1px solid var(--line); }
.service-card { display: flex; flex-direction: column; gap: .5rem; height: 100%; }
.service-card .price { font: 400 1.4rem var(--font-display); color: var(--lagoon-dark); margin-top: auto; }
.cta-band { background: var(--lagoon); color: #fff; border-radius: 16px; padding: 2.2rem; }
.cta-band h2 { color: #fff; }

/* About */
.about-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; align-items: start; }
.prose { max-width: 68ch; }
.team-card { border-left: 4px solid var(--lagoon); background: #fff; padding: .9rem 1rem; border-radius: 0 var(--radius) var(--radius) 0; }
.team-card strong { display: block; }
.map-frame { width: 100%; height: 260px; border: 0; border-radius: var(--radius); }

/* Auth */
.auth-wrap { max-width: 440px; margin: 2rem auto; }
.status-box { border-radius: 10px; padding: .9rem 1rem; margin-bottom: 1rem; font-size: .95rem; border-left: 5px solid var(--brass); background: var(--brass-soft); }
.status-box.declined { border-color: var(--bad); background: var(--bad-soft); }
.status-box.approved { border-color: var(--ok); background: var(--ok-soft); }
.status-box strong { display: block; font-size: 1.02rem; }

/* Requests */
.service-pick { display: grid; grid-template-columns: auto 1fr auto auto; gap: .8rem; align-items: center; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.service-pick:last-child { border-bottom: 0; }
.service-pick input[type="number"] { width: 70px; }
.summary-bar { position: sticky; bottom: 0; background: #fff; border-top: 2px solid var(--lagoon); padding: .9rem 1rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: 9rem 1fr; gap: .3rem 1rem; font-size: .95rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.2rem; border-left: 3px solid var(--lagoon-soft); }
.timeline li { position: relative; padding: 0 0 1rem 1rem; }
.timeline li::before { content: ""; position: absolute; left: -1.72rem; top: .35rem; width: 13px; height: 13px; border-radius: 50%; background: var(--lagoon); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--lagoon); }
.timeline li.note::before { background: #fff; }
.bill td, .bill th { padding: .5rem .6rem; }
.bill tfoot td { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 0; }
.detail-section { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1.25rem; }
.detail-section h3 { font-size: 1.05rem; }

/* Receipt */
.receipt { max-width: 640px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 2rem; }
.receipt h1 { font-size: 1.7rem; }
.receipt .stamp { display: inline-block; border: 3px solid var(--ok); color: var(--ok); font-weight: 800; padding: .1rem .8rem; transform: rotate(-6deg); border-radius: 6px; font-size: 1.1rem; }
.receipt .stamp.unpaid { border-color: var(--brass); color: #8a5f10; }

.site-footer { background: var(--ink); color: #b9d0d6; padding-block: 2rem; margin-top: 2rem; font-size: .92rem; }
.site-footer .container { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: space-between; }
.site-footer strong { color: #fff; font-family: var(--font-display); font-weight: 400; font-size: 1.1rem; }
.site-footer a { color: #d5e6ea; }

@media (max-width: 820px) {
  .hero .container { grid-template-columns: 1fr; padding-block: 2.5rem; gap: 2rem; }
  .ticket { transform: none; }
  .about-grid { grid-template-columns: 1fr; }
  .service-pick { grid-template-columns: auto 1fr; }
  .service-pick .price, .service-pick .qty { grid-column: 2; }
  .kv { grid-template-columns: 1fr; }
  th, td { padding: .55rem .6rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

@media print {
  body { background: #fff; }
  .site-header, .site-footer, .no-print, #toasts { display: none !important; }
  main.container { padding: 0; width: 100%; }
  .receipt { border: 0; padding: 0; }
}

/* Buttons on the dark hero */
.hero .btn.secondary { color: #fff; border-color: #7fb0b8; }
.hero .btn.secondary:hover { background: rgba(255,255,255,.12); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
