/* "Coastal Light" (D-8): white and pale sand, sea blue, coral buttons, rounded shapes, big edge-to-edge photos
   and a wave above the footer. The variable names --teal / --rose are kept so the rest of the file needs no changes.
   D-8: --sea / --sea-soft are the light sea blues, --sun / --sun-soft the warm golden-hour accent taken from the sunset photo. */
/* D-8: Fraunces (SIL OFL), self-hosted because the content security policy allows no external fonts; Latin only, Thai headings use the sans */
@font-face { font-family: "Fraunces"; src: url("/fonts/fraunces-latin.woff2") format("woff2"); font-weight: 600 800; font-style: normal; font-display: swap; }
:root {
  --cream: #fdfbf7; --blush: #f3ede3; --teal: #164b60; --teal-soft: #2b7a9b; --white: #fff;
  --rose: #c9553c; --rose-dark: #a8432d; --sea: #2b7a9b; --sea-soft: #d8ecf3; --sun: #f0a868; --sun-soft: #fdebd6; --sun-deep: #8a4b12; --gold: #c89a3a;
  --ink: #1f2d35; --muted: #5d6b72; --line: #e6e1d8; --danger: #b3261e; --ok: #2e7d4f;
  --radius: 16px; --shadow: none;
  --font: "Noto Sans Thai", "Leelawadee UI", "Segoe UI", Tahoma, "Thonburi", system-ui, -apple-system, sans-serif; /* renders Thai script (T-9) */
  --serif: "Fraunces", Georgia, "Times New Roman", "Noto Sans Thai", "Leelawadee UI", serif;
  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40V22C150 2 300 2 450 18S750 38 900 20 1100 4 1200 14V40Z' fill='%23164b60'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { overflow-x: clip; display: flex; flex-direction: column; min-height: 100vh; margin: 0; background: var(--cream); color: var(--ink); font: 16px/1.6 var(--font); }
img { max-width: 100%; display: block; }
a { color: var(--rose-dark); }
a:hover { color: var(--rose); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5em; font-weight: 600; }
:lang(en) h1 { letter-spacing: -.012em; }
:lang(th) :is(h1, h2, h3, .brand, .price) { font-family: var(--font); } /* D-8: Fraunces has no Thai glyphs, so Thai headings stay in the sans */
.price { font-variant-numeric: lining-nums; }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); }
h2 { font-size: 1.65rem; } h3 { font-size: 1.15rem; }
h3 a { text-decoration: none; color: var(--ink); } h3 a:hover { color: var(--rose); }
main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 24px 16px 48px; outline: none; }
.muted { color: var(--muted); } .empty { padding: 24px 0; text-align: center; }
.center { text-align: center; padding: 48px 0; }
.empty-box { text-align: center; padding-bottom: 24px; } .empty-box .empty { max-width: 560px; margin: 0 auto; }
.narrow { max-width: 520px; margin: 0 auto; }
.error { color: var(--danger); } .ok { color: var(--ok); }
.notice { background: var(--sea-soft); border-radius: 8px; padding: 10px 14px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 100; }

/* header */
#site-header { background: var(--white); border-bottom: 2px solid var(--sea); position: sticky; top: 0; z-index: 20; }
.bar { max-width: 1120px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--serif); font-weight: 600; font-size: 1.3rem; }
.brand img { border-radius: 50%; object-fit: cover; }
#nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
#nav a { padding: 8px 12px; border-radius: 4px; text-decoration: none; color: var(--ink); }
#nav a:hover { background: var(--blush); }
#nav a[aria-current="page"] { background: none; color: var(--teal); font-weight: 600; box-shadow: inset 0 -3px 0 var(--sea); border-radius: 0; }
.tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.lang button { border: 0; background: var(--white); padding: 6px 10px; cursor: pointer; font: inherit; color: var(--ink); }
.lang button[aria-pressed="true"] { background: var(--rose); color: var(--white); }
.account-link { text-decoration: none; }
.menu-toggle { display: none; margin-left: auto; font-size: 1.4rem; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 2px 10px; cursor: pointer; }
#site-footer { text-align: center; color: #d9e6e3; padding: 32px 16px 44px; background: var(--teal); margin-top: 24px; }
#site-footer a { color: var(--sea-soft); }
#site-footer p { margin: 4px 0; }

