@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
    U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range:
    U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

[data-bs-theme="light"] {
  --bs-primary: #303280;
  --bs-primary-rgb: 48, 50, 128;
  --bs-primary-active: #25275f;
  --merit-navy: #303280;
  --bs-app-bg-color: #f5f6fb;
}

.btn.btn-primary {
  --bs-btn-bg: var(--bs-primary);
  --bs-btn-border-color: var(--bs-primary);
  --bs-btn-color: #ffffff;
  --bs-btn-hover-bg: var(--bs-primary-active);
  --bs-btn-hover-border-color: var(--bs-primary-active);
  --bs-btn-hover-color: #ffffff;
  --bs-btn-active-bg: var(--bs-primary-active);
  --bs-btn-active-border-color: var(--bs-primary-active);
  --bs-btn-active-color: #ffffff;
  --bs-btn-disabled-bg: var(--bs-primary);
  --bs-btn-disabled-border-color: var(--bs-primary);
}

.text-primary {
  color: var(--bs-primary) !important;
}
.bg-primary {
  background-color: var(--bs-primary) !important;
}

.app-sidebar {
  background-color: #1b1c3d;
}

.app-sidebar-logo a {
  white-space: nowrap;
  overflow: hidden;
}

[data-kt-app-sidebar-fixed="true"] .app-sidebar {
  z-index: 111;
}

.app-sidebar-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.app-sidebar-brand-subtitle {
  color: rgba(255, 255, 255, 0.45);
  font-weight: 500;
  margin-top: 2px;
}

.merit-stat-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
  box-shadow: 0 4px 16px rgba(27, 28, 61, 0.05);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.merit-stat-card--primary {
  --merit-stat-accent: var(--bs-primary);
}

.merit-stat-card--success {
  --merit-stat-accent: var(--bs-success);
}

.merit-stat-card--danger {
  --merit-stat-accent: var(--bs-danger);
}

.merit-stat-card::after {
  content: "";
  position: absolute;
  inset-block: 1.25rem;
  inset-inline-start: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--merit-stat-accent, transparent);
}

.merit-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(27, 28, 61, 0.1);
}

.merit-stat-card.is-selected {
  box-shadow: 0 10px 28px rgba(27, 28, 61, 0.12);
}

.merit-stat-card.is-selected::after {
  inset-block: 0;
  width: 6px;
}

.cursor-pointer {
  cursor: pointer;
}

.survey-preview-root {
  --survey-bg: linear-gradient(135deg, #303280 0%, #1b1c3d 100%);
  position: relative;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  background: var(--survey-bg);
}

.theme-merit-navy {
  --survey-bg: linear-gradient(135deg, #303280 0%, #1b1c3d 100%);
  --bs-primary: #303280;
  --bs-primary-rgb: 48, 50, 128;
  --bs-primary-active: #25275f;
}

.theme-ocean-teal {
  --survey-bg: linear-gradient(135deg, #0e7490 0%, #164e63 100%);
  --bs-primary: #06b6d4;
  --bs-primary-rgb: 6, 182, 212;
  --bs-primary-active: #0891b2;
}

.theme-royal-burgundy {
  --survey-bg: linear-gradient(135deg, #7c2d12 0%, #431407 100%);
  --bs-primary: #b91c1c;
  --bs-primary-rgb: 185, 28, 28;
  --bs-primary-active: #7f1d1d;
}

.theme-luxury-gold {
  --survey-bg: linear-gradient(135deg, #1c1917 0%, #000000 100%);
  --bs-primary: #d4a574;
  --bs-primary-rgb: 212, 165, 116;
  --bs-primary-active: #b08855;
}

:root {
  --theme-swatch-ring: rgba(255, 255, 255, 0.28);
  --theme-swatch-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.theme-summary-bar {
  border-top: 1px solid var(--bs-border-color);
  background: rgba(var(--bs-primary-rgb), 0.05);
}

.theme-summary-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--survey-bg);
  box-shadow:
    inset 0 0 0 2px var(--theme-swatch-ring),
    var(--theme-swatch-shadow);
  flex-shrink: 0;
}

.preview-theme-panel {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 1050;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.preview-theme-panel__toggle {
  appearance: none;
  -webkit-appearance: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: #ffffff;
  color: var(--bs-primary);
  box-shadow: 0 8px 24px rgba(27, 28, 61, 0.18);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.preview-theme-panel__toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 28px rgba(27, 28, 61, 0.22);
}

.preview-theme-panel__toggle:focus,
.preview-theme-panel__toggle:focus-visible {
  outline: none;
}

.preview-theme-panel__body {
  width: 280px;
  background: #ffffff;
  border-radius: 0.85rem;
  box-shadow: 0 16px 40px rgba(27, 28, 61, 0.22);
  padding: 1rem;
  display: none;
}

.preview-theme-panel.is-open .preview-theme-panel__body {
  display: block;
}

.preview-theme-panel__group + .preview-theme-panel__group {
  margin-top: 1rem;
}

.preview-theme-panel__title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bs-gray-600);
  margin-bottom: 0.6rem;
}

.preview-theme-panel .theme-card-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
}

.preview-theme-panel .theme-card {
  padding: 0.6rem 0.4rem 0.5rem;
}

@media (max-width: 575.98px) {
  .preview-theme-panel {
    top: auto;
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .preview-theme-panel__body {
    width: auto;
  }
}

.survey-preview-root #previewBody .card.card-bordered {
  --bs-card-bg: rgba(var(--bs-primary-rgb), 0.07);
  background-color: rgba(var(--bs-primary-rgb), 0.07);
  border-color: rgba(var(--bs-primary-rgb), 0.22);
}

.pattern-bubbles::before,
.pattern-bubbles::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.03) 70%
  );
}

