:root {
  --ink: #132120;
  --muted: #65706d;
  --line: #dce2df;
  --paper: #f5f7f5;
  --white: #ffffff;
  --evergreen: #163e36;
  --evergreen-deep: #0d2b26;
  --pine: #28705e;
  --mint: #b9e3d6;
  --yellow: #f2c94c;
  --shadow: 0 18px 55px rgba(18, 38, 34, .10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 15% 8%, rgba(185, 227, 214, .28), transparent 30rem),
    var(--paper);
}

a {
  color: inherit;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .72rem;
  color: var(--ink);
  font-weight: 760;
  letter-spacing: -.015em;
  text-decoration: none;
}

.wordmark-light {
  color: var(--white);
}

.wordmark-mark {
  display: inline-grid;
  width: 2.55rem;
  height: 2.55rem;
  place-items: center;
  border-radius: .8rem;
  color: var(--evergreen-deep);
  background: var(--yellow);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: -.05em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .38);
}

.button {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  border: 0;
  border-radius: .8rem;
  padding: .75rem 1.05rem;
  font: inherit;
  font-weight: 720;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  width: 100%;
  color: var(--white);
  background: var(--evergreen);
  box-shadow: 0 10px 24px rgba(22, 62, 54, .18);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--evergreen-deep);
}

.button-quiet {
  color: var(--evergreen);
  background: #e8efec;
}

.button-support {
  flex: 0 0 auto;
  color: var(--evergreen-deep);
  background: var(--yellow);
}

.button:focus-visible,
.service-tile:focus-visible,
a:focus-visible {
  outline: 3px solid #64aa98;
  outline-offset: 3px;
}

.eyebrow {
  margin: 0 0 .75rem;
  color: var(--pine);
  font-size: .75rem;
  font-weight: 840;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.eyebrow-light {
  color: var(--mint);
}

.muted,
.help-text,
.legal {
  color: var(--muted);
}

.login-body {
  background: var(--evergreen-deep);
}

.login-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1.05fr) minmax(28rem, .95fr);
}

.login-brand {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 5vw, 5rem);
  overflow: hidden;
  color: var(--white);
  background:
    linear-gradient(145deg, rgba(13, 43, 38, .78), rgba(22, 62, 54, .96)),
    repeating-linear-gradient(125deg, transparent 0 36px, rgba(255, 255, 255, .035) 36px 37px);
}

.login-brand::after {
  content: "";
  position: fixed;
  top: 8%;
  left: 37%;
  width: 32rem;
  height: 32rem;
  border: 1px solid rgba(185, 227, 214, .16);
  border-radius: 50%;
  box-shadow:
    0 0 0 5rem rgba(185, 227, 214, .025),
    0 0 0 10rem rgba(185, 227, 214, .018);
  pointer-events: none;
}

.login-copy {
  position: relative;
  z-index: 1;
  max-width: 44rem;
}

.login-copy h1 {
  max-width: 11ch;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.5rem, 7vw, 7rem);
  font-weight: 520;
  line-height: .92;
  letter-spacing: -.055em;
}

.login-copy > p:last-child {
  max-width: 39rem;
  margin: 2rem 0 0;
  color: #d6e8e2;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  line-height: 1.7;
}

.login-trust {
  margin: 0;
  color: #aac8bf;
  font-size: .82rem;
}

.login-panel {
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 2rem;
  background: var(--paper);
}

.login-card {
  width: min(100%, 29rem);
  padding: clamp(2rem, 5vw, 3.5rem);
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  background: var(--white);
  box-shadow: var(--shadow);
}

.mobile-wordmark {
  display: none;
}

.login-card h2,
.error-card h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.5rem;
  font-weight: 520;
  letter-spacing: -.04em;
}

.login-card .muted {
  margin: 1rem 0 2rem;
  line-height: 1.65;
}

.help-text {
  margin: 1.5rem 0 0;
  font-size: .84rem;
  line-height: 1.55;
}

.help-text a {
  color: var(--evergreen);
  font-weight: 700;
}

.legal {
  margin: 1.25rem 0 0;
  font-size: .75rem;
}

.notice {
  margin: 0 0 1.2rem;
  border-radius: .7rem;
  padding: .8rem 1rem;
  font-size: .88rem;
}

.notice-error {
  border: 1px solid #e7b6ae;
  color: #74271e;
  background: #fff2ef;
}

.topbar {
  display: flex;
  min-height: 5rem;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 1px solid var(--line);
  padding: .9rem clamp(1rem, 4vw, 4rem);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(14px);
}

.topbar-actions,
.identity {
  display: flex;
  align-items: center;
}