/* buttons, badges */
.btn { display: inline-block; border: 1px solid var(--rose); background: var(--white); color: var(--rose-dark); padding: 8px 16px; border-radius: 4px; font: inherit; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--blush); color: var(--rose-dark); }
.btn.primary { background: var(--rose); color: var(--white); } .btn.primary:hover { background: var(--rose-dark); color: var(--white); }
.btn.ghost { border-color: var(--line); color: var(--ink); }
.btn.danger { border-color: var(--danger); color: var(--danger); } .btn.danger:hover { background: #fbeae9; }
.btn.small { padding: 3px 10px; font-size: .9rem; } .btn.block { display: block; text-align: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.badge { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: .8rem; background: var(--blush); color: var(--rose-dark); margin-right: 4px; }
.badge.sample { background: var(--sun-soft); color: var(--sun-deep); } .badge.draft { background: #eee; color: #555; } .badge.internal { background: #e4eaf7; color: #34456f; }
.badge.status { background: #e8f2ea; color: #25593a; } .badge.fail { background: #fbe6e6; color: #8a1f1f; } .login-sent { color: var(--muted); } .badge.rejected { background: var(--danger); color: #fff; } /* a rejected testimonial: the red of Delete */
.db-status, .mail-settings { margin-top: 24px; } .mail-settings .toolbar { margin: 0 0 12px; flex-wrap: nowrap; } .mail-settings .toolbar .field { flex: 1; min-width: 0; } /* the test recipient and its button fill the grid cell next to the sender address */

/* hero and cards */
.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 520px; margin: -24px calc(50% - 50vw) 0; background: var(--teal); color: #fff; }
.hero-text { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 56px max(24px, calc((100vw - 1120px) / 2)) 56px max(24px, calc((100vw - 1120px) / 2)); }
.hero-text > * { max-width: 30rem; }
.hero-logo { width: 72px; height: 72px; border-radius: 50%; margin-bottom: 28px; object-fit: cover; border: 2px solid var(--sea); }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4.2rem); line-height: 1.08; margin-bottom: .4em; }
.hero p { font-size: 1.1rem; line-height: 1.7; color: #d9e6e3; margin: 0 0 28px; }
.hero .btn.primary { background: var(--sea); border-color: var(--sea); color: var(--teal); font-weight: 600; padding: 11px 22px; }
.hero .btn.primary:hover { background: var(--sea-soft); border-color: var(--sea-soft); }
.hero-photo { position: absolute; top: 0; right: 0; width: 50%; height: 100%; object-fit: cover; object-position: 50% 80%; }
/* B-6: pinned blog posts below the hero: title above, square photo with the start of the text on a soft strip at its bottom;
   two per row (one alone uses the full width in a wider frame). text-light = white text on a dark strip, text-dark = black text on a light strip */
.pinned { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 56px 0 48px; align-items: start; }
.pin h2 { color: var(--teal); margin-bottom: 10px; } .pin h2 a { color: inherit; text-decoration: none; } .pin h2 a:hover { color: var(--rose); }
.pin-photo { position: relative; display: block; overflow: hidden; border-radius: var(--radius); text-decoration: none; }
.pin-photo .cover { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform .6s ease; }
.pin-photo:hover .cover { transform: scale(1.03); }
.pinned.single { grid-template-columns: 1fr; } .pinned.single .pin-photo .cover { aspect-ratio: 2 / 1; }
.pin-photo p { position: absolute; inset: auto 0 0 0; margin: 0; padding: 48px 20px 18px; font-size: 1.05rem; line-height: 1.5; }
.pin-photo.text-light p { color: #fff; background: linear-gradient(transparent, rgba(10, 35, 45, .72)); text-shadow: 0 1px 6px rgba(0, 0, 0, .35); }
.pin-photo.text-dark p { color: #14232b; background: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, .82)); }
.pin .admin-bar { padding-top: 8px; justify-content: center; }
/* D-7: page banner: an edge-to-edge photo strip with the title on a dark gradient (like the hero, it breaks out of main's width) */
.banner { position: relative; overflow: hidden; height: 260px; margin: -24px calc(50% - 50vw) 28px; background: var(--teal); display: flex; align-items: flex-end; }
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 35, 45, .05) 30%, rgba(10, 35, 45, .65)); }
.banner-inner { position: relative; z-index: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.banner h1 { color: #fff; margin: 0; font-size: clamp(2rem, 5vw, 3rem); text-shadow: 0 2px 12px rgba(0, 0, 0, .35); display: flex; align-items: center; gap: 8px; }
.banner .btn { background: rgba(255, 255, 255, .92); border-color: transparent; }
.banner .icon-btn { color: #fff; } .banner .icon-btn:hover { color: #fff; background: rgba(255, 255, 255, .18); }
/* a banner with filters on it (Viewings) grows when they wrap, e.g. on a phone */
.banner:has(.toolbar) { height: auto; min-height: 260px; }
.banner .toolbar { margin: 0; gap: 10px; } .banner .toolbar .field { min-width: 160px; }
.banner .toolbar .field > span, .banner .toolbar .check { color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.banner .toolbar .check { margin-right: 4px; min-height: 40px; }
.banner .btn.primary { background: var(--rose); border-color: var(--rose); color: #fff; }
/* secondary banner buttons (Edit locations, Edit listing types): transparent with a white outline, so Add listing stands out */
.banner .btn.glass { background: transparent; border-color: rgba(255, 255, 255, .85); color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.banner .btn.glass:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin: 16px 0 24px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card .cover { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--blush); }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-body p { margin: .2em 0; }
.card-body > .enquire { margin-top: auto; align-self: flex-start; }
.meta { color: var(--muted); font-size: .9rem; } .facts { color: var(--muted); font-size: .92rem; }
.price { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; color: var(--teal); } .price small { font-weight: 400; color: var(--muted); } .price.big { font-size: 1.5rem; }
.admin-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; }
/* PR-7: Enquire on the listing cards, with the admin buttons on the right */
.card-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; }
.card-actions .admin-bar { margin-top: 0; padding-top: 0; }
/* D-8: on every card the admin buttons sit at the bottom right, in the Enquire row where the card has one (staff cards stay centred) */
.card:not(.person) .card-body > .admin-bar { justify-content: flex-end; }
.panel .card-actions { flex-wrap: nowrap; } .panel .card-actions .block { flex: 1; } /* the listing page's Enquire fills the row, the admin buttons sit to its right */
.person .card-body { align-items: center; text-align: center; }
/* TM-1: testimonial cards, the client's words as a quote with the name and details below */
.testimonial blockquote { margin: 0; font-style: italic; color: var(--ink); position: relative; padding-top: 18px; }
.testimonial blockquote::before { content: "\201C"; position: absolute; top: -10px; left: -2px; font-size: 3rem; line-height: 1; color: var(--rose); font-style: normal; }
.testimonial .who { font-weight: 600; margin-top: 10px; } .testimonial .meta, .testimonial .date { font-size: .9rem; }
.avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin-bottom: 8px; }
.avatar.placeholder { background: var(--blush); display: grid; place-items: center; font-size: 2.4rem; color: var(--rose); }
.role { color: #8a6c3a; font-weight: 600; margin: 0; }
.prose p { margin: 0 0 1em; }

/* detail pages */
.post { max-width: 760px; margin: 0 auto; } .cover.wide { width: 100%; border-radius: var(--radius); margin: 12px 0 20px; aspect-ratio: 16 / 9; object-fit: cover; }
.gallery .main { display: block; width: 100%; max-height: min(480px, 70vh); object-fit: contain; background: var(--white); border-radius: var(--radius); }
.gallery .stage { position: relative; } .gallery [data-full] { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
/* PR-11, PR-15: the round photo buttons, shared by the gallery and the full-size pop-up (which only moves them) */
.photo-step, .lb-close { width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .88); color: var(--teal); padding: 0; display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.photo-step:hover, .photo-step:focus-visible, .lb-close:hover, .lb-close:focus-visible { background: var(--white); color: var(--rose); }
.photo-step { position: absolute; top: 50%; transform: translateY(-50%); } .photo-step.prev svg { transform: scaleX(-1); }
.gallery .prev { left: 10px; } .gallery .next { right: 10px; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0; }
.thumb { border: 2px solid transparent; padding: 0; background: none; cursor: pointer; border-radius: 8px; flex: 0 0 auto; }
.thumb:hover, .thumb:focus-visible, .thumb.active { border-color: var(--rose); } .thumb img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; }
.video video, .video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: min(480px, 70vh); border: 0; border-radius: var(--radius); background: #000; }
.thumb.video { position: relative; } .thumb .vt { display: block; width: 96px; height: 72px; object-fit: cover; border-radius: 6px; background: #222; }
.thumb.video::after { content: '▶'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 22px; text-shadow: 0 1px 4px rgba(0, 0, 0, .7); pointer-events: none; }
.detail-grid { display: grid; grid-template-columns: 1fr 340px; gap: 28px; margin-top: 20px; align-items: start; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.panel dl, .contact-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 12px 0; }
dt { color: var(--muted); } dd { margin: 0; }
.contact-list dd { overflow-wrap: anywhere; }
.contact-grid { margin-top: 0; grid-template-columns: 1fr 1fr; align-items: stretch; } /* details card and map side by side, both ending at the same height */
.contact-grid .contact-map { margin-top: 0; height: 100%; min-height: 320px; }
#contact-form { display: flex; flex-direction: column; } /* the message field grows so the form ends level with the map */
#contact-form .field:has(textarea) { flex: 1; } #contact-form textarea { flex: 1; min-height: 120px; resize: vertical; }
#contact-form .btn { align-self: flex-start; }
.contact-grid .panel { padding: 24px 26px; box-shadow: 0 6px 24px rgba(22, 75, 96, .08); border-color: transparent; }
.contact-grid h2 { color: var(--teal); font-size: 1.35rem; }
.contact-list { gap: 12px 20px; font-size: 1.05rem; }
.contact-map { display: block; width: 100%; height: 320px; border: 0; margin-top: 20px; border-radius: var(--radius); box-shadow: 0 6px 24px rgba(22, 75, 96, .08); background: var(--blush); }
.contact-list .msg { display: inline-block; vertical-align: middle; margin-left: 6px; line-height: 0; }
.contact-list button.msg, .contact-row button.msg, td button.msg { border: 0; background: none; padding: 0; cursor: pointer; }
/* CRM-6 / AD-8: icon rows in the client dialog and the Clients list */
.contact-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin: 6px 0; min-height: 30px; }
.contact-row > .muted { min-width: 170px; font-size: .92rem; }
.contact-row .msg, td .msg { display: inline-block; line-height: 0; margin: 0 2px; } .contact-row .msg svg, td .msg svg { width: 22px; height: 22px; }
.contact-row .msg-note { flex-basis: 100%; margin-left: 174px; }
td .msg-note { display: block; }
/* AD-8: the contact icons and the lead/budget values stay on one line; on a phone the table scrolls sideways instead of stacking them */
td.contacts, td.nowrap { white-space: nowrap; } td.contacts .msg-note { white-space: normal; }
/* L-1 to L-3: the locations dialog and the preferred-location checkbox list */
.loc-rows { display: grid; gap: 6px; margin: 8px 0 12px; max-height: 55vh; overflow-y: auto; }
.loc-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: center; }
.loc-row.sortable { grid-template-columns: auto auto 1fr 1fr auto; }
.loc-row.sortable [data-move=down] { margin-left: -4px; }
/* CT-3: a client's contracts: type, location, from, till, bin */
.contract-rows { display: grid; gap: 6px; margin: 4px 0 10px; }
.contract-summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; } .contract-summary ul { list-style: none; margin: 0; padding: 0; flex: 1; } .contract-summary li { padding: 2px 0; }
.contract-row { display: grid; grid-template-columns: 1.3fr 1.3fr 1fr 1fr auto; gap: 0 8px; align-items: end; }
.contract-row .field { margin-bottom: 0; } .contract-row > button { margin-bottom: 6px; }
@media (max-width: 800px) { .contract-row { grid-template-columns: 1fr 1fr; padding-bottom: 8px; border-bottom: 1px solid #e6e1d6; } }
.loc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px 12px; max-height: 60vh; overflow-y: auto; }
.loc-list .check { margin: 0; }
.note-i { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--sea-soft); color: var(--teal); font: italic 700 .9rem/1 Georgia, serif; cursor: help; }
.msg-note { display: block; font-size: .9rem; color: var(--muted); margin-top: 4px; } .contact-list .msg + .msg { margin-left: 4px; } .contact-list .msg:hover { opacity: .85; }
.social { display: flex; gap: 14px; margin: 16px 0 0; }
.social a { color: var(--rose-dark); line-height: 0; } .social a:hover { color: var(--rose); } .social a:hover svg { opacity: .85; }

/* forms */
.field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; }
.field > span, .phone-field > label { font-weight: 600; font-size: .92rem; }
/* CRM-6: in the client dialog the messenger icons and their pen sit right of the phone number */
.phone-line { display: flex; align-items: center; gap: 6px; } .phone-line input { flex: 1; min-width: 0; }
.phone-icons { display: inline-flex; align-items: center; flex: none; } .phone-icons [data-icons] { display: inline-flex; align-items: center; gap: 4px; margin-right: 2px; } .phone-icons .msg { line-height: 0; } .field small { color: var(--muted); }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); width: 100%; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
#site-footer a:focus-visible { outline-color: var(--sun); }
input[type=checkbox] { width: auto; } .check, .checks label { display: inline-flex; gap: 6px; align-items: center; margin-right: 16px; }
.grid2, .bi { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.toolbar { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; margin: 12px 0; } .toolbar .field { margin: 0; min-width: 180px; }
.media-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.media-list li { display: flex; align-items: center; gap: 10px; background: var(--cream); border-radius: 8px; padding: 4px 8px; }
.media-list img, .media-list .vt { flex: none; width: 48px; height: 36px; object-fit: cover; border-radius: 4px; } .media-list .vt { background: #222; } .media-list span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { background: var(--sea-soft); border-radius: 6px; padding: 0 6px; flex: 0 !important; }
.media-add, .picture-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .media-add input[type=url], .picture-row input[type=url] { flex: 1; min-width: 160px; width: auto; }
[hidden] { display: none !important; } /* classes such as .field set display and would otherwise keep hidden elements visible */
.picture-row img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; } .picture-row img[hidden] { display: none; }

/* dialog */
dialog { border: 0; border-radius: var(--radius); padding: 0; width: min(560px, 94vw); max-height: 92vh; box-shadow: 0 10px 40px rgba(0, 0, 0, .3); background: var(--cream); color: var(--ink); }
dialog.wide { width: min(820px, 94vw); } dialog::backdrop { background: rgba(40, 25, 25, .5); }
.dlg-form { padding: 20px; display: flex; flex-direction: column; max-height: 92vh; } .dlg-body { overflow-y: auto; padding: 4px 2px; }
.dlg-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding-top: 14px; }
.dlg-extra { display: flex; align-items: center; gap: 10px; margin-right: auto; flex-wrap: wrap; } /* CT-4: a secondary action on the left of the dialog's buttons */

/* tables and CRM */
.table-wrap { overflow-x: auto; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); margin: 12px 0 24px; }
table { border-collapse: collapse; width: 100%; } th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--blush); font-size: .9rem; } td.actions { white-space: nowrap; text-align: right; } td.actions .btn { margin-left: 4px; }
section + section { margin-top: 32px; }
.group { margin: 16px 0; } .group h3 { display: flex; gap: 8px; align-items: center; } .count { background: var(--blush); border-radius: 999px; padding: 0 10px; font-size: .85rem; }
.group.overdue h3 { color: var(--danger); } .group.today h3, .group.tomorrow h3 { color: var(--ok); }
.viewings { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.viewing { background: var(--white); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); } .viewing p { margin: .25em 0; } .viewing .follow { color: var(--rose-dark); }

