:root {
  --brand-left: #1f2467;
  --brand-right: #158db7;
  --brand-accent: #009be7;
  --panel-border: #d4dde6;
  --panel-bg: #ffffff;
  --soft-bg: #edf4f8;
  --tab-line: #dbe4eb;
  --text: #24364f;
  --muted: #6b7b8f;
  --success: #59f100;
  --warning: #f6a623;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Aktiv grotesk", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    linear-gradient(180deg, #eef4f8 0%, #f8fbfd 280px, #edf3f7 100%);
}

body.modal-open {
  overflow: hidden;
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  color: #fff;
  background: linear-gradient(90deg, var(--brand-left), #264798 55%, var(--brand-right));
  box-shadow: 0 2px 10px rgba(20, 40, 90, 0.15);
}

.app-menu {
  position: absolute;
  top: 78px;
  left: 24px;
  z-index: 20;
  min-width: 260px;
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid #d5dfeb;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 36px rgba(31, 47, 69, 0.18);
  backdrop-filter: blur(8px);
}

.app-menu--hidden {
  display: none;
}

.app-menu a {
  padding: 12px 14px;
  border-radius: 10px;
  color: #27415f;
  text-decoration: none;
  font-weight: 600;
}

.app-menu a:hover {
  background: #edf4fb;
  color: #20488f;
}

.topbar__left,
.topbar__right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar__right {
  justify-content: flex-end;
}

.product-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand {
  font-size: 2rem;
  font-weight: 700;
  white-space: nowrap;
}

.brand span {
  opacity: 0.55;
  margin: 0 6px;
}

.icon-button {
  width: 48px;
  height: 48px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.icon-button span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 999px;
}

.circle-button,
.avatar-button {
  width: 48px;
  height: 48px;
  border: 2px solid rgba(26, 67, 142, 0.7);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #2d5fb9;
  font-weight: 700;
}

.breadcrumb-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 26px;
  font-size: 0.95rem;
  color: #fff;
  background: linear-gradient(90deg, #10213f, #0f688b);
}

.chevron,
.muted {
  opacity: 0.8;
}

.workspace {
  padding: 18px;
}

.card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(36, 54, 79, 0.08);
}

.journey {
  padding: 20px 24px 18px;
  margin-bottom: 18px;
}

.journey__steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(100px, 1fr));
  gap: 12px;
  position: relative;
  margin-bottom: 22px;
}

.journey__steps::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 6%;
  right: 6%;
  border-top: 3px dotted #c7cfda;
}

.step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  z-index: 1;
}

.step__dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 4px solid #c7ccd6;
  background: #fff;
}

.step__label {
  font-size: 1rem;
  font-weight: 600;
  color: #6d7987;
}

.step--active .step__dot {
  border-color: #3d4faa;
  box-shadow: 0 0 0 4px rgba(61, 79, 170, 0.12);
}

.step--active .step__label {
  color: var(--text);
}

