html, body {
  font-family: "Inter", sans-serif;
  margin: 0;
  padding: 0;
  font-size: 16px;
}

a, .btn-link {
  color: #FFBB54;
}

.btn-primary, .questionnaire-dashboard-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: #FFBB54;
  border: 1px solid rgb(100%, 65.3801169591%, 12.9411764706%);
  border-radius: 1.5rem;
  color: #1a1a1a;
  font-size: 0.9375rem;
  font-family: "Inter", sans-serif;
  font-weight: 500;
  padding: 1rem;
  cursor: pointer;
  line-height: 1;
}
.btn-primary:hover, .questionnaire-dashboard-btn:hover {
  background-color: rgb(100%, 65.3801169591%, 12.9411764706%);
  border-color: rgb(100%, 65.3801169591%, 12.9411764706%);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
  padding-top: 1.1rem;
}

h1:focus {
  outline: none;
}

.valid.modified:not([type=checkbox]) {
  outline: 1px solid #26b050;
}

.invalid {
  outline: 1px solid #e50000;
}

.validation-message {
  color: #e50000;
}

.blazor-error-boundary {
  display: none;
}

#blazor-error-ui {
  display: none !important;
}

.app-loading {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #F5F5F5;
}

.app-loading-spinner {
  width: 3rem;
  height: 3rem;
  border: 0.25rem solid #E0E0E0;
  border-top-color: #FFBB54;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.app-loading-text {
  margin-top: 1rem;
  color: #666;
  font-size: 16px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.darker-border-checkbox.form-check-input {
  border-color: #929292;
}

.questionnaire-container {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 52px);
  background-color: #fff;
  max-width: 480px;
  margin: 0 auto;
}

.questionnaire-progress {
  padding: 0 1rem 0.5rem;
}

.questionnaire-progress-track {
  height: 6px;
  border-radius: 100px;
  background-color: #F5F5F5;
  overflow: hidden;
}

.questionnaire-progress-fill {
  height: 100%;
  border-radius: 100px;
  background-color: #FFBB54;
  transition: width 0.2s ease;
}

.questionnaire-progress-label {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: #999;
  letter-spacing: -0.01em;
}

.questionnaire-content {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem 1rem;
}

.questionnaire-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 0.75rem 0;
  letter-spacing: -0.01em;
  line-height: 1.4;
}

.questionnaire-answer-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.questionnaire-answer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  min-height: 44px;
  border: 0.5px solid #E0E0E0;
  border-radius: 0.5rem;
  background-color: #fff;
  cursor: pointer;
  gap: 0.75rem;
}
.questionnaire-answer-item--selected {
  background-color: #F4F1EA;
  border-color: #F4F1EA;
}

.questionnaire-answer-text {
  font-size: 0.9375rem;
  color: #1a1a1a;
  flex: 1;
  line-height: 1.4;
  padding: 0.75rem 0;
}

.questionnaire-answer-radio {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid #E0E0E0;
  background-color: #fff;
}
.questionnaire-answer-radio--selected {
  background-color: #FFBB54;
  border-color: #FFBB54;
}

.questionnaire-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.5rem 1.5rem;
  margin-top: auto;
}

.questionnaire-footer-start {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.questionnaire-fab {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: #FFBB54;
  border: none;
  color: #1a1a1a;
  font-size: 1.125rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.questionnaire-fab:hover {
  background-color: rgb(100%, 65.3801169591%, 12.9411764706%);
}

.questionnaire-dashboard-btn {
  min-height: 52px;
  padding: 0.75rem 1rem;
}

.questionnaire-completed-text {
  padding: 2rem;
  font-size: 0.9375rem;
  color: #1a1a1a;
}

.questionnaire-dual-columns {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.questionnaire-dual-column {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.questionnaire-dual-label {
  font-size: 0.75rem;
  color: #999;
  text-align: center;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.questionnaire-profile-hint {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  color: #999;
  line-height: 1.4;
}

.questionnaire-freetext {
  width: 100%;
  min-height: 8rem;
  resize: vertical;
}

.questionnaire-badge-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.questionnaire-badge-btn {
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 0.5px solid #E0E0E0;
  border-radius: 0.5rem;
  background-color: #fff;
  color: #1a1a1a;
  font-size: 0.9375rem;
  cursor: pointer;
}
.questionnaire-badge-btn.is-selected {
  background-color: #F4F1EA;
  border-color: #F4F1EA;
}

.questionnaire-answer-check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1.5px solid #E0E0E0;
  background-color: #fff;
}
.questionnaire-answer-check--selected {
  background-color: #FFBB54;
  border-color: #FFBB54;
}

.questionnaire-likert {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.5rem 0 1rem;
}

.questionnaire-likert-labels,
.questionnaire-likert-values {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9375rem;
  color: #999;
  line-height: 1.3;
}

.questionnaire-likert-labels span {
  flex: 1;
}
.questionnaire-likert-labels span:last-child {
  text-align: right;
}

.questionnaire-likert-values span {
  flex: 1;
  text-align: center;
  font-weight: 500;
  color: #1a1a1a;
}

.questionnaire-likert-track {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.questionnaire-likert-track.is-dragging {
  cursor: grabbing;
}

.questionnaire-likert-line,
.questionnaire-likert-fill {
  position: absolute;
  left: 22px;
  right: 22px;
  top: 50%;
  height: 6px;
  margin-top: -3px;
  border-radius: 100px;
  pointer-events: none;
}

.questionnaire-likert-line {
  background-color: #F5F5F5;
}

.questionnaire-likert-fill {
  right: auto;
  background-color: #FFBB54;
}

.questionnaire-likert-stop {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  pointer-events: none;
}

.questionnaire-likert-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid #E0E0E0;
  background-color: #fff;
}

.questionnaire-likert-stop.is-selected .questionnaire-likert-dot {
  width: 24px;
  height: 24px;
  border-color: #FFBB54;
  background-color: #FFBB54;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeInSimple {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.sl-btn-primary {
  padding: 0.75rem 1.25rem;
  background: #FFBB54;
  border: none;
  border-radius: 1.5rem;
  color: #000000;
  font-size: 14px;
  font-weight: 500;
  font-family: "Inter", sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(255, 187, 84, 0.3);
}
.sl-btn-primary:hover:not(:disabled) {
  background-color: rgb(100%, 65.3801169591%, 12.9411764706%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 187, 84, 0.4);
}
.sl-btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(255, 187, 84, 0.3);
}
.sl-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(255, 187, 84, 0.5);
}

.sl-btn-secondary {
  padding: 0.75rem 1.25rem;
  background: #666;
  border: none;
  border-radius: 0.5rem;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: "Inter", sans-serif;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}
.sl-btn-secondary:hover {
  background-color: rgb(30%, 30%, 30%);
}
.sl-btn-secondary:active {
  transform: scale(0.98);
}
.sl-btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sl-btn-link {
  background: none;
  border: none;
  color: #FFBB54;
  font-size: 0.75rem;
  font-family: "Inter", sans-serif;
  cursor: pointer;
  text-align: center;
  padding: 0.5rem;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.2s ease;
}
.sl-btn-link:hover {
  opacity: 0.7;
  text-decoration: underline;
}
.sl-btn-link:active {
  opacity: 0.5;
}

.message-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.chip-btn {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  height: 2rem;
  padding: 0 0.75rem 0 0.5rem;
  background-color: #F2F0ED;
  border-radius: 0.5rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  max-width: 100%;
}
.chip-btn:hover {
  background-color: #E8E4DF;
  transform: translateY(-1px);
}
.chip-btn:active {
  transform: translateY(0);
}
.chip-btn:focus-visible {
  outline: 2px solid #258cfb;
  outline-offset: 2px;
}
.chip-btn .chip-btn-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: #1a1a1a;
}
.chip-btn .chip-btn-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-compose-fallback {
  margin-top: 0.5rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  background-color: #F2F0ED;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.email-compose-fallback .email-compose-fallback-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #1a1a1a;
}
.email-compose-fallback .email-compose-fallback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sl-form-group {
  margin-bottom: 1.25rem;
}

.sl-label {
  display: block;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
  font-family: "Inter", sans-serif;
}

.sl-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #E0E0E0;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-family: "Inter", sans-serif;
  color: #1a1a1a;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
  box-sizing: border-box;
}
.sl-input:focus {
  outline: none;
  border-color: #FFBB54;
  box-shadow: 0 0 0 3px rgba(255, 187, 84, 0.1);
}
.sl-input::placeholder {
  color: #999;
}
.sl-input.invalid, .sl-input.validation-error {
  border-color: #e50000;
}
.sl-input.valid.modified {
  border-color: #26b050;
}

.sl-validation-msg {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #e50000;
  line-height: 1.4;
  font-family: "Inter", sans-serif;
}

.sl-container {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sl-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  padding-top: calc(1rem + env(safe-area-inset-top));
  padding-top: calc(1rem + constant(safe-area-inset-top));
}
.sl-header .sl-back-btn {
  background: none;
  border: none;
  color: #1a1a1a;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  transition: opacity 0.2s ease;
}
.sl-header .sl-back-btn:hover {
  opacity: 0.7;
}
.sl-header .sl-back-btn:active {
  opacity: 0.5;
}
.sl-header .sl-back-btn svg {
  width: 24px;
  height: 24px;
}
.sl-header .sl-logo {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #14110A;
}
.sl-header .sl-header-spacer {
  width: 24px;
}