.pattern-bubbles::before {
  width: 480px;
  height: 480px;
  top: -150px;
  right: -120px;
}

.pattern-bubbles::after {
  width: 360px;
  height: 360px;
  bottom: -140px;
  left: -110px;
}

.pattern-stripes::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.05) 0 22px,
    transparent 22px 44px
  );
}

.pattern-dots::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.22) 2.2px, transparent 2.2px);
  background-size: 28px 28px;
}

.theme-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.75rem;
}

.theme-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 0.5rem 0.7rem;
  border: 1.5px solid var(--bs-border-color);
  border-radius: 0.6rem;
  background: #ffffff;
  cursor: pointer;
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.theme-card:focus,
.theme-card:focus-visible {
  outline: none;
}

.theme-card:hover {
  border-color: rgba(var(--bs-primary-rgb), 0.55);
  transform: translateY(-1px);
}

.theme-card.is-selected {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.18);
}

.theme-card-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--survey-bg);
  box-shadow:
    inset 0 0 0 2px var(--theme-swatch-ring),
    var(--theme-swatch-shadow);
}

.theme-card-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--bs-gray-700);
  text-align: center;
}

.theme-card-check {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  color: var(--bs-primary);
  opacity: 0;
  font-size: 0.85rem;
  transition: opacity 0.15s ease;
}

.theme-card.is-selected .theme-card-check {
  opacity: 1;
}

[data-bs-theme="dark"] .theme-card {
  background: var(--bs-gray-100);
}

[data-bs-theme="dark"] .theme-card-swatch,
[data-bs-theme="dark"] .theme-summary-dot {
  box-shadow:
    inset 0 0 0 2px var(--theme-swatch-ring),
    0 0 0 1px rgba(255, 255, 255, 0.14),
    var(--theme-swatch-shadow);
}

.pattern-card-sample {
  width: 44px;
  height: 30px;
  border-radius: 0.4rem;
  background-color: #475569;
  position: relative;
  overflow: hidden;
}

.pattern-card-sample.pattern-bubbles {
  background-image: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4), transparent 60%);
}

.pattern-card-sample.pattern-stripes {
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.32) 0 5px,
    transparent 5px 10px
  );
}

.pattern-card-sample.pattern-dots {
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.6) 1.5px, transparent 1.5px);
  background-size: 7px 7px;
}

.survey-preview-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: transparent;
}

.survey-preview-content {
  margin: auto;
}

.survey-preview-stage #previewBody {
  background: var(--bs-body-bg);
  border-radius: 1.5rem;
  box-shadow: 0 24px 60px rgba(27, 28, 61, 0.28);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  max-width: 700px;
  transition: max-width 0.3s ease;
  position: relative;
  overflow-wrap: anywhere;
}

.survey-preview-stage #previewBody.pv-narrow {
  max-width: 480px;
}

