:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #162638;
  background: #f3f6f8;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid #4f8ff7;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff;
  color: #10283b;
  font-weight: 800;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  inset: 0 auto auto 0;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  margin: 0;
  color: #64778a;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tenant-header {
  min-height: 82px;
  padding: 0 clamp(24px, 6vw, 90px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid #dce4e8;
}

.tenant-header p {
  color: #657787;
}

.tenant-mark {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tenant-mark span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--tenant-primary);
  color: var(--tenant-on-primary);
  font-weight: 850;
  letter-spacing: 0.03em;
}

.tenant-mark strong {
  font-size: 1rem;
}

.public-grid {
  min-height: calc(100vh - 142px);
  padding: clamp(44px, 7vw, 104px) clamp(24px, 7vw, 112px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.72fr);
  gap: clamp(42px, 8vw, 118px);
  align-items: center;
  background: radial-gradient(circle at 8% 3%, color-mix(in srgb, var(--tenant-accent) 15%, transparent), transparent 31%), #f6f7f4;
}

.public-copy h1 {
  max-width: 760px;
  margin: 0.22em 0;
  color: #142b3c;
  font: 750 clamp(3rem, 6.2vw, 6.1rem) / 0.97 Georgia, serif;
  letter-spacing: -0.055em;
}

.public-copy > p:not(.eyebrow) {
  max-width: 620px;
  color: #506473;
  font-size: 1.16rem;
  line-height: 1.7;
}

.trust-row {
  display: flex;
  gap: 20px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.trust-row span {
  color: #405563;
  font-size: 0.88rem;
  font-weight: 750;
}

.trust-row span::before {
  content: "✓";
  margin-right: 8px;
  color: var(--tenant-primary);
  font-weight: 900;
}

.quote-card,
.result-card {
  padding: 32px;
  background: #fff;
  border: 1px solid #dbe3e7;
  border-radius: 18px;
  box-shadow: 0 25px 70px #23384b18;
}

.quote-card {
  border-top: 5px solid var(--tenant-accent);
}

.quote-card h2,
.panel h2 {
  margin: 0.24em 0 0.85em;
  color: #173044;
  font-size: 1.45rem;
  letter-spacing: -0.018em;
}

.quote-card label,
.sign-in label,
.inline-form label {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  color: #283e4f;
  font-size: 0.84rem;
  font-weight: 750;
}

.quote-card input,
.quote-card select,
.sign-in input,
.inline-form input,
.section-head input {
  min-width: 0;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #c7d3da;
  border-radius: 8px;
  color: #162638;
}

.quote-card button,
.sign-in button,
.inline-form button,
.section-head button {
  padding: 12px 17px;
  border: 0;
  border-radius: 8px;
  background: var(--tenant-primary);
  color: var(--tenant-on-primary);
  font-weight: 800;
}

.result-card {
  grid-column: 2;
}

.result-card h2 {
  margin: 0.18em 0;
  color: #173044;
  font-size: 2.75rem;
}

.result-card dl div {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid #e6ecef;
}

.fine {
  color: #667986;
  font-size: 0.8rem;
  line-height: 1.5;
}

.public-surface footer {
  min-height: 60px;
  padding: 12px clamp(24px, 6vw, 90px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--tenant-primary);
  color: var(--tenant-on-primary);
}

.public-surface footer a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.public-surface footer small {
  opacity: 0.78;
}

.app-surface {
  background: #f3f6f8;
}

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

.app-sidebar {
  min-width: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 20px 22px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0d2639 0%, #102c42 64%, #0d2436 100%);
  color: #d8e4ec;
  box-shadow: 10px 0 30px #10283b0c;
}

.wordmark {
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-rows: 21px 17px;
  column-gap: 11px;
  align-items: center;
  color: #fff;
}

.wordmark > span {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #3278e8;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
}

.wordmark > strong {
  align-self: end;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
}

.wordmark > small {
  align-self: start;
  color: #8fa7b8;
  font-size: 0.67rem;
}

.sidebar-context {
  margin-top: 30px;
  padding: 15px;
  background: #ffffff0a;
  border: 1px solid #ffffff17;
  border-radius: 10px;
}

.sidebar-context p,
.sidebar-context span {
  margin: 0;
  color: #8fa8b9;
  font-size: 0.65rem;
}

.sidebar-context p {
  margin-bottom: 6px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.sidebar-context strong {
  display: block;
  margin-bottom: 4px;
  color: #fff;
  font-size: 0.87rem;
}

.app-nav {
  margin-top: 20px;
}

.nav-label {
  margin: 18px 11px 9px;
  color: #7590a2;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  margin: 3px 0;
  border-radius: 7px;
  color: #bfd0dc;
  font-size: 0.85rem;
  font-weight: 650;
}

.nav-item:hover {
  background: #ffffff0a;
  color: #fff;
}

.nav-item.active {
  background: #245072;
  color: #fff;
  box-shadow: inset 3px 0 #69a4ff;
}

.sidebar-footer {
  margin-top: auto;
}

.user-context {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 5px;
  border-top: 1px solid #ffffff14;
}

.user-context > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: #254c68;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 850;
}

.user-context p {
  min-width: 0;
  margin: 0;
}

.user-context strong,
.user-context small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-context strong {
  color: #fff;
  font-size: 0.78rem;
}

.user-context small {
  margin-top: 2px;
  color: #8fa8b9;
  font-size: 0.65rem;
}

.logout button {
  width: 100%;
  padding: 9px;
  background: transparent;
  border: 1px solid #3b5b70;
  border-radius: 7px;
  color: #cbd9e2;
  font-weight: 700;
}

.app-main {
  min-width: 0;
  width: 100%;
  max-width: 1560px;
  padding: 34px clamp(28px, 4vw, 68px) 64px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  margin-bottom: 30px;
}

.app-header h1 {
  margin: 0.16em 0 0.12em;
  color: #142c3e;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  letter-spacing: -0.035em;
}

.app-header > div:first-child > p:last-child {
  max-width: 690px;
  margin: 0;
  color: #627585;
  font-size: 0.9rem;
  line-height: 1.55;
}

.tenant-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 205px;
  padding: 10px 15px;
  background: #fff;
  border: 1px solid #d4dfe5;
  border-radius: 10px;
  box-shadow: 0 8px 25px #17324d0a;
}