.sl-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
  padding-bottom: calc(1.5rem + constant(safe-area-inset-bottom));
}

.sl-card {
  background: #fff;
  border-radius: 1.5rem;
  padding: 2rem;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.sl-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #E0E0E0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.sl-tabs::-webkit-scrollbar {
  display: none;
}

.sl-tab {
  background: none;
  border: none;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  font-family: "Inter", sans-serif;
  color: #666;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  flex-shrink: 0;
}
.sl-tab:hover {
  color: #1a1a1a;
}
.sl-tab.active {
  color: #FFBB54;
  border-bottom-color: #FFBB54;
  font-weight: 500;
}

.sl-tab-content {
  position: relative;
}

@media (max-width: 640px) {
  .sl-card {
    padding: 1.5rem 1rem;
    margin: 0.75rem;
  }
  .sl-tabs {
    gap: 0;
  }
  .sl-tab {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }
  .sl-content {
    padding: 1rem 0.75rem;
  }
}
@media (max-width: 480px) {
  .sl-header {
    padding: 0.75rem;
    padding-top: calc(0.75rem + env(safe-area-inset-top));
  }
  .sl-content {
    padding: 0.75rem;
  }
  .sl-card {
    padding: 1.25rem 0.75rem;
    margin: 0;
  }
}
.sl-page-background {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: #fff;
  overflow: hidden;
}
.sl-page-background__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.sl-container,
.chat-welcome-container {
  position: relative;
  z-index: 1;
}

@media (min-width: 769px) {
  .modal-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
  }
}

@media (min-width: 769px) {
  .modal-panel {
    background-color: #fff;
    border-radius: 1.5rem;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
    position: relative;
    display: flex;
    flex-direction: column;
  }
  .modal-panel .questionnaire-container {
    min-height: unset;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }
}

.confirm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 1rem;
}

.confirm-dialog {
  background: #fff;
  border-radius: 1.5rem;
  padding: 1.5rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.confirm-title {
  margin: 0 0 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1a1a1a;
}

.confirm-message {
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
  color: #666;
  line-height: 1.5;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}
.confirm-actions .sl-btn-primary,
.confirm-actions .sl-btn-secondary {
  width: auto;
}

.feedback-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 0.75rem;
}

.feedback-modal-panel {
  background: #fff;
  border-radius: 1.5rem;
  width: 80vw;
  max-width: 960px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
}

.feedback-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.feedback-modal-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1a1a1a;
}

.feedback-modal-close {
  border: none;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  color: #666;
  padding: 0 0.25rem;
}

.feedback-modal-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.feedback-modal-tab {
  border: none;
  background: transparent;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  color: #666;
  font-size: 0.9375rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.feedback-modal-tab.active {
  color: #1a1a1a;
  font-weight: 600;
  border-bottom-color: #FFBB54;
}

.feedback-modal-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.feedback-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feedback-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.feedback-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.feedback-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #1a1a1a;
}

.feedback-content {
  min-height: 16rem;
  resize: vertical;
}

.feedback-rating-row {
  display: flex;
  gap: 0.5rem;
}

.feedback-thumb {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  color: #1a1a1a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}
.feedback-thumb:hover {
  border-color: rgba(0, 0, 0, 0.25);
}
.feedback-thumb.active {
  background: rgba(255, 187, 84, 0.12);
  border-color: #FFBB54;
  color: #FFBB54;
}
.feedback-thumb:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.feedback-phone-hint {
  margin: 0;
  padding: 0.75rem;
  background: rgba(0, 0, 0, 0.03);
  border-radius: 1.25rem;
  color: #1a1a1a;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.feedback-error {
  margin: 0;
  color: #e50000;
  font-size: 0.75rem;
}

.feedback-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}
.feedback-form-actions .sl-btn-primary,
.feedback-form-actions .sl-btn-secondary {
  width: auto;
}

.feedback-empty {
  margin: 0;
  color: #666;
  text-align: center;
  padding: 1.5rem 0;
}

.feedback-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feedback-history-item {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 1.25rem;
  padding: 0.75rem 1rem;
  background: #fff;
}

.feedback-history-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.feedback-history-rating {
  font-weight: 600;
  color: #1a1a1a;
}

.feedback-history-content {
  margin: 0 0 0.75rem;
  white-space: pre-wrap;
  color: #1a1a1a;
  line-height: 1.45;
}

.feedback-history-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
.feedback-history-actions .sl-btn-secondary {
  width: auto;
}

@media (max-width: 768px) {
  .feedback-modal-panel {
    width: 100%;
    max-height: 95vh;
  }
  .feedback-modal-header,
  .feedback-modal-tabs,
  .feedback-modal-body {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  .feedback-meta-row {
    grid-template-columns: 1fr;
  }
}
.top-bar {
  line-height: 3rem;
  background-color: #ebdab7;
}

.questionnaire-container {
  position: relative;
  padding: 0.75rem;
}

.questionnaire-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
}

.questionnaire-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #1a1a1a;
  opacity: 0.6;
  font-size: 1.5rem;
  line-height: 1;
  transition: all 0.2s ease;
}
.questionnaire-close:hover {
  opacity: 0.9;
  background-color: rgba(0, 0, 0, 0.05);
}

.sl-btn-speech-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  opacity: 0.6;
  transition: all 0.2s ease;
  color: #1a1a1a;
}
.sl-btn-speech-toggle:hover {
  opacity: 0.9;
  background-color: rgba(0, 0, 0, 0.05);
}
.sl-btn-speech-toggle:active {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.1);
}
.sl-btn-speech-toggle.active {
  opacity: 1;
  background-color: rgba(255, 187, 84, 0.15);
  color: #FFBB54;
}

* {
  box-sizing: border-box;
}

.chat-container {
  height: calc(100vh - 3rem);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #ebdab7 0%, #FFFFFF 100%);
}

.settings-toggle {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  display: flex;
  gap: 1.25rem;
  z-index: 250;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.625rem 0.9375rem;
  border-radius: 1.25rem;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1);
  max-width: calc(100% - 2.5rem);
  opacity: 0.8;
}

.settings-toggle .form-check {
  margin: 0;
}

.settings-toggle .form-check-label {
  font-size: 0.75rem;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 5rem 1.25rem 10rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 50rem;
  width: 100%;
  margin: 0 auto;
}

.welcome-message {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #333;
}

.welcome-message h2 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #1a1a1a;
}

.welcome-message p {
  font-size: 1rem;
  color: #666;
  margin: 0;
}

.message-wrapper {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  max-width: 70%;
}

.message-wrapper.user-message {
  margin-left: auto;
  flex-direction: row-reverse;
}

.message-wrapper.assistant-message {
  margin-right: auto;
}

.avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFD93D 0%, #FFA500 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.125rem;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.15);
}

.user-avatar {
  background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
}

.typing-avatar {
  animation: pulse 1.5s ease-in-out infinite;
}

.message-bubble {
  padding: 0.75rem 1rem;
  border-radius: 1.25rem;
  word-wrap: break-word;
  line-height: 1.4;
  font-size: 0.9375rem;
}

.user-bubble {
  background: #FFBB54;
  color: white;
  border-bottom-right-radius: 0.25rem;
}

.assistant-bubble {
  background: #E9ECEF;
  color: #1a1a1a;
  border-bottom-left-radius: 0.25rem;
}

.typing-indicator {
  padding: 1rem;
}

.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.dot {
  width: 0.5rem;
  height: 0.5rem;
  background-color: #999;
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.dot:nth-child(2) {
  animation-delay: 0.2s;
}

.dot:nth-child(3) {
  animation-delay: 0.4s;
}

.chat-input-area {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.25rem;
  background: white;
  border-top: 1px solid #E0E0E0;
  width: 100%;
  z-index: 100;
  box-shadow: 0 -0.125rem 0.625rem rgba(0, 0, 0, 0.1);
}

.input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  background: #F5F5F5;
  border-radius: 1.5rem;
  padding: 0.5rem 0.5rem 0.5rem 1rem;
  border: 1px solid #E0E0E0;
  max-width: 100%;
  margin: 0 auto;
}

