:root {
  --navy: #071725;
  --navy-2: #10283a;
  --cream: #f4f1eb;
  --paper: #ffffff;
  --ink: #111827;
  --muted: #5e6b7a;
  --line: rgba(10, 23, 37, 0.12);
  --blue: #0a55c2;
  --blue-soft: #eef5ff;
  --leaf: #506a57;
  --copper: #b9825f;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--cream);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-size: 14px;
}

button,
input {
  font: inherit;
}

button {
  min-height: 40px;
  border: 1px solid var(--navy);
  border-radius: 7px;
  background: var(--navy);
  color: #fff;
  padding: 9px 14px;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

a {
  color: inherit;
}

svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.hidden {
  display: none !important;
}

.loading-screen,
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.loading-mark,
.login-card {
  width: min(100%, 520px);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.loading-mark {
  padding: 34px;
}

.loading-mark h1,
.login-heading h1,
.overview-hero h1 {
  margin: 0;
  letter-spacing: 0;
}

.loading-mark h1 span {
  color: var(--muted);
  font-weight: 500;
}

.loading-mark p {
  margin: 12px 0 0;
  color: var(--muted);
}

.login-card {
  overflow: hidden;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 96px;
  padding: 24px;
  background: var(--navy);
  color: #fff;
}

.login-brand img,
.brand-block img {
  width: 138px;
  height: auto;
}

.login-brand span {
  color: rgba(255, 255, 255, 0.7);
}

.login-heading,
.login-form,
.login-message {
  padding: 0 28px;
}

.login-heading {
  padding-top: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.login-heading h1 {
  font-size: 34px;
  line-height: 1.08;
}

.login-form {
  padding-top: 24px;
  padding-bottom: 28px;
}

.login-form label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.login-row {
  display: flex;
  gap: 10px;
}

.login-row input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
}

.login-message {
  margin: 0 28px 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.login-message.error {
  border-color: rgba(185, 28, 28, 0.35);
  background: #fff5f5;
}

.login-message h2 {
  margin: 0 0 6px;
  font-size: 16px;
}

.login-message p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 14px 20px;
  background: var(--navy);
  color: #fff;
}

.sidebar-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-bottom: 18px;
}

.brand-block {
  display: flex;
  justify-content: center;
  padding: 0 12px 12px;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  border-radius: 7px;
  padding: 0 14px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.86);
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.nav-item.muted {
  color: rgba(255, 255, 255, 0.72);
}

.consultant-card {
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 16px;
  background: var(--navy-2);
}

.consultant-card h2,
.panel h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.consultant-profile {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 16px 0;
}

.avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font-weight: 800;
}

.consultant-profile strong,
.consultant-profile span {
  display: block;
}

.consultant-profile span,
.consultant-link,
.empty {
  color: var(--muted);
}

.consultant-card .consultant-link,
.consultant-card .empty {
  color: rgba(255, 255, 255, 0.74);
}

.consultant-link {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.user-card {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  gap: 11px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 18px;
}

.user-card .avatar {
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--navy);
  font-size: 12px;
}

.user-card p {
  margin: 0 0 3px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-card span {
  display: block;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-card.single-line {
  align-items: center;
}

.user-card.single-line span {
  display: none;
}

.user-card.single-line p {
  margin-bottom: 0;
}

.logout-button {
  width: 38px;
  height: 38px;
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: rgba(255, 255, 255, 0.64);
  padding: 0;
}

.logout-button:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

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

.overview-hero {
  min-height: 420px;
  display: flex;
  align-items: flex-start;
  border-radius: 0;
  padding: 46px 66px;
  background:
    linear-gradient(180deg, rgba(244, 241, 235, 0) 74%, rgba(244, 241, 235, 0.54) 91%, rgba(244, 241, 235, 1) 100%),
    linear-gradient(90deg, rgba(244, 241, 235, 0.98) 0%, rgba(244, 241, 235, 0.76) 23%, rgba(244, 241, 235, 0.1) 45%, rgba(244, 241, 235, 0) 72%),
    url("/assets/portal/hero-heaton-drive.jpg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.welcome-line {
  margin: 0 0 78px;
  font-weight: 500;
}

.overview-hero h1 {
  max-width: 560px;
  font-size: 44px;
  font-weight: 600;
  line-height: 1.08;
  text-shadow:
    0 1px 18px rgba(255, 255, 255, 0.82),
    0 0 42px rgba(255, 255, 255, 0.58);
}

.hero-copy {
  max-width: 520px;
  margin: 18px 0 0;
  color: #334155;
  font-size: 17px;
  line-height: 1.55;
}

.overview-grid,
.detail-grid {
  display: grid;
  gap: 16px;
}

.overview-grid {
  grid-template-columns: minmax(270px, 0.78fr) minmax(360px, 1.5fr);
  margin: -70px 28px 0;
}

.detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 16px 28px 0;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.project-card,
.panel {
  padding: 24px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.soft-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.project-title {
  margin: 26px 0 12px;
  font-size: 26px;
  line-height: 1.18;
}

.summary {
  color: #435066;
  line-height: 1.65;
}

.metric-list,
.info-list {
  display: grid;
  gap: 10px;
}

.metric-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 22px 0;
}

.metric {
  min-height: 60px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px;
}

.metric strong,
.metric span {
  display: block;
}

.metric strong {
  font-size: 18px;
}

.metric span,
.info-item span {
  color: var(--muted);
  font-size: 12px;
}

.price {
  margin-top: 26px;
}

.price span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.price strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.price small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.map-card {
  display: flex;
  flex-direction: column;
}

.map-surface {
  position: relative;
  overflow: hidden;
  min-height: 410px;
  display: grid;
  place-items: center;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(7, 23, 37, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(7, 23, 37, 0.06) 1px, transparent 1px),
    #edf1ed;
  background-size: 28px 28px;
}

.map-surface iframe {
  width: 100%;
  height: 100%;
  min-height: 410px;
  border: 0;
}

.map-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  border: 1px solid rgba(7, 23, 37, 0.12);
  border-radius: 999px;
  padding: 5px 10px;
  background: #f4f8fb;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.map-action svg {
  width: 14px;
  height: 14px;
}

.empty {
  margin: 18px 0 0;
  line-height: 1.55;
}

.info-list {
  margin-top: 18px;
}

.info-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding: 0 0 10px;
}

.info-item strong {
  text-align: right;
}

@media (max-width: 960px) {
  .portal-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

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

  .overview-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .overview-grid {
    margin-top: -44px;
  }

  .overview-hero {
    min-height: 350px;
  }
}

@media (max-width: 620px) {
  .login-row {
    flex-direction: column;
  }

  .workspace {
    padding-bottom: 28px;
  }

  .sidebar {
    padding: 22px 12px;
  }

  .nav-list {
    grid-template-columns: 1fr;
  }

  .overview-hero {
    min-height: 330px;
    padding: 28px 24px;
    background-position: 62% center;
  }

  .overview-grid,
  .detail-grid {
    margin-right: 14px;
    margin-left: 14px;
  }

  .overview-grid {
    margin-top: -24px;
  }

  .welcome-line {
    margin-bottom: 56px;
  }

  .overview-hero h1 {
    font-size: 34px;
  }

  .map-card .panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .map-action {
    justify-content: center;
  }

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