.tenant-chip > span {
  width: 10px;
  height: 30px;
  border-radius: 6px;
}

.tenant-chip p,
.tenant-chip small,
.tenant-chip strong {
  display: block;
  margin: 0;
}

.tenant-chip small {
  color: #728494;
  font-size: 0.61rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tenant-chip strong {
  margin-top: 2px;
  color: #1f3648;
  font-size: 0.8rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}

.metric-grid > a,
.panel {
  background: #fff;
  border: 1px solid #d9e3e8;
  border-radius: 12px;
}

.metric-grid > a {
  min-height: 145px;
  padding: 22px;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.metric-grid > a:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px #1833470d;
}

.metric-grid p {
  margin: 0;
  color: #5d7181;
  font-size: 0.79rem;
  font-weight: 750;
}

.metric-grid strong {
  display: block;
  margin: 13px 0 5px;
  color: #14334a;
  font-size: 2.4rem;
  letter-spacing: -0.045em;
}

.metric-grid span {
  color: #7b8c98;
  font-size: 0.73rem;
}

.panel {
  margin-top: 20px;
  padding: 24px;
}

.panel > p:not(.eyebrow),
.section-head p {
  color: #667987;
  font-size: 0.84rem;
  line-height: 1.55;
}

.dashboard-grid,
.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 20px;
}

.dashboard-grid .panel,
.settings-grid .panel {
  margin-top: 20px;
}

.attention-list {
  margin-top: 6px;
}

.attention-list > a,
.record-list > li,
.record-list > li > a,
.feature-list > li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.attention-list > a {
  padding: 15px 0;
  border-top: 1px solid #e7ecef;
}

.attention-list > a span,
.attention-list > a small,
.record-list span,
.record-list small,
.feature-list span,
.feature-list small {
  display: block;
}

.attention-list small,
.record-list small,
.feature-list small {
  margin-top: 4px;
  color: #70828f;
  font-size: 0.73rem;
  font-weight: 500;
  line-height: 1.45;
}

