:root {
  --bg: #eef3f1;
  --surface: #f8fbfa;
  --card: #ffffff;
  --text: #101417;
  --muted: #4c5b59;
  --primary: #0b7d63;
  --primary-strong: #055f4b;
  --line: #d6e4df;
  --glow: rgba(49, 198, 146, 0.24);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f4f8f7 0%, #ebf3ef 100%);
}

.page-bg {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 80% 0%, rgba(65, 216, 163, 0.2), transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(0, 128, 110, 0.1), transparent 35%);
  pointer-events: none;
  z-index: -1;
}

.container {
  width: min(1180px, 94%);
  margin: 18px auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(25, 53, 47, 0.08);
  padding: 22px 30px 30px;
}

.hidden {
  display: none !important;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-image {
  width: 220px;
  height: auto;
  display: block;
}

.top-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.top-nav a {
  color: #23312f;
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
}

.hero {
  text-align: center;
  margin-top: 26px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 64px);
  line-height: 1.05;
}

.hero p {
  margin: 16px auto 0;
  max-width: 700px;
  color: var(--muted);
  font-size: 22px;
  line-height: 1.4;
}

.hero-visual {
  margin: 34px auto 0;
  max-width: 1120px;
  border-radius: 20px;
  background: #f0f5f3;
  padding: 0;
  overflow: hidden;
}

.hero-combined-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: inherit;
}

.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 12px;
  padding: 13px 24px;
  font-size: 19px;
  font-weight: 700;
  cursor: pointer;
}