.step--done .step__dot {
  border-color: #0f8c6a;
  background: linear-gradient(180deg, #39c498, #0f8c6a);
  box-shadow: 0 0 0 4px rgba(15, 140, 106, 0.12);
}

.step--done .step__label {
  color: #23534a;
  font-weight: 700;
}

.journey__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-button,
.secondary-button {
  padding: 11px 18px;
  border-radius: 999px;
  border: 0;
  font-weight: 700;
  cursor: pointer;
}

.primary-button {
  color: #fff;
  background: linear-gradient(180deg, #30459c, #2a3f8d);
}

.primary-button:hover,
.primary-button:focus,
.primary-button:active,
.primary-button:visited {
  color: #fff;
  background: linear-gradient(180deg, #3750af, #30459c);
  text-decoration: none;
}

.primary-button--success {
  background: linear-gradient(180deg, #2aa36f, #1f8d5e);
}

.secondary-button {
  color: #fff;
  background: linear-gradient(180deg, #3b4ca2, #314289);
}

.secondary-button:hover,
.secondary-button:focus,
.secondary-button:active,
.secondary-button:visited {
  color: #fff;
  background: linear-gradient(180deg, #4258b7, #3850a3);
  text-decoration: none;
}

.secondary-button--disabled {
  color: #6e7b8d;
  background: linear-gradient(180deg, #eef2f6, #e1e7ee);
  cursor: not-allowed;
  box-shadow: inset 0 0 0 1px #d2dae4;
}

.link-button,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.ghost-link {
  padding: 11px 18px;
  border: 1px solid #cfd8e3;
  border-radius: 999px;
  color: #39506f;
  background: #fff;
  font-weight: 700;
}

.ghost-link:hover,
.ghost-link:focus,
.ghost-link:active,
.ghost-link:visited {
  color: #39506f;
  background: #fff;
  border-color: #cfd8e3;
  text-decoration: none;
}

.ghost-link--disabled {
  color: #6e7b8d;
  background: linear-gradient(180deg, #f4f7fa, #e9eef4);
  border-color: #d4dde6;
  pointer-events: none;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.main-column,
.side-panel {
  overflow: hidden;
}

.tabs,
.panel-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 18px 20px 0;
  border-bottom: 1px solid var(--tab-line);
}

.tab {
  padding: 0 0 12px;
  border: 0;
  background: transparent;
  color: #4f637a;
  font-size: 1rem;
}

.tab--active {
  color: var(--text);
  font-weight: 700;
  box-shadow: inset 0 -3px 0 #2e52a8;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  background: #dfeaf1;
  border-bottom: 1px solid var(--panel-border);
}

.summary-item {
  padding: 18px 22px;
  border-right: 1px solid rgba(129, 149, 170, 0.18);
}

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

.summary-item__label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.form-section {
  padding: 20px 22px 24px;
  border-top: 1px solid #edf1f5;
}

.main-tab-panel--hidden {
  display: none;
}

.registry-side-panel--hidden {
  display: none;
}

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

.overview-card {
  padding: 18px;
  border: 1px solid #dde6ef;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
}

.overview-card--alert {
  border-color: #f1d3a0;
  background: linear-gradient(180deg, #fffaf1, #fff4df);
}

.overview-card__label {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.overview-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.08rem;
}

.overview-card p {
  margin: 0 0 6px;
  color: #4b6076;
  line-height: 1.45;
}

.history-list {
  display: grid;
  gap: 14px;
}

.history-item {
  padding: 16px 18px;
  border-left: 4px solid #2e52a8;
  border-radius: 0 12px 12px 0;
  background: linear-gradient(180deg, #f8fbff, #eef4fb);
}

.history-item strong {
  display: block;
  margin-bottom: 6px;
}

.history-item p {
  margin: 0;
  color: #4b6076;
  line-height: 1.5;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.22rem;
}

.section-heading--compact {
  margin-bottom: 10px;
}

.pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: #ebf2fa;
  color: #385276;
  font-size: 0.88rem;
  font-weight: 600;
}

.pill--ok {
  background: rgba(89, 241, 0, 0.12);
  color: #3d6d14;
}

.pill--warn {
  background: rgba(246, 166, 35, 0.14);
  color: #9b6411;
}

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

.field {
  display: grid;
  gap: 8px;
}

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

.field span {
  color: #53677e;
  font-size: 0.92rem;
  font-weight: 600;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  color: var(--text);
  background: #f8fbfd;
}

.field textarea {
  resize: vertical;
}

.attachment-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px dashed #9eb5c7;
  border-radius: 10px;
  background: linear-gradient(180deg, #f6fbfe, #eef6fb);
}

.form-section .journey__actions {
  margin-top: 28px;
}

.attachment-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.doc-link {
  color: #214a93;
  text-decoration: none;
  font-weight: 600;
}

.doc-link:hover {
  text-decoration: underline;
}

.doc-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.doc-modal--hidden {
  display: none;
}

.doc-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 32, 56, 0.5);
  backdrop-filter: blur(2px);
}

.doc-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(1100px, calc(100vw - 40px));
  height: min(90vh, 860px);
  margin: 24px auto;
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 24px 60px rgba(18, 32, 56, 0.28);
}

.doc-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  color: #fff;
  background: linear-gradient(90deg, var(--brand-left), #264798 55%, var(--brand-right));
}

.doc-modal__close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.doc-modal__frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #eef3f7;
}

.doc-modal__body {
  padding: 28px 32px 36px;
  overflow: auto;
  background: linear-gradient(180deg, #f6f8fb, #eef3f7);
}

.document-preview {
  max-width: 820px;
  margin: 0 auto;
  padding: 42px 48px;
  border: 1px solid #d7e0ea;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(36, 54, 79, 0.08);
}

.document-preview__meta {
  margin-bottom: 26px;
  color: #6b7b8f;
  font-size: 0.92rem;
}

.document-preview h2 {
  margin: 0 0 20px;
  font-size: 1.8rem;
}

.document-preview p {
  margin: 0 0 14px;
  color: #31465e;
  line-height: 1.65;
}

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

.decision-card {
  padding: 18px;
  border: 1px solid #dde6ee;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f7fbfd);
}

.decision-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.decision-card p {
  margin: 0 0 14px;
  color: #465a70;
}

.decision-flow {
  display: grid;
  gap: 16px;
}

.decision-step {
  padding: 18px;
  border: 1px solid #dde6ee;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f7fbfd);
}

.decision-step--done {
  border-color: #b9dfd4;
  background: linear-gradient(180deg, #f5fbf8, #edf8f3);
}

.decision-step--active {
  border-color: #c8d7f2;
  background: linear-gradient(180deg, #f6f9ff, #edf3fd);
}

.decision-step__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.decision-step__head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.decision-step p {
  margin: 0 0 14px;
  color: #465a70;
  line-height: 1.5;
}

.decision-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.next-stage-panel {
  margin-top: 18px;
}

.next-stage-panel--hidden {
  display: none;
}

.decision-meta {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

.form-section--inner {
  margin-top: 18px;
  padding: 0;
  border-top: 0;
}

.side-column {
  display: grid;
  gap: 18px;
}

.panel-header {
  padding: 16px 20px;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  background: linear-gradient(90deg, #1f3d81, #1189b1);
}

.task-list {
  padding: 14px 18px 18px;
}

.task strong {
  display: block;
  margin-bottom: 4px;
}

.document-tree {
  padding: 16px 18px 20px;
}

.side-tab-panel--hidden {
  display: none;
}

.tree-folder {
  margin-bottom: 14px;
}

.tree-folder:last-child {
  margin-bottom: 0;
}

.tree-folder__label {
  position: relative;
  padding: 8px 10px 8px 34px;
  border-radius: 10px;
  background: #eef5fb;
  color: #2b4566;
  font-weight: 700;
}

.tree-folder__label::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 14px;
  height: 11px;
  border-radius: 2px 2px 3px 3px;
  background: #d99513;
  transform: translateY(-50%);
  box-shadow: 0 -4px 0 0 #efb646 inset;
}

.tree-file {
  position: relative;
  display: block;
  margin-left: 20px;
  padding: 10px 10px 10px 34px;
  color: #4b6076;
  border-left: 2px solid #d8e2ec;
}

.tree-file::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 14px;
  width: 12px;
  height: 14px;
  border: 1px solid #aebccc;
  border-radius: 2px;
  background: #fff;
}

.tree-file--muted {
  color: #7a8899;
  font-style: italic;
}

.tree-file--link {
  text-decoration: none;
}

.tree-file--link:hover {
  color: #214a93;
  text-decoration: underline;
}

.message-list,
.notes-list {
  display: grid;
  gap: 12px;
  padding: 16px 18px 20px;
}

.notes-toolbar {
  display: flex;
  gap: 10px;
  padding: 16px 18px 0;
}

.notes-toolbar__button {
  padding-top: 9px;
  padding-bottom: 9px;
}

.message-card,
.note-card {
  padding: 14px 16px;
  border: 1px solid #dde6ef;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #f8fbfd);
}

.note-card {
  cursor: pointer;
}

.note-card--selected {
  border-color: #2e52a8;
  background: linear-gradient(180deg, #eef4ff, #e8f1fb);
  box-shadow: 0 0 0 3px rgba(46, 82, 168, 0.12);
}

.message-card strong,
.note-card strong {
  display: block;
  margin-bottom: 6px;
}

.message-card p,
.note-card p {
  margin: 0 0 8px;
  color: #4b6076;
  line-height: 1.5;
}

.message-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.note-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.note-card__meta span {
  color: var(--muted);
  font-size: 0.88rem;
  white-space: nowrap;
}

.task {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid #eef2f5;
}

.task--link {
  color: inherit;
  text-decoration: none;
}

.task--link:hover {
  background: #f7fbfe;
}

.task:last-child {
  border-bottom: 0;
}

.task__status {
  width: 14px;
  height: 14px;
  margin-top: 4px;
  border-radius: 50%;
  background: #c3ccd6;
}

.task p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.task--done .task__status {
  background: var(--success);
}

.task--active .task__status {
  background: var(--warning);
}

.checklist {
  margin: 0;
  padding: 4px 22px 22px 40px;
  color: #455a71;
}

.checklist li {
  margin-bottom: 12px;
  line-height: 1.45;
}

.integration-banner {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 24px;
  padding: 24px 26px;
  margin-bottom: 18px;
}

.integration-banner h1 {
  margin: 10px 0 10px;
  font-size: 2rem;
}

.integration-banner p {
  margin: 0;
  color: #4f6278;
  line-height: 1.55;
}

.integration-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, #0b839c, #36bcc3);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.integration-flow {
  display: grid;
  align-content: center;
  gap: 12px;
}

.integration-node {
  padding: 18px 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, #233f81, #1a85ad);
  color: #fff;
  text-align: center;
  font-weight: 700;
}

.integration-node--cosmic {
  background: linear-gradient(135deg, #00889f, #34c0c4);
}

.integration-arrow {
  text-align: center;
  color: #6b7b8f;
  font-size: 1.8rem;
  font-weight: 700;
}

.search-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.search-grid__full {
  grid-column: 1 / -1;
}

.search-panel {
  overflow: hidden;
}

.search-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 14px;
  border-bottom: 1px solid #edf1f5;
}

.search-panel__header h2 {
  margin: 0 0 6px;
  font-size: 1.22rem;
}

.search-panel__header p {
  margin: 0;
  color: var(--muted);
}

.search-toolbar {
  padding: 16px 20px 10px;
}

.search-toolbar--action {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}

.search-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d8e0e8;
  border-radius: 12px;
  background: #f8fbfd;
}

.search-button {
  min-width: 110px;
}

.search-gate {
  padding: 0 20px 8px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.search-results {
  display: grid;
  gap: 12px;
  padding: 10px 20px 20px;
}

.result-card {
  width: 100%;
  padding: 16px;
  border: 1px solid #dce5ee;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #f8fbfd);
  text-align: left;
  color: var(--text);
  cursor: pointer;
}

.result-card.is-selected {
  border-color: #2e52a8;
  background: linear-gradient(180deg, #eef4ff, #e8f1fb);
  box-shadow: 0 0 0 3px rgba(46, 82, 168, 0.2);
}

.result-card.is-selected::before {
  content: "Vald";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #2e52a8;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}

.result-card__head,
.result-card__body,
.result-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.result-card__head {
  margin-bottom: 8px;
}

.result-card__body,
.result-card__meta {
  color: var(--muted);
  font-size: 0.92rem;
}

.result-card__meta {
  margin-top: 10px;
}

.search-empty {
  padding: 22px 16px;
  border: 1px dashed #cbd6e1;
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
  background: #f8fbfd;
}

.linking-panel {
  padding: 22px;
}

.confirmation-banner {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #b8d9bf;
  border-radius: 12px;
  background: linear-gradient(180deg, #f2fbf3, #e8f7ea);
  color: #29563b;
  font-weight: 600;
}

.confirmation-banner--hidden {
  display: none;
}

.linking-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.link-card {
  padding: 18px;
  border: 1px solid #dde6ef;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #f8fbfd);
}

.link-card--selected {
  border-color: #97b5e6;
  background: linear-gradient(180deg, #f3f8ff, #eaf3fc);
  box-shadow: inset 0 0 0 1px rgba(46, 82, 168, 0.12);
}

.link-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.15rem;
}

.link-card p {
  margin: 0 0 6px;
  color: var(--muted);
}

.link-card__label {
  display: inline-block;
  margin-bottom: 10px;
  color: #4f637a;
  font-size: 0.9rem;
  font-weight: 700;
}

.link-card--connector {
  display: grid;
  place-items: center;
  min-width: 110px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

.hero-panel {
  min-height: 320px;
  padding: 38px;
  background:
    radial-gradient(circle at 18% 24%, rgba(76, 188, 193, 0.18) 0, rgba(76, 188, 193, 0.18) 14%, transparent 15%),
    radial-gradient(circle at 28% 36%, rgba(255, 255, 255, 0.08) 0, rgba(255, 255, 255, 0.08) 10%, transparent 11%),
    linear-gradient(135deg, #213f78, #163261);
  color: #fff;
}

.hero-panel__content {
  max-width: 540px;
  padding-top: 34px;
}

.hero-avatar {
  width: 70px;
  height: 70px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #203b74;
  font-weight: 700;
  font-size: 1.2rem;
}

.hero-panel h1 {
  margin: 0 0 10px;
  font-size: 2.1rem;
}

.hero-panel p {
  max-width: 480px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.02rem;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions--compact {
  gap: 10px;
  margin-top: 18px;
}

.hero-quick-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 700;
}

.hero-quick-link:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  text-decoration: none;
}

.hero-quick-link:visited,
.hero-quick-link:focus,
.hero-quick-link:active {
  color: #fff;
  text-decoration: none;
}

.metric-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
}

.metric {
  display: grid;
  gap: 8px;
  padding: 20px;
  border-radius: 18px;
  color: #fff;
  min-height: 132px;
}

.metric span {
  font-size: 0.98rem;
  opacity: 0.92;
}

.metric strong {
  font-size: 2.2rem;
  line-height: 1;
}

.metric--blue {
  background: linear-gradient(135deg, #21448a, #178db0);
}

.metric--teal {
  background: linear-gradient(135deg, #02839b, #3ec0c3);
}

.metric--amber {
  background: linear-gradient(135deg, #c97709, #f3a81f);
}

.metric--violet {
  background: linear-gradient(135deg, #54418f, #7f6bc8);
}

.list-panel {
  padding: 0 0 12px;
}

.list-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
}

.list-panel__header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.list-panel__header a,
.list-panel__header span {
  color: var(--muted);
  font-size: 0.95rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 14px 20px;
  border-top: 1px solid #edf1f5;
  text-align: left;
}

.data-table th {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.data-table tbody tr.is-selected {
  background: #eef5fb;
}

.data-table tbody tr.is-clickable {
  cursor: pointer;
}

.data-table tbody tr.is-clickable:hover {
  background: #f5f9fd;
}

.data-table tbody tr.is-selected {
  box-shadow: inset 4px 0 0 #2e52a8;
}

.table-action-button {
  padding: 8px 12px;
  border: 1px solid #cfd8e3;
  border-radius: 999px;
  background: #fff;
  color: #355170;
  font-weight: 700;
  cursor: pointer;
}

.data-table tbody tr.is-selected .table-action-button {
  border-color: #2e52a8;
  background: #2e52a8;
  color: #fff;
}

#person-service-panel {
  scroll-margin-top: 100px;
}

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

.coverage-card {
  padding: 16px;
  border: 1px solid #dde6ef;
  border-radius: 14px;
  background: #f8fbfd;
}

a.coverage-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.coverage-card:hover {
  border-color: #b8c9df;
  background: #f1f7fc;
}

.coverage-card strong {
  display: block;
  margin-bottom: 6px;
}

.coverage-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.quick-links {
  display: grid;
  gap: 10px;
  padding: 0 20px 12px;
}

.quick-links a {
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(90deg, #273d83, #1b9bc0);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

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

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

  .side-column .side-panel:last-child {
    grid-column: 1 / -1;
  }

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

  .integration-banner,
  .search-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .brand {
    font-size: 1.5rem;
  }

  .journey__steps {
    grid-template-columns: repeat(3, minmax(100px, 1fr));
    row-gap: 18px;
  }

  .summary-strip,
  .form-grid,
  .decision-grid,
  .side-column,
  .metric-panel,
  .coverage-grid,
  .linking-grid,
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .doc-modal__dialog {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
    margin: 10px;
  }

  .link-card--connector {
    min-width: 0;
    padding: 0;
  }

  .search-toolbar--action {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .workspace {
    padding: 10px;
  }

  .journey,
  .main-column,
  .side-panel {
    border-radius: 14px;
  }

  .journey__steps {
    grid-template-columns: repeat(2, minmax(100px, 1fr));
  }

  .journey__steps::before {
    display: none;
  }

  .tabs,
  .panel-tabs {
    gap: 16px;
  }

  .product-title {
    font-size: 1.2rem;
  }
}
