:root {
  color: #18201b;
  background: #f5f7f2;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --ink: #18201b;
  --muted: #657166;
  --panel: rgba(255, 255, 255, 0.94);
  --line: #dbe2d8;
  --green: #18715a;
  --green-strong: #0d5b49;
  --blue: #234b6f;
  --gold: #b7791f;
  --shadow: 0 18px 45px rgba(24, 32, 27, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 8%, rgba(24, 113, 90, 0.13), transparent 30%),
    radial-gradient(circle at 86% 18%, rgba(183, 121, 31, 0.16), transparent 26%),
    linear-gradient(135deg, #f7f8f5 0%, #eef4ef 58%, #f6f1e7 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

#root {
  min-height: 100vh;
}

.public-site {
  min-height: 100vh;
}

.public-hero,
.public-band,
.auth-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.public-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.7fr);
  gap: 40px;
  align-items: center;
  min-height: 78vh;
  padding: 48px 0 28px;
}

.public-hero-copy,
.launch-snapshot,
.auth-panel,
.panel,
.metric,
.workflow-card,
.launch-card,
.role-button {
  background: var(--panel);
  border: 1px solid rgba(219, 226, 216, 0.95);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.public-hero-copy {
  padding: clamp(28px, 5vw, 56px);
}

.brand-row,
.sidebar-brand,
.row-header,
.topbar,
.status-strip,
.identity-chip,
.dispatch-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark.compact {
  width: 36px;
  height: 36px;
}

.eyebrow,
.snapshot-label {
  margin: 0 0 8px;
  color: var(--green-strong);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(2.55rem, 6vw, 5.2rem);
  line-height: 0.96;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  line-height: 1.08;
}

h3 {
  font-size: 1.1rem;
}

.auth-copy,
.public-section-heading,
.launch-snapshot p,
.workflow-card p,
.launch-card span,
.role-button small,
.detail-list,
.empty-state span {
  color: var(--muted);
}

.hero-actions,
.role-grid,
.workflow-grid,
.launch-grid,
.metrics-grid,
.content-grid,
.panel-list,
.dispatch-list,
.request-form,
.summary-list {
  display: grid;
  gap: 14px;
}

.hero-actions {
  grid-template-columns: repeat(2, max-content);
  margin-top: 26px;
}

.primary-link,
.secondary-link,
.text-button,
.sign-out,
.role-button,
.request-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
  text-decoration: none;
}

.primary-link,
.request-submit,
.text-button:hover,
.role-button:hover,
.sidebar nav button.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.secondary-link {
  background: #eef4ef;
}

.launch-snapshot {
  padding: 28px;
}

.launch-snapshot strong {
  display: block;
  margin-bottom: 18px;
  font-size: 1.45rem;
  line-height: 1.1;
}

dl {
  margin: 0;
}

.launch-snapshot dl,
.auth-status,
.detail-list {
  display: grid;
  gap: 12px;
}

.launch-snapshot div,
.auth-status div,
.detail-list div {
  display: grid;
  gap: 4px;
}

dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.public-band,
.auth-panel {
  padding: 56px 0;
}

.workflow-grid,
.launch-grid,
.metrics-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.workflow-card,
.launch-card,
.metric,
.panel {
  padding: 22px;
}

.workflow-card strong,
.launch-card strong,
.metric strong {
  display: block;
  margin-bottom: 8px;
}

.auth-panel {
  margin-bottom: 56px;
  padding: 32px;
}

.compact-heading {
  margin-bottom: 20px;
}

.role-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 20px;
}

.role-button {
  align-items: flex-start;
  min-height: 112px;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.role-button span {
  font-size: 1.06rem;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  background: rgba(255, 255, 255, 0.86);
  border-right: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.sidebar nav {
  display: grid;
  gap: 8px;
  margin: 28px 0;
}

.sidebar nav button,
.sign-out {
  justify-content: flex-start;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 14px;
  background: transparent;
  color: var(--ink);
  font-weight: 800;
}

.workspace {
  min-width: 0;
  padding: 26px;
}

.topbar {
  justify-content: space-between;
  margin-bottom: 22px;
}

.identity-chip {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.identity-chip span {
  color: var(--muted);
  font-size: 0.86rem;
}

.route-panel {
  display: grid;
  gap: 20px;
}

.status-strip {
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
}

.status-dot.ready {
  background: var(--green);
}

.status-dot.error {
  background: #b42318;
}

.content-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel.wide {
  grid-column: span 2;
}

.detail-list.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel-list {
  grid-template-columns: minmax(0, 1fr);
}

.dispatch-card,
.tenant-maintenance {
  display: grid;
  gap: 18px;
}

.dispatch-contractor,
.maintenance-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcf8;
}

.dispatch-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: #edf4ef;
  color: var(--green-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

.request-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.request-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 800;
}

.request-form input,
.request-form select,
.request-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

.request-form textarea,
.message-form,
.request-submit,
.error-banner {
  grid-column: 1 / -1;
}

.error-banner {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(180, 35, 24, 0.28);
  border-radius: 8px;
  background: #fff4f2;
  color: #9b2218;
  font-weight: 700;
}

.empty-state {
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.timeline,
.maintenance-history {
  display: grid;
  gap: 10px;
  padding-left: 20px;
}

@media (max-width: 920px) {
  .public-hero,
  .app-shell,
  .workflow-grid,
  .launch-grid,
  .metrics-grid,
  .content-grid,
  .role-grid {
    grid-template-columns: 1fr;
  }

  .public-hero {
    min-height: auto;
    padding-top: 26px;
  }

  .panel.wide {
    grid-column: auto;
  }

  .sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .public-hero,
  .public-band,
  .auth-panel {
    width: min(100% - 20px, 1180px);
  }

  .public-hero-copy,
  .auth-panel,
  .panel,
  .workflow-card,
  .launch-card {
    padding: 18px;
  }

  .hero-actions,
  .request-form,
  .detail-list.compact {
    grid-template-columns: 1fr;
  }

  .workspace {
    padding: 16px;
  }

  .topbar,
  .status-strip,
  .dispatch-contractor,
  .maintenance-summary {
    align-items: flex-start;
    flex-direction: column;
  }
}
