:root {
  color-scheme: light;
  --bg: #f3f6fb;
  --panel: #fff;
  --ink: #172236;
  --muted: #66758a;
  --line: #e0e7f0;
  --blue: #1760e5;
  --soft: #edf3ff;
  --shadow: 0 12px 42px #17346109;
  font-family:
    Inter,
    "DM Sans",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 15px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
a {
  color: var(--blue);
}
h1,
h2,
h3 {
  letter-spacing: -0.035em;
  margin: 0 0 18px;
}
h1 {
  font-size: clamp(27px, 3vw, 38px);
}
h2 {
  font-size: 21px;
}
p {
  line-height: 1.65;
}
small,
.muted {
  color: var(--muted);
}
small {
  display: block;
  font-size: 12px;
  margin-top: 5px;
}
input,
select,
textarea {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  padding: 12px;
  border-radius: 10px;
  max-width: 100%;
  min-width: 0;
}
input:not([type="checkbox"]):not([type="radio"]),
textarea {
  width: 100%;
}
textarea {
  resize: vertical;
  min-height: 95px;
}
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}
:focus-visible {
  outline: 3px solid #6b9cff;
  outline-offset: 3px;
}
label.field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 18px 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
label.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.6;
  margin: 20px 0;
}
input[type="file"] {
  font-size: 13px;
}
#app {
  min-height: 100vh;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px;
  box-shadow: var(--shadow);
  margin: 0 0 22px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 15px;
  font-size: 13px;
  font-weight: 650;
  min-height: 42px;
}
.btn:hover {
  background: var(--soft);
  border-color: #8eafe7;
}
.btn.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}
.btn.primary:hover {
  background: #104fbf;
}
.icon-button {
  border: 0;
  background: var(--soft);
  color: var(--ink);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 25px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
}
.brand img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}
.brand strong {
  font-size: 19px;
  letter-spacing: -0.045em;
  line-height: 1.1;
  display: block;
}
.brand strong span {
  display: block;
  color: var(--blue);
  font-size: 25px;
  letter-spacing: -0.06em;
}
.brand small {
  font-size: 9px;
  letter-spacing: 0.03em;
  margin-top: 5px;
}
.brand-link {
  text-decoration: none;
  display: block;
  padding: 6px 0 28px;
}
.account-company {
  border-block: 1px solid var(--line);
  padding: 18px 0;
  font-size: 13px;
  font-weight: 650;
  display: flex;
  gap: 10px;
  align-items: center;
}
.account-company img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  background: white;
  border-radius: 6px;
}
aside {
  width: 240px;
  position: fixed;
  inset: 0 auto 0 0;
  padding: 28px 22px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 20px;
}
nav button {
  border: 0;
  text-align: left;
  padding: 13px 15px;
  background: transparent;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
nav button:hover,
nav button.active {
  background: var(--soft);
  color: var(--blue);
}
.sidebar-note {
  margin-top: auto;
  padding: 22px 0;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
}
.workspace {
  margin-left: 240px;
  min-height: 100vh;
}
header {
  min-height: 88px;
  padding: 18px 34px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: var(--panel);
}
header > div:last-child {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
header > div:first-child {
  font-weight: 650;
  font-size: 14px;
}
header select {
  font-size: 13px;
  padding: 10px;
}
.content {
  max-width: 1480px;
  margin: auto;
  padding: 30px 34px 45px;
}
.filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 30px;
}
.filters select {
  margin-left: 8px;
  font-size: 12px;
  padding: 9px;
}
.welcome {
  padding: 9px 0 24px;
}
.welcome h1 {
  margin-bottom: 6px;
}
.welcome p {
  color: var(--muted);
  font-size: 14px;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
  margin-bottom: 10px;
}
.metrics .panel {
  padding: 22px;
  border-top: 3px solid #377bed;
}
.metrics .panel:nth-child(2) {
  border-top-color: #8c71d7;
}
.metrics .panel:nth-child(3) {
  border-top-color: #299f9a;
}
.metrics .panel:nth-child(4) {
  border-top-color: #e8a34b;
}
.metrics span {
  font-size: 13px;
  color: var(--muted);
}
.metrics b {
  display: block;
  font-size: 34px;
  margin-top: 22px;
  letter-spacing: -0.06em;
  color: var(--blue);
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 20px;
}
.section-head h2 {
  margin: 0;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}
th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  color: var(--muted);
  font-weight: 650;
  padding: 12px 14px 18px;
  white-space: nowrap;
}
td {
  padding: 17px 14px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}