.attention-list b {
  color: #2064b0;
  font-size: 0.76rem;
}

.empty-state {
  display: grid !important;
  justify-content: start !important;
  gap: 5px !important;
  padding: 18px 0;
  color: #4f6473;
}

.empty-state span {
  color: #7b8c98;
  font-size: 0.78rem;
}

.flow-panel ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-panel li {
  position: relative;
  display: flex;
  gap: 13px;
  padding: 11px 0;
}

.flow-panel li > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  background: #e8f0fa;
  color: #245f9d;
  font-size: 0.7rem;
  font-weight: 850;
}

.flow-panel li p,
.flow-panel li strong,
.flow-panel li small {
  display: block;
  margin: 0;
}

.flow-panel li small {
  margin-top: 3px;
  color: #728390;
  font-size: 0.71rem;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section-head h2 {
  margin: 0.12em 0;
}

.section-head p {
  max-width: 700px;
  margin: 4px 0 0;
}

.section-head form,
.actions,
.actions form,
.compact-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-wrap {
  margin-top: 18px;
  overflow: auto;
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  text-align: left;
}

th {
  padding: 11px 12px;
  color: #6e8190;
  border-bottom: 1px solid #d8e2e7;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  padding: 14px 12px;
  border-bottom: 1px solid #e9eef1;
  color: #2b4050;
  font-size: 0.84rem;
  vertical-align: middle;
}

td small {
  display: block;
  margin-top: 3px;
  color: #71828f;
  font-size: 0.7rem;
}

.numeric {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.record-link {
  color: #175fa7;
  font-weight: 820;
}

.record-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pill {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e2f3eb;
  color: #126d47;
  font-size: 0.68rem;
  font-weight: 820;
  white-space: nowrap;
}

.pill.muted {
  background: #ebf0f3;
  color: #536b7b;
}

.secondary,
.button-link {
  display: inline-block;
  padding: 11px 15px;
  background: #fff !important;
  border: 1px solid #b8c8d2 !important;
  border-radius: 8px;
  color: #173b56 !important;
  font-size: 0.8rem;
  font-weight: 800;
}

.compact-form select {
  max-width: 245px;
  padding: 8px;
  background: #fff;
  border: 1px solid #c7d3da;
  border-radius: 7px;
}

.compact-form button,
td form button {
  padding: 8px 11px;
  background: #173b56;
  border: 0;
  border-radius: 7px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.workflow-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #eaf0f5;
  border: 1px solid #d5e0e7;
  border-radius: 10px;
  color: #607585;
  font-size: 0.78rem;
  font-weight: 750;
}

.workflow-strip .current {
  color: #194f82;
}

.workflow-strip i {
  color: #92a2ae;
  font-style: normal;
}

.workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 27px 30px;
  background: linear-gradient(135deg, #163b56, #102d43);
  border-radius: 13px;
  color: #fff;
}

.workspace-head .eyebrow {
  color: #9fbdd0;
}

.workspace-head h2 {
  margin: 0.16em 0;
  font-size: 1.85rem;
  letter-spacing: -0.035em;
}

.workspace-head p {
  margin: 0.25em 0;
  color: #c6d7e2;
  font-size: 0.82rem;
}

.workspace-total {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.workspace-total > strong {
  font-size: 1.8rem;
  font-variant-numeric: tabular-nums;
}

.workspace-total > small {
  color: #a9c0cf;
  font-size: 0.68rem;
}

.workspace-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 15px;
  background: #fff;
  border: 1px solid #d9e3e8;
  border-radius: 11px;
}

.workspace-summary article {
  min-width: 0;
  padding: 17px 20px;
  border-right: 1px solid #e6ecef;
}

.workspace-summary article:last-child {
  border-right: 0;
}

.workspace-summary span,
.workspace-summary strong {
  display: block;
}

.workspace-summary span {
  color: #718390;
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.workspace-summary strong {
  margin-top: 6px;
  overflow: hidden;
  color: #20394b;
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-nav {
  display: flex;
  gap: 22px;
  margin-top: 14px;
  padding: 0 4px;
  overflow-x: auto;
}

.workspace-nav a {
  padding: 9px 0;
  color: #536b7b;
  border-bottom: 2px solid transparent;
  font-size: 0.76rem;
  font-weight: 750;
  white-space: nowrap;
}

.workspace-nav a:hover {
  color: #175fa7;
  border-color: #4c8bd4;
}

.workspace-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.record-list,
.feature-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.record-list > li,
.record-list > li > a,
.feature-list > li {
  width: 100%;
  padding: 13px 0;
  border-top: 1px solid #e6ecef;
}

.record-list > li > a {
  padding: 0;
  border: 0;
}

.policy-version {
  color: #5d7180;
  font-size: 0.68rem;
  font-weight: 750;
  white-space: nowrap;
}

.inline-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.inline-form label {
  margin: 0;
}

.feature-list > li > span:first-child {
  min-width: 0;
}

.brand-preview > div {
  display: flex;
  gap: 10px;
}

.brand-preview > div span {
  width: 54px;
  height: 54px;
  border: 1px solid #00000012;
  border-radius: 10px;
}

.notice {
  padding: 16px 20px;
  border: 1px solid #decf94;
  border-radius: 10px;
  background: #fff9df;
}

.business-notice {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #4d4934;
}

.business-notice span {
  color: #706b50;
  font-size: 0.78rem;
}

.sign-in,
.error-page {
  min-height: 100vh;
  display: grid;
  place-content: center;
  padding: 30px;
  background: linear-gradient(135deg, #eaf1f5, #fff);
}

.sign-in > section,
.error-page {
  width: min(480px, 90vw);
}

.sign-in section {
  margin-top: 38px;
  padding: 34px;
  background: #fff;
  border: 1px solid #d8e2e7;
  border-radius: 14px;
  box-shadow: 0 30px 80px #17324d16;
}

.sign-in h1,
.error-page h1 {
  margin-bottom: 0.35em;
  color: #173044;
  font-size: 2.35rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.wordmark.dark {
  color: #132d42;
}

.wordmark.dark small {
  color: #63798a;
}

@media (max-width: 1080px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 820px) {
  .public-grid {
    grid-template-columns: 1fr;
  }

  .result-card {
    grid-column: 1;
  }

  .app-layout {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 18px;
  }

  .sidebar-context {
    margin-top: 18px;
  }

  .app-nav {
    width: 100%;
    min-width: 0;
    display: flex;
    gap: 5px;
    margin-top: 12px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .nav-label {
    display: none;
  }

  .nav-item {
    flex: 0 0 auto;
  }

  .nav-item.active {
    box-shadow: inset 0 -3px #69a4ff;
  }

  .sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #ffffff14;
  }

  .user-context {
    min-width: 0;
    padding: 0;
    border: 0;
  }

  .logout button {
    width: auto;
    white-space: nowrap;
  }

  .app-main {
    padding: 28px 20px 50px;
  }

  .app-header,
  .section-head,
  .workspace-head,
  .business-notice {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace-total {
    justify-items: start;
  }

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

  .workspace-summary article:nth-child(2) {
    border-right: 0;
  }

  .workspace-summary article:nth-child(-n + 2) {
    border-bottom: 1px solid #e6ecef;
  }

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

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

  .compact-form {
    align-items: stretch;
    flex-direction: column;
  }

  .compact-form select {
    max-width: none;
  }
}

@media (max-width: 550px) {
  .tenant-header p {
    display: none;
  }

  .public-grid {
    padding-top: 48px;
  }

  .public-copy h1 {
    font-size: 3rem;
  }

  .public-surface footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .sidebar-context span,
  .user-context small {
    display: none;
  }

  .app-nav {
    flex-wrap: wrap;
    overflow: visible;
  }

  .nav-item {
    min-height: 38px;
    padding: 8px 10px;
  }

  .app-header {
    gap: 18px;
  }

  .tenant-chip {
    width: 100%;
  }

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

  .workflow-strip {
    gap: 7px;
    overflow-x: auto;
  }

  .workflow-strip span {
    white-space: nowrap;
  }

  .workspace-head {
    padding: 24px;
  }
}
