:root {
  color-scheme: light;
  --ink: #26332f;
  --muted: #718079;
  --paper: #f5f2ec;
  --surface: #fffdfa;
  --line: #e5e3db;
  --sage: #e7eee7;
  --green: #3d655a;
  --orange: #d7774e;
  --shadow: 0 14px 36px rgba(38, 51, 47, .07);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid #82a895;
  outline-offset: 3px;
}
[hidden] { display: none !important; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 252px;
  flex: 0 0 252px;
  display: flex;
  flex-direction: column;
  padding: 27px 16px 20px;
  background: var(--sage);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 9px 43px;
  color: var(--ink);
  text-decoration: none;
  font: 700 21px Georgia, serif;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--green);
  color: white;
}
.brand-accent { color: var(--green); }
.nav-label, .eyebrow {
  margin: 0;
  color: #849088;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
}
.nav-label { padding: 0 12px 12px; }
.nav-label-spaced { padding-top: 26px; }
.sidebar nav { display: grid; gap: 5px; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 43px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #596860;
  text-align: left;
  font-weight: 650;
  font-size: 13px;
}
.nav-link > span { width: 20px; font-size: 17px; text-align: center; }
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,.7); color: var(--ink); }
.sidebar-bottom { margin-top: auto; }
.security-note {
  padding: 13px;
  border: 1px solid #dfe4db;
  border-radius: 9px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}
.security-note strong { color: var(--ink); }
.owner-mini { display: flex; gap: 10px; align-items: center; padding: 9px 3px 0; font-size: 12px; }
.owner-mini strong, .owner-mini small { display: block; }
.owner-mini small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #d78a67;
  color: white;
  font-size: 10px;
  font-weight: 700;
}