.primary-btn {
  margin-top: 24px;
  background: linear-gradient(180deg, #148a6e, #0f6f5a);
  color: #fff;
  box-shadow: 0 8px 20px rgba(15, 111, 90, 0.25);
}

.primary-btn:hover {
  filter: brightness(1.05);
}

.ghost-btn {
  background: #e4f0ec;
  color: #0d6653;
}

.benefits {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.benefit-card {
  background: #eff5f3;
  border: 1px solid #d4e4df;
  border-radius: 16px;
  padding: 16px;
  min-height: 150px;
}

.benefit-card h3 {
  margin-top: 0;
  font-size: 28px;
}

.benefit-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 20px;
}

.method {
  margin-top: 20px;
  padding: 12px;
  color: #3e4c49;
  font-size: 19px;
  line-height: 1.5;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  color: #4d5e59;
}

.form-card,
.question-card,
.thanks-card {
  margin: 20px auto;
  width: min(1020px, 98%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(26, 58, 50, 0.14);
  padding: 26px;
}

.form-card h2,
.thanks-card h2 {
  margin: 0;
  font-size: 40px;
}

.form-card p,
.thanks-card p {
  color: var(--muted);
  font-size: 20px;
}

.passport-form {
  margin-top: 16px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-weight: 500;
}

.form-group input,
.form-group select {
  border: 1px solid #c8d8d3;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 16px;
  background: #fbfffd;
}

.consent-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  color: #2e3e3b;
}

.consent-row a {
  color: #0e7d62;
}

.actions {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.question-brand {
  text-align: center;
  font-size: 46px;
  font-weight: 700;
  color: #295f54;
}

.question-pair {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}

.question-pair h2 {
  margin: 0;
  font-size: clamp(22px, 1.9vw, 34px);
  font-weight: 500;
  line-height: 1.18;
  min-height: 132px;
  letter-spacing: 0.01em;
}

.question-pair h2:last-child {
  text-align: right;
}

.scale-row {
  margin: 30px auto 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: nowrap;
}

.scale-dot {
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.scale-row .scale-dot:nth-child(1),
.scale-row .scale-dot:nth-child(7) {
  width: 96px;
  height: 96px;
  background: #19866c;
}

.scale-row .scale-dot:nth-child(2),
.scale-row .scale-dot:nth-child(6) {
  width: 82px;
  height: 82px;
  background: #3bb093;
}

.scale-row .scale-dot:nth-child(3),
.scale-row .scale-dot:nth-child(5) {
  width: 68px;
  height: 68px;
  background: #68c8b0;
}

.scale-row .scale-dot:nth-child(4) {
  width: 54px;
  height: 54px;
  background: #9ddfcd;
}

.scale-dot:hover,
.scale-dot.active {
  transform: scale(1.06);
  box-shadow: 0 0 0 10px rgba(85, 201, 165, 0.2);
}

.progress-wrap {
  margin-top: 32px;
}

.progress-line {
  width: 100%;
  border-radius: 999px;
  background: #d8e8e1;
  height: 9px;
}

#progressFill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #17a37f, #13906f);
  transition: width 0.2s ease;
}

#progressText {
  margin: 10px 0 0;
  text-align: center;
  font-size: 30px;
}

.thanks-card {
  text-align: center;
  padding: 48px;
}

@media (max-width: 980px) {
  .container {
    padding: 18px;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }


  .scale-row {
    gap: 12px;
    flex-wrap: wrap;
  }

  .scale-row .scale-dot:nth-child(1),
  .scale-row .scale-dot:nth-child(7) {
    width: 74px;
    height: 74px;
  }

  .scale-row .scale-dot:nth-child(2),
  .scale-row .scale-dot:nth-child(6) {
    width: 64px;
    height: 64px;
  }

  .scale-row .scale-dot:nth-child(3),
  .scale-row .scale-dot:nth-child(5) {
    width: 54px;
    height: 54px;
  }

  .scale-row .scale-dot:nth-child(4) {
    width: 44px;
    height: 44px;
  }

  .benefits,
  .form-grid,
  .question-pair {
    grid-template-columns: 1fr;
  }

  .question-pair h2,
  .question-pair h2:last-child {
    text-align: left;
  }

  .site-footer {
    flex-direction: column;
    gap: 6px;
  }
}

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

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

.admin-filters {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-table-wrap {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: auto;
  background: #fff;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid #e2ece8;
  padding: 10px;
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

.admin-table th {
  background: #eff6f3;
  font-weight: 700;
}

.tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: #dff2ea;
  color: #0f6f5a;
  font-size: 12px;
  font-weight: 700;
}

.muted {
  color: #59706a;
}

@media (max-width: 980px) {
  .admin-filters {
    grid-template-columns: 1fr;
  }
}

.login-panel {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}

.login-panel .primary-btn {
  margin-top: 0;
}

.login-panel p {
  grid-column: 1 / -1;
  margin: 0;
}

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

.panel-card {
  margin-top: 18px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 14px;
}

.panel-card h3 {
  margin-top: 0;
}

.list-wrap {
  margin-top: 10px;
  max-height: 210px;
  overflow: auto;
  border: 1px solid #e2ece8;
  border-radius: 10px;
  padding: 8px;
}

.list-wrap ul,
.list-wrap li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-wrap li {
  padding: 6px 0;
  border-bottom: 1px solid #eef4f1;
}

.list-wrap li:last-child {
  border-bottom: 0;
}

.company-item-btn {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: #fff;
  border-radius: 10px;
  padding: 10px 10px;
  color: #17322d;
  cursor: pointer;
}

.company-item-btn:hover {
  background: #f4faf7;
  border-color: #d9ebe4;
}

.company-item-btn.active {
  background: #ecf8f3;
  border-color: #9ecfbf;
}

.company-card-inline {
  margin-top: 12px;
  border-top: 1px solid #e6f0ec;
  padding-top: 10px;
}

.admin-filters.compact {
  grid-template-columns: 2fr 1fr;
}

@media (max-width: 980px) {
  .admin-grid-2,
  .login-panel,
  .admin-filters.compact {
    grid-template-columns: 1fr;
  }
}

.login-panel {
  grid-template-columns: 1fr 1fr auto;
}

.login-panel .form-group {
  margin: 0;
}

.panel-card h4 {
  margin-bottom: 8px;
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.link-actions {
  display: inline-flex;
  gap: 8px;
  margin-top: 6px;
}

.link-actions button {
  border: 1px solid #cce0da;
  background: #f4fbf8;
  color: #136452;
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
}

.link-actions .link-action-danger {
  border-color: #e6bdc4;
  background: #fff3f5;
  color: #af2e43;
}

.tag.link-status-active {
  background: #dff2ea;
  color: #0f6f5a;
}

.tag.link-status-inactive {
  background: #e8eceb;
  color: #51605d;
}

.qr-panel {
  margin-top: 10px;
  border: 1px solid #d6e7e1;
  border-radius: 10px;
  padding: 10px;
  background: #f9fffd;
}

.qr-panel img {
  width: 220px;
  height: 220px;
  object-fit: contain;
  display: block;
}

.qr-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.qr-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: stretch;
}

.qr-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #cde0d8;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

@media (max-width: 560px) {
  .qr-actions-grid {
    grid-template-columns: 1fr;
  }
}

.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
}

.qr-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 18, 0.58);
}