.icon-button {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.icon-button:hover:not(:disabled) {
  color: #FFBB54;
}

.icon-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-input {
  flex: 1;
  border: none;
  background: transparent;
  resize: none;
  outline: none;
  font-size: 0.9375rem;
  line-height: 1.4;
  padding: 0.5rem 0;
  max-height: 7.5rem;
  font-family: "Inter", sans-serif;
}

.chat-input::placeholder {
  color: #999;
}

.chat-input:disabled {
  opacity: 0.6;
}

.send-button {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: #FFBB54;
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, transform 0.1s;
  flex-shrink: 0;
}

.send-button:hover:not(:disabled) {
  background: rgb(100%, 65.3801169591%, 12.9411764706%);
  transform: scale(1.05);
}

.send-button:active:not(:disabled) {
  transform: scale(0.95);
}

.send-button:disabled,
.send-button.disabled {
  background: #CCCCCC;
  cursor: not-allowed;
  transform: none;
}

.spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes typing {
  0%, 60%, 100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-0.25rem);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.15);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0.25rem 0.75rem rgba(255, 217, 61, 0.4);
  }
}
/* Scrollbar Styling */
.chat-messages::-webkit-scrollbar {
  width: 0.375rem;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0.1875rem;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

/* Desktop: Account for sidebar */
@media (min-width: 641px) {
  .chat-container {
    left: 15.625rem; /* 250px Sidebar width from MainLayout */
  }
  .chat-input-area {
    left: 15.625rem; /* 250px Sidebar width from MainLayout */
    width: calc(100% - 15.625rem); /* Subtract sidebar width */
  }
}
/* Mobile Responsive */
@media (max-width: 768px) {
  .chat-container {
    left: 0; /* No sidebar on mobile */
    top: 3.5rem; /* Keep the top-row header visible */
  }
  .settings-toggle {
    position: fixed;
    top: 7.5625rem;
    right: 0.625rem;
    left: 0.625rem;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    max-width: none;
    width: auto;
  }
  .settings-toggle .form-check-label {
    white-space: normal;
    font-size: 0.6875rem;
    line-height: 1.3;
  }
  .chat-messages {
    padding: 6.875rem 0.9375rem 8.75rem;
  }
  .message-wrapper {
    max-width: 85%;
  }
  .welcome-message h2 {
    font-size: 1.5rem;
  }
  .welcome-message p {
    font-size: 0.875rem;
  }
  .chat-input-area {
    padding: 0.9375rem;
    left: 0;
  }
}
.decision-traces {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: rgba(244, 241, 235, 0.5);
  border-radius: 0.5rem;
  border-left: 3px solid #14110A;
  font-size: 0.75rem;
}
.decision-traces .traces-header {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
}
.decision-traces .traces-header svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}
.decision-traces .trace-entry {
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.decision-traces .trace-entry:last-child {
  border-bottom: none;
}
.decision-traces .trace-entry .trace-agent {
  font-weight: 600;
  color: #1a1a1a;
  font-size: 0.6875rem;
  margin-bottom: 2px;
}
.decision-traces .trace-entry .trace-decision {
  color: #1a1a1a;
  font-size: 0.6875rem;
  margin-bottom: 2px;
}
.decision-traces .trace-entry .trace-reasoning {
  color: #666;
  font-size: 0.6875rem;
  font-style: italic;
  margin-top: 2px;
}

.chat-welcome-container {
  min-height: 100vh;
  min-height: 100dvh;
  min-height: 100svh;
  min-height: -webkit-fill-available;
  height: 100vh;
  height: 100dvh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  overscroll-behavior: contain;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
.chat-welcome-container.page-transition-slide-out-left {
  transform: translateX(-100%);
  -webkit-transform: translateX(-100%);
}
.chat-welcome-container.animate-in {
  animation: slideInFromLeft 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-animation: slideInFromLeft 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInFromLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  animation: fadeInSimple 0.3s ease;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  max-width: 85vw;
  height: 100vh;
  height: 100dvh;
  height: 100svh;
  min-height: -webkit-fill-available;
  background: #fff;
  background-color: #fff;
  z-index: 999;
  transform: translateX(-100%);
  -webkit-transform: translateX(-100%);
  transition: transform 0.3s ease;
  -webkit-transition: -webkit-transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  will-change: transform;
}
.sidebar.sidebar-open {
  transform: translateX(0);
  -webkit-transform: translateX(0);
}

.sidebar-header {
  padding: 1rem;
  padding-top: calc(1rem + env(safe-area-inset-top));
  padding-top: calc(1rem + constant(safe-area-inset-top));
  border-bottom: 1px solid #E0E0E0;
  background: #F5F5F5;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.sidebar-header .sidebar-header-title {
  font-size: 1.125rem;
  font-weight: 500;
  color: #1a1a1a;
}

.sidebar-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
  padding-bottom: constant(safe-area-inset-bottom);
}

.sidebar-top {
  flex-shrink: 0;
}

.sidebar-footer {
  flex-shrink: 0;
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid #E0E0E0;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.sidebar-profile:hover {
  background-color: rgba(0, 0, 0, 0.02);
}
.sidebar-profile .profile-avatar {
  position: relative;
  flex-shrink: 0;
}
.sidebar-profile .profile-avatar .avatar-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #E0E0E0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1a1a1a;
}
.sidebar-profile .profile-avatar .avatar-status-dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #FF9500;
  border: 2px solid #fff;
}
.sidebar-profile .profile-info {
  flex: 1;
  min-width: 0;
}
.sidebar-profile .profile-info .profile-name {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-profile .profile-chevron-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s ease;
}
.sidebar-profile .profile-chevron-btn:hover {
  color: #1a1a1a;
}

.sidebar-menu-items {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0;
  border-bottom: 1px solid #E0E0E0;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease;
  position: relative;
}
.menu-item:hover {
  background-color: rgba(0, 0, 0, 0.02);
}
.menu-item svg {
  flex-shrink: 0;
  color: #1a1a1a;
  width: 24px;
  height: 24px;
}
.menu-item span {
  flex: 1;
  font-size: 0.9375rem;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.menu-item .menu-item-notification {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FF9500;
  flex-shrink: 0;
}

.sidebar-chats-section {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0;
  border-bottom: 1px solid #E0E0E0;
}

.sidebar-chats-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.chats-heading {
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.chats-list {
  flex: 0 0 auto;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0 0.5rem;
}

.chat-list-item {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 2.5rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s ease;
}
.chat-list-item.is-hovered, .chat-list-item.menu-open {
  background-color: rgba(235, 218, 183, 0.45);
}
.chat-list-item.menu-open {
  z-index: 1100;
}

.chat-list-item-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 0.9375rem;
  color: #1a1a1a;
}

.chat-list-item-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-list-item-title-input {
  width: 100%;
  min-width: 0;
  padding: 0.25rem 0.5rem;
  border: none;
  border-radius: 0.25rem;
  background: #fff;
  font: inherit;
  color: inherit;
  outline: none;
}

.chat-list-item-actions {
  position: relative;
  flex-shrink: 0;
  padding-right: 0.5rem;
}

.chat-list-item-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  border-radius: 0.25rem;
  background: transparent;
  color: #1a1a1a;
  cursor: pointer;
}
.chat-list-item-menu-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.chat-list-item-menu {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1200;
  min-width: 12rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  background: #fff;
  border: 1px solid #E0E0E0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  visibility: hidden;
}

.chat-list-item-menu-action {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: 0.25rem;
  background: none;
  text-align: left;
  font-size: 0.75rem;
  color: #1a1a1a;
  cursor: pointer;
}
.chat-list-item-menu-action:hover {
  background-color: rgba(235, 218, 183, 0.35);
}

.chat-list-item-menu-action-danger {
  color: #e50000;
}

.chat-list-item-menu-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem 0;
  border-top: 1px solid #E0E0E0;
  font-size: 0.6875rem;
  color: #666;
  line-height: 1.4;
}

.chats-empty {
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  color: #666;
}

.chat-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 0.9375rem;
  color: #1a1a1a;
}
.chat-item:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

.sidebar-language-section {
  flex: 0 0 auto;
}

.sidebar-language-control {
  padding: 0 1rem 0.75rem;
}

.sidebar-language-dropdown {
  position: relative;
  width: 100%;
}
.sidebar-language-dropdown::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 10px;
  height: 5px;
  pointer-events: none;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='5' viewBox='0 0 10 5' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 4L9 1' stroke='%231B160E' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.sidebar-language-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 36px;
  padding: 5px 34px 5px 12px;
  border: none;
  border-radius: 0.5rem;
  background: #fff;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: -0.2px;
  color: #1b160e;
  cursor: pointer;
}
.sidebar-language-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 187, 84, 0.1);
}

.sidebar-personality-test {
  padding: 1rem;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.sidebar-personality-test:hover {
  background-color: #f9f9f9;
}
.sidebar-personality-test .personality-test-icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #F4F1EB;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1a1a;
  flex-shrink: 0;
}
.sidebar-personality-test .personality-test-content {
  text-align: left;
}
.sidebar-personality-test .personality-test-content .personality-test-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.25rem;
}
.sidebar-personality-test .personality-test-content .personality-test-description {
  font-size: 0.75rem;
  color: #666;
  line-height: 1.4;
}

