@charset "UTF-8";
.chestionar-container {
  max-width: 900px;
  margin: 0 auto;
}

.chestionar-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-radius: 8px 8px 0 0;
  padding: 30px;
  margin-bottom: 0;
  /*   position: sticky;
          top: 57px;
          z-index: 1020; */
}

.chestionar-header-politic {
  background: linear-gradient(135deg, #c0392b 0%, #8e44ad 100%);
}

.chestionar-header-comunitate {
  background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
}

.chestionar-header-mediu {
  background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
}

.chestionar-header-administratie {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.chestionar-header h3 {
  margin: 0;
  font-weight: 600;
}

.chestionar-section {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 24px 30px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.chestionar-section .question-title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 16px;
  color: #333;
}

.chestionar-section .question-title .required {
  color: #d93025;
  margin-left: 4px;
}

.chestionar-section .form-check {
  padding: 8px 0 8px 28px;
}

.chestionar-section .form-check-label {
  font-size: 14px;
  color: #555;
  cursor: pointer;
}

.chestionar-section .form-check-input {
  cursor: pointer;
}

.chestionar-section .form-control {
  border: none;
  border-bottom: 1px solid #ccc;
  border-radius: 0;
  padding-left: 0;
  box-shadow: none;
}

.chestionar-section .form-control:focus {
  border-bottom-color: #667eea;
  box-shadow: 0 1px 0 0 #667eea;
}

.scale-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13px;
  color: #888;
}

.scale-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.scale-options label {
  text-align: center;
  cursor: pointer;
  font-size: 13px;
  color: #555;
}

.scale-options input[type=radio] {
  display: block;
  margin: 0 auto 4px;
  cursor: pointer;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.matrix-table thead th {
  text-align: center;
  padding: 10px 6px;
  font-weight: 500;
  font-size: 12px;
  color: #666;
  border-bottom: 2px solid #e0e0e0;
  vertical-align: bottom;
}

.matrix-table thead th:first-child {
  text-align: left;
  min-width: 200px;
}

.matrix-table tbody td {
  text-align: center;
  padding: 12px 6px;
  border-bottom: 1px solid #f0f0f0;
}

.matrix-table tbody td:first-child {
  text-align: left;
  color: #333;
  font-weight: 400;
}

.matrix-table tbody tr:hover {
  background-color: #f8f9ff;
}

.matrix-table input[type=radio] {
  cursor: pointer;
}

.btn-submit-chestionar {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border: none;
  padding: 10px 30px;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-submit-chestionar:hover {
  opacity: 0.9;
  color: #fff;
}

.other-text-input {
  display: inline-block;
  width: 250px;
  margin-left: 8px;
  border: none;
  border-bottom: 1px solid #ccc;
  outline: none;
  font-size: 14px;
  padding: 2px 0;
}

.other-text-input:focus {
  border-bottom-color: #667eea;
}

.qe-comentariu-wrapper {
  border-top: 1px solid #f0f0f0;
  padding-top: 12px;
}

.qe-btn-comentariu {
  font-size: 13px;
  color: #888;
  border-color: #dee2e6;
  transition: color 0.2s, border-color 0.2s;
}
.qe-btn-comentariu:hover {
  color: #667eea;
  border-color: #667eea;
}

.qe-comentariu-form {
  animation: qe-slide-in 200ms ease;
}

.qe-comentariu-textarea {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  resize: vertical;
  min-height: 60px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.qe-comentariu-textarea:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.12);
  outline: none;
}

.qe-btn-anuleaza-comentariu {
  font-size: 13px;
  padding: 2px 8px;
  text-decoration: none;
}
.qe-btn-anuleaza-comentariu:hover {
  color: #dc3545 !important;
}

@media (max-width: 768px) {
  .chestionar-section {
    padding: 16px;
  }
  .matrix-table {
    font-size: 12px;
  }
  .matrix-table thead th {
    font-size: 10px;
    padding: 6px 2px;
  }
  .matrix-table thead th:first-child {
    min-width: 120px;
  }
  .matrix-table tbody td {
    padding: 8px 2px;
  }
}
.chestionar-container > .progress {
  position: sticky;
  top: calc(3.5rem + 1px);
  z-index: 1010;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.qe-optiune {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.qe-optiune::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #adb5bd;
  background: #fff;
  flex-shrink: 0;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.qe-optiune:hover {
  border-color: #5b8dee;
  background: #f8f9ff;
}
.qe-optiune:hover::before {
  border-color: #5b8dee;
}
.qe-optiune.qe-selected {
  border-color: #5b8dee;
  background: #eef2ff;
  font-weight: 500;
}
.qe-optiune.qe-selected::before {
  background: #5b8dee;
  border-color: #5b8dee;
  box-shadow: inset 0 0 0 4px #fff;
}

[data-tip-intrebare="2"] .qe-optiune::before {
  border-radius: 4px;
}
[data-tip-intrebare="2"] .qe-optiune.qe-selected::before {
  border-radius: 4px;
  background: #5b8dee;
  border-color: #5b8dee;
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 5px #5b8dee;
}

.qe-validation-error {
  border: 1px solid #dc3545;
  background: #fff5f5;
}

@keyframes qe-slide-in {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.qe-slide-in {
  animation: qe-slide-in 250ms ease;
}

/* ═══════════════════════════════════════════════════
   Admin Panel – Tabs & Layout
   ═══════════════════════════════════════════════════ */
.admin-tabs {
  background: #fff;
  border-bottom: 2px solid #e0e0e0;
  padding: 0 24px;
}

.admin-tabs .nav-link {
  color: #555;
  font-weight: 500;
  padding: 12px 20px;
  border: none;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.admin-tabs .nav-link:hover {
  color: #667eea;
  border-bottom-color: #c5cdf7;
}

.admin-tabs .nav-link.active {
  color: #667eea;
  border-bottom-color: #667eea;
  background: transparent;
}

.admin-tabs .badge {
  font-size: 11px;
  vertical-align: middle;
}

#adminTabContent {
  padding-top: 20px;
}

/* ── Question cards ── */
.admin-question-card {
  position: relative;
  transition: box-shadow 0.15s;
}

.admin-question-card:hover {
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.admin-card-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.admin-card-order {
  font-size: 13px;
  font-weight: 600;
  color: #667eea;
  background: #eef2ff;
  border-radius: 4px;
  padding: 2px 8px;
}

.admin-card-actions {
  display: flex;
  gap: 4px;
}

.admin-card-actions .btn {
  padding: 4px 8px;
  font-size: 13px;
  line-height: 1;
}

.admin-question-meta {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.admin-question-meta .badge {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
}

/* ── Options preview ── */
.admin-options-preview {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}

.admin-options-preview li {
  padding: 6px 0;
  font-size: 14px;
  color: #555;
  border-bottom: 1px solid #f5f5f5;
}

.admin-options-preview li:last-child {
  border-bottom: none;
}

.admin-scale-preview,
.admin-text-preview {
  margin-top: 10px;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 6px;
}

/* ── Bottom action bar ── */
.admin-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0 8px;
  border-top: 1px solid #eee;
  margin-top: 8px;
}

/* ── Empty state ── */
.admin-empty-state {
  text-align: center;
  padding: 60px 20px;
}

/* ── Statistics summary cards ── */
.admin-stats-summary {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.admin-stat-card {
  flex: 1;
  min-width: 140px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px 24px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.admin-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #667eea;
}

.admin-stat-label {
  font-size: 13px;
  color: #888;
  margin-top: 4px;
}

/* ── Per-question stat rows ── */
.admin-stat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
}

.admin-bar-wrapper {
  flex: 1;
  height: 8px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
}

.admin-bar-fill {
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.admin-stat-pct {
  white-space: nowrap;
  font-size: 13px;
  color: #888;
  min-width: 90px;
  text-align: right;
}

/* ── Text responses ── */
.admin-text-responses {
  margin-top: 8px;
}

.admin-text-response-item {
  padding: 10px 14px;
  background: #f8f9fa;
  border-radius: 6px;
  margin-bottom: 8px;
  font-size: 14px;
  color: #444;
}

@media (max-width: 768px) {
  .admin-tabs {
    padding: 0 12px;
  }
  .admin-tabs .nav-link {
    padding: 10px 12px;
    font-size: 14px;
  }
  .admin-stats-summary {
    flex-direction: column;
  }
  .admin-bottom-bar {
    flex-direction: column;
    gap: 10px;
  }
}
/* ═══════════════════════════════════════════════════
   Admin Panel – Conditions & Modal styles
   ═══════════════════════════════════════════════════ */
.admin-conditii-inline {
  border-left: 3px solid #667eea;
  padding-left: 12px;
  margin-top: 4px;
}

.admin-conditie-row {
  animation: qe-slide-in 200ms ease;
}

.badge-outline-info {
  background: transparent;
  border: 1px solid #17a2b8;
  color: #17a2b8;
  font-size: 11px;
  font-weight: 500;
}

/* ── Settings form ── */
#panel-setari .custom-switch {
  padding-top: 4px;
}

#panel-setari .custom-control-label {
  font-size: 14px;
  cursor: pointer;
}

/* ── Question edit modal ── */
#qe-admin-intrebare-modal .edit-optiune-ident {
  font-size: 13px;
  color: #888;
}

#qe-admin-intrebare-modal .input-group-append .btn {
  border-radius: 0;
}

#edit-conditii-section {
  border-top: 1px solid #eee;
  padding-top: 12px;
}

.btn-outline-secondary:hover {
  color: #fff !important;
}