/* The Grand at Diamond Beach - site theme (plain CSS, no build step) */
:root {
  --teal: #16828C;
  --teal-dark: #106770;
  --gold: #8B6618;
  --gold-dark: #845E15;
  --band: #E2E2E2;
  --contact: #F4F4F4;
  --text: #333;
  --muted: #666;
  --line: #ddd;
  --danger: #b42318;
  --danger-bg: #fdecea;
  --ok-bg: #e7f5ee;
  --ok: #17663a;
  --warn-bg: #fff6e0;
}
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 18px; }
body { margin: 0; font-family: 'Barlow', Arial, sans-serif; font-weight: 400; color: var(--text); background: #fff; line-height: 1.6; letter-spacing: .01em; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); }
a:hover { color: var(--teal-dark); }
h1, h2, h3 { font-weight: 300; line-height: 1.25; margin: 0 0 .6em; color: var(--text); }
h1 { font-size: 2.2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; font-weight: 400; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--teal); color: #fff; padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 10px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Header ---------- */
.site-header { background: #fff; border-bottom: 1px solid #eee; position: relative; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: center; gap: 40px; min-height: 112px; padding: 8px 20px; }
.header-logo img { width: 180px; }
.public-header .header-inner { gap: 50px; }
.nav-mobile { display: none; }
.public-header .nav-desktop { gap: 30px; }
.nav { display: flex; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0; }
.nav a, .nav button.nav-top, .nav button.nav-link { display: block; padding: 10px 16px; color: var(--teal); text-decoration: none; text-transform: uppercase; letter-spacing: .08em; font-size: 1.05rem; font-weight: 400; background: none; border: 0; font-family: inherit; cursor: pointer; }
.nav a:hover, .nav button.nav-top:hover, .nav button.nav-link:hover, .nav a.active { color: var(--gold); }
.nav-item { position: relative; }
.nav-top::after { content: ""; display: inline-block; margin-left: 6px; border: 5px solid transparent; border-top-color: currentColor; vertical-align: 1px; }
.dropdown { display: none; position: absolute; top: 100%; left: 0; min-width: 260px; background: #fff; border: 1px solid #e5e5e5; box-shadow: 0 8px 24px rgba(0,0,0,.08); list-style: none; margin: 0; padding: 6px 0; z-index: 60; }
.dropdown a { text-transform: none; letter-spacing: .02em; color: var(--text); padding: 10px 18px; }
.dropdown a:hover { background: #f4f9f9; color: var(--teal); }
.nav-item.open > .dropdown { display: block; }
@media (hover: hover) and (min-width: 1001px) { .nav-item:hover > .dropdown { display: block; } }
.menu-toggle { display: none; background: none; border: 2px solid var(--teal); color: var(--teal); padding: 8px 14px; font: inherit; text-transform: uppercase; letter-spacing: .08em; border-radius: 4px; cursor: pointer; }
.member-header .header-inner { justify-content: space-between; gap: 20px; }
.member-header .header-logo img { width: 150px; }
.logout-form { margin: 0; }

@media (max-width: 1000px) {
  .header-inner, .member-header .header-inner { justify-content: space-between; flex-wrap: wrap; min-height: 84px; gap: 0; }
  .header-logo img, .member-header .header-logo img { width: 130px; }
  .menu-toggle { display: inline-block; }
  .nav-wrap { display: none; width: 100%; order: 3; padding: 8px 0 14px; }
  .nav-wrap.open { display: block; }
  .nav { flex-direction: column; align-items: stretch; gap: 0; }
  .public-header .nav-desktop { display: none; }
  .nav-mobile.open { display: block; }
  .nav a, .nav button.nav-top, .nav button.nav-link { padding: 14px 6px; border-top: 1px solid #eee; width: 100%; text-align: left; font-size: 1.1rem; }
  .dropdown { position: static; box-shadow: none; border: 0; padding: 0 0 6px 16px; min-width: 0; }
  .dropdown a { border-top: 0; padding: 10px 6px; }
}

/* ---------- Hero & banner ---------- */
.hero img { width: 100%; height: auto; max-height: 692px; object-fit: cover; }
.banner { height: 267px; background: url('/images/banner-beach.jpg') center / cover no-repeat; }
@media (max-width: 700px) { .banner { height: 130px; } }

/* ---------- Home ---------- */
.intro { text-align: center; padding: 70px 20px 50px; }
.intro h1 { font-size: 2.3rem; }
.intro .rich { max-width: 1000px; margin: 0 auto; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 30px 0 40px; }
.card { display: flex; background: #f3f3f3; border: 1px solid #e3e3e3; }
.card img { flex: 0 0 34%; max-width: 286px; width: 34%; object-fit: cover; object-position: left center; }
.card-body { padding: 36px 40px; }
.card-body h2 { text-transform: uppercase; font-size: 1.7rem; letter-spacing: .02em; margin-bottom: .4em; }
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 560px) {
  .card { flex-direction: column; }
  .card img { width: 100%; max-width: none; flex: none; height: 220px; object-position: center; }
  .card-body { padding: 24px 20px; }
  .intro { padding: 40px 16px 30px; }
  .intro h1 { font-size: 1.75rem; }
}

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 12px 22px; font: inherit; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; border: 2px solid var(--teal); background: var(--teal); color: #fff; text-decoration: none; cursor: pointer; border-radius: 2px; line-height: 1.3; }
.btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
.btn-gold { background: var(--gold); border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.btn-outline { background: #fff; color: var(--teal); }
.btn-outline:hover { background: #f1f8f8; color: var(--teal-dark); }
.btn-danger { background: #fff; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.btn-small { padding: 8px 14px; font-size: .9rem; }
.btn-block { display: block; width: 100%; text-align: center; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- Interior content ---------- */
.page { padding: 60px 0 80px; min-height: 360px; }
.page-title { text-align: center; font-size: 2.6rem; margin-bottom: 1em; }
@media (max-width: 700px) { .page { padding: 34px 0 50px; } .page-title { font-size: 1.9rem; } }
.rich { font-size: 1.05rem; }
.rich img { display: inline-block; }
.rich table { border-collapse: collapse; width: 100%; }
.rich td, .rich th { border: 1px solid var(--line); padding: 8px; }
.section-title { font-size: 1.5rem; margin: 2em 0 .8em; border-bottom: 1px solid var(--line); padding-bottom: .3em; }

/* ---------- Forms ---------- */
.panel { background: #fff; border: 1px solid #e3e3e3; padding: 30px; margin-bottom: 30px; }
@media (max-width: 560px) { .panel { padding: 20px 16px; } }
.field { margin-bottom: 20px; }
.field label, .label { display: block; font-weight: 500; margin-bottom: 6px; }
.field .hint { color: var(--muted); font-size: .9rem; margin-top: 4px; }
input[type=text], input[type=email], input[type=tel], input[type=search], input[type=file], select, textarea {
  width: 100%; font: inherit; font-size: 1.05rem; padding: 12px 14px; border: 1px solid #bbb; border-radius: 3px; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { border-color: var(--teal); outline: 2px solid rgba(22,130,140,.25); }
.code-input { font-size: 2rem !important; letter-spacing: .5em; text-align: center; max-width: 320px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 400; margin-bottom: 10px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--teal); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }
.error { color: var(--danger); font-size: .95rem; margin-top: 6px; }
.has-error input { border-color: var(--danger); }
.phone-input { display: flex; }
.phone-prefix { display: flex; align-items: center; padding: 0 14px; font-size: 1.05rem; background: #f4f4f4; border: 1px solid #bbb; border-right: 0; border-radius: 3px 0 0 3px; color: var(--text); }
.phone-input input { border-radius: 0 3px 3px 0; min-width: 0; }
select.phone-prefix { width: auto; flex: none; padding: 0 8px 0 12px; cursor: pointer; }
.has-error .phone-prefix { border-color: var(--danger); }

/* ---------- Alerts ---------- */
.alert { padding: 14px 18px; border-left: 5px solid var(--teal); background: #eef7f8; margin-bottom: 24px; }
.alert-success { border-color: var(--ok); background: var(--ok-bg); }
.alert-error { border-color: var(--danger); background: var(--danger-bg); }
.alert-warning { border-color: var(--gold); background: var(--warn-bg); }

/* ---------- Tables / lists ---------- */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 1rem; }
table.list th, table.list td { text-align: left; padding: 12px 10px; border-bottom: 1px solid #e5e5e5; vertical-align: middle; }
table.list th { font-weight: 500; background: #f6f6f6; white-space: nowrap; }
table.list th a { color: var(--text); text-decoration: none; }
table.list th a:hover { color: var(--teal); }
.avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: #eee; }
.avatar-placeholder { width: 52px; height: 52px; border-radius: 50%; background: #e8e8e8; display: inline-flex; align-items: center; justify-content: center; color: #888; font-size: .95rem; }
.muted { color: var(--muted); }
.badge { display: inline-block; font-size: .8rem; padding: 2px 8px; border-radius: 10px; background: #eee; color: #444; text-transform: uppercase; letter-spacing: .04em; }
.badge-teal { background: #e0f0f1; color: var(--teal-dark); }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 24px; }
.toolbar .grow { flex: 1 1 260px; }

/* Directory: cards on small screens */
@media (max-width: 760px) {
  table.directory thead { display: none; }
  table.directory, table.directory tbody, table.directory tr, table.directory td { display: block; width: 100%; }
  table.directory tr { border: 1px solid #e3e3e3; margin-bottom: 14px; padding: 10px 14px; }
  table.directory td { border: 0; padding: 4px 0; }
  table.directory td[data-label]::before { content: attr(data-label) ": "; font-weight: 500; }
}

/* File manager */
.folder { border: 1px solid #e3e3e3; margin-bottom: 22px; }
.folder > h3 { margin: 0; padding: 14px 18px; background: #f6f6f6; border-bottom: 1px solid #e3e3e3; font-size: 1.2rem; }
.file-row { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-bottom: 1px solid #eee; }
.file-row:last-child { border-bottom: 0; }
.file-icon { flex: 0 0 64px; text-align: center; font-size: .75rem; font-weight: 600; text-transform: uppercase; padding: 8px 4px; border-radius: 4px; background: #e0f0f1; color: var(--teal-dark); }
.file-icon.pdf { background: #fbe4e2; color: #a2271d; }
.file-icon.word { background: #e2ebfb; color: #1f4fa5; }
.file-icon.excel { background: #e1f3e6; color: #1d6b37; }
.file-icon.image { background: #f4ecdc; color: var(--gold-dark); }
.file-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.file-meta { color: var(--muted); font-size: .9rem; }
@media (max-width: 560px) { .file-row { flex-wrap: wrap; } .file-row .btn { width: 100%; text-align: center; } }

/* Member home tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.tile { display: block; padding: 24px; border: 1px solid #e3e3e3; background: #fafafa; text-decoration: none; color: var(--text); font-size: 1.15rem; }
.tile:hover { border-color: var(--teal); background: #f1f8f8; color: var(--teal-dark); }
.tile small { display: block; color: var(--muted); font-size: .9rem; margin-top: 4px; }

/* ---------- Footer ---------- */
.footer-logo { background: var(--band); padding: 44px 20px; }
.footer-logo img { width: 540px; max-width: 80%; margin: 0 auto; }
.footer-contact { background: var(--contact); color: var(--gold); text-align: center; padding: 18px 20px; font-size: 1.05rem; }
.footer-contact a { color: var(--gold); text-decoration: none; }
.footer-contact strong { font-weight: 600; }
.footer-contact .sep { margin: 0 10px; }
.footer-copy { background: var(--band); text-align: center; padding: 22px 20px; font-size: .9rem; color: #444; }
.footer-copy a { color: #444; text-decoration: none; }
.footer-copy a:hover { color: var(--teal); }
@media (max-width: 700px) {
  .footer-contact span.item { display: block; }
  .footer-contact .sep { display: none; }
}

/* ---------- Phase 2/3 additions ---------- */
.member-header .nav a, .member-header .nav button.nav-top, .member-header .nav button.nav-link { padding: 10px 11px; font-size: .95rem; letter-spacing: .06em; }
.dropdown-right { left: auto; right: 0; }
@media (max-width: 1000px) { .dropdown-right { right: auto; } }
input[type=date], input[type=time], input[type=number] { width: 100%; font: inherit; font-size: 1.05rem; padding: 11px 14px; border: 1px solid #bbb; border-radius: 3px; background: #fff; color: var(--text); }
textarea { min-height: 140px; }
.has-error select, .has-error textarea { border-color: var(--danger); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 20px; }
@media (max-width: 760px) { .grid-3 { grid-template-columns: 1fr; } }
.page-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.status { display: inline-block; font-size: .85rem; padding: 3px 10px; border-radius: 12px; font-weight: 500; white-space: nowrap; }
.status-open, .status-pending-approval { background: #e0f0f1; color: var(--teal-dark); }
.status-pending { background: var(--warn-bg); color: var(--gold-dark); }
.status-approved { background: var(--ok-bg); color: var(--ok); }
.status-closed, .status-cancelled { background: #eee; color: #555; }
.status-denied { background: var(--danger-bg); color: var(--danger); }
.empty { padding: 30px; text-align: center; color: var(--muted); border: 1px dashed #ccc; }

/* Tabs / segmented links */
.segmented { display: inline-flex; flex-wrap: wrap; border: 2px solid var(--teal); border-radius: 3px; overflow: hidden; }
.segmented a { padding: 8px 16px; text-decoration: none; color: var(--teal); font-size: .95rem; text-transform: uppercase; letter-spacing: .05em; }
.segmented a + a { border-left: 2px solid var(--teal); }
.segmented a.on { background: var(--teal); color: #fff; }

/* Calendar */
.cal-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cal-head h2 { margin: 0; font-size: 1.7rem; }
.cal-nav { display: flex; gap: 8px; }
.calendar { width: 100%; border-collapse: collapse; table-layout: fixed; }
.calendar th { background: #f6f6f6; font-weight: 500; padding: 8px; font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; border: 1px solid #e3e3e3; }
.calendar td { border: 1px solid #e3e3e3; vertical-align: top; height: 112px; padding: 6px; font-size: .85rem; }
.calendar td.other { background: #fafafa; color: #aaa; }
.calendar td.today { background: #f1f8f8; }
.calendar .daynum { display: block; font-weight: 500; margin-bottom: 4px; font-size: .95rem; }
.cal-item { display: block; border-left: 4px solid var(--teal); background: #e9f4f5; padding: 3px 6px; margin-bottom: 4px; line-height: 1.3; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.cal-item.room-2 { border-color: var(--gold); background: #f6efdf; }
.cal-item .t { display: block; font-weight: 500; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 12px 0 0; font-size: .95rem; }
.cal-legend span::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; background: #e9f4f5; border-left: 4px solid var(--teal); }
.cal-legend span.room-2::before { background: #f6efdf; border-color: var(--gold); }
.week-list { border: 1px solid #e3e3e3; }
.week-day { display: flex; gap: 16px; padding: 14px 16px; border-bottom: 1px solid #eee; }
.week-day:last-child { border-bottom: 0; }
.week-day.today { background: #f1f8f8; }
.week-day .d { flex: 0 0 120px; font-weight: 500; }
.week-day .items { flex: 1; }
@media (max-width: 760px) {
  .calendar thead { display: none; }
  .calendar, .calendar tbody, .calendar tr, .calendar td { display: block; width: 100%; }
  .calendar td { height: auto; border-width: 0 0 1px; padding: 10px 4px; }
  .calendar td.other, .calendar td.no-items { display: none; }
  .calendar .daynum::after { content: attr(data-long); font-weight: 400; margin-left: 6px; }
  .week-day { flex-direction: column; gap: 6px; }
}

/* Repeatable rows (party members, vehicles) */
.repeat-row { display: grid; gap: 12px; align-items: end; padding: 14px; border: 1px solid #e3e3e3; background: #fafafa; margin-bottom: 12px; }
.repeat-row.party { grid-template-columns: 1fr 120px auto; }
.repeat-row.vehicle { grid-template-columns: 1fr 1fr 1fr 1fr auto; }
.repeat-row .field { margin: 0; }
@media (max-width: 760px) { .repeat-row.party, .repeat-row.vehicle { grid-template-columns: 1fr 1fr; } .repeat-row .remove { grid-column: 1 / -1; } }

/* Documents to sign */
.doc-box { border: 1px solid #ccc; max-height: 300px; overflow-y: auto; padding: 16px 18px; background: #fff; margin-bottom: 12px; }
.doc-block { margin-bottom: 26px; }
.signature-wrap { border: 2px dashed #999; background: #fff; max-width: 640px; position: relative; }
.signature-wrap canvas { display: block; width: 100%; height: 200px; touch-action: none; }
.signature-wrap .line { position: absolute; left: 24px; right: 24px; bottom: 44px; border-bottom: 1px solid #bbb; pointer-events: none; }
.signature-img { max-width: 360px; border: 1px solid #ddd; background: #fff; }

/* Message board / ticket thread */
.post { border: 1px solid #e3e3e3; padding: 20px 22px; margin-bottom: 18px; }
.post h3 { margin-bottom: .2em; }
.post .meta { color: var(--muted); font-size: .9rem; margin-bottom: 10px; }
.post .body { white-space: pre-line; overflow-wrap: anywhere; }
.thread .msg { border: 1px solid #e3e3e3; padding: 16px 18px; margin-bottom: 14px; }
.thread .msg.staff { border-left: 5px solid var(--teal); background: #f4f9f9; }
.thread .msg .meta { color: var(--muted); font-size: .9rem; margin-bottom: 6px; }
.thread .msg .body { white-space: pre-line; overflow-wrap: anywhere; }
.side-layout { display: grid; grid-template-columns: 240px 1fr; gap: 36px; }
.side-nav { list-style: none; margin: 0; padding: 0; border: 1px solid #e3e3e3; align-self: start; }
.side-nav a { display: block; padding: 12px 16px; border-bottom: 1px solid #eee; text-decoration: none; }
.side-nav li:last-child a { border-bottom: 0; }
.side-nav a.on { background: var(--teal); color: #fff; }
@media (max-width: 860px) { .side-layout { grid-template-columns: 1fr; gap: 20px; } }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.gallery-grid a { display: block; text-decoration: none; color: var(--text); }
.gallery-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #eee; }
.gallery-grid .cap { padding: 8px 2px; }
.gallery-grid .cap small { display: block; color: var(--muted); }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; }
.lightbox::backdrop { background: rgba(0,0,0,.85); }
.lightbox img { max-width: 94vw; max-height: 84vh; margin: 0 auto; }
.lightbox p { color: #fff; text-align: center; margin: 10px 0 0; }
.lightbox button { position: fixed; top: 14px; right: 14px; }

dl.details { display: grid; grid-template-columns: 220px 1fr; gap: 8px 20px; margin: 0; }
dl.details dt { font-weight: 500; }
dl.details dd { margin: 0; }
@media (max-width: 640px) { dl.details { grid-template-columns: 1fr; gap: 2px; } dl.details dd { margin-bottom: 10px; } }

/* The member menu has more items than the public one: keep labels on one line and switch to the Menu button earlier. */
.nav a, .nav button.nav-top, .nav button.nav-link { white-space: nowrap; }
@media (max-width: 1200px) {
  .member-header .header-inner { justify-content: space-between; flex-wrap: wrap; min-height: 84px; gap: 0; }
  .member-header .header-logo img { width: 130px; }
  .member-header .menu-toggle { display: inline-block; }
  .member-header .nav-wrap { display: none; width: 100%; order: 3; padding: 8px 0 14px; }
  .member-header .nav-wrap.open { display: block; }
  .member-header .nav { flex-direction: column; align-items: stretch; gap: 0; }
  .member-header .nav a, .member-header .nav button.nav-top, .member-header .nav button.nav-link { padding: 14px 6px; border-top: 1px solid #eee; width: 100%; text-align: left; font-size: 1.1rem; }
  .member-header .dropdown { position: static; box-shadow: none; border: 0; padding: 0 0 6px 16px; min-width: 0; }
  .member-header .dropdown a { border-top: 0; padding: 10px 6px; }
  .member-header .nav-item:hover > .dropdown { display: none; }
  .member-header .nav-item.open > .dropdown { display: block; }
}
.req { color: var(--danger); font-weight: 600; }

/* Date picker (flatpickr) in the site colors */
.flatpickr-calendar { font-family: 'Barlow', Arial, sans-serif; font-size: 16px; }
.flatpickr-day.selected, .flatpickr-day.selected:hover, .flatpickr-day.startRange, .flatpickr-day.endRange { background: var(--teal); border-color: var(--teal); }
.flatpickr-day.today { border-color: var(--gold); }
.flatpickr-months .flatpickr-month, .flatpickr-current-month .flatpickr-monthDropdown-months { color: var(--text); }
input[data-date] { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%2316828C' stroke-width='2' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 10h18'/%3E%3C/svg%3E") no-repeat right 12px center; padding-right: 42px; }
