/* Shared design system for every Sunset app.
   Colors and type are the same ones the lobby kiosk uses, pulled from
   sunsettherapyspaces.com, so the family looks like one product.

   Type note: the site's real headline face, "Albra," is a licensed
   commercial font. Fraunces stands in for it — a free, similarly warm
   editorial serif. Inter matches the real site's body text exactly. */

:root {
  --cream: #F1ECE7;
  --white: #FFFFFF;
  --ink: #37302A;
  --ink-soft: #6b5f55;
  --terracotta: #7F533A;
  --terracotta-dark: #6a4530;
  --border: #E3DAD1;
  --danger: #B0402C;
  --danger-soft: #FBEFE9;
  --success: #4F6B4A;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius: 18px;
  --radius-sm: 10px;

  /* One spacing scale, so gaps across the apps relate to each other
     instead of every page inventing its own numbers. */
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;

  --shadow-card: 0 1px 2px rgba(55, 48, 42, .04), 0 8px 24px rgba(55, 48, 42, .06);

  /* Tints derived from the accent, so a booking page themed in another
     business's colour doesn't keep terracotta-tinted highlights. The flat
     values come first as a fallback for browsers without color-mix. */
  --accent-tint: #F3EDE7;
  --accent-tint: color-mix(in srgb, var(--terracotta) 12%, var(--white));
  --accent-tint-strong: #E8DCD1;
  --accent-tint-strong: color-mix(in srgb, var(--terracotta) 24%, var(--white));
  --accent-edge: #D9C6B6;
  --accent-edge: color-mix(in srgb, var(--terracotta) 35%, var(--white));
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: 760px; margin: 0 auto; padding: var(--space-6) var(--space-4) 80px; }
.wrap-wide { max-width: 1040px; }

/* Short, single-purpose pages (sign in, connect a calendar) sit in the
   middle of the screen rather than clinging to the top with a sea of
   empty space underneath. */
.page-center {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-5) var(--space-4);
}
.page-center > * { width: 100%; max-width: 420px; }
@media (max-height: 640px) {
  /* On a short window, go back to top-aligned so nothing is cut off. */
  .page-center { justify-content: flex-start; }
}

/* ------------------------------------------------------------------ brand */

.brand-row { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); }
.brand-row.center { justify-content: center; margin-bottom: var(--space-4); }
/* A supplied brand lockup, used instead of our mark + wordmark. */
.brand-row .brand-logo { height: 30px; width: auto; display: block; }
@media (max-width: 520px) { .brand-row .brand-logo { height: 26px; } }
.brand-row .mark { width: 24px; height: 24px; color: var(--terracotta); flex: none; }
.brand-row .mark svg { width: 100%; height: 100%; display: block; }
.brand-row .wordmark {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 600;
}

/* ------------------------------------------------------------------- type */

h1 { font-family: var(--font-display); font-weight: 500; font-size: 32px; margin: 0 0 var(--space-5); line-height: 1.2; letter-spacing: -0.01em; }
h2 { font-family: var(--font-display); font-weight: 500; font-size: 21px; margin: var(--space-6) 0 var(--space-3); }
h3 { font-family: var(--font-body); font-weight: 600; font-size: 15px; margin: 0 0 6px; }
p { line-height: 1.6; }
.hint { font-size: 13px; color: var(--ink-soft); margin-top: 6px; line-height: 1.5; }
.muted { color: var(--ink-soft); }

/* ------------------------------------------------------------------ cards */

.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--space-5);
  box-shadow: var(--shadow-card);
}
.card + .card { margin-top: var(--space-3); }
.card-tight { padding: var(--space-3) var(--space-4); }
@media (max-width: 520px) { .card { padding: var(--space-4); } }

/* ----------------------------------------------------------------- inputs */

label { display: block; font-size: 13px; color: var(--ink-soft); margin: var(--space-4) 0 var(--space-1); font-weight: 500; }
label:first-child { margin-top: 0; }

input, textarea, select {
  width: 100%; font-size: 16px; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); font-family: var(--font-body); color: var(--ink);
  background: var(--white);
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--terracotta); outline-offset: -1px; border-color: var(--terracotta);
}
textarea { resize: vertical; min-height: 64px; }

.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1 1 180px; }

.check { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; color: var(--ink); }
.check input { width: auto; flex: none; }

/* ---------------------------------------------------------------- buttons */

.btn {
  display: inline-block; padding: 12px 20px; border-radius: var(--radius-sm); border: none;
  font-size: 15px; font-weight: 600; cursor: pointer; font-family: var(--font-body);
  text-decoration: none; text-align: center;
}
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--terracotta); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--terracotta-dark); }
.btn-secondary { background: var(--cream); color: var(--ink); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { background: #e9e2db; }
.btn-danger { background: transparent; color: var(--danger); padding: 6px 10px; font-size: 14px; }
.btn-block { width: 100%; }

/* ----------------------------------------------------------------- tables */

table { width: 100%; border-collapse: collapse; margin-top: 4px; }
th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-soft); padding: 8px 6px; border-bottom: 1px solid var(--border); font-weight: 600;
}
td { padding: 12px 6px; border-bottom: 1px solid var(--border); font-size: 15px; vertical-align: top; }
tr:last-child td { border-bottom: none; }
.empty-row td { color: var(--ink-soft); text-align: center; padding: 24px 6px; }

/* ------------------------------------------------------------------ chips */

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-block; background: var(--cream); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px 12px; font-size: 13px; color: var(--ink-soft);
}
.chip.on { background: var(--accent-tint); border-color: var(--accent-edge); color: var(--terracotta); font-weight: 600; }

/* ----------------------------------------------------------------- status */

.status { margin-top: var(--space-3); font-size: 14px; min-height: 20px; line-height: 1.5; }
/* Reserve no room until there's something to say, so a form doesn't sit
   on a band of dead space. */
.status:empty { min-height: 0; margin-top: 0; }
.status.ok { color: var(--success); }
.status.err { color: var(--danger); }

/* ------------------------------------------------------- login + app shell */

.login-screen { text-align: left; }
.login-screen h1 { font-size: 26px; margin-bottom: var(--space-4); text-align: center; }
.login-screen .btn { width: 100%; margin-top: var(--space-4); }
.login-screen .status { text-align: center; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-5);
}
.topbar .who { font-size: 13px; color: var(--ink-soft); }
.backlink {
  display: inline-block; font-size: 13px; color: var(--ink-soft);
  text-decoration: none; margin-bottom: var(--space-3);
}
.backlink:hover { color: var(--terracotta); }

/* Tiles on the hub */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-3); }
.tile {
  display: block; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--space-4); text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow-card);
  transition: border-color .15s ease, transform .15s ease;
}
.tile:hover { border-color: var(--terracotta); transform: translateY(-1px); }
.tile .tile-name { font-family: var(--font-display); font-size: 19px; margin-bottom: 6px; }
.tile .tile-blurb { font-size: 14px; color: var(--ink-soft); line-height: 1.5; }
.tile.soon { opacity: .6; pointer-events: none; }
.tile.soon .tile-name::after {
  content: "Soon"; font-family: var(--font-body); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft);
  border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; margin-left: 8px;
  vertical-align: middle;
}

.hidden { display: none !important; }
