/* SikaStay platform pages: signup, login, and the host dashboard. */
:root {
  color-scheme: light;
  --ink: #17221f;
  --muted: #5f6a66;
  --paper: #f7f7f3;
  --surface: #ffffff;
  --line: #dce2dd;
  --green: #17624b;
  --green-dark: #0f4637;
  --coral: #a94f37;
  --gold: #d7a840;
  --soft-green: #eaf1ed;
  --danger: #a53b3b;
  --shadow: 0 18px 46px rgba(20, 34, 29, 0.11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.5; }
body:has(dialog[open]) { overflow: hidden; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; letter-spacing: 0; }
h1 { font-size: 2.5rem; line-height: 1.08; margin-bottom: 12px; }
h2 { font-size: 1.6rem; line-height: 1.15; margin-bottom: 8px; }
h3 { font-size: 1.02rem; margin-bottom: 4px; }
p { color: var(--muted); }
:focus-visible { outline: 3px solid rgba(215, 168, 64, 0.6); outline-offset: 2px; }

/* Buttons */
.btn {
  display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 6px; padding: 0 18px;
  font-weight: 750; font-size: 0.92rem; text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}
.btn { white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }
.btn-primary { background: var(--green); color: white; }
.btn-primary:hover { background: var(--green-dark); }
.btn-quiet { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn-quiet:hover { background: var(--soft-green); }
.btn-small { min-height: 36px; padding: 0 13px; font-size: 0.84rem; }

/* Forms */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; align-content: start; }
.field > span, .field > label { color: var(--ink); font-size: 0.78rem; font-weight: 750; }
.field small { color: var(--muted); font-size: 0.76rem; line-height: 1.4; }
input, select, textarea {
  width: 100%; border: 1px solid #c9d0cb; border-radius: 6px; background: white;
  color: var(--ink); padding: 11px 12px; min-height: 44px;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.address-input { display: grid; grid-template-columns: 1fr auto; align-items: stretch; }
.address-input input { border-right: 0; border-radius: 6px 0 0 6px; }
.address-input .suffix {
  display: grid; align-items: center; border: 1px solid #c9d0cb; border-radius: 0 6px 6px 0;
  background: var(--soft-green); color: var(--muted); padding: 0 12px; font-size: 0.86rem;
}
.hint { min-height: 1.2em; margin: 0; font-size: 0.8rem; font-weight: 650; }
.hint.good { color: var(--green); }
.hint.bad, .message.error { color: var(--danger); }
.message { min-height: 0; margin: 0; color: var(--green-dark); font-size: 0.86rem; font-weight: 650; }
.message:empty { display: none; }
.message.error { padding: 10px 12px; border-radius: 6px; background: #fbeeee; }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark {
  display: grid; width: 40px; height: 40px; place-items: center; border-radius: 6px;
  background: var(--green); color: white; font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem;
}
.brand > span:last-child { min-width: 0; }
.brand strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem; font-weight: 600; }
.brand small { display: block; color: var(--muted); font-size: 0.72rem; }

/* Signup and login */
.auth-layout { display: grid; min-height: 100svh; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.auth-aside {
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  padding: 44px clamp(28px, 5vw, 64px); background: #16342b; color: white;
}
.auth-aside .brand, .auth-aside .brand small { color: white; }
.auth-aside .brand small { opacity: 0.7; }
.auth-aside .brand-mark { background: var(--gold); color: #16342b; }
.auth-aside h1 { max-width: 460px; color: white; font-size: 2.9rem; }
.auth-aside p { max-width: 440px; color: rgba(255, 255, 255, 0.78); font-size: 1.02rem; }
.auth-points { display: grid; gap: 14px; margin: 26px 0 0; padding: 0; list-style: none; }
.auth-points li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; color: rgba(255, 255, 255, 0.9); font-size: 0.95rem; }
.auth-points li::before { content: "\2713"; color: var(--gold); font-weight: 800; }
.auth-footnote { margin: 0; color: rgba(255, 255, 255, 0.6); font-size: 0.8rem; }
.auth-main { display: grid; align-content: center; justify-items: center; padding: 40px clamp(20px, 5vw, 64px); }
.auth-card { width: min(100%, 480px); }
.auth-card h2 { font-size: 2rem; }
.auth-card > p { margin-bottom: 24px; }
.auth-alt { margin: 22px 0 0; font-size: 0.9rem; text-align: center; }
.auth-alt a { color: var(--green); font-weight: 750; }
.fine-print { margin: 0; font-size: 0.78rem; line-height: 1.5; }

/* Dashboard */
.dash-header {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px); border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
}
.dash-actions { display: flex; align-items: center; gap: 10px; }
.dash-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; width: min(1080px, 100%); margin: 0 auto; padding: 34px clamp(16px, 4vw, 40px) 70px; }
.dash-title p { margin-bottom: 0; }
.card { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 24px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.card-head h2 { margin-bottom: 2px; font-size: 1.4rem; }
.card-head p { margin-bottom: 0; font-size: 0.9rem; }

.steps { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.step { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.step:first-child { border-top: 0; padding-top: 0; }
.step-number {
  display: grid; width: 30px; height: 30px; place-items: center; border: 2px solid var(--line);
  border-radius: 50%; color: var(--muted); font-size: 0.82rem; font-weight: 800;
}
.step.done .step-number { border-color: var(--green); background: var(--green); color: white; }
.step.current .step-number { border-color: var(--gold); color: var(--ink); }
.step h3 { margin-bottom: 1px; }
.step p { margin-bottom: 0; font-size: 0.86rem; }
.step.done h3 { color: var(--muted); }

.listings { display: grid; gap: 12px; }
.listing {
  display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center;
  padding: 16px 18px; border: 1px solid var(--line); border-radius: 8px;
}
.listing-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0 0; color: var(--muted); font-size: 0.86rem; }
.listing-actions { display: flex; gap: 8px; }
.badge {
  display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 999px;
  background: #f1ecdd; color: #6d5614; font-size: 0.72rem; font-weight: 800; vertical-align: middle;
}
.badge.live { background: var(--soft-green); color: var(--green-dark); }
.empty { padding: 26px 18px; border: 1px dashed #c9d0cb; border-radius: 8px; text-align: center; }
.empty p { max-width: 420px; margin: 0 auto 14px; }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.metric { padding: 14px 16px; border-radius: 8px; background: var(--soft-green); }
.metric span { display: block; color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.metric strong { font-family: Georgia, "Times New Roman", serif; font-size: 1.5rem; font-weight: 600; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: 0.74rem; font-weight: 800; text-transform: uppercase; }
.status-confirmed { color: var(--green); font-weight: 750; }
.status-pending { color: #8a6a12; font-weight: 750; }

/* Listing dialog */
.listing-dialog {
  width: min(640px, calc(100% - 28px)); max-height: calc(100svh - 28px); overflow: auto;
  border: 0; border-radius: 10px; padding: 0; background: var(--surface); color: var(--ink);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3);
}
.listing-dialog::backdrop { background: rgba(7, 18, 15, 0.7); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin-bottom: 0; font-size: 1.4rem; }
.dialog-body { padding: 22px 24px 26px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.form-section { display: grid; gap: 14px; }
.form-section + .form-section { margin-top: 6px; padding-top: 18px; border-top: 1px solid var(--line); }
.form-section > h3 { margin-bottom: 0; font-size: 0.82rem; text-transform: uppercase; color: var(--muted); }
.money-input { position: relative; }
.money-input input { padding-left: 52px; }
.money-input::before {
  content: "GHS"; position: absolute; top: 50%; left: 12px; transform: translateY(-50%);
  color: var(--muted); font-size: 0.78rem; font-weight: 800; pointer-events: none;
}

@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-aside { gap: 24px; padding: 28px 24px; }
  .auth-aside h1 { font-size: 2.1rem; }
  .auth-points { display: none; }
}

@media (max-width: 640px) {
  h1 { font-size: 2rem; }
  .field-row { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr; }
  .listing { grid-template-columns: 1fr; }
  .step { grid-template-columns: 34px 1fr; }
  .step .btn, .step .badge { grid-column: 2; justify-self: start; margin-left: 0; }
  .dash-header { gap: 10px; }
  .dash-header .brand { min-width: 0; }
  .dash-header .brand strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dash-header .brand small, #viewSite { display: none; }
  .dialog-body, .dialog-head { padding-left: 18px; padding-right: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

[hidden] { display: none !important; }

.turnstile-slot:empty { display: none; }

.code-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px dashed var(--green); border-radius: 8px; background: var(--soft-green); }
.code-box code { color: var(--green-dark); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.5rem; font-weight: 800; letter-spacing: 0.06em; }
.verify-label { margin: 0 0 -6px; color: var(--muted); font-size: 0.8rem; font-weight: 750; }
.verify-steps { margin: 0; padding-left: 1.2rem; color: var(--muted); font-size: 0.92rem; line-height: 1.7; }
.verify-alt { margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.verify-alt p { margin-bottom: 10px; font-size: 0.9rem; }
.dialog-body > p a { color: var(--green); font-weight: 650; }

.forgot-link { margin: -6px 0 0; font-size: 0.86rem; text-align: right; }
.forgot-link a { color: var(--green); font-weight: 650; }
.notice { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-color: #e7d49a; background: #fff8e1; }
.notice h2 { margin-bottom: 2px; font-size: 1.15rem; }
.notice p { margin: 0; font-size: 0.9rem; }
@media (max-width: 640px) { .notice { flex-direction: column; align-items: flex-start; } }

.check { display: flex; align-items: flex-start; gap: 10px; color: var(--ink); font-size: 0.9rem; font-weight: 500; text-transform: none; }
.check input { width: 18px; min-height: 0; margin-top: 3px; flex: none; }
.check a { color: var(--green); font-weight: 650; }
.policy-box { padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft-green); font-size: 0.88rem; }
.policy-box p { margin: 0 0 4px; color: var(--ink); }
.policy-box .policy-title { color: var(--green-dark); }
.policy-box details { margin-top: 6px; }
.policy-box summary { cursor: pointer; color: var(--green); font-weight: 650; }
.policy-box ul { margin: 8px 0 0; padding-left: 1.1rem; color: var(--muted); line-height: 1.55; }

.domain-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.domain-row:first-child { border-top: 0; padding-top: 0; }
.domain-row strong { display: inline-block; margin-right: 8px; }
.domain-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
#domainOrders h3 { margin: 22px 0 8px; font-size: 1rem; }
.domain-order { margin: 6px 0 0; font-size: 0.9rem; }
.domain-outcome { margin: 10px 0; }
.dns-table td { white-space: normal; }
.dns-value { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.8rem; word-break: break-all; }
.check-list { margin: 8px 0 14px; padding: 0; list-style: none; }
.check-list li { margin-bottom: 6px; font-size: 0.92rem; }
.check-list small { display: block; margin-left: 1.2rem; color: var(--muted); }
.check-ok strong { color: var(--green); }
.check-bad strong, .check-bad { color: var(--danger); }
.domain-setup h3 { margin: 16px 0 6px; }
@media (max-width: 640px) { .domain-row { flex-direction: column; align-items: flex-start; } }

/* Calendar sync */
.calendar-line { margin: 6px 0 0; font-size: 0.88rem; }
.calendar-ok { color: var(--green-dark); }
.calendar-warn { color: #8a5a00; }
.calendar-bad { color: #9b2c2c; }
.cal-step { padding: 14px 0; border-top: 1px solid var(--line); }
.cal-step:first-of-type { border-top: 0; }
.cal-step h3 { margin: 0 0 6px; font-size: 1.02rem; }
.cal-step p { margin: 0 0 10px; color: var(--muted); font-size: 0.92rem; line-height: 1.55; }
.cal-step .calendar-line { margin: 0 0 10px; }
.cal-step .verify-label { margin: 12px 0 0; }
.calendar-input { display: flex; gap: 8px; align-items: stretch; margin-bottom: 10px; }
.calendar-input input { flex: 1; min-width: 0; }
.link-box { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; }
.listing-actions { flex-wrap: wrap; }
@media (max-width: 640px) { .calendar-input { flex-direction: column; } }

/* Sign in with Google and by texted code */
.auth-options { display: grid; gap: 10px; margin-bottom: 18px; }
.btn-google { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid #c9d0cb; background: #fff; color: #1f1f1f; text-decoration: none; font-weight: 650; }
.btn-google:hover { background: #f7f8f8; }
.divider { display: flex; align-items: center; gap: 12px; margin: 6px 0 0; color: var(--muted); font-size: 0.82rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.google-note { display: grid; gap: 8px; margin-bottom: 18px; padding: 12px 14px; border-radius: 8px; background: var(--soft-green); }
.google-note p { margin: 0; font-size: 0.9rem; color: var(--ink); }
.google-note .btn { justify-self: start; }
.phone-step { margin-bottom: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 8px; }
.phone-step h3 { margin-bottom: 4px; }
.phone-step-links { display: flex; flex-wrap: wrap; gap: 8px; }
.phone-inline { display: flex; gap: 8px; margin-top: 10px; }
.phone-inline input { width: 140px; min-height: 36px; padding: 0 10px; border: 1px solid #d9c98f; border-radius: 8px; }
#phoneForm .btn-quiet, #loginForm + .btn-quiet { width: 100%; }

/* Listing tools: amenities, dates and prices, photos */
.amenity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 14px; margin: 6px 0 14px; }
.amenity-grid .check { font-size: 0.88rem; }
.dates-dialog { width: min(760px, calc(100vw - 24px)); }
.dates-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dates-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.dates-grid .weekday { padding: 4px 0; color: var(--muted); font-size: 0.72rem; font-weight: 700; text-align: center; }
.date-cell { display: grid; align-content: start; gap: 2px; min-height: 58px; padding: 6px 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); text-align: left; }
.date-cell.is-empty { border: 0; background: none; }
.date-number { font-weight: 750; font-size: 0.85rem; }
.date-price { color: var(--muted); font-size: 0.68rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.date-cell.is-custom { border-color: var(--gold); background: #fff8e1; }
.date-cell.is-blocked, .date-cell.is-blocked_linked { background: repeating-linear-gradient(135deg, #eef0ee, #eef0ee 6px, #e2e6e3 6px, #e2e6e3 12px); color: var(--muted); }
.date-cell.is-booked, .date-cell.is-held { background: var(--soft-green); border-color: #b9d3c6; }
.date-cell.is-airbnb { background: #fdeeee; border-color: #efc8c8; }
.date-cell.is-past { opacity: 0.45; }
.date-cell.is-selected { outline: 3px solid var(--green); outline-offset: -2px; }
.dates-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.8rem; }
.dates-legend li { display: flex; align-items: center; gap: 6px; }
.swatch { width: 14px; height: 14px; border: 1px solid var(--line); border-radius: 3px; }
.swatch.open { background: var(--surface); }
.swatch.custom { background: #fff8e1; border-color: var(--gold); }
.swatch.blocked { background: #e2e6e3; }
.swatch.booked { background: var(--soft-green); }
.swatch.airbnb { background: #fdeeee; }
.dates-actions { padding-top: 12px; border-top: 1px solid var(--line); }
.dates-actions p { margin: 0 0 8px; font-size: 0.9rem; }
.price-set { display: inline-flex; gap: 6px; align-items: center; }
.price-set .money-input input { width: 110px; min-height: 36px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 14px; }
.photo-card { display: grid; gap: 8px; margin: 0; }
.photo-frame { position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 8px; background: var(--soft-green); }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-cover { position: absolute; top: 8px; left: 8px; }
.photo-caption { min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 0.85rem; }
.upload-button { display: inline-flex; align-items: center; cursor: pointer; }
@media (max-width: 640px) {
  .date-cell { min-height: 48px; padding: 4px 2px; }
  .date-price { font-size: 0.6rem; }
}
.calendar-warning { margin: 0 0 12px; padding: 12px 14px; border: 1px solid #e7d49a; border-radius: 8px; background: #fff8e1; }
.calendar-warning strong { display: block; margin-bottom: 4px; }
.calendar-warning p { margin: 0 0 6px; color: var(--ink); font-size: 0.88rem; }
.calendar-warning p:last-child { margin-bottom: 0; }