.qr-modal-card {
  position: relative;
  width: min(440px, 92vw);
  margin: 8vh auto;
  border: 1px solid #d6e7e1;
  border-radius: 14px;
  padding: 14px;
  background: #f9fffd;
  box-shadow: 0 16px 36px rgba(14, 38, 31, 0.32);
}

.qr-modal-card img {
  width: 100%;
  height: auto;
  max-width: 320px;
  margin: 0 auto;
  display: block;
}

.recent-link-meta {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}









.ghost-btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.danger-btn { border-color: #e2b6bc; color: #9f3345; background: #fff6f7; }
.danger-btn:hover { border-color: #d78693; color: #8b2538; background: #ffecef; }
.demo-creds { margin-top: 6px; font-size: 13px; color: #60736f; }

/* Specialist cabinet UX updates */
.login-panel {
  margin-top: 16px;
  display: block;
}

.login-controls {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}

.login-controls .primary-btn {
  margin-top: 0;
}

.auth-error {
  margin: 10px 0 0;
  color: #bb2337;
  font-size: 14px;
  font-weight: 600;
}

.input-error {
  border-color: #d63a4f !important;
  box-shadow: 0 0 0 2px rgba(214, 58, 79, 0.14);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel-head h3 {
  margin: 0;
}

.company-create-panel {
  margin-top: 12px;
  border: 1px solid #dfece7;
  border-radius: 10px;
  background: #f8fcfa;
  padding: 12px;
}

.company-create-actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
}

.company-create-actions .primary-btn,
.company-create-actions .ghost-btn {
  margin-top: 0;
}

.company-create-actions.compact-actions {
  gap: 8px;
  flex-wrap: wrap;
}

.company-create-actions.compact-actions .primary-btn,
.company-create-actions.compact-actions .ghost-btn {
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  margin-top: 0;
  flex: 0 0 auto;
}

.admin-filters .primary-btn,
.admin-filters .ghost-btn {
  margin-top: 0;
  width: 100%;
}

.filter-action {
  align-self: end;
}

@media (max-width: 980px) {
  .login-controls {
    grid-template-columns: 1fr;
  }

  .company-create-actions {
    flex-direction: column;
  }
}

.user-grid {
  margin-top: 8px;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.inline-check input {
  margin: 0;
}

#newUserCompanies,
#accessCompanyIds {
  min-height: 120px;
  background: #fbfffd;
}


.config-editor {
  width: 100%;
  min-height: 320px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.4;
  border: 1px solid #c8d8d3;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fbfffd;
  resize: vertical;
}

.config-history-row {
  margin-top: 8px;
}

.cfg-editor-wrap {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid #d5e3de;
  border-radius: 14px;
  background: #f8fdfb;
}

.cfg-editor-wrap h4 {
  margin: 0 0 6px;
}

#testConfigForm {
  display: grid;
  gap: 14px;
  margin-top: 10px;
}

.cfg-section {
  border: 1px solid #d8e6e1;
  border-radius: 12px;
  background: #ffffff;
  padding: 12px;
}

.cfg-section h5 {
  margin: 0;
}

.cfg-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.cfg-question-grid,
.cfg-answer-grid,
.cfg-scale-grid {
  display: grid;
  gap: 8px;
}

.cfg-question-row,
.cfg-answer-row,
.cfg-scale-row {
  display: grid;
  gap: 8px;
  align-items: center;
  border: 1px solid #e3ece8;
  border-radius: 10px;
  background: #fbfefd;
  padding: 8px;
}

.cfg-question-row {
  grid-template-columns: 88px 1fr 1fr 120px;
}

.cfg-answer-row {
  grid-template-columns: 120px 120px 1fr 1fr 120px;
}

.cfg-scale-row {
  grid-template-columns: 1fr 1.2fr 170px 1.3fr 120px;
}

.cfg-question-row textarea,
.cfg-question-row input,
.cfg-answer-row input,
.cfg-scale-row input,
.cfg-scale-row select,
#lieScalePairsEditor {
  width: 100%;
  border: 1px solid #c9dad4;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  background: #ffffff;
}

.cfg-question-row textarea,
#lieScalePairsEditor {
  resize: vertical;
  min-height: 56px;
}