td .btn {
  font-size: 12px;
  padding: 7px 10px;
  white-space: nowrap;
  min-height: 36px;
}
td .btn + .btn {
  margin-left: 5px;
}
.empty {
  color: var(--muted);
  padding: 35px 10px;
}
.form-panel {
  max-width: 700px;
}
.notice {
  border-radius: 10px;
  background: var(--soft);
  color: var(--muted);
  padding: 15px 17px;
  font-size: 12px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.form-error {
  color: #c74457;
  font-size: 13px;
}
.eyebrow {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--blue);
  font-weight: 750;
  margin: 32px 0 14px;
}
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background: radial-gradient(ellipse at 15% 10%, #2770eb10, transparent 60%);
}
.login .panel {
  width: min(100%, 470px);
  padding: 38px;
}
.login h1 {
  font-size: 28px;
}
.login form .primary {
  width: 100%;
  margin-top: 5px;
}
.login > section > p {
  font-size: 13px;
  color: var(--muted);
}
.login .brand {
  margin-bottom: 30px;
}
dialog {
  background: var(--panel);
  color: var(--ink);
  width: min(94vw, 590px);
  max-height: 90vh;
  overflow: auto;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 28px 120px #07132744;
}
dialog::backdrop {
  background: #0d1c3d88;
  backdrop-filter: blur(4px);
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.modal-head h2 {
  font-size: 22px;
}
.one-time-password {
  display: block;
  font-size: 19px;
  padding: 22px;
  background: var(--soft);
  overflow-wrap: anywhere;
  user-select: all;
  border-radius: 10px;
}
.quote {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
#toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translate(-50%, 15px);
  background: #142848;
  color: white;
  padding: 14px 22px;
  border-radius: 12px;
  font-size: 14px;
  max-width: min(90vw, 700px);
  box-shadow: 0 10px 50px #0003;
  z-index: 4000;
  pointer-events: none;
  opacity: 0;
  transition: 0.2s;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
footer {
  padding: 10px 34px 25px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}
#lab-map {
  height: 480px;
  border-radius: 12px;
  background: #dce6ef;
  z-index: 0;
}
.map-note {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 0;
}
.leaflet-popup-content {
  color: #172236;
}
.response-list article {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.response-list article span {
  display: block;
  font-size: 12px;
  color: var(--blue);
  margin-top: 6px;
}
.response-list p {
  font-size: 13px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.public-survey {
  width: min(100%, 720px);
  margin: auto;
  padding: 35px 20px;
}
.public-survey .panel {
  padding: 34px;
}
.public-survey h1 {
  font-size: 30px;
}
.public-survey p {
  color: var(--muted);
  font-size: 14px;
}
.survey-logo {
  max-height: 70px;
  max-width: 180px;
  object-fit: contain;
}
.public-survey fieldset {
  border: 0;
  margin: 32px 0;
  padding: 0;
}
.public-survey legend {
  line-height: 1.6;
  font-size: 15px;
  margin-bottom: 17px;
}
.score-options {
  display: flex;
  gap: 8px;
}
.score-options label {
  flex: 1;
  position: relative;
}
.score-options input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.score-options span {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 48px;
  font-size: 17px;
  background: var(--panel);
  pointer-events: none;
}
.score-options input:checked + span {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.score-options input:focus-visible + span {
  outline: 3px solid #6b9cff;
  outline-offset: 3px;
}
.scale {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  margin-top: 9px;
}
.signature {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
}
.public-survey .primary {
  width: 100%;
  padding: 15px;
}
.trend {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 160px;
  margin-top: 28px;
}
.trend-week {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  height: 100%;
  gap: 8px;
  font-size: 10px;
  color: var(--muted);
}
.trend-bar {
  width: 100%;
  max-width: 60px;
  border-radius: 7px 7px 0 0;
  background: var(--blue);
  min-height: 2px;
}
.insight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.critical b {
  display: block;
}
.critical article {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.critical article span {
  font-size: 12px;
  color: var(--muted);
}
.critical p {
  font-size: 12px;
  margin: 5px 0;
  overflow-wrap: anywhere;
}
.nps-explanation {
  font-size: 12px;
  color: var(--muted);
}
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c1421;
  --panel: #131e2e;
  --ink: #f3f6fc;
  --muted: #9baec9;
  --line: #28384e;
  --blue: #74a6ff;
  --soft: #1b2e4d;
  --shadow: 0 12px 42px #0001;
}
[data-theme="dark"] .btn.primary {
  background: #2465da;
  border-color: #2465da;
  color: white;
}
[data-theme="dark"] .welcome h1 {
  color: white;
}
[data-theme="dark"] .brand img {
  background: white;
  border-radius: 11px;
}
[data-theme="dark"] .login {
  background: #0c1421;
}
@media (min-width: 1500px) {
  .content {
    padding-top: 40px;
  }
}
@media (max-width: 1100px) {
  aside {
    width: 210px;
    padding: 25px 16px;
  }
  .workspace {
    margin-left: 210px;
  }
  .content {
    padding: 25px 20px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  header {
    padding: 16px 20px;
    align-items: flex-start;
  }
  .insight-grid {
    grid-template-columns: 1fr;
  }
  .brand strong {
    font-size: 18px;
  }
  .brand strong span {
    font-size: 24px;
  }
}
@media (max-width: 720px) {
  aside {
    position: static;
    width: auto;
    padding: 18px 20px;
    display: block;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand-link {
    padding: 0 0 15px;
  }
  .account-company {
    border-bottom: 0;
    padding-bottom: 0;
  }
  nav {
    flex-direction: row;
    overflow: auto;
    white-space: nowrap;
    margin-top: 15px;
    gap: 3px;
  }
  nav button {
    padding: 10px 13px;
  }
  .sidebar-note {
    display: none;
  }
  aside > .btn {
    position: absolute;
    top: 26px;
    right: 20px;
  }
  .workspace {
    margin: 0;
  }
  header {
    display: block;
  }
  header > div:last-child {
    margin-top: 12px;
  }
  header .btn {
    font-size: 12px;
    padding: 8px 10px;
  }
  .content {
    padding: 20px 14px;
  }
  .panel {
    padding: 18px;
    border-radius: 14px;
  }
  .metrics {
    gap: 10px;
  }
  .metrics .panel {
    padding: 17px;
  }
  .metrics b {
    font-size: 29px;
  }
  .metrics span {
    font-size: 12px;
  }
  .filters > span {
    display: none;
  }
  .login {
    padding: 16px;
  }
  .login .panel {
    padding: 26px;
  }
  .public-survey {
    padding: 20px 12px;
  }
  .public-survey .panel {
    padding: 24px 18px;
  }
  .score-options {
    gap: 5px;
  }
  .nps {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
  }
  .nps label {
    min-width: 0;
  }
  .score-options span {
    min-height: 45px;
  }
  .public-survey h1 {
    font-size: 26px;
  }
  #lab-map {
    height: 400px;
  }
  .section-head h2 {
    font-size: 18px;
  }
  .section-head {
    align-items: flex-start;
  }
  dialog {
    padding: 23px;
  }
  .btn {
    font-size: 12px;
  }
  td,
  th {
    padding-left: 9px;
    padding-right: 9px;
  }
}
.metric-button {
  text-align: left;
  cursor: pointer;
  width: 100%;
  color: var(--ink);
}
.metric-button:hover {
  border-color: var(--blue);
}

.mini-logo {
  max-height: 40px;
  max-width: 70px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 10px;
  background: white;
  border-radius: 6px;
}
.map-filters {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.map-filters label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.map-filters select {
  font-size: 12px;
  padding: 9px;
}
.metrics .metric-button small {
  font-size: 10px;
  margin-top: 12px;
}
.metrics .metric-button span {
  display: block;
  min-height: 30px;
}
.mini-logo + b {
  display: inline-block;
}