.chat-welcome-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  padding-top: calc(1rem + env(safe-area-inset-top));
  background: transparent;
}
.chat-welcome-header .header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.chat-welcome-header .header-menu-btn {
  background: none;
  border: none;
  color: #1a1a1a;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}
.chat-welcome-header .header-menu-btn:hover {
  opacity: 0.7;
}
.chat-welcome-header .header-menu-btn:active {
  opacity: 0.5;
}
.chat-welcome-header .header-menu-btn img {
  width: 20px;
  height: 20px;
}
.chat-welcome-header .header-right-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.chat-welcome-header .header-toggle-btn {
  background: none;
  border: none;
  color: #1a1a1a;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border-radius: 8px;
  opacity: 0.6;
}
.chat-welcome-header .header-toggle-btn:hover {
  opacity: 0.9;
  background-color: rgba(0, 0, 0, 0.05);
}
.chat-welcome-header .header-toggle-btn:active {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.1);
}
.chat-welcome-header .header-toggle-btn.active {
  opacity: 1;
  background-color: rgba(20, 17, 10, 0.1);
  color: #14110A;
}
.chat-welcome-header .header-toggle-btn.generating-speech {
  animation: speechGeneratingPulse 1.2s ease-in-out infinite;
}
.chat-welcome-header .header-toggle-btn svg {
  width: 20px;
  height: 20px;
}
.chat-welcome-header .sl-header-login-btn {
  background: none;
  border: none;
  color: #1a1a1a;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}
.chat-welcome-header .sl-header-login-btn:hover {
  opacity: 0.7;
}
.chat-welcome-header .sl-header-login-btn:active {
  opacity: 0.5;
}
.chat-welcome-header .sl-header-login-btn svg {
  width: 20px;
  height: 20px;
}
.chat-welcome-header .header-notification-btn {
  position: relative;
  background: none;
  border: none;
  color: #1a1a1a;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
}
.chat-welcome-header .header-notification-btn:hover {
  opacity: 0.7;
}
.chat-welcome-header .header-notification-btn:active {
  opacity: 0.5;
}
.chat-welcome-header .header-notification-btn img {
  width: 20px;
  height: 20px;
}
.chat-welcome-header .header-notification-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FF9500;
  border: 1px solid #fff;
}
.chat-welcome-header .header-logo {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 500;
  font-style: normal;
  line-height: 140%;
  letter-spacing: -0.2px;
  text-align: center;
  color: #14110A;
}

@keyframes speechGeneratingPulse {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
    background-color: rgba(20, 17, 10, 0.15);
  }
}
.chat-welcome-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 1.5rem 1rem;
  padding-bottom: calc(220px + env(safe-area-inset-bottom) + 0.5rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.welcome-greeting {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 1rem;
  width: 100%;
  margin-bottom: 1rem;
}
.welcome-greeting h1 {
  font-size: 1.5rem;
  font-weight: 400;
  color: #000000;
  margin: 0 0 0.25rem 0;
  line-height: 1.4;
}
.welcome-greeting .welcome-subtitle {
  font-size: 0.875rem;
  font-weight: 400;
  color: #666666;
  margin: 0;
  line-height: 1.5;
  max-width: 600px;
}

.welcome-startup-message {
  width: 100%;
  max-width: 900px;
  margin-top: auto;
  padding: 0 1rem;
  align-self: center;
}
.welcome-startup-message .chat-message {
  width: 100%;
  justify-content: flex-start;
}

.welcome-julia-bubble {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 1.25rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  max-width: 75%;
  padding: 1rem 1.25rem;
}
.welcome-julia-bubble .message-text {
  font-size: 0.9375rem;
  font-weight: 400;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.5;
}

.option-buttons-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-self: flex-end;
  align-items: flex-end;
  width: auto;
  max-width: 90%;
  margin-top: auto;
  padding: 0 0.75rem;
}

.option-button {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 1.25rem;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: flex-end;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  text-align: right;
  width: auto;
  white-space: nowrap;
}
.option-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.option-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.option-button .option-emoji {
  font-size: 1.5rem;
  line-height: 1;
  flex-shrink: 0;
}
.option-button .option-text {
  font-size: 0.9375rem;
  color: #1a1a1a;
  line-height: 1.4;
}

.chat-welcome-input-area {
  position: fixed !important;
  bottom: 0 !important;
  bottom: env(safe-area-inset-bottom) !important;
  left: 50%;
  transform: translateX(-50%);
  width: 653px;
  min-height: 150px;
  background: transparent;
  padding: 16px;
  padding-bottom: 16px;
  box-shadow: none;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 12px;
  opacity: 1;
  box-sizing: border-box;
}
.chat-welcome-input-area .input-container {
  background: #FFFFFF;
  border: 0.5px solid #D8D7D4;
  border-radius: 1.5rem;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 118px;
  justify-content: flex-end;
  overflow: visible;
}
.chat-welcome-input-area .recording-mode-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}
.chat-welcome-input-area .sound-wave-recording {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  height: 48px;
  padding: 0.5rem 0;
  overflow: hidden;
  align-items: flex-end;
}
.chat-welcome-input-area .input-buttons-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  flex-shrink: 0;
  position: relative;
}
.chat-welcome-input-area .plus-btn {
  background: #F4F1EB;
  border: none;
  border-radius: 100px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #666;
  flex-shrink: 0;
  transition: all 0.2s ease;
  padding: 8px;
  gap: 8px;
  opacity: 1;
}
.chat-welcome-input-area .plus-btn:hover {
  background-color: rgb(92.137887413%, 89.9936748893%, 85.7052498419%);
}
.chat-welcome-input-area .plus-btn:active {
  transform: scale(0.95);
}
.chat-welcome-input-area .plus-btn img {
  width: 20px;
  height: 20px;
}
.chat-welcome-input-area .chat-welcome-input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 0.5rem 0;
  font-size: 0.9375rem;
  font-family: "Inter", sans-serif;
  resize: none;
  max-height: 300px;
  overflow-y: auto;
  line-height: 1.4;
  min-height: 1.4em;
}
.chat-welcome-input-area .chat-welcome-input:focus {
  outline: none;
}
.chat-welcome-input-area .chat-welcome-input::placeholder {
  color: #999;
}
.chat-welcome-input-area .mic-btn {
  background: #F4F1EB;
  border: none;
  border-radius: 100px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #666;
  flex-shrink: 0;
  transition: all 0.2s ease;
  padding: 8px;
  gap: 8px;
  opacity: 1;
}
.chat-welcome-input-area .mic-btn:hover:not(:disabled) {
  background-color: rgb(92.137887413%, 89.9936748893%, 85.7052498419%);
}
.chat-welcome-input-area .mic-btn:active:not(:disabled) {
  transform: scale(0.95);
}
.chat-welcome-input-area .mic-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.chat-welcome-input-area .mic-btn img {
  width: 20px;
  height: 20px;
}
.chat-welcome-input-area .mic-btn.mic-btn-permission-denied {
  opacity: 0.5;
  cursor: pointer;
}
.chat-welcome-input-area .mic-permission-hint {
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: #2c2c2c;
  color: #ffffff;
  font-size: 12px;
  line-height: 1.4;
  padding: 8px 12px;
  border-radius: 8px;
  max-width: 260px;
  white-space: normal;
  pointer-events: none;
  z-index: 100;
}
.chat-welcome-input-area .mic-permission-hint::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 10px;
  border: 6px solid transparent;
  border-top-color: #2c2c2c;
}
.chat-welcome-input-area .send-btn {
  background: #FFBB54;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  flex-shrink: 0;
  transition: all 0.2s ease;
  margin-left: auto;
}
.chat-welcome-input-area .send-btn:hover {
  background-color: rgb(100%, 77.3099415205%, 42.9411764706%);
  transform: scale(1.05);
}
.chat-welcome-input-area .send-btn:active {
  transform: scale(0.95);
}
.chat-welcome-input-area .send-btn img {
  width: 20px;
  height: 20px;
}

@media (max-width: 640px) {
  .chat-welcome-content {
    padding: 1.25rem 0.75rem;
    padding-bottom: calc(240px + env(safe-area-inset-bottom) + 0.5rem);
  }
  .welcome-greeting h1 {
    font-size: 1.5rem;
  }
  .welcome-greeting .welcome-subtitle {
    font-size: 0.8125rem;
  }
  .option-card {
    padding: 1rem;
  }
  .option-card .option-card-emoji {
    font-size: 1.5rem;
  }
  .option-card .option-card-text {
    font-size: 0.75rem;
  }
  .chat-welcome-input-area {
    width: calc(100% - 32px);
    max-width: 100%;
    padding: 0.75rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
  }
}
.dictate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.dictate-content {
  background: #fff;
  border-radius: 1.5rem;
  padding: 2rem;
  max-width: 90%;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.dictate-header {
  text-align: center;
}
.dictate-header h2 {
  font-size: 1.75rem;
  font-weight: 500;
  color: #1a1a1a;
  margin: 0;
}

.sound-wave-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.25rem 0;
  min-height: 120px;
}

.sound-wave {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  width: 100%;
  height: 100px;
}

.sound-wave-bar {
  width: 3px;
  background: #1a1a1a;
  border-radius: 2px;
  transition: height 0.1s ease, opacity 0.2s ease;
  min-height: 4px;
  max-height: 36px;
  opacity: 0.3;
}

.sound-wave-recording .sound-wave-bar {
  width: 3px;
  background: #1a1a1a;
  border-radius: 2px;
  transition: height 0.1s ease, opacity 0.2s ease;
  min-height: 4px;
  max-height: 36px;
  opacity: 0.3;
}

.dictate-actions {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.dictate-cancel-btn,
.dictate-confirm-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  padding: 0;
}
.dictate-cancel-btn svg,
.dictate-confirm-btn svg {
  width: 20px;
  height: 20px;
}

.dictate-cancel-btn {
  background: transparent;
  color: #1a1a1a;
}
.dictate-cancel-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
}
.dictate-cancel-btn:active {
  transform: scale(0.95);
}