.cfg-id {
  max-width: 88px;
}

@media (max-width: 1200px) {
  .cfg-question-row {
    grid-template-columns: 72px 1fr;
  }

  .cfg-answer-row,
  .cfg-scale-row {
    grid-template-columns: 1fr;
  }
}

.cfg-collapsible {
  border: 1px solid #d8e6e1;
  border-radius: 12px;
  background: #ffffff;
}

.cfg-collapsible + .cfg-collapsible {
  margin-top: 8px;
}

.cfg-collapsible > summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 14px;
  font-weight: 700;
  color: #1f3d35;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cfg-collapsible > summary::-webkit-details-marker {
  display: none;
}

.cfg-collapsible > summary::after {
  content: "+";
  font-size: 20px;
  line-height: 1;
  color: #1f8a70;
}

.cfg-collapsible[open] > summary::after {
  content: "-";
}

.cfg-collapse-body {
  border-top: 1px solid #e2ece8;
  padding: 12px;
}

.cfg-grid-head {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: #5a7770;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.cfg-question-head {
  grid-template-columns: 88px 1fr 1fr 120px;
}

.cfg-answer-head {
  grid-template-columns: 120px 120px 1fr 1fr 120px;
}

.cfg-scale-head {
  grid-template-columns: 1fr 1.2fr 170px 1.3fr 120px;
}

@media (max-width: 1200px) {
  .cfg-grid-head {
    display: none;
  }
}

.panel-head h4 {
  margin: 0;
}

.company-panel-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-start;
}

.company-panel-actions .primary-btn,
.company-panel-actions .ghost-btn {
  margin-top: 0;
}

.user-panel-actions {
  margin-top: 10px;
}


.cfg-screening-grid {
  display: grid;
  gap: 8px;
}

.cfg-screening-row {
  display: grid;
  grid-template-columns: 88px 1fr 120px;
  gap: 8px;
  align-items: center;
  border: 1px solid #e3ece8;
  border-radius: 10px;
  background: #fbfefd;
  padding: 8px;
}

.cfg-screening-head {
  grid-template-columns: 88px 1fr 120px;
}

.cfg-screening-row textarea,
.cfg-screening-row input {
  width: 100%;
  border: 1px solid #c9dad4;
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  background: #ffffff;
}

.cfg-screening-row textarea {
  resize: vertical;
  min-height: 56px;
}

@media (max-width: 1200px) {
  .cfg-screening-row {
    grid-template-columns: 72px 1fr;
  }
}

.screening-question {
  margin-bottom: 14px;
}

.screening-options {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.screening-options label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.dashboard-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
}

.dashboard-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 21, 0.55);
}

.dashboard-card {
  position: relative;
  width: min(1180px, 94vw);
  max-height: 90vh;
  overflow: auto;
  margin: 4vh auto;
  background: #ffffff;
  border: 1px solid #d2e3dd;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 20px 40px rgba(20, 44, 38, 0.3);
}

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

.dashboard-controls {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  align-items: center;
}

.dashboard-content {
  margin-top: 8px;
}

.dashboard-bars {
  display: grid;
  gap: 12px;
}

.dashboard-triad-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid #d4e5df;
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfefd 0%, #f3faf7 100%);
  box-shadow: 0 8px 22px rgba(18, 53, 43, 0.06);
}

.dashboard-triad-title {
  font-weight: 700;
  color: #1d3b34;
}

.dashboard-triad-rows {
  display: grid;
  gap: 10px;
}
.dashboard-bar-row {
  display: grid;
  gap: 6px;
}

.dashboard-bar-title {
  font-weight: 600;
}

.dashboard-bar-track {
  position: relative;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #e3efea;
  overflow: hidden;
}

.dashboard-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #128a6e, #2fb28f);
}

.dashboard-bar-values {
  font-size: 13px;
  color: #5d716c;
}

.dashboard-radar-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.dashboard-radar-svg {
  width: 100%;
  max-height: 640px;
}

.dashboard-radar-legend {
  margin: 0;
  padding-left: 20px;
  color: #253936;
}

.legal-doc {
  line-height: 1.5;
}

.legal-doc h3 {
  margin-top: 18px;
}

