/* 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; 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; }
