/* Same look as the Property Repairs app (colours, card style, buttons), with a teal accent so the two are easy to tell apart. */
:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1d2430;
  --muted: #6b7482;
  --line: #e3e6ea;
  --line-strong: #cfd4da;
  --accent: #0f766e;
  --accent-soft: #e3f4f1;
  --green: #15803d;
  --green-soft: #e6f4ea;
  --amber: #b45309;
  --amber-soft: #fdf2e3;
  --red: #c62828;
  --red-soft: #fdecec;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 2px; }
h2 { font-size: 18px; margin: 0 0 6px; }
h3 { font-size: 15px; margin: 0 0 10px; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.pad { padding: 40px 0; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 0 20px; height: 56px;
  background: var(--card); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--text); min-width: 0; }
.brand:hover { text-decoration: none; }
.brand span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo {
  width: 26px; height: 26px; border-radius: 7px; flex: none; background: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath d='M12 32 32 16l20 16v16a2 2 0 0 1-2 2H14a2 2 0 0 1-2-2z' fill='white'/%3E%3C/svg%3E");
  background-size: cover;
}
.tabs { display: flex; gap: 4px; margin-left: auto; }
.tabs a { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; color: var(--muted); font-weight: 550; }
.tabs a:hover { background: var(--bg); text-decoration: none; }
.tabs a.on { color: var(--accent); background: var(--accent-soft); }
.tabs a[hidden] { display: none; }
.tab-ico { width: 19px; height: 19px; flex: none; }
.user-btn {
  flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 14px;
}
.user-btn[hidden] { display: none; }

/* ---------- Page ---------- */
.view { max-width: 760px; margin: 0 auto; padding: 22px 16px 60px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 14px; }
.page-head { margin-bottom: 16px; }
.empty { text-align: center; padding: 44px 18px; }
.empty-ico { width: 46px; height: 46px; color: var(--accent); margin-bottom: 8px; }

/* ---------- Forms and buttons ---------- */
.field { display: block; margin-bottom: 12px; }
.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.input {
  width: 100%; padding: 9px 11px; font: inherit; color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 8px; background: #fff;
}
.input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--text);
}
.btn:hover { background: var(--bg); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--red); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.warn-note { background: var(--amber-soft); color: var(--amber); border-radius: 8px; padding: 8px 10px; margin-bottom: 12px; }

/* ---------- Sign in ---------- */
.signin { max-width: 380px; margin: 40px auto; }
.signin .btn { width: 100%; margin-top: 4px; }

/* ---------- People (Settings) ---------- */
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.people li:first-child { border-top: 0; }
.people .who { flex: 1; min-width: 0; }
.people .who b { display: block; }
.role { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 99px; background: var(--bg); color: var(--muted); }
.role.owner { background: var(--accent-soft); color: var(--accent); }
.row-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.card-head h3 { margin: 0; }

/* ---------- Modal and toast ---------- */
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(16, 24, 40, .45); display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px; overflow: auto; }
.modal { background: var(--card); border-radius: 12px; width: 100%; max-width: 420px; padding: 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
#toastRoot { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; }
.toast { background: #1d2430; color: #fff; padding: 10px 14px; border-radius: 9px; font-size: 14px; box-shadow: var(--shadow); }

/* ---------- Menu ---------- */
.menu { position: fixed; z-index: 55; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .14); padding: 6px; min-width: 180px; }
.menu .menu-who { padding: 6px 10px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; background: none; font: inherit; cursor: pointer; border-radius: 7px; color: var(--text); }
.menu button:hover { background: var(--bg); }

@media (max-width: 560px) {
  .topbar { padding: 0 12px; gap: 8px; }
  .tabs a { padding: 7px 9px; }
  .tabs a span { display: none; }
  .view { padding: 16px 12px 50px; }
  .people li { flex-wrap: wrap; }
  .row-btns { width: 100%; justify-content: flex-start; }
}