@media (max-width: 980px) {
  .dashboard-head {
    flex-direction: column;
    align-items: flex-start;
  }

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

.cabinet-menu {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.cabinet-menu-item {
  border: 1px solid #cfe3dc;
  background: #f5fbf8;
  color: #16463c;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.cabinet-menu-item:hover {
  background: #e9f6f1;
  border-color: #b9d8ce;
}

.cabinet-menu-item.is-active {
  background: #178f73;
  border-color: #178f73;
  color: #ffffff;
}

.cabinet-menu-item-danger {
  background: #ffffff;
  color: #9f3a45;
  border-color: #e9c9ce;
}

.workspace-section {
  margin-top: 12px;
}

.links-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

.links-form-panel,
.links-recent-panel {
  border: 1px solid #e3efea;
  border-radius: 12px;
  padding: 12px;
  background: #fcfffe;
}

.links-recent-panel .list-wrap {
  max-height: 420px;
}

.links-archive-panel {
  margin-top: 14px;
}

.links-filters-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.links-table-toolbar {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

@media (max-width: 980px) {
  .links-layout {
    grid-template-columns: 1fr;
  }

  .links-filters-grid {
    grid-template-columns: 1fr;
  }
}

.session-badge {
  border: 1px solid #cfe2da;
  background: #f3faf7;
  color: #1e4a3f;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}




/* Landing blocks 1-13 */
.hero-updated {
  text-align: left;
}

.hero-updated h1 {
  font-size: clamp(22px, 2.3vw, 34px);
  line-height: 1.2;
  max-width: 1100px;
  border: 1px solid #d5e7e1;
  background: linear-gradient(180deg, #f9fdfb, #eef7f3);
  border-radius: 14px;
  padding: 14px 16px;
  color: #103c33;
  box-shadow: 0 8px 18px rgba(18, 74, 61, 0.08);
}

.hero-updated p {
  margin-left: 0;
  max-width: 980px;
  font-size: 20px;
}

.hero-badges {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-badges span {
  border: 1px solid #cde3dc;
  background: #eef8f4;
  color: #18473d;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
}

.hero-footnote {
  margin-top: 10px;
  color: #58706a;
  font-size: 14px;
}

.social-proof-strip {
  margin-top: 22px;
  border-radius: 16px;
  border: 1px solid #0e7b64;
  background: linear-gradient(120deg, #0d6e59, #0f8e73);
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.social-proof-strip article {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 12px;
  color: #ecfffa;
}

.social-proof-strip strong {
  display: block;
  font-size: 30px;
  line-height: 1;
}

.social-proof-strip span {
  font-size: 13px;
  color: #d4f0e9;
}

.landing-section {
  margin-top: 28px;
  padding: 20px;
  border: 1px solid #d5e6e0;
  border-radius: 16px;
  background: #ffffff;
}

.landing-section h2 {
  margin: 0;
  font-size: clamp(24px, 2.7vw, 38px);
  line-height: 1.12;
}

.problem-grid,
.why-grid,
.timeline-grid,
.metrics-grid,
.formats-grid,
.method-list {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

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

.problem-card,
.why-grid article,
.timeline-grid article,
.metrics-grid article,
.format-card,
.artifact-grid article,
.method-list article,
.reality-levels article,
.tab-panel {
  border: 1px solid #d9e8e2;
  border-radius: 14px;
  background: #f8fcfa;
  padding: 14px;
}

.problem-card h3,
.why-grid h3,
.timeline-grid h3,
.metrics-grid h3,
.format-card h3,
.tab-panel h3 {
  margin: 0;
  font-size: 20px;
}

.problem-card p,
.why-grid p,
.timeline-grid p,
.metrics-grid p,
.format-card p,
.tab-panel p,
.method-copy,
.safe-list li {
  margin: 8px 0 0;
  color: #49645e;
}

.section-insight {
  margin: 14px 0 0;
  color: #1b4e43;
  font-weight: 600;
}

.section-contrast {
  background: linear-gradient(180deg, #f6fbfa, #f0f7f4);
}

.reality-levels {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.reality-levels .focus {
  border-color: #8bc6b3;
  background: #e8f7f1;
}

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

.artifact-grid article strong {
  color: #0f7a63;
  font-size: 26px;
}

.artifact-grid article h3 {
  margin: 6px 0 0;
  font-size: 19px;
}

.artifact-grid article p {
  margin: 8px 0 0;
  color: #4b6660;
}

.result-tabs {
  margin-top: 16px;
}

.tab-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab-btn {
  border: 1px solid #cfe4dd;
  background: #f4fbf8;
  color: #19493f;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 600;
  cursor: pointer;
}

.tab-btn.is-active {
  border-color: #0f7a63;
  background: #0f7a63;
  color: #ffffff;
}

.tab-panels {
  margin-top: 12px;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.section-metrics {
  background: linear-gradient(180deg, #eff8f4, #f9fffc);
}

.metric-value {
  display: block;
  font-size: clamp(34px, 4vw, 50px);
  color: #0f7a63;
  line-height: 1;
}

.metrics-grid p {
  font-size: 13px;
}

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

.format-card.featured {
  border-color: #7fb9a9;
  background: linear-gradient(180deg, #e7f7f1, #f4fcf8);
}

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

.safe-list {
  margin: 14px 0 0;
  padding-left: 22px;
}

.safe-list a {
  color: #0f7d62;
}

.final-cta {
  text-align: center;
  background: linear-gradient(130deg, #0d6f5a, #169174);
  border-color: #0d6f5a;
}

.final-cta h2,
.final-cta p {
  color: #f2fffb;
}

.final-cta .primary-btn {
  background: #ffffff;
  color: #0d6f5a;
  box-shadow: 0 12px 24px rgba(9, 42, 34, 0.24);
}

@media (max-width: 980px) {
  .hero-updated {
    text-align: left;
  }

  .hero-updated p {
    font-size: 17px;
  }

  .social-proof-strip,
  .problem-grid,
  .why-grid,
  .timeline-grid,
  .artifact-grid,
  .metrics-grid,
  .formats-grid,
  .method-list,
  .reality-levels {
    grid-template-columns: 1fr;
  }

  .landing-section {
    padding: 16px;
  }
}




.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
}

.contact-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 21, 18, 0.55);
}

.contact-card {
  position: relative;
  width: min(760px, 94vw);
  margin: 7vh auto;
  background: #ffffff;
  border: 1px solid #d4e4de;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 20px 40px rgba(20, 49, 40, 0.3);
}

.contact-card h3 {
  margin: 0;
}

.contact-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.contact-links a {
  color: #0f7b62;
  text-decoration: none;
  border: 1px solid #cfe2db;
  background: #f2fbf8;
  border-radius: 999px;
  padding: 6px 10px;
}

.contact-links a[aria-disabled="true"] {
  opacity: 0.72;
  cursor: default;
}

.dashboard-answers {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.dashboard-answers th,
.dashboard-answers td {
  border: 1px solid #e2ece8;
  padding: 8px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.dashboard-answers th {
  background: #eff6f3;
  font-weight: 700;
}

.link-actions .link-action-neutral {
  border-color: #cce0da;
  background: #f4fbf8;
  color: #136452;
}

.dashboard-controls {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  align-items: center;
}

.dashboard-person-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #d7e7e2;
  border-radius: 12px;
  background: #f7fcfa;
}

.dashboard-person-field span {
  display: block;
  font-size: 12px;
  color: #5a6f69;
  margin-bottom: 2px;
}

.dashboard-person-field strong {
  font-size: 14px;
  color: #143a31;
  font-weight: 600;
}

.dashboard-controls .ghost-btn,
.dashboard-controls .primary-btn {
  min-width: 108px;
  height: 34px;
  padding: 0 10px;
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


.question-actions {
  justify-content: center;
  margin-top: 10px;
  margin-bottom: 6px;
}

.question-actions .ghost-btn {
  min-width: 220px;
}

/* Question card prev button */
.question-card {
  position: relative;
  padding-top: 56px;
}

.question-actions {
  position: absolute;
  left: 18px;
  top: 14px;
  margin: 0;
  justify-content: flex-start;
}

.question-actions .ghost-btn {
  min-width: 0;
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  background: #e7ecea;
  color: #52615d;
}

/* Dashboard button alignment */
.dashboard-controls .ghost-btn,
.dashboard-controls .primary-btn {
  margin-top: 0;
  vertical-align: middle;
}

/* Question card refinements */
.question-pair {
  position: relative;
}

.question-pair::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: #d7dfdc;
  pointer-events: none;
}

.question-pair h2 {
  font-size: clamp(19px, 1.6vw, 30px);
  font-weight: 400;
}

@media (max-width: 980px) {
  .question-pair::after {
    display: none;
  }
}

/* Export controls for results */
#downloadMainBtn,
#downloadDashboardBtn {
  background: #e8f2ff;
  color: #1f5b9d;
  border: 1px solid #bfd7f7;
}

#downloadMainBtn:hover,
#downloadDashboardBtn:hover {
  background: #ddebff;
}

.export-format-group,
.export-checks-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.export-format-group {
  flex-direction: column;
  align-items: flex-start;
}

.admin-filters .export-checks-group {
  margin-top: 4px;
}

.dashboard-export-panel {
  margin-top: 10px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #d7e7e2;
  border-radius: 10px;
  background: #f7fcfa;
}

.dashboard-export-panel .export-format-group {
  flex-direction: row;
  align-items: center;
}

.bar-sort-panel {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 8px 10px;
  border: 1px solid #d7e7e2;
  border-radius: 10px;
  background: #f7fcfa;
}

.bar-sort-panel .ghost-btn {
  margin-top: 0;
  min-width: 40px;
  padding: 6px 10px;
  height: 32px;
}

.requests-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.requests-search-group {
  margin: 0;
}

.contact-consent-row {
  margin-top: 14px;
}

.contact-consent-row input[type="checkbox"] {
  margin-top: 3px;
}

@media (max-width: 980px) {
  .requests-toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

.city-picker-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.chips-row {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-item {
  border: 1px solid #cfe3dd;
  background: #f3fbf8;
  color: #1f6654;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  cursor: pointer;
}

 .dept-builder-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr auto;
  gap: 8px;
  align-items: center;
}

.dept-tree-preview {
  margin-top: 10px;
  border: 1px solid #d8e5e1;
  border-radius: 10px;
  background: #f9fcfb;
  padding: 10px 12px;
  max-height: 240px;
  overflow: auto;
}

.dept-tree-preview ul {
  list-style: none;
  margin: 0;
  padding-left: 14px;
  border-left: 1px dashed #c8d8d3;
}

.dept-tree-preview > ul {
  padding-left: 0;
  border-left: none;
}

.dept-tree-preview li {
  margin: 8px 0;
}

.dept-node-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dept-node-row .ghost-btn {
  padding: 4px 8px;
  font-size: 12px;
}

@media (max-width: 980px) {
  .dept-builder-row {
    grid-template-columns: 1fr;
  }

  .dept-node-row {
    flex-wrap: wrap;
  }
}


.company-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}


.company-edit-modal-card {
  width: min(920px, 94vw);
  max-height: 90vh;
  overflow: auto;
}

.company-edit-modal-card .company-create-panel {
  margin-top: 0;
  border: none;
  padding: 4px;
  background: transparent;
}

#companyCard {
  display: grid;
  gap: 10px;
}

#companyCard > p,
#companyCard > div,
#companyCard > ul {
  margin: 0;
}

#companyCard > p,
#companyCard > div {
  border: 1px solid #dbe8e4;
  border-radius: 12px;
  background: #fbfffd;
  padding: 10px 12px;
}

.company-card-head {
  background: linear-gradient(180deg, #f2faf7 0%, #ffffff 100%);
}

.company-card-head p {
  margin: 0;
  font-size: 18px;
}

#companyCard ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.tag-green {
  background: #e8f8f0;
  color: #1f7f52;
  border: 1px solid #b9e5cf;
}

.tag-gray {
  background: #f0f3f5;
  color: #687884;
  border: 1px solid #d3dce2;
}

.company-list-table .is-active-row td {
  background: #eef8f4;
}

.company-list-table td {
  vertical-align: middle;
}

.mini-link-btn {
  padding: 4px 10px !important;
  font-size: 12px !important;
  line-height: 1.2;
  border-radius: 999px;
  min-height: auto;
}

.company-name-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.company-list-table tr {
  cursor: pointer;
}

.company-list-table tr:hover td {
  background: #f4fbf8;
}

.company-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.company-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (max-width: 980px) {
  .company-card-grid {
    grid-template-columns: 1fr;
  }
}

.company-card-actions .primary-btn,
.company-card-actions .ghost-btn {
  margin-top: 0;
  font-size: 15px;
  padding: 10px 16px;
}

.company-open-main-btn {
  min-width: 132px;
}

.company-edit-soft-btn {
  background: #edf4f1;
  color: #2f5f56;
  border: 1px solid #d3e2dd;
  box-shadow: none;
}



.totp-modal-card {
  width: min(420px, 92vw);
  margin: 4vh auto;
  max-height: 88vh;
  overflow-y: auto;
  padding: 12px;
}

.totp-modal-title {
  margin: 0 0 6px;
}

.totp-secret {
  display: block;
  padding: 10px 12px;
  border: 1px solid #c8d8d3;
  border-radius: 10px;
  background: #f4fbf8;
  color: #17463c;
  font-size: 14px;
  line-height: 1.35;
  word-break: break-all;
}
.logs-toolbar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.logs-actions-row,
.logs-settings-row {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.logs-settings-card {
  margin-top: 12px;
}

#logsBody td code {
  font-size: 12px;
  color: #3a4f4a;
}

@media (max-width: 980px) {
  .logs-toolbar-grid {
    grid-template-columns: 1fr;
  }
}
#totpQrImage {
  max-width: 210px;
}

.totp-modal-card .qr-actions {
  margin-top: 6px;
  gap: 6px;
}
.totp-modal-card .qr-actions .primary-btn,
.totp-modal-card .qr-actions .ghost-btn {
  padding: 7px 11px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  margin-top: 0;
}
.totp-modal-card .form-group {
  margin-top: 8px;
}
.totp-modal-card .totp-secret {
  padding: 8px 10px;
  font-size: 13px;
}




.main-export-line {
  margin-top: 10px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 12px;
  border: 1px solid #d7e7e2;
  border-radius: 10px;
  background: #f7fcfa;
}

.main-export-line .ghost-btn {
  margin-top: 0;
  height: 34px;
  padding: 0 16px;
}

.sort-th-btn {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
}

.sort-th-btn:hover {
  text-decoration: underline;
}

/* Results dashboard layout overrides */
.dashboard-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.dashboard-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

@media (max-width: 980px) {
  .dashboard-head {
    align-items: stretch;
  }
}

.users-list-wrap {
  min-height: 360px;
  max-height: 360px;
}


.dashboard-section-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.export-scope-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.dashboard-sort-select {
  min-width: 240px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #cfe3dc;
  background: #f7fcfa;
  color: #16463c;
  padding: 0 10px;
}

.dashboard-triad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}

.dashboard-bar-row-accent .dashboard-bar-fill {
  background: linear-gradient(90deg, #d8702f 0%, #d9963f 100%);
}

.dashboard-bar-row-count .dashboard-bar-fill {
  background: linear-gradient(90deg, #5c8f82 0%, #7ab19e 100%);
}

@media (max-width: 980px) {
  .dashboard-sort-select {
    min-width: 100%;
  }
}
.table-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.table-actions .ghost-btn {
  margin-top: 0;
}

.results-open-btn {
  min-width: 88px;
  height: 32px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
}

.results-delete-btn {
  min-width: 74px;
  height: 30px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
}
.dashboard-section-tabs .ghost-btn,
.dashboard-section-tabs .primary-btn {
  min-width: 0;
  height: 30px;
  padding: 0 11px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0;
}

.dashboard-section-tabs .ghost-btn {
  background: #edf4f1;
  color: #3c6258;
  border: 1px solid #d5e3de;
}

.dashboard-section-tabs .primary-btn {
  background: #d9efe7;
  color: #15594b;
  border: 1px solid #9bcdbd;
  box-shadow: none;
}

.results-delete-btn {
  border-color: #e2b6bc;
  color: #9f3345;
  background: #fff6f7;
}

.results-delete-btn:hover {
  border-color: #d78693;
  color: #8b2538;
  background: #ffecef;
}
.reality-note {
  margin: 10px 0 0;
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.reality-note-muted {
  background: #fff2e8;
  color: #8f5a38;
}

.reality-note-active {
  background: #e6f5ef;
  color: #1b6d58;
}

.reality-bridge {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid #a8d5c6;
  border-radius: 12px;
  background: linear-gradient(180deg, #eef8f4 0%, #f8fcfa 100%);
  color: #184c41;
  font-weight: 600;
}
.company-edit-modal-card {
  width: min(1120px, 96vw);
}

.company-edit-modal-card .company-create-actions .primary-btn,
.company-edit-modal-card .company-create-actions .ghost-btn,
.company-edit-modal-card .city-picker-row .ghost-btn,
.company-edit-modal-card .dept-builder-row .ghost-btn {
  margin-top: 0;
  padding: 8px 12px;
  font-size: 14px;
  border-radius: 10px;
}

.company-list-table .mini-link-btn {
  margin-top: 0;
}