.dictate-confirm-btn {
  background: #1a1a1a;
  color: #fff;
}
.dictate-confirm-btn:hover:not(:disabled) {
  background-color: rgb(20.1960784314%, 20.1960784314%, 20.1960784314%);
  transform: scale(1.05);
}
.dictate-confirm-btn:active:not(:disabled) {
  transform: scale(0.95);
}
.dictate-confirm-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: rgba(26, 26, 26, 0.4);
}

@media (max-width: 640px) {
  .sidebar {
    width: 100vw;
    max-width: 100vw;
  }
}
@media (min-width: 769px) {
  .chat-welcome-container {
    margin: 0 auto;
    margin-left: 0;
    transition: margin-left 0.3s ease;
  }
  .chat-welcome-container.sidebar-open-desktop {
    margin-left: 320px;
  }
  .chat-welcome-header {
    max-width: none;
    margin: 0;
    left: 0;
    right: 0;
    transition: left 0.3s ease;
  }
  .chat-welcome-input-area {
    width: 653px;
    max-width: calc(100% - 32px);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    transition: left 0.3s ease;
  }
  .sidebar {
    width: 320px;
    -webkit-transition: -webkit-transform 0.3s ease;
    transition: transform 0.3s ease;
  }
  .sidebar .profile-chevron-btn {
    display: none;
  }
  .sidebar-backdrop {
    display: none;
  }
}
@supports (-webkit-touch-callout: none) {
  .sidebar,
  .sidebar-backdrop {
    position: fixed;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }
  .sidebar {
    width: 100vw;
    max-width: 100vw;
    background: #fff;
    background-color: #fff;
    -webkit-transform: translateX(-100%);
    transform: translateX(-100%);
  }
  .sidebar.sidebar-open {
    -webkit-transform: translateX(0);
    transform: translateX(0);
  }
  .sidebar button,
  .menu-item,
  .chat-item,
  .sidebar-profile,
  .sidebar-personality-test {
    -webkit-appearance: none;
    appearance: none;
    font: inherit;
  }
  .menu-item,
  .chat-item,
  .sidebar-profile,
  .sidebar-personality-test {
    border: none;
    background: transparent;
  }
}
.feature-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  width: 100%;
  max-width: 900px;
  padding: 0 1rem;
  margin-top: 1rem;
}

.feature-card {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 1.25rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  text-align: left;
}
.feature-card:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.feature-card:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.feature-card:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.feature-card .feature-card-icon {
  flex-shrink: 0;
}
.feature-card .feature-card-icon svg {
  width: 24px;
  height: 24px;
  color: #1a1a1a;
}
.feature-card .feature-card-icon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.feature-card h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.4;
}
.feature-card p {
  font-size: 0.75rem;
  color: #666;
  margin: 0;
  line-height: 1.4;
}

.quick-actions-scroll {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  overflow-x: scroll;
  overflow-y: hidden;
  padding: 0.5rem 0;
  width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}
.quick-actions-scroll::-webkit-scrollbar {
  display: none;
}

.quick-action-btn {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 1.25rem;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: -webkit-fill-available;
  min-width: fit-content;
}
.quick-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.quick-action-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.quick-action-btn .quick-action-emoji {
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
}
.quick-action-btn .quick-action-text {
  font-size: 0.75rem;
  color: #1a1a1a;
  line-height: 1.4;
}
.quick-action-btn--feedback {
  min-width: min(100%, 22rem);
  justify-content: center;
  padding: 0.5rem 1.25rem;
}
.quick-action-btn--feedback .quick-action-icon {
  flex-shrink: 0;
  color: #1a1a1a;
}
.quick-action-btn--feedback .quick-action-text {
  font-size: 0.9375rem;
}

.chat-welcome-input-area .quick-actions-scroll {
  min-width: 0;
}

@media (max-width: 768px) {
  .feature-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 0 0.75rem;
  }
  .feature-card {
    padding: 1rem;
  }
  .feature-card .feature-card-icon svg {
    width: 20px;
    height: 20px;
  }
  .feature-card h3 {
    font-size: 0.75rem;
  }
  .feature-card p {
    font-size: 0.6875rem;
  }
}
.chat-welcome-content.chat-active {
  justify-content: flex-start;
  align-items: stretch;
  padding: 0;
  padding-bottom: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: calc(100vh - 280px - env(safe-area-inset-bottom) - env(safe-area-inset-top));
  max-height: calc(100dvh - 280px - env(safe-area-inset-bottom) - env(safe-area-inset-top));
}
.chat-welcome-content.chat-active::-webkit-scrollbar {
  width: 8px;
}
.chat-welcome-content.chat-active::-webkit-scrollbar-track {
  background: transparent;
}
.chat-welcome-content.chat-active::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
.chat-welcome-content.chat-active::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

.chat-messages-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem 1rem;
  padding-bottom: 1.25rem;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  min-height: min-content;
}

.chat-message {
  display: flex;
  width: 100%;
  animation: fadeInMessage 0.3s ease;
}
.chat-message.user-message {
  justify-content: flex-end;
}
.chat-message.machine-message {
  justify-content: flex-start;
}

.message-speech-btn {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.65;
}
.message-speech-btn:hover {
  opacity: 1;
}

.message-bubble {
  position: relative;
  max-width: 70%;
  padding: 1rem 1.25rem;
  border-radius: 1.25rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  word-wrap: break-word;
  word-break: break-word;
}
.user-message .message-bubble {
  background: #F4F1EB;
  border-radius: 1.25rem;
  max-width: 60%;
}
.machine-message .message-bubble {
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 1.25rem;
  max-width: 75%;
  padding-bottom: 2.25rem;
}
.message-bubble .message-text {
  font-size: 0.9375rem;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.5;
}
.message-bubble .message-text-streaming {
  min-height: 1.5em;
}
.message-bubble.message-bubble-streaming {
  animation: bubbleFadeIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.stream-chunk {
  display: inline;
  opacity: 0;
  transform: translateY(6px);
  animation: streamChunkIn 320ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  will-change: opacity, transform;
}

.stream-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background-color: rgba(0, 0, 0, 0.35);
  margin-left: 2px;
  vertical-align: text-bottom;
  opacity: 0;
  animation: streamCursorIn 320ms ease forwards, streamingCursor 1s ease-in-out 320ms infinite;
}

@keyframes bubbleFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes streamChunkIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes streamCursorIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes streamingCursor {
  0%, 100% {
    opacity: 0.2;
  }
  50% {
    opacity: 1;
  }
}
.message-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.message-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: #F4F1EB;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  color: #666;
  white-space: nowrap;
}

.typing-indicator {
  padding: 1rem !important;
  background: #FFFFFF !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.dot {
  width: 0.5rem;
  height: 0.5rem;
  background-color: #999;
  border-radius: 50%;
  animation: typingDot 1.4s infinite;
}

.dot:nth-child(2) {
  animation-delay: 0.2s;
}

.dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingDot {
  0%, 60%, 100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-4px);
  }
}
@keyframes fadeInMessage {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 640px) {
  .chat-messages-container {
    padding: 1rem 0.75rem;
    padding-bottom: calc(240px + env(safe-area-inset-bottom) + 0.5rem);
  }
  .message-bubble {
    max-width: 85%;
    padding: 0.75rem 1rem;
  }
}
/* Assistant History Sidebar (Right) */
.assistant-history-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  height: 100vh;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 100;
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}
.assistant-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background: white;
}

.assistant-history-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: #2c3e50;
}

.assistant-history-title svg {
  color: #6366f1;
}

.assistant-history-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #6c757d;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.assistant-history-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #2c3e50;
}

.assistant-history-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.assistant-history-entry {
  background: white;
  border-radius: 8px;
  padding: 12px;
  border-left: 3px solid #6366f1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
}

.assistant-history-entry:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.assistant-history-entry.warning {
  border-left-color: #dc3545;
  background: #fff5f5;
}

/* Entry type colors */
.assistant-history-entry.domainselection {
  border-left-color: #8b5cf6;
}

.assistant-history-entry.ethicalcheck {
  border-left-color: #f59e0b;
}

.assistant-history-entry.languagedetection {
  border-left-color: #10b981;
}

.assistant-history-entry.agentresponse {
  border-left-color: #3b82f6;
}

.assistant-history-entry.toolexecution {
  border-left-color: #ec4899;
}

.assistant-history-entry.trace {
  border-left-color: #6366f1;
}

.assistant-history-entry.info {
  border-left-color: #64748b;
}

.entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.entry-agent {
  font-weight: 600;
  font-size: 12px;
  color: #6366f1;
  background: rgba(99, 102, 241, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

.entry-time {
  font-size: 11px;
  color: #94a3b8;
  font-family: "Courier New", monospace;
}

.entry-message {
  font-size: 13px;
  color: #2c3e50;
  line-height: 1.5;
  margin-bottom: 4px;
}

.entry-details {
  font-size: 12px;
  color: #64748b;
  background: rgba(0, 0, 0, 0.03);
  padding: 8px;
  border-radius: 4px;
  margin-top: 8px;
  line-height: 1.4;
  font-family: "Courier New", monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Adjust main content when sidebar is open */
.chat-welcome-container {
  transition: margin-right 0.3s ease;
}

.chat-welcome-container.assistant-sidebar-open {
  margin-right: 400px;
}

/* Mobile responsive */
@media (max-width: 1200px) {
  .assistant-history-sidebar {
    width: 350px;
  }
  .chat-welcome-container.assistant-sidebar-open {
    margin-right: 350px;
  }
}
@media (max-width: 768px) {
  .assistant-history-sidebar {
    width: 100%;
    max-width: 100vw;
  }
  .chat-welcome-container.assistant-sidebar-open {
    margin-right: 0;
  }
}
/* Scrollbar styling for assistant history */
.assistant-history-content::-webkit-scrollbar {
  width: 6px;
}

.assistant-history-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}

.assistant-history-content::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.3);
  border-radius: 3px;
}

