:root {
  --brand: #0f4c5c;
  --brand-dark: #0a3540;
  --brand-soft: #e7f1f3;
  --ink: #1b1f24;
  --muted: #6c757d;
  --surface: #f5f7f8;
}

body {
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.admin-body {
  background: var(--surface);
  min-height: 100vh;
}

.admin-navbar {
  background: linear-gradient(120deg, var(--brand) 0%, #163a4a 55%, #5f0f40 100%);
}

.btn-primary {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-dark);
  --bs-btn-hover-border-color: var(--brand-dark);
  --bs-btn-active-bg: var(--brand-dark);
  --bs-btn-active-border-color: var(--brand-dark);
}

.btn-outline-primary {
  --bs-btn-color: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand);
  --bs-btn-hover-border-color: var(--brand);
  --bs-btn-active-bg: var(--brand-dark);
  --bs-btn-active-border-color: var(--brand-dark);
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--brand), #5f0f40);
  color: #fff;
  font-size: 1.5rem;
}

.card {
  border-radius: 14px;
}

.table > :not(caption) > * > * {
  padding: 0.9rem 1rem;
}

.choice-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.choice-btn {
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
  font-weight: 500;
  font-size: var(--choice-font-size, 1rem);
  line-height: 1.2;
  text-align: center;
  white-space: normal;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.choice-buttons--emoji .choice-btn {
  min-width: 3.25rem;
  padding: 0.55rem 0.85rem;
}

.choice-btn:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 8px 18px rgba(15, 76, 92, 0.18);
  background-color: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-dark);
  z-index: 1;
}

.btn-check:checked + .choice-btn,
.btn-check:checked + .choice-btn:hover {
  background-color: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 0 0 0.18rem rgba(15, 76, 92, 0.22);
  transform: translateY(-1px) scale(1.03);
}

.btn-check:focus-visible + .choice-btn {
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(15, 76, 92, 0.28);
}

.survey-form-block {
  text-align: left;
}

.survey-thanks-block {
  text-align: center;
}

.survey-thanks-card {
  padding: 2rem 1.25rem;
  border: 1px solid rgba(15, 76, 92, 0.12);
  border-radius: 16px;
  background: #f8fafb;
}

.survey-intro {
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(15, 76, 92, 0.12);
}

.survey-title {
  color: var(--brand);
  font-weight: 700;
  line-height: 1.3;
}

.survey-description {
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.55;
}

.survey-description :is(p, ul, ol):last-child {
  margin-bottom: 0;
}

.survey-accordion .accordion-item {
  border: 1px solid rgba(15, 76, 92, 0.16);
  border-radius: 12px !important;
  overflow: hidden;
  margin-bottom: 0.75rem;
  background: #fff;
}

.survey-accordion .accordion-item.has-section-error {
  border-color: #dc3545;
}

.survey-accordion .accordion-button {
  gap: 0.55rem;
  font-weight: 600;
  color: var(--brand-dark);
  background: #f4f8f9;
  box-shadow: none;
}

.survey-accordion .accordion-button:not(.collapsed) {
  background: var(--brand-soft);
  color: var(--brand-dark);
  box-shadow: none;
}

.survey-accordion .accordion-button:focus {
  box-shadow: 0 0 0 0.2rem rgba(15, 76, 92, 0.18);
}

.survey-section-kicker {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(15, 76, 92, 0.1);
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.survey-section-name {
  font-size: 1rem;
}

.survey-accordion .accordion-body {
  padding-top: 1.25rem;
}

.survey-field.has-error .form-control,
.survey-field.has-error .form-select {
  border-color: #dc3545;
}

.public-body {
  min-height: 100vh;
  background: #fff;
}

.dashboard-stat-card .card-header h2 {
  font-size: 0.92rem;
  line-height: 1.3;
}

.dashboard-chart {
  position: relative;
  width: 100%;
}

.dashboard-chart--doughnut {
  width: 96px;
  height: 96px;
}

.dashboard-chart--bar {
  height: 96px;
}

.dashboard-text-list {
  max-height: 180px;
  overflow: auto;
}

.min-w-0 {
  min-width: 0;
}

@media (max-width: 575.98px) {
  .dashboard-chart--doughnut {
    width: 80px;
    height: 80px;
  }
}

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

.question-actions form {
  display: inline-flex;
  margin: 0;
}

.question-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  line-height: 1;
}

/* Action Text / Trix no admin */
.rich-text-area,
trix-editor {
  min-height: 140px;
  border-radius: 0.5rem;
  border: 1px solid #ced4da;
  background: #fff;
  padding: 0.75rem 0.9rem;
}

trix-toolbar {
  border-radius: 0.5rem 0.5rem 0 0;
  border: 1px solid #ced4da;
  border-bottom: 0;
  background: #f8f9fa;
  margin-bottom: 0;
}

trix-toolbar + trix-editor,
.trix-content {
  border-radius: 0 0 0.5rem 0.5rem;
}

.trix-button-row {
  flex-wrap: wrap;
}