.topbar-actions {
  gap: 1.2rem;
}

.identity {
  flex-direction: column;
  align-items: flex-end;
  font-size: .82rem;
}

.identity span {
  color: var(--muted);
}

.dashboard {
  width: min(100% - 2rem, 78rem);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 5rem) 0 2rem;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3rem;
  margin-bottom: 4.5rem;
}

.hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 6vw, 5.6rem);
  font-weight: 520;
  line-height: 1;
  letter-spacing: -.055em;
}

.hero p:last-child {
  max-width: 42rem;
  margin: 1.2rem 0 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.7;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: -.03em;
}

.section-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.service-tile {
  display: grid;
  min-height: 14.5rem;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto 1fr;
  gap: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  padding: 1.4rem;
  color: inherit;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 7px 25px rgba(18, 38, 34, .04);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.service-tile:hover {
  transform: translateY(-3px);
  border-color: #adc8bf;
  box-shadow: var(--shadow);
}

.service-tile-disabled {
  opacity: .68;
  background: rgba(245, 247, 245, .9);
}

.service-tile-disabled:hover {
  transform: none;
  border-color: var(--line);
  box-shadow: 0 7px 25px rgba(18, 38, 34, .04);
}

.tile-icon {
  display: inline-grid;
  width: 3rem;
  height: 3rem;
  place-items: center;
  border-radius: .85rem;
  color: var(--evergreen-deep);
  background: #e2f0eb;
  font-size: 1.1rem;
  font-weight: 850;
}

.icon-lifebuoy,
.icon-pulse {
  background: #fcebb1;
}

.icon-camera {
  background: #e7e2f8;
}

.icon-receipt {
  background: #e2eaf8;
}

.tile-arrow {
  color: var(--pine);
  font-size: 1.2rem;
}

.tile-status {
  justify-self: end;
  border: 1px solid #c9d3cf;
  border-radius: 99rem;
  padding: .35rem .6rem;
  color: var(--muted);
  background: var(--white);
  font-size: .66rem;
  font-weight: 780;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.tile-content {
  display: flex;
  grid-column: 1 / -1;
  flex-direction: column;
  align-self: end;
}

.tile-content strong {
  margin-bottom: .55rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.42rem;
  font-weight: 550;
  letter-spacing: -.025em;
}

.tile-content > span:last-child {
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.55;
}

.tile-category {
  margin-bottom: .35rem;
  color: var(--pine);
  font-size: .66rem;
  font-weight: 820;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.dashboard-footer {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 4rem;
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 0;
  color: var(--muted);
  font-size: .76rem;
}

.empty-state,
.error-card {
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  padding: 2.5rem;
  background: var(--white);
  box-shadow: var(--shadow);
}

.empty-state h2 {
  margin-top: 0;
}

.error-body {
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.error-card {
  width: min(100%, 34rem);
  text-align: center;
}

.error-card .wordmark-mark {
  margin-bottom: 2rem;
}

.error-card > p:not(.eyebrow, .help-text) {
  margin: 1rem 0 2rem;
  color: var(--muted);
  line-height: 1.6;
}

.asset-card {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--white);
  box-shadow: var(--shadow);
}

.asset-card h2 {
  margin: .25rem 0 0;
  font-size: clamp(1.45rem, 4vw, 2.1rem);
}

.asset-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: .75rem;
  margin: 0;
}

.asset-details div {
  border-radius: .85rem;
  padding: .9rem 1rem;
  background: #edf2ef;
}

.asset-details dt {
  margin-bottom: .3rem;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.asset-details dd {
  margin: 0;
  font-weight: 700;
}

.asset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.tenant-chip {
  border-radius: 999px;
  padding: .55rem .8rem;
  color: var(--evergreen);
  background: #e8efec;
  font-size: .78rem;
  font-weight: 720;
}

.text-link {
  color: var(--evergreen);
  font-weight: 720;
  text-underline-offset: .2em;
}

@media (max-width: 900px) {
  .login-shell {
    display: block;
  }

  .login-brand {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
  }

  .mobile-wordmark {
    display: flex;
    align-items: center;
    gap: .7rem;
    margin-bottom: 3rem;
    font-weight: 760;
  }

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

@media (max-width: 620px) {
  .topbar,
  .topbar-actions,
  .hero,
  .dashboard-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    gap: .9rem;
  }

  .topbar-actions {
    flex-direction: row;
    justify-content: space-between;
  }

  .identity {
    align-items: flex-start;
  }

  .hero {
    gap: 1.5rem;
    margin-bottom: 3rem;
  }

  .tile-grid {
    grid-template-columns: 1fr;
  }

  .service-tile {
    min-height: 13rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