@media (max-width: 800px) {
  .menu-toggle { display: block; } #nav { display: none; flex-basis: 100%; flex-direction: column; order: 5; } #nav.open { display: flex; }
  .tools { margin-left: 0; order: 4; flex-basis: 100%; justify-content: space-between; }
  .detail-grid { grid-template-columns: 1fr; } .grid2, .bi, .grid3 { grid-template-columns: 1fr; }
  main { padding: 16px 16px 40px; }
  .hero { grid-template-columns: 1fr; min-height: 0; margin-top: -16px; } .hero-photo { position: static; order: -1; width: 100%; height: 280px; } .hero-text { padding: 32px 16px 40px; }
  .pinned { grid-template-columns: 1fr; margin-top: 32px; } .pin-photo .cover, .pinned.single .pin-photo .cover { aspect-ratio: 4 / 3; } .pin-photo p { font-size: .95rem; padding: 36px 14px 12px; }
  .banner { height: 170px; margin: -16px -16px 20px; } .banner-inner { padding-bottom: 14px; }
  .banner:has(.toolbar) { min-height: 170px; } .banner:has(.toolbar) .banner-inner { padding-top: 40px; } .banner .toolbar .field { flex: 1 1 140px; min-width: 0; }
  .contact-grid .panel { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .pin-photo .cover { transition: none; } .pin-photo:hover .cover { transform: none; } }

.viewings-table { font-size: .92rem; } .viewings-table th, .viewings-table td { padding: 8px 8px; overflow-wrap: break-word; } .viewings-table td.nowrap { white-space: nowrap; overflow-wrap: normal; }
.icon-btn { background: none; border: 0; padding: 4px 6px; margin-left: 2px; border-radius: 6px; color: var(--rose-dark); cursor: pointer; line-height: 0; vertical-align: middle; }
.icon-btn:hover { background: var(--blush); }
.heart { padding: 6px; } .heart svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; } .heart[aria-pressed="true"] svg { fill: currentColor; } /* the favourite mark of a client (CA-8) */
.account { max-width: 760px; margin: 0 auto; } .account .cards { margin-bottom: 8px; } /* CA-5: My account, the groups below each other */
.link-btn.danger { color: var(--danger); } .account-links { margin: 16px 0 32px; }
.icon-btn.danger { color: var(--danger); } .icon-btn.danger:hover { background: #fbeae9; }
fieldset.group { border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px 10px; margin: 10px 0; min-width: 0; }
fieldset.group legend { padding: 0 6px; font-weight: 600; color: var(--rose-dark); }

/* Coastal Light details (D-8): rounded pills, frosted hero card over the full-width photo, soft card shadows, footer wave */
h1, h2, h3 { font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.75rem; }

/* header: white with a soft hairline */
#site-header { border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); }
.brand { color: var(--teal); }
#nav a { color: var(--ink); border-radius: 999px; }
#nav a:hover { background: var(--sea-soft); color: var(--teal); }
#nav a[aria-current="page"] { color: var(--teal); background: var(--sun-soft); box-shadow: none; border-radius: 999px; } /* D-8: the current page is a warm pill */
.lang { border-radius: 999px; }
.lang button[aria-pressed="true"] { background: var(--teal-soft); }

/* buttons: coral pills */
.btn { border-radius: 999px; border-color: var(--teal-soft); color: var(--teal); }
.btn:hover { background: var(--sea-soft); color: var(--teal); }
.btn.primary { border-color: var(--rose); }
.btn.primary:hover { border-color: var(--rose-dark); }

/* hero: the sunset photo edge to edge with the text straight on it, over a deep-sea fade from the left; the photo drifts in once, slowly, on load */
.hero { display: flex; align-items: center; min-height: 640px; background: var(--teal); color: #fff; }
.hero-photo { inset: 0; width: 100%; height: 100%; object-position: 50% 62%; transform-origin: 62% 60%; animation: hero-drift 26s ease-out both; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(10, 38, 50, .88) 0%, rgba(10, 38, 50, .6) 36%, rgba(10, 38, 50, 0) 66%); }
.hero-text { position: relative; z-index: 2; padding: 72px max(24px, calc((100vw - 1120px) / 2)); }
.hero-text > * { max-width: 30rem; }
.hero-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hero-logo { width: 60px; height: 60px; border: 2px solid rgba(255, 255, 255, .75); margin-bottom: 20px; }
.hero h1 { color: #fff; font-weight: 800; font-size: clamp(2.3rem, 4.8vw, 3.6rem); text-shadow: 0 2px 18px rgba(0, 0, 0, .25); }
.hero p { color: #e8f0f3; text-shadow: 0 1px 10px rgba(0, 0, 0, .3); }
.hero .btn.primary { background: var(--sun); border-color: var(--sun); color: var(--teal); font-weight: 700; padding: 12px 26px; }
.hero .btn.primary:hover { background: var(--sun-soft); border-color: var(--sun-soft); color: var(--teal); }
.hero .icon-btn { color: #fff; } .hero .icon-btn:hover { background: rgba(255, 255, 255, .18); }
@keyframes hero-drift { from { transform: scale(1); } to { transform: scale(1.08); } }

/* photo band: rounded photos, no frames */

/* cards: rounded with a soft shadow; cards that open a page lift a little on hover */
.card { border: 0; box-shadow: 0 6px 24px rgba(22, 75, 96, .09); transition: transform .25s ease, box-shadow .25s ease; }
.card:has(.cover):hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(22, 75, 96, .16); }
.price { color: var(--teal-soft); }
.badge { background: var(--sea-soft); color: var(--teal); }
/* PR-6 / D-8: the listing price sits on the photo's lower edge, white on a soft fade */
.card-photo { position: relative; display: block; overflow: hidden; }
.card-photo .cover { transition: transform .5s ease; } .card:hover .card-photo .cover { transform: scale(1.04); }
.card-photo .pricetag { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 44px 16px 12px; color: #fff; font-size: 1.4rem; background: linear-gradient(transparent, rgba(10, 38, 50, .74)); text-shadow: 0 1px 6px rgba(0, 0, 0, .35); }
.card-photo .pricetag small { color: rgba(255, 255, 255, .88); }
/* PR-18, B-6: a featured listing or blog post: the filled golden star (staff click it to tick or untick) and, on listings, the Featured badge;
   on blog posts the star sits in the row of the edit buttons (in-bar), without the shadow it needs on a photo */
.card.property { position: relative; }
.card .star.in-bar, .star.in-bar { position: static; width: 36px; height: 36px; box-shadow: none; border: 1px solid var(--line); }
.star { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 999px; background: #fff; color: var(--muted); box-shadow: 0 2px 8px rgba(0, 0, 0, .18); vertical-align: middle; }
.card .star { position: absolute; top: 12px; right: 12px; z-index: 1; } button.star { width: 44px; height: 44px; cursor: pointer; }
.star svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
span.star, .star[aria-pressed="true"] { color: var(--gold); } span.star svg, .star[aria-pressed="true"] svg { fill: currentColor; }
.badge.featured { display: inline-flex; align-items: center; gap: 4px; background: var(--sun-soft); color: var(--sun-deep); font-weight: 600; }
.badge.featured svg { width: 12px; height: 12px; fill: currentColor; }
.featured-row { margin: 48px 0 8px; } .featured-row h2 { margin-bottom: 0; }
/* PR-19: the cards of the home page row grow with fewer listings, like the featured blog posts: 1 wide (2:1 photo), 2 and 4 in two columns, 3 in three */
.featured-row .cards.n1 { grid-template-columns: 1fr; } .featured-row .cards.n1 .cover { aspect-ratio: 2 / 1; }
.featured-row .cards.n2, .featured-row .cards.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .featured-row .cards.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 720px) { .featured-row .cards[class*=" n"] { grid-template-columns: 1fr; } .featured-row .cards.n1 .cover { aspect-ratio: 4 / 3; } }
/* CA-17: the Processing… popup while a save sends an e-mail */
dialog.busy { border: 0; border-radius: var(--radius); padding: 24px 32px; text-align: center; background: var(--white); color: var(--ink); box-shadow: 0 12px 40px rgba(22, 75, 96, .25); }
dialog.busy::backdrop { background: rgba(10, 38, 50, .35); } dialog.busy p { margin: 12px 0 0; }
.spinner { display: inline-block; width: 32px; height: 32px; border: 3px solid var(--line); border-top-color: var(--teal-soft); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.card-actions > .admin-bar:only-child { margin-left: auto; } /* CA-13: the pen of a card in My listings sits on the right like the other edit buttons */
input[readonly] { background: var(--blush); color: var(--muted); } /* CA-12: the expiry date a co-agent sees but does not set */
.staff-only { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 8px; font-size: .92rem; } /* PR-16, PR-17: the expiry date and the internal notes, for staff */
/* TM-1 / D-8: testimonials have a warm quote mark (the card is white like the others) */
.testimonial blockquote::before { color: var(--sun); font-family: var(--serif); font-size: 4rem; top: -18px; }
/* CA-9: a testimonial that is not released is told by its card, not only by the badge: waiting for approval grey, rejected and revoked pink with a red edge (revoked dashed) */
.testimonial.st-pending { background: #eceae6; border-color: #c9c5bd; }
.testimonial.st-rejected, .testimonial.st-revoked { background: #fbeae9; border-color: var(--danger); }
.testimonial.st-revoked { border-style: dashed; }
/* CA-15: listing cards in the same colours, for staff and for a co-agent on their own (cards have no border here, so the edge is a ring) */
.card.property.st-pending, .card.property.st-draft, .card.property.st-pending:has(.cover):hover, .card.property.st-draft:has(.cover):hover { background: #eceae6; box-shadow: 0 0 0 1px #c9c5bd; }
.card.property.st-removed, .card.property.st-rejected, .card.property.st-expired,
.card.property.st-removed:has(.cover):hover, .card.property.st-rejected:has(.cover):hover, .card.property.st-expired:has(.cover):hover { background: #fbeae9; box-shadow: 0 0 0 1px var(--danger); }
/* empty listing pages: a small line drawing above the friendly message */
.empty-art { display: block; width: 120px; height: auto; margin: 8px auto 4px; color: var(--teal-soft); }
.empty-art circle { fill: var(--sun-soft); stroke: var(--sun); }
th { background: var(--sea-soft); color: var(--teal); }

/* footer: deep sea blue under a wave */
#site-footer { position: relative; color: #d7e7ee; margin-top: 64px; padding-top: 36px; }
/* two wave layers: a pale one behind (::before), the deep one in front (::after) */
#site-footer::before, #site-footer::after { content: ""; position: absolute; left: 0; right: 0; height: 40px; background: var(--wave) center / 100% 100% no-repeat; }
#site-footer::after { top: -39px; }
#site-footer::before { top: -54px; transform: scaleX(-1); opacity: .35; }
#site-footer a { color: #ffd2c4; }

@media (max-width: 800px) {
  .hero { flex-direction: column; align-items: stretch; min-height: 0; }
  .hero::before { display: none; }
  .hero-photo { height: 300px; animation: none; }
  .hero-text { padding: 28px 20px 36px; }
}
@media (prefers-reduced-motion: reduce) { .hero-photo { animation: none; } .card, .card-photo .cover { transition: none; } .card:has(.cover):hover, .card:hover .card-photo .cover { transform: none; } }
.tick { color: var(--ok); font-weight: 700; } /* AD-10: Agent / Admin columns of the Users list */

/* CP-9: the floating contact button and the contact panel (general and property mode) */
.cfab { position: fixed; right: 16px; bottom: 16px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border: 0; border-radius: 999px; background: var(--rose); color: #fff; font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 4px 16px rgba(22, 75, 96, .35); }
.cfab:hover { background: var(--rose-dark); } .cfab[hidden] { display: none; }
#site-footer { padding-bottom: 88px; } /* the floating button never covers the footer's contact details */
.cpanel { position: fixed; right: 16px; bottom: 84px; z-index: 50; width: min(360px, calc(100vw - 32px)); max-height: calc(100vh - 110px); overflow-y: auto; background: var(--cream); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0, 0, 0, .3); padding: 16px 16px 18px; }
.cp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; } .cp-head h2 { margin: 0; font-size: 1.15rem; overflow-wrap: anywhere; }
.cp-kicker { margin: 0 0 2px; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cp-close { background: none; border: 0; font-size: 1.6rem; line-height: 1; padding: 0 6px; cursor: pointer; color: var(--muted); } .cp-close:hover { color: var(--ink); }
.cp-hint { margin: 6px 0 10px; color: var(--muted); font-size: .92rem; }
.cp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.cp-ch { display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; padding: 9px 12px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.cp-ch:hover { background: var(--sea-soft); } .cp-ch svg { flex: none; width: 28px; height: 28px; }
.cp-name { display: flex; flex-direction: column; min-width: 0; font-weight: 600; } .cp-name small { font-weight: 400; color: var(--muted); overflow-wrap: anywhere; }
.cp-note { margin: 10px 0 0; font-size: .92rem; color: var(--ok); } .cp-note[hidden], .cp-msg[hidden] { display: none; }
.cp-msg { display: block; width: 100%; box-sizing: border-box; margin-top: 8px; font: inherit; font-size: .9rem; padding: 8px; border: 1px solid var(--line); border-radius: 8px; resize: none; }
@media (max-width: 800px) {
  .cfab { right: 12px; bottom: 12px; padding: 12px 16px; }
  .cpanel { left: 0; right: 0; bottom: 0; width: auto; max-height: 80vh; border-radius: var(--radius) var(--radius) 0 0; border-width: 1px 0 0; padding-bottom: 24px; }
}
/* CRM-14: the client's name in the viewings list is a button that looks like a link */
.login-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0; } .invite-link { display: flex; gap: 8px; align-items: center; margin: 8px 0; } .invite-link input { flex: 1; min-width: 0; } /* the login of a client in its dialog (CA-3) */
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--teal-soft); text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; } .link-btn:hover { color: var(--rose-dark); }
.post .gallery { margin: 12px 0 20px; }
.media-list .tag { margin-right: 4px; }
.row-link { cursor: pointer; } .row-link:hover td { background: var(--cream); } .row-link td.contacts { cursor: default; }
@media (max-width: 800px) { .hide-m { display: none; } } /* columns that are not shown on a phone; the same values are in the edit dialog */
/* on a phone the tables use tighter cells, e-mail addresses may break and the contact icons are a little smaller, so the lists fit without scrolling sideways */
@media (max-width: 800px) { .table-wrap th, .table-wrap td { padding: 8px 6px; } .table-wrap td { overflow-wrap: anywhere; } .table-wrap td .msg { margin: 0 1px; } .table-wrap td .msg svg { width: 20px; height: 20px; } }
.price-line { display: block; } .price-line + .price-line { font-size: .8em; } /* PR-14: the long term price under the short term price */
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 16px; } @media (max-width: 800px) { .grid4 { grid-template-columns: 1fr 1fr; } } /* four short number fields in a row */
.grid2.keep { grid-template-columns: 1fr 1fr; } /* stays two columns on a phone: status and its date share a line */
/* the price group: six columns; rental prices take two each, price and status (sale) or status and date (rent) three each; on a phone the prices stack, status and date stay on one line */
.grid6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0 16px; } .grid6 > .s2 { grid-column: span 2; } .grid6 > .s3 { grid-column: span 3; }
@media (max-width: 800px) { .grid6 > .s2, .grid6 > .s3.m6 { grid-column: span 6; } }

/* PR-15: full-size photo pop-up */
body.lb-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(10, 14, 16, .94); }
.lightbox img { max-width: 100vw; max-height: 100vh; max-height: 100dvh; object-fit: contain; }
.lightbox .photo-step { position: fixed; } .lightbox .prev { left: 14px; } .lightbox .next { right: 14px; }
.lightbox .lb-close { position: fixed; top: 12px; right: 14px; font-size: 28px; line-height: 1; z-index: 1; }
.lightbox .lb-count { position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); padding: 2px 12px; border-radius: 12px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .9rem; }