.survey-preview-stage .pv-sheet {
  background: var(--bs-body-bg);
  border-radius: 1.5rem;
  box-shadow: 0 24px 60px rgba(27, 28, 61, 0.28);
  padding: clamp(1.5rem, 4vw, 2.75rem);
  max-width: 700px;
  transition: max-width 0.3s ease;
}

.survey-preview-stage .pv-sheet.pv-narrow {
  max-width: 480px;
}

.pv-org-card {
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease;
}

.pv-org-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(27, 28, 61, 0.08);
  border-color: rgba(var(--bs-primary-rgb), 0.18);
}

.survey-name-wrap {
  max-width: 480px;
}

.survey-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 767.98px) {
  .survey-desc {
    display: none;
  }
}

.survey-date-cell {
  white-space: nowrap;
}

.pv-loc-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(var(--bs-primary-rgb), 0.08);
  color: var(--bs-primary);
  font-weight: 600;
  font-size: 0.8rem;
}

.pv-intro-logo {
  height: 160px;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgba(27, 28, 61, 0.2));
}

.pv-intro-title {
  color: var(--bs-primary);
}

.pv-field.pv-invalid .select2-selection,
.pv-field.pv-invalid .form-select {
  border-color: var(--bs-danger) !important;
  box-shadow: 0 0 0 1px var(--bs-danger) !important;
}

.select2-container .select2-selection--multiple .select2-selection__rendered {
  max-height: 160px;
  overflow-y: auto;
}

.pv-done-badge {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    var(--bs-success),
    color-mix(in srgb, var(--bs-success) 75%, #000)
  );
  box-shadow: 0 16px 36px rgba(var(--bs-success-rgb), 0.35);
  animation: pv-done-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes pv-done-pop {
  from {
    transform: scale(0.5);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pv-done-badge {
    animation: none;
  }
}

.survey-progress-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.survey-progress-fill {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: #fff;
  transition: width 0.4s ease;
}

.survey-progress-logo {
  position: absolute;
  top: 50%;
  left: 0;
  width: 36px;
  height: 36px;
  margin-left: -18px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 16px rgba(27, 28, 61, 0.4);
  transition: left 0.4s ease;
}

.survey-progress-logo img {
  width: 22px;
  height: 22px;
}

.pv-qnum {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bs-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1;
}

.lang-flag-img {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  vertical-align: -2px;
}

#previewBody .form-control:disabled,
#previewBody .form-select:disabled,
#previewBody textarea:disabled {
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  border: 1px solid var(--bs-border-color);
  opacity: 1;
}

#previewModal .modal-body {
  background-color: var(--bs-secondary-bg);
}

#previewBody .form-check-input:disabled {
  opacity: 1;
}

#previewBody .form-check-label,
#previewBody .form-label {
  color: var(--bs-body-color);
  opacity: 1;
}

.pv-option {
  padding: 0.7rem 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.65rem;
  background: var(--bs-body-bg);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}

.pv-option .form-check-input {
  margin-top: 0;
}

.pv-option .form-check-input:checked {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.pv-option:hover {
  border-color: var(--bs-primary);
}

.pv-option:has(.form-check-input:checked) {
  border-color: var(--bs-primary);
  background-color: rgba(var(--bs-primary-rgb), 0.06);
}

.pv-sort-item {
  cursor: grab;
}

.pv-sort-item.sortable-chosen {
  cursor: grabbing;
}

.pv-rating {
  display: inline-flex;
  flex-direction: row-reverse;
  font-size: 2rem;
  line-height: 1;
}

.pv-rating .pv-star {
  cursor: pointer;
  color: var(--bs-gray-300);
  transition: color 0.12s ease;
  margin-bottom: 0;
}

.pv-rating .pv-star:hover,
.pv-rating .pv-star:hover ~ .pv-star,
.pv-rating input:checked ~ .pv-star {
  color: var(--bs-warning);
}

.validation-summary-errors ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.auth-aside {
  background: linear-gradient(135deg, #303280 0%, #1b1c3d 100%);
  position: relative;
  overflow: hidden;
}

@media (max-width: 991.98px) {
  .auth-aside {
    background: transparent;
  }

  .auth-aside::before,
  .auth-aside::after {
    display: none;
  }
}

.auth-aside::before,
.auth-aside::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
}

.auth-aside::before {
  width: 480px;
  height: 480px;
  top: -160px;
  right: -120px;
}

.auth-aside::after {
  width: 320px;
  height: 320px;
  bottom: -120px;
  left: -80px;
}

.auth-aside-content {
  position: relative;
  z-index: 1;
}

.auth-logo {
  animation: auth-float 6s ease-in-out infinite;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.35));
}