.assistant-history-content::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.5);
}

.matches-container {
  background: #fff;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: 100svh;
  min-height: -webkit-fill-available;
  height: 100vh;
  height: 100dvh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  animation: slideInFromRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.matches-container.page-transition-slide-out-right {
  transform: translateX(100%);
}

@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
.matches-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  padding-top: calc(1rem + env(safe-area-inset-top));
  background: #fff;
  border-bottom: 1px solid #E0E0E0;
  position: sticky;
  top: 0;
  z-index: 10;
}
.matches-header .back-button {
  background: none;
  border: none;
  color: #1a1a1a;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}
.matches-header .back-button:hover {
  opacity: 0.7;
}
.matches-header .back-button:active {
  opacity: 0.5;
}
.matches-header .back-button svg {
  width: 24px;
  height: 24px;
}
.matches-header .matches-header-title {
  font-size: 1.125rem;
  font-weight: 500;
  color: #1a1a1a;
  flex: 1;
  text-align: center;
}
.matches-header .matches-header-spacer {
  width: 40px;
  flex-shrink: 0;
}

.matches-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-overflow-scrolling: touch;
}

.matches-list {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.matches-empty {
  padding: 1.25rem 1rem;
  color: #666;
  font-size: 0.9375rem;
  text-align: center;
}

.match-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: none;
  border-bottom: 1px solid #E0E0E0;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.2s ease;
  width: 100%;
}
.match-item:hover {
  background-color: rgba(0, 0, 0, 0.02);
}
.match-item:active {
  background-color: rgba(0, 0, 0, 0.05);
}
.match-item:last-child {
  border-bottom: none;
}

.match-avatar-container {
  position: relative;
  flex-shrink: 0;
}

.match-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  font-weight: 600;
  color: #1a1a1a;
  background: #E0E0E0;
}

.match-notification-dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #FF9500;
  border: 2px solid #fff;
}

.match-item-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.match-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.match-item-date {
  font-size: 0.75rem;
  color: #666;
  flex-shrink: 0;
}

.match-item-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.match-item-message {
  font-size: 0.75rem;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .matches-header {
    padding: 0.75rem 1rem;
    padding-top: calc(0.75rem + env(safe-area-inset-top));
  }
  .match-item {
    padding: 0.75rem;
  }
  .match-avatar {
    width: 50px;
    height: 50px;
    font-size: 0.9375rem;
  }
}
@media (min-width: 769px) {
  .matches-container {
    max-width: 50rem;
    margin: 0 auto;
  }
}
.contact-detail {
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-detail-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.contact-detail-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1a1a1a;
}

.contact-detail-meta {
  font-size: 0.75rem;
  color: #666;
}

.contact-detail-facts {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-detail-fact {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #E0E0E0;
}
.contact-detail-fact dt {
  color: #666;
  font-size: 0.75rem;
}
.contact-detail-fact dd {
  margin: 0;
  color: #1a1a1a;
  font-size: 0.75rem;
  text-align: right;
}

.contact-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-action-btn {
  width: 100%;
  border: 1px solid #E0E0E0;
  background: #fff;
  color: #1a1a1a;
  padding: 0.75rem;
  font-size: 0.9375rem;
  cursor: pointer;
}
.contact-action-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.contact-action-btn-chat {
  background: #14110A;
  color: #fff;
  border-color: #14110A;
}

.contact-action-btn-reject {
  color: #666;
}

.match-chat-page {
  display: flex;
  flex-direction: column;
}

.match-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.match-chat-dummy-notice {
  align-self: stretch;
  padding: 0.5rem 0.75rem;
  background: #F7F3E8;
  border: 1px solid #E4D9B8;
  color: #1a1a1a;
  font-size: 0.75rem;
  line-height: 1.4;
}

.match-chat-bubble {
  max-width: 80%;
  padding: 0.5rem 0.75rem;
  border-radius: 16px;
  font-size: 0.75rem;
  line-height: 1.4;
}

.match-chat-bubble-mine {
  align-self: flex-end;
  background: #14110A;
  color: #fff;
}

.match-chat-bubble-theirs {
  align-self: flex-start;
  background: #F2EFE8;
  color: #1a1a1a;
}

.match-chat-composer {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
  border-top: 1px solid #E0E0E0;
}

.match-chat-input {
  flex: 1;
  border: 1px solid #E0E0E0;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
}

.match-chat-send {
  border: none;
  background: #14110A;
  color: #fff;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}
.match-chat-send:disabled {
  opacity: 0.5;
  cursor: default;
}

.status-alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  animation: slideDown 0.3s ease;
  font-size: 0.9375rem;
}
.status-alert svg {
  flex-shrink: 0;
}
.status-alert span {
  flex: 1;
  line-height: 1.4;
}
.status-alert.status-success {
  background: rgba(38, 176, 80, 0.1);
  border: 1px solid #26b050;
  color: rgb(11.3505589152%, 52.5710097123%, 23.8959135056%);
}
.status-alert.status-success svg {
  color: #26b050;
}
.status-alert.status-error {
  background: rgba(229, 0, 0, 0.1);
  border: 1px solid #e50000;
  color: #b20000;
}
.status-alert.status-error svg {
  color: #e50000;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.form-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.form-actions .sl-btn-primary,
.form-actions .sl-btn-secondary,
.form-actions .sl-btn-link {
  width: 100%;
}

.form-actions-start {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.form-action-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 0.75rem;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 500;
  color: #1a1a1a;
  margin: 0 0 1.25rem 0;
}

.forgot-password-intro {
  margin-bottom: 1.25rem;
}
.forgot-password-intro p {
  font-size: 0.9375rem;
  color: #666;
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 480px) {
  .form-actions,
  .form-actions-start {
    margin-top: 1.25rem;
  }
}
.profile-completion-card {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  background: #fff;
  border-radius: 1.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.profile-completion-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.profile-completion-close {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
  transition: background-color 0.2s ease, color 0.2s ease;
  font-size: 28px;
  line-height: 1;
}
.profile-completion-close:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: #1a1a1a;
}

.profile-completion-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
  font-family: "Inter", sans-serif;
}

.profile-completion-subtitle {
  font-size: 0.9375rem;
  color: #666;
  margin-bottom: 2rem;
  font-family: "Inter", sans-serif;
  line-height: 1.5;
}

.profile-completion-section {
  margin-bottom: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid #E0E0E0;
}

.profile-completion-section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 1rem;
  font-family: "Inter", sans-serif;
}

.profile-completion-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2rem;
}

.profile-completion-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #E0E0E0;
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-family: "Inter", sans-serif;
  color: #1a1a1a;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
  box-sizing: border-box;
}
.profile-completion-select:focus {
  outline: none;
  border-color: #FFBB54;
  box-shadow: 0 0 0 3px rgba(255, 187, 84, 0.1);
}
.profile-completion-select::placeholder {
  color: #999;
}
.profile-completion-select.invalid, .profile-completion-select.validation-error {
  border-color: #e50000;
}
.profile-completion-select.valid.modified {
  border-color: #26b050;
}
.profile-completion-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2rem;
  cursor: pointer;
}

.admin-container {
  background: #F5F5F5;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #1a1a1a;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  line-height: 1.45;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  padding-top: calc(1.25rem + env(safe-area-inset-top));
  background: #fff;
  border-bottom: 1px solid #E0E0E0;
  flex-shrink: 0;
}
.admin-header .admin-back-btn {
  background: #F5F5F5;
  border: 1px solid #E0E0E0;
  border-radius: 0.5rem;
  color: #1a1a1a;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.admin-header .admin-back-btn:hover {
  background: #fff;
  border-color: #FFBB54;
}
.admin-header .admin-header-title {
  font-family: "Inter", sans-serif;
  font-size: 1.0125rem;
  font-weight: 600;
  color: #1a1a1a;
}
.admin-header .admin-header-spacer {
  width: 40px;
}

.admin-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  flex: 1;
  min-height: 0;
}

.admin-sidebar {
  border-right: 1px solid #E0E0E0;
  background: #F5F5F5;
  padding: 1.25rem 1rem;
  overflow-y: auto;
}

.admin-sidebar-heading {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #999;
  margin-bottom: 1rem;
  padding: 0 0.5rem;
}

.admin-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.25rem;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: #666;
  font-family: "Inter", sans-serif;
  font-size: 0.9375rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.admin-nav-item:hover {
  background: rgba(0, 0, 0, 0.04);
  color: #1a1a1a;
}
.admin-nav-item.active {
  background: #fff;
  color: #1a1a1a;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.admin-nav-item .admin-nav-item-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: #FFBB54;
}

.admin-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #F5F5F5;
}