.main { min-width: 0; flex: 1; padding-bottom: 48px; }
.topbar {
  position: sticky;
  z-index: 3;
  top: 0;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 clamp(20px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
  background: rgba(245,242,236,.96);
  backdrop-filter: blur(12px);
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.breadcrumb { color: #909b94; font-size: 12px; }
.breadcrumb span { padding: 0 8px; }
.breadcrumb strong { color: var(--ink); }
.menu-toggle { display: none; border: 0; background: transparent; color: var(--ink); font-size: 22px; }
.install-button {
  border: 1px solid #d3e2d5;
  border-radius: 999px;
  background: #e8f1e8;
  color: var(--green);
  padding: 9px 14px;
  font-size: 11px;
  font-weight: 700;
}
.auth-button {
  border-color: rgba(61, 101, 90, .28);
  background: #f0f7f3;
}
.security-banner {
  display: flex;
  align-items: center;
  gap: 11px;
  max-width: 1100px;
  margin: 22px auto 0;
  padding: 11px 15px;
  border: 1px solid #ecdfc8;
  border-radius: 9px;
  background: #f8f1e6;
  color: #766b58;
  font-size: 11px;
  line-height: 1.5;
}
.security-banner > span { font-size: 16px; }
.security-banner p { flex: 1; margin: 0; }
.security-banner strong { color: #5e503c; }
.banner-dismiss { border: 0; background: transparent; color: #7f7567; font-size: 20px; }
.view { max-width: 1100px; margin: 0 auto; padding: 42px 0 50px; }
.page-heading { margin-bottom: 24px; }
.page-heading h1 {
  margin: 9px 0 8px;
  font: 600 clamp(30px, 4vw, 42px)/1.12 Georgia, serif;
  letter-spacing: -.8px;
}
.page-heading > p:last-child { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.heading-row { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.button {
  min-height: 40px;
  border-radius: 7px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 700;
}
.button-primary { border: 1px solid var(--green); background: var(--green); color: white; }
.button-primary:hover { background: #31574d; }
.button-secondary { border: 1px solid var(--line); background: white; color: var(--ink); }
.notice-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 17px;
  border-radius: 9px;
  background: #e8f0e7;
}
.notice-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #78a385;
  color: white;
  font-weight: 700;
}
.notice-card p { margin: 0; }
.notice-card strong, .notice-card small { display: block; }
.notice-card strong { font-size: 12px; }
.notice-card small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.overview-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 17px; margin-top: 18px; }
.card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 21px;
}
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card h2, .info-card h2, .install-card h2 {
  margin: 7px 0 10px;
  font: 600 21px Georgia, serif;
}
.text-button { border: 0; background: transparent; color: var(--green); font-size: 11px; font-weight: 700; }
.empty-inline { margin: 17px 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.empty-inline strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 14px; }
.empty-inline small { color: var(--muted); }
.feature-card { background: #e4eee4; border-color: #d6e4d7; }
.feature-card > p:not(.eyebrow) { color: #687970; font-size: 12px; line-height: 1.65; }
.activity-card { margin-top: 18px; }

.chat-card { max-width: 800px; padding: 0; overflow: hidden; }
.chat-context { display: flex; align-items: center; gap: 11px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.chat-context strong, .chat-context small { display: block; }
.chat-context strong { font-size: 13px; }
.chat-context small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.messages-list { min-height: 260px; padding: 22px; }
.message { width: fit-content; max-width: min(78%, 500px); margin-bottom: 15px; }
.message.sent { margin-left: auto; text-align: right; }
.message small { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.message p { margin: 0; padding: 11px 13px; border-radius: 5px 13px 13px; background: #edf2eb; font-size: 12px; line-height: 1.6; text-align: left; overflow-wrap: anywhere; }
.message.sent p { border-radius: 13px 5px 13px 13px; background: #f7e5dc; }
.message-form { display: flex; gap: 10px; padding: 14px 18px 5px; border-top: 1px solid var(--line); }
.message-form input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 7px; padding: 10px 12px; background: white; font-size: 12px; }
.form-hint { margin: 8px 18px 15px; color: var(--muted); font-size: 10px; line-height: 1.5; }

.form-card { max-width: 700px; }
.form-card > p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.invite-code { margin: 14px 0; padding: 14px 16px; border: 1px dashed var(--green); border-radius: 9px; background: var(--sage); color: var(--ink) !important; font-size: 24px !important; font-weight: 700; letter-spacing: .12em; text-align: center; user-select: all; }
.form-card > h2 { margin-top: 0; }
.appointment-form { display: grid; gap: 14px; }
.appointment-form label { display: grid; gap: 6px; color: #526159; font-size: 11px; font-weight: 700; }
.appointment-form input { width: 100%; min-height: 40px; border: 1px solid var(--line); border-radius: 7px; padding: 9px 11px; background: white; color: var(--ink); }
.form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.appointment-form button { justify-self: start; }
.appointment-list { display: grid; gap: 12px; max-width: 700px; margin-top: 16px; }
.appointment-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.appointment-item h2 { margin: 5px 0; }
.appointment-item p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.appointment-item .eyebrow { font-size: 9px; }

.warning-panel { padding: 17px 19px; border: 1px solid #ecdfc8; border-radius: 10px; background: #f8f1e6; }
.warning-panel strong { color: #5e503c; font-size: 13px; }
.warning-panel p { margin: 7px 0 0; color: #766b58; font-size: 12px; line-height: 1.65; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 17px; }
.info-card { box-shadow: none; }
.info-card > p:not(.eyebrow) { color: var(--muted); font-size: 12px; line-height: 1.7; }
.info-card small { display: block; margin-top: 10px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.info-card ul { padding-left: 18px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.copyright { color: var(--ink) !important; font-weight: 700; }
.install-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 17px; }
.install-card h2 { margin-bottom: 6px; }
.install-card p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.app-footer { padding: 18px 20px 0; color: var(--muted); text-align: center; font-size: 10px; }
.toast { position: fixed; z-index: 5; right: 20px; bottom: 20px; max-width: min(420px, calc(100vw - 40px)); padding: 12px 16px; border-radius: 8px; background: #24312e; color: white; box-shadow: var(--shadow); font-size: 12px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: .18s ease; }
.toast.visible { opacity: 1; transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1180px) {
  .view, .security-banner { margin-left: 28px; margin-right: 28px; }
}
@media (max-width: 820px) {
  .sidebar { position: fixed; z-index: 4; inset: 0 auto 0 0; transform: translateX(-105%); transition: transform .2s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: block; }
  .topbar { justify-content: flex-start; }
  .topbar-actions { margin-left: auto; }
  .overview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .view, .security-banner { margin-left: 16px; margin-right: 16px; }
  .view { padding-top: 30px; }
  .heading-row, .install-card { align-items: flex-start; flex-direction: column; }
  .info-grid, .form-columns { grid-template-columns: 1fr; }
  .appointment-item { align-items: flex-start; }
  .security-banner { align-items: flex-start; }
  .security-banner > span { padding-top: 2px; }
}