.auth-fade-in {
  opacity: 0;
  animation: auth-fade-up 0.7s ease-out forwards;
}

.auth-delay-1 {
  animation-delay: 0.15s;
}
.auth-delay-2 {
  animation-delay: 0.3s;
}

.auth-shell {
  background: linear-gradient(160deg, #303280 0%, #1b1c3d 100%);
}

.auth-topbar {
  z-index: 5;
}

@media (max-width: 991.98px) {
  .auth-shell {
    justify-content: center;
  }
}

.auth-body {
  background-color: transparent;
}

.auth-footer {
  color: rgba(255, 255, 255, 0.6);
}

@media (min-width: 992px) {
  .auth-shell {
    background: none;
  }

  .auth-body {
    background-color: #f6f7fb;
    background-image:
      radial-gradient(
        1100px 560px at 100% 0,
        rgba(48, 50, 128, 0.07),
        transparent 58%
      ),
      radial-gradient(
        820px 480px at 0 100%,
        rgba(178, 148, 88, 0.08),
        transparent 55%
      );
  }

  .auth-footer {
    color: var(--bs-gray-500);
  }
}

.auth-card {
  border: 0;
  border-radius: 1.5rem;
  box-shadow:
    0 24px 60px rgba(27, 28, 61, 0.12),
    0 6px 16px rgba(27, 28, 61, 0.05);
}

.auth-card-logo {
  filter: drop-shadow(0 8px 16px rgba(27, 28, 61, 0.18));
}

.auth-form {
  opacity: 0;
  animation: auth-fade-up 0.6s ease-out 0.1s forwards;
}

@keyframes auth-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

@keyframes auth-fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-logo,
  .auth-fade-in,
  .auth-form {
    animation: none;
    opacity: 1;
  }
}

.ks-date-modal {
  overflow: visible !important;
  max-height: none !important;
}

.ks-date-modal #ksDateInput {
  display: none;
}

.ks-date-modal .flatpickr-calendar.inline {
  margin: 0.25rem auto 0;
  box-shadow: none;
  border: 1px solid var(--bs-border-color, #e1e3ea);
  max-width: calc(100vw - 3rem);
}

#reportResults .report-q-caret {
  transition: transform 0.2s ease;
}

#reportResults .report-q-toggle {
  transition: background-color 0.15s ease;
  background-color: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: inherit;
  -webkit-appearance: none;
  appearance: none;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

#reportResults .report-q-toggle:hover {
  background-color: var(--bs-primary-light);
}

#reportResults .report-q-toggle:not(.collapsed) {
  background-color: var(--bs-primary-light);
}

#reportResults .report-q-toggle:not(.collapsed) .report-q-caret {
  transform: rotate(180deg);
}

#reportResults .report-total-card {
  border-left: 4px solid var(--bs-primary);
}

#kt_app_sidebar_logo {
  height: auto;
}

.merit-brand-logo {
  width: 100%;
  max-height: 70px;
  object-fit: contain;
}

@media print {
  body.report-printing > *:not(#reportCommentsModal) {
    display: none !important;
  }

  body.report-printing #reportCommentsModal {
    display: block !important;
    position: static;
    overflow: visible;
    background: #fff;
  }

  body.report-printing #reportCommentsModal .modal-dialog {
    max-width: 100%;
    height: auto;
    margin: 0;
  }

  body.report-printing #reportCommentsModal .modal-content {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    max-height: none;
  }

  body.report-printing #reportCommentsModal .modal-body {
    max-height: none !important;
    overflow: visible !important;
  }

  body.report-printing #reportCommentsModal .report-comment-item {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  body.report-printing #reportCommentsModal .report-no-print {
    display: none !important;
  }
}

.date-field {
    position: relative;
}

.date-field .form-control {
    padding-right: 2.75rem;
}

.date-field-icon {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    color: var(--bs-gray-500);
    pointer-events: none;
}

.flatpickr-calendar {
    max-width: calc(100vw - 2rem);
}