.admin-mobile-nav {
  display: none;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #E0E0E0;
  background: #fff;
  overflow-x: auto;
  flex-shrink: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.admin-mobile-nav::-webkit-scrollbar {
  display: none;
}

.admin-mobile-nav-item {
  border: 1px solid #E0E0E0;
  border-radius: 0.5rem;
  background: #fff;
  color: #666;
  font-family: "Inter", sans-serif;
  font-size: 0.84375rem;
  padding: 0.5rem 1rem;
  min-height: 2.5rem;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.admin-mobile-nav-item.active {
  border-color: #FFBB54;
  background: rgba(255, 187, 84, 0.12);
  color: #1a1a1a;
  font-weight: 600;
}

.admin-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 2rem;
  padding-bottom: calc(2rem + env(safe-area-inset-bottom));
}
.admin-content .sl-form-group {
  margin-bottom: 1rem;
}
.admin-content .sl-label {
  font-size: 0.84375rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}
.admin-content .sl-input,
.admin-content select.sl-input,
.admin-content textarea.sl-input {
  min-height: 2.5rem;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  line-height: 1.4;
}
.admin-content textarea.sl-input {
  min-height: 5rem;
}
.admin-content input[type=checkbox] {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: #FFBB54;
}

.admin-module-title {
  font-family: "Inter", sans-serif;
  font-size: 1.0125rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.admin-module-lead {
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  color: #666;
  margin: 0 0 1.25rem;
  max-width: 52rem;
}

.admin-loading {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F5F5F5;
}

.admin-loading-text {
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  color: #666;
}

.admin-confirm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 1rem;
}

.admin-confirm-dialog {
  background: #fff;
  border-radius: 1.25rem;
  padding: 1.5rem 2rem;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
}

.admin-confirm-title {
  margin: 0 0 0.75rem;
  font-size: 1.0125rem;
  font-weight: 600;
  color: #1a1a1a;
}

.admin-confirm-message {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
}

.admin-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.admin-btn {
  border: none;
  border-radius: 0.5rem;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  min-height: 2.5rem;
  padding: 0.65rem 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: opacity 0.2s ease, background 0.2s ease;
}
.admin-btn:hover:not(:disabled) {
  opacity: 0.9;
}
.admin-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.admin-btn-secondary {
  background: #fff;
  color: #1a1a1a;
  border: 1px solid #E0E0E0;
}

.admin-btn-danger {
  background: #e50000;
  color: #fff;
}

.admin-btn-primary {
  background: #FFBB54;
  color: #1a1a1a;
  font-weight: 600;
}

.admin-user-management {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: 0;
}

.admin-user-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 1.25rem;
}

.admin-user-toolbar-search {
  display: flex;
  flex: 1 1 16rem;
  gap: 0.75rem;
  min-width: 0;
  align-items: center;
}
.admin-user-toolbar-search .sl-input {
  flex: 1;
  min-width: 0;
}

.admin-user-toolbar-roles {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}
.admin-user-toolbar-roles .sl-input {
  min-width: 9rem;
  width: 10rem;
}

.admin-user-list-panel {
  padding: 1rem 1.25rem;
}

.admin-user-list-meta {
  margin-bottom: 0.75rem;
}

.admin-user-table tbody tr {
  cursor: pointer;
}
.admin-user-table tbody tr:hover, .admin-user-table tbody tr.active {
  background: rgba(255, 187, 84, 0.08);
}

.admin-user-col-check {
  width: 2.5rem;
  text-align: center;
}

.admin-user-sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
  animation: admin-fade-in 0.2s ease;
}

.admin-user-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 201;
  width: 70vw;
  height: 100vh;
  height: 100dvh;
  padding: 1.25rem 1.5rem;
  padding-top: calc(1.25rem + env(safe-area-inset-top));
  padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
  background: #fff;
  border-left: 1px solid #E0E0E0;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
  overflow-y: auto;
  overflow-x: hidden;
  animation: admin-sidebar-in 0.28s ease;
}

.admin-user-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.admin-user-sidebar-header .admin-section-title {
  margin: 0;
}

@keyframes admin-sidebar-in {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}
@keyframes admin-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.admin-panel {
  min-width: 0;
}

.admin-panel-list {
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 1.25rem;
  padding: 1.25rem;
}

.admin-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.admin-search {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.admin-user-bulk {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #F5F5F5;
  border-radius: 0.5rem;
}

.admin-user-bulk-select-all {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.84375rem;
  font-weight: 500;
}

.admin-user-bulk-assign {
  display: flex;
  gap: 0.75rem;
  align-items: stretch;
}
.admin-user-bulk-assign .sl-input {
  flex: 1;
  min-width: 0;
}

.admin-user-bulk-count {
  font-size: 0.84375rem;
  color: #666;
}

.admin-license-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1rem 0;
}

.admin-panel-detail {
  min-height: 0;
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 1.25rem;
  padding: 1.25rem 1.5rem;
}

.admin-detail-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #E0E0E0;
  overflow-x: auto;
  scrollbar-width: none;
}
.admin-detail-tabs::-webkit-scrollbar {
  display: none;
}
.admin-detail-tabs .sl-tab {
  font-size: 0.84375rem;
  font-weight: 500;
  padding: 0.75rem 1rem;
  min-height: 2.75rem;
}

.admin-detail-section {
  margin-bottom: 1.5rem;
}

.admin-section-title {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1a1a1a;
}

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

.admin-form-full {
  grid-column: 1/-1;
}

.admin-email-placeholders {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84375rem;
}

.admin-email-template-form {
  margin-top: 1.25rem;
}

.admin-email-html-editor {
  min-height: 28rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84375rem;
  line-height: 1.45;
  resize: vertical;
  white-space: pre-wrap;
}

.admin-form-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #E0E0E0;
}

.admin-empty-hint {
  color: #666;
  font-size: 0.9rem;
  margin: 0;
}

.admin-status {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.84375rem;
  font-weight: 500;
}
.admin-status.success {
  background: rgba(38, 176, 80, 0.12);
  color: rgb(11.3505589152%, 52.5710097123%, 23.8959135056%);
}
.admin-status.error {
  background: rgba(229, 0, 0, 0.1);
  color: #e50000;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid #E0E0E0;
  border-radius: 0.5rem;
  background: #fff;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84375rem;
}
.admin-table th,
.admin-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #E0E0E0;
  text-align: left;
  vertical-align: top;
}
.admin-table th {
  background: #F5F5F5;
  font-weight: 600;
  white-space: nowrap;
}
.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table-primary {
  font-weight: 600;
}

.admin-table-secondary {
  color: #666;
  font-size: 0.84375rem;
}

.admin-vector-summary {
  margin: 0 0 1rem;
}

.admin-module-page {
  max-width: 72rem;
}

.admin-questionnaire {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 1.25rem;
  padding: 1.25rem 1.5rem;
}

.admin-questionnaire-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.admin-catalog-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.25rem;
  background: #F5F5F5;
  border: 1px solid #E0E0E0;
  border-radius: 0.5rem;
}

.admin-catalog-tab {
  border: none;
  border-radius: 0.25rem;
  background: transparent;
  color: #666;
  font-family: "Inter", sans-serif;
  font-size: 0.84375rem;
  font-weight: 500;
  min-height: 2.25rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.admin-catalog-tab:hover {
  color: #1a1a1a;
  background: rgba(0, 0, 0, 0.04);
}
.admin-catalog-tab.active {
  background: #fff;
  color: #1a1a1a;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.admin-questionnaire-toolbar .sl-form-group {
  margin-bottom: 0;
}

.admin-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid #E0E0E0;
  border-radius: 0.5rem;
  background: #fff;
  color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.admin-icon-btn:hover:not(:disabled) {
  border-color: #FFBB54;
  color: #FFBB54;
}
.admin-icon-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.admin-icon-btn-primary {
  background: #FFBB54;
  border-color: #FFBB54;
  color: #fff;
}
.admin-icon-btn-primary:hover:not(:disabled) {
  background: rgb(100%, 68.5614035088%, 20.9411764706%);
  border-color: rgb(100%, 68.5614035088%, 20.9411764706%);
  color: #fff;
}

.admin-icon-btn-danger {
  background: #e50000;
  border-color: #e50000;
  color: #fff;
}
.admin-icon-btn-danger:hover:not(:disabled) {
  background: rgb(77.8039215686%, 0%, 0%);
  border-color: rgb(77.8039215686%, 0%, 0%);
  color: #fff;
}

.admin-question-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.admin-question-list.is-dragging .admin-question-card-body {
  pointer-events: none;
}

.admin-question-card {
  border: 1px solid #E0E0E0;
  border-radius: 0.5rem;
  background: #fff;
  transition: box-shadow 0.2s ease, opacity 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.admin-question-card.drag-source {
  opacity: 0.55;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.admin-question-card.drop-target {
  border-color: #FFBB54;
  background: rgba(255, 187, 84, 0.08);
  box-shadow: 0 0 0 2px rgba(255, 187, 84, 0.28);
}
.admin-question-card.is-expanded {
  border-color: rgba(255, 187, 84, 0.35);
}

.admin-question-card-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 1rem;
}

.admin-question-grip {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: #999;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.admin-question-grip:active {
  cursor: grabbing;
}

.admin-question-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
}

.admin-question-key {
  font-size: 1rem;
}

.admin-question-card-actions,
.admin-answer-card-actions,
.admin-question-inline-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.admin-question-card-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 0 1rem 1rem;
  border-top: 1px solid #E0E0E0;
  padding-top: 1rem;
}

