:root {
  --navy: #26306f;
  --navy-dark: #1e265b;
  --cyan: #068fbc;
  --cyan-soft: #dff4fa;
  --sky: #5cc4d8;
  --bg: #f7f8fb;
  --band: #d7d7d7;
  --surface: #ffffff;
  --ink: #273047;
  --muted: #7b8190;
  --line: #dfe4ef;
  --success: #11845b;
  --warning: #d48a1f;
  --danger: #c94f4f;
  --shadow: 0 18px 42px rgba(38, 48, 111, 0.11);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.info-bar {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 34px;
  padding: 0 7.5vw;
  color: white;
  background: var(--navy);
  font-size: 13px;
  font-weight: 650;
}

.info-bar a {
  margin-left: auto;
  color: white;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 92px;
  padding: 0 7.5vw;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  text-decoration: none;
  min-width: max-content;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 3px solid var(--cyan);
  border-radius: 50%;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 24px;
  letter-spacing: 0;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  flex: 1;
}

.nav-link {
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

.nav-link.active,
.nav-link:hover {
  color: var(--navy);
}

.header-actions,
.hero-actions,
.filters,
.modal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

main {
  width: min(1180px, 100% - 48px);
  margin: 0 auto 56px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  min-height: 420px;
  margin-inline: calc(50% - 50vw);
  padding: 58px 7.5vw;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.92) 41%, rgba(255, 255, 255, 0.55) 64%),
    radial-gradient(circle at 80% 32%, rgba(6, 143, 188, 0.24), transparent 26%),
    linear-gradient(135deg, #e9f3f6, #ffffff 46%, #c7d6e5);
}

.hero h1 {
  max-width: 680px;
  margin: 0;
  color: var(--navy);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero p {
  max-width: 620px;
  margin: 18px 0 0;
  color: #60687b;
  font-size: 18px;
  line-height: 1.58;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-actions {
  margin-top: 26px;
}

.hero-panel {
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.hero-panel div {
  padding: 16px;
  border-radius: var(--radius);
  background: white;
  border: 1px solid var(--line);
}

.hero-panel span,
.mini-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.hero-panel strong {
  display: block;
  margin-top: 7px;
  color: var(--navy);
  font-size: 26px;
}

.primary-button,
.outline-button,
.ghost-button,
.segment,
.icon-button {
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0 18px;
  font-weight: 850;
}

.primary-button {
  color: white;
  background: var(--cyan);
}

.primary-button:hover {
  background: #057fa8;
}

.outline-button {
  color: var(--navy);
  background: transparent;
  border-color: var(--navy);
}

.ghost-button,
.segment,
.icon-button {
  color: var(--navy);
  background: white;
  border-color: var(--line);
}

.icon-button {
  width: 42px;
  padding: 0;
  font-size: 16px;
}

.specialties-band {
  margin-inline: calc(50% - 50vw);
  padding: 58px 7.5vw 44px;
  background: var(--band);
}

.band-header,
.section-title,
.card-top,
.portal-row,
.request-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.band-header {
  padding-bottom: 24px;
  border-bottom: 2px solid rgba(38, 48, 111, 0.55);
}

.band-header h2,
.section-title h1 {
  margin: 0;
  color: var(--navy);
  letter-spacing: 0;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.module-card {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--navy);
  text-align: center;
  box-shadow: 0 10px 22px rgba(38, 48, 111, 0.08);
}

.module-card.active {
  outline: 3px solid rgba(6, 143, 188, 0.22);
}

.module-icon {
  color: var(--cyan);
  font-size: 42px;
  font-weight: 900;
  line-height: 1;
}

.summary-grid,
.property-grid,
.request-grid,
.portal-layout {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

.summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-top: 32px;
}

.metric-card,
.property-card,
.request-card,
.portal-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 18px;
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  color: var(--navy);
  font-size: 28px;
}

.section-title {
  margin: 42px 0 22px;
}

.filters input,
.filters select,
.form-grid input,
.form-grid select,
.section-title select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--ink);
  background: white;
}

.filters input {
  width: min(430px, 40vw);
}

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

.property-card {
  overflow: hidden;
}

.property-visual {
  height: 126px;
  background:
    linear-gradient(135deg, rgba(38, 48, 111, 0.12), rgba(6, 143, 188, 0.18)),
    repeating-linear-gradient(90deg, #eef4f8 0 18px, #ffffff 18px 36px);
}

.property-body {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.property-body h2,
.request-card h2,
.portal-card h2 {
  margin: 0;
  color: var(--navy);
  font-size: 20px;
}

.role-list {
  display: grid;
  gap: 10px;
}

.property-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.property-facts span {
  min-height: 62px;
  padding: 10px;
  border-radius: var(--radius);
  background: #f3f7fb;
}

.property-facts strong,
.property-facts small {
  display: block;
}

.property-facts strong {
  color: var(--navy);
}

.property-facts small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.role-pill {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: #f3f7fb;
}

.contract-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.contract-strip small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.property-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.card-actions form {
  margin: 0;
}

.danger-button {
  color: var(--danger);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--success);
  background: rgba(17, 132, 91, 0.12);
  font-size: 12px;
  font-weight: 900;
}

.badge.warning {
  color: var(--warning);
  background: rgba(212, 138, 31, 0.12);
}

.badge.danger {
  color: var(--danger);
  background: rgba(201, 79, 79, 0.12);
}

.segmented {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: #e9eef6;
}

.segment {
  border: 0;
  background: transparent;
}

.segment.active {
  background: white;
  box-shadow: 0 8px 18px rgba(38, 48, 111, 0.1);
}

.table-shell {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
}

th,
td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

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

.request-card,
.portal-card {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.request-row,
.portal-row {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.portal-layout {
  grid-template-columns: 1.05fr 0.95fr;
}

.portal-card.action-card {
  background: var(--cyan);
  color: white;
}

.portal-card.action-card h2,
.portal-card.action-card .mini-label {
  color: white;
}

.portal-card.action-card .outline-button {
  color: white;
  border-color: white;
}

.modal {
  width: min(760px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
}

.modal::backdrop {
  background: rgba(24, 30, 54, 0.55);
}

.modal-card {
  padding: 24px;
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}

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

.modal-header h2 {
  margin: 0;
  color: var(--navy);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 22px 0;
}

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

.full-field {
  grid-column: 1 / -1;
}

.modal-actions {
  justify-content: flex-end;
  margin: 0;
  padding: 0;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  max-width: 340px;
  padding: 13px 16px;
  border-radius: var(--radius);
  color: white;
  background: var(--navy);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.user-chip {
  display: grid;
  gap: 1px;
  min-height: 42px;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

.user-chip small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.logout-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.76)),
    radial-gradient(circle at 78% 28%, rgba(6, 143, 188, 0.26), transparent 28%),
    linear-gradient(135deg, #edf7fb, #ffffff 45%, #c9d9ea);
}

.auth-shell {
  width: min(980px, calc(100% - 32px));
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 22px;
  align-items: center;
  margin: 0;
}

.auth-hero {
  display: grid;
  gap: 18px;
}

.auth-hero h1 {
  max-width: 560px;
  margin: 0;
  color: var(--navy);
  font-size: clamp(38px, 5vw, 62px);
  line-height: 0.98;
}

.auth-hero p {
  max-width: 520px;
  margin: 0;
  color: #60687b;
  font-size: 18px;
  line-height: 1.55;
}

.login-card {
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}

.login-card h2 {
  margin: 0;
  color: var(--navy);
}

.login-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.login-card input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
}

.form-error {
  padding: 12px 14px;
  border-radius: var(--radius);
  color: var(--danger);
  background: #fff1f1;
  font-weight: 800;
}

.setup-warning {
  margin: 28px 0;
  padding: 22px;
  border: 1px solid rgba(201, 79, 79, 0.35);
  border-radius: var(--radius);
  background: #fff6f6;
  box-shadow: var(--shadow);
}

.setup-warning h1 {
  margin: 0 0 10px;
  color: var(--danger);
}

.setup-warning p {
  margin: 8px 0 0;
}

@media (max-width: 980px) {
  .info-bar {
    display: none;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 24px;
  }

  .main-nav {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .hero,
  .summary-grid,
  .property-grid,
  .request-grid,
  .portal-layout {
    grid-template-columns: 1fr;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    padding: 28px 0;
  }

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

  .section-title,
  .band-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .filters {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .filters input {
    width: 100%;
  }
}

@media (max-width: 620px) {
  main {
    width: min(100% - 28px, 1180px);
  }

  .header-actions,
  .hero-actions,
  .modal-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .header-actions button,
  .hero-actions button,
  .modal-actions button {
    width: 100%;
  }

  .hero {
    min-height: auto;
    padding: 42px 24px;
  }

  .specialties-band {
    padding: 38px 24px;
  }

  .module-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }
}