.admin-question-meta-row,
.admin-translation-row,
.admin-answer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.admin-question-meta-row {
  gap: 1.5rem;
}

.admin-translation-row,
.admin-answer-row {
  align-items: flex-start;
}

.admin-question-meta-row .sl-form-group,
.admin-translation-row .sl-form-group,
.admin-answer-row .sl-form-group {
  margin-bottom: 0;
}

.admin-field-key,
.admin-field-weight,
.admin-field-partner-key,
.admin-field-catalog,
.admin-field-type,
.admin-field-section,
.admin-field-parent,
.admin-field-min {
  width: auto;
  flex: 0 0 auto;
}

.admin-field-key .sl-input {
  width: 5.5rem;
}

.admin-field-weight .sl-input {
  width: 4.25rem;
}

.admin-field-partner-key .sl-input {
  width: 5.5rem;
}

.admin-field-catalog .sl-input,
.admin-field-type .sl-input,
.admin-field-section .sl-input {
  width: 11rem;
}

.admin-field-parent .sl-input {
  width: 10rem;
}

.admin-field-min .sl-input {
  width: 5.5rem;
}

.admin-field-language {
  width: 10.5rem;
  flex: 0 0 10.5rem;
}

.admin-field-text {
  flex: 1 1 18rem;
  min-width: 14rem;
}

.admin-field-key .sl-input,
.admin-field-weight .sl-input,
.admin-field-partner-key .sl-input {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.admin-field-weight .sl-input {
  appearance: textfield;
}
.admin-field-weight .sl-input::-webkit-outer-spin-button, .admin-field-weight .sl-input::-webkit-inner-spin-button {
  appearance: none;
  margin: 0;
}

.admin-field-text-label {
  visibility: hidden;
  min-height: 1em;
}

.admin-translation-text,
.admin-answer-text {
  min-height: 4.5rem;
  resize: vertical;
  line-height: 1.45;
}

.admin-answer-text {
  min-height: 3.25rem;
}

.admin-question-checkbox {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  min-height: calc(0.75rem * 2 + 0.9375rem * 1.2);
}

.admin-question-checkbox .sl-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0;
  white-space: nowrap;
}

.admin-translation-row .admin-question-inline-actions,
.admin-answer-row .admin-answer-card-actions {
  margin-left: auto;
  flex-shrink: 0;
  min-height: 2.25rem;
}

.admin-translation-row .admin-question-inline-actions,
.admin-answer-row .admin-answer-card-actions {
  padding-top: calc(0.9375rem * 1.2 + 0.5rem);
}

.admin-question-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-question-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.admin-question-block-title {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #999;
}

.admin-answer-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-answer-card {
  border: 1px solid #E0E0E0;
  border-radius: 0.5rem;
  padding: 0.75rem;
  background: #F5F5F5;
}

.admin-question-editor {
  border: 1px solid #E0E0E0;
  border-radius: 0.5rem;
  padding: 1rem;
  background: #F5F5F5;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-question-editor-header,
.admin-question-editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.admin-question-editor-actions {
  justify-content: flex-end;
}

.admin-question-order {
  font-size: 0.75rem;
  color: #999;
}

.admin-question-tag {
  font-size: 0.75rem;
  color: #666;
}

.admin-question-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 0.25rem;
  background: rgba(255, 187, 84, 0.12);
  color: #FFBB54;
  font-size: 0.75rem;
  font-weight: 600;
}

.admin-add-question {
  border: 1px solid #E0E0E0;
  border-radius: 0.5rem;
  padding: 1rem;
  background: #F5F5F5;
}

.admin-audit-log {
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) minmax(24rem, 1.4fr);
  gap: 1.5rem;
  min-height: 0;
}

.admin-audit-log-filters {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 1.25rem;
  padding: 1.25rem;
}

.admin-audit-log-date-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.admin-audit-log-results {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.admin-audit-log-result {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #E0E0E0;
  border-radius: 0.5rem;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.admin-audit-log-result:hover, .admin-audit-log-result.active {
  border-color: #FFBB54;
  background: rgba(255, 187, 84, 0.06);
}

.admin-audit-log-result-time {
  font-size: 0.75rem;
  color: #999;
}

.admin-audit-log-result-user {
  font-weight: 600;
}

.admin-audit-log-result-input,
.admin-audit-log-result-response {
  font-size: 0.75rem;
  color: #666;
}

.admin-audit-log-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
}

.admin-audit-log-page-info {
  font-size: 0.75rem;
  color: #999;
}

.admin-audit-log-meta {
  display: grid;
  gap: 1rem;
}
.admin-audit-log-meta div {
  display: grid;
  gap: 0.25rem;
}
.admin-audit-log-meta dt {
  font-size: 0.75rem;
  font-weight: 600;
  color: #999;
}
.admin-audit-log-meta dd {
  margin: 0;
}

.admin-audit-log-text {
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-audit-log-displayed {
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: rgba(255, 187, 84, 0.08);
  border: 1px solid rgba(255, 187, 84, 0.2);
}

.admin-audit-log-entries {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-audit-log-entry {
  border: 1px solid #E0E0E0;
  border-radius: 0.5rem;
  padding: 0.75rem;
  background: #fff;
}
.admin-audit-log-entry.is-displayed {
  border-color: #FFBB54;
  background: rgba(255, 187, 84, 0.06);
}
.admin-audit-log-entry.is-warning {
  border-color: #d97706;
  background: rgba(217, 119, 6, 0.08);
}

.admin-audit-log-entry-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.admin-audit-log-entry-agent {
  font-weight: 600;
}

.admin-audit-log-entry-type {
  font-size: 0.75rem;
  color: #999;
}

.admin-audit-log-entry-time {
  margin-left: auto;
  font-size: 0.75rem;
  color: #666;
}

.admin-audit-log-entry-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: #FFBB54;
}

.admin-audit-log-entry-message {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-audit-log-entry-details {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  color: #666;
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-match-overview {
  display: grid;
  grid-template-columns: minmax(16rem, 18rem) minmax(0, 1fr);
  gap: 1.5rem;
  min-height: 0;
  position: relative;
}

.admin-match-sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
}

.admin-match-user-panel {
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 1.25rem;
  padding: 1.25rem;
}

.admin-match-settings {
  margin-bottom: 1rem;
}
.admin-match-settings .admin-match-settings-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.admin-match-settings .admin-match-settings-row .sl-input {
  max-width: 8rem;
}
.admin-match-settings .admin-settings-hint {
  margin-top: 0.25rem;
  font-size: 0.84375rem;
}
.admin-match-settings .admin-settings-hint.success {
  color: #26b050;
}
.admin-match-settings .admin-settings-hint.error {
  color: #e50000;
}

.admin-match-list-panel {
  min-width: 0;
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 1.25rem;
  padding: 1.25rem;
}

.admin-match-list-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.admin-match-target-similarity {
  margin: 0;
  color: #666;
}

.admin-match-table tr.active {
  background: rgba(255, 187, 84, 0.06);
}

.admin-match-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 201;
  width: 85vw;
  height: 100vh;
  height: 100dvh;
  padding: 1.25rem;
  padding-top: calc(1.25rem + env(safe-area-inset-top));
  padding-bottom: calc(1.25rem + env(safe-area-inset-bottom));
  background: #fff;
  border-left: 1px solid #E0E0E0;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.admin-match-sidebar::-webkit-scrollbar {
  display: none;
}

.admin-match-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.admin-match-detail-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.25rem;
  margin-bottom: 1rem;
  font-size: 0.75rem;
}
.admin-match-detail-summary p {
  margin: 0;
  white-space: nowrap;
}

.admin-match-matrix-section {
  margin-bottom: 1.5rem;
}

.admin-match-matrix-heading {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.admin-match-qa-table-wrap,
.admin-match-matrix-table {
  font-size: 0.75rem;
}

.admin-match-qa-table td.admin-match-answer-equal {
  background: rgba(38, 176, 80, 0.16);
}
.admin-match-qa-table td.admin-match-answer-near {
  background: rgba(255, 193, 7, 0.28);
}

.admin-match-matrix-table th {
  white-space: pre-line;
  vertical-align: bottom;
}

.admin-btn-compact {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

@media (max-width: 1024px) {
  .admin-user-toolbar-roles {
    margin-left: 0;
    width: 100%;
  }
  .admin-user-sidebar {
    width: min(100vw, 100%);
  }
  .admin-audit-log {
    grid-template-columns: 1fr;
  }
  .admin-match-overview {
    grid-template-columns: 1fr;
  }
  .admin-match-sidebar {
    width: 90vw;
  }
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    display: none;
  }
  .admin-mobile-nav {
    display: flex;
  }
  .admin-content {
    padding: 1rem;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
  }
  .admin-panel-list,
  .admin-panel-detail {
    padding: 1rem;
  }
  .admin-header {
    padding: 1rem;
    padding-top: calc(1rem + env(safe-area-inset-top));
  }
}
