:root {
  --fefna-green: #76b629;
  --fefna-green-dark: #5b9a1f;
  --fefna-ink: #1d2433;
  --fefna-muted: #5a6475;
  --fefna-bg: #f4f7f2;
  --fefna-card: #ffffff;
  --fefna-border: #e2e8d9;
  --fefna-shadow: 0 18px 40px rgba(29, 36, 51, 0.12);
  --radius-lg: 22px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--fefna-ink);
  background: radial-gradient(circle at top, #eff6e6 0%, #f9faf6 45%, #ffffff 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  min-height: 100vh;
}

body.pqr-plain-bg {
  background: radial-gradient(circle at top, #eff6e6 0%, #f9faf6 45%, #ffffff 100%);
}

.pqr-header {
  background: #ffffff;
  border-bottom: 1px solid var(--fefna-border);
}

.pqr-header__content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pqr-logo {
  height: 42px;
}

.pqr-back {
  color: var(--fefna-green-dark);
  text-decoration: none;
  font-weight: 600;
}

.pqr-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.pqr-section {
  animation: fadeUp 0.35s ease;
}

.pqr-hero {
  background: var(--fefna-card);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--fefna-shadow);
  margin-bottom: 28px;
}

.pqr-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 38px);
}

.pqr-hero p {
  margin: 0;
  color: var(--fefna-muted);
}

.pqr-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.pqr-card {
  background: var(--fefna-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--fefna-shadow);
  border: 1px solid var(--fefna-border);
}

.pqr-card__icon {
  font-size: 28px;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef6e3;
  color: var(--fefna-green);
  margin-bottom: 16px;
}

.pqr-card__icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.pqr-card h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.pqr-card p {
  margin: 0 0 18px;
  color: var(--fefna-muted);
}

.pqr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  background: linear-gradient(135deg, var(--fefna-green), #9ad84e);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

.pqr-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.pqr-btn--outline {
  background: #ffffff;
  color: var(--fefna-green-dark);
  border: 1px solid var(--fefna-green);
}

.pqr-link {
  background: none;
  border: none;
  color: var(--fefna-green-dark);
  font-weight: 600;
  cursor: pointer;
}

.pqr-form__header {
  margin-bottom: 16px;
}

.pqr-section-head {
  background: var(--fefna-card);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--fefna-shadow);
  border: 1px solid var(--fefna-border);
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.pqr-section-head__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #eaf5db;
  color: var(--fefna-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: 1px;
}

.pqr-section-head__icon svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.pqr-section-head h2 {
  margin: 6px 0 4px;
  font-size: 22px;
}

.pqr-section-head p {
  margin: 0;
  color: var(--fefna-muted);
}

.pqr-info-card {
  background: var(--fefna-card);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  box-shadow: none;
  border: 1px solid var(--fefna-border);
  margin: 8px 0 0;
  width: 100%;
}

.pqr-info-card h3 {
  margin: 0 0 4px;
  font-size: 14px;
}

.pqr-info-card p {
  margin: 0;
  color: var(--fefna-muted);
  font-size: 12px;
}

.pqr-info-card--warning {
  background: #fff9e6;
  border-color: #f3e0a2;
}

.pqr-form {
  background: var(--fefna-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--fefna-shadow);
  border: 1px solid var(--fefna-border);
}

.pqr-form__group {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
  gap: 6px;
}

.pqr-form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.pqr-form input,
.pqr-form select,
.pqr-form textarea {
  border: 1px solid #d7e2c9;
  border-radius: 10px;
  padding: 12px;
  font-family: inherit;
}

.pqr-form__actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 12px;
}

.pqr-message {
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  font-weight: 600;
}

.pqr-message.success {
  background: #e8f7d5;
  color: #2f6a1f;
}

.pqr-message.error {
  background: #fde2e2;
  color: #b42318;
}

.pqr-upload {
  margin: 6px 0 10px;
  display: grid;
  gap: 6px;
}

.pqr-upload__label {
  font-size: 12px;
  color: var(--fefna-muted);
  font-weight: 600;
}

.pqr-upload__bar {
  height: 6px;
  background: #edf3e6;
  border-radius: 999px;
  overflow: hidden;
}

.pqr-upload__bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--fefna-green), #9ad84e);
  transition: width 0.6s ease;
}

.pqr-upload.loading .pqr-upload__bar span {
  width: 70%;
}

.pqr-upload.ready .pqr-upload__bar span {
  width: 100%;
}

.help {
  color: var(--fefna-muted);
  font-size: 12px;
}

.checkbox {
  flex-direction: row;
  align-items: center;
}

.pqr-result {
  margin-top: 24px;
  background: var(--fefna-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--fefna-border);
  box-shadow: var(--fefna-shadow);
}

.pqr-result__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.badge {
  background: #eef6e3;
  color: var(--fefna-green-dark);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
}

.badge.state-recibido {
  background: #eaf5db;
  color: #5b9a1f;
}

.badge.state-tramite {
  background: #fff4cc;
  color: #b46a00;
}

.badge.state-resuelto {
  background: #dff5e6;
  color: #1f7a43;
}

.badge.state-cerrado {
  background: #eeeeee;
  color: #6b7280;
}

.pqr-result__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.label {
  font-size: 12px;
  color: var(--fefna-muted);
  margin: 0 0 4px;
}

.pqr-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.pqr-timeline li {
  background: #f7fbf1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e1ead4;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pqr-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.pqr-list-item {
  border: 1px solid #e1ead4;
  border-radius: 12px;
  padding: 12px 14px;
  background: #f9fcf4;
  display: grid;
  gap: 6px;
}

.pqr-list-item.state-recibido {
  background: #f9fcf4;
  border-color: #e1ead4;
}

.pqr-list-item.state-tramite {
  background: #f9fcf4;
  border-color: #e1ead4;
}

.pqr-list-item.state-resuelto {
  background: #f9fcf4;
  border-color: #e1ead4;
}

.pqr-list-item.state-cerrado {
  background: #f9fcf4;
  border-color: #e1ead4;
}

.pqr-list-item__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.pqr-list-item__title {
  font-weight: 700;
}

.pqr-list-item__meta {
  font-size: 12px;
  color: var(--fefna-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pqr-list-item__response {
  margin-top: 6px;
  display: grid;
  gap: 8px;
}

.pqr-list-item__response-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  font-size: 12px;
  color: var(--fefna-muted);
}

.pqr-response-meta {
  font-size: 12px;
  color: var(--fefna-muted);
  margin-top: 4px;
}

.pqr-attachments {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--fefna-muted);
}

.pqr-response + .pqr-attachments {
  margin-top: 10px;
}

.pqr-attachment-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #d7e2c9;
  background: #ffffff;
  font-weight: 600;
  color: var(--fefna-green-dark);
  text-decoration: none;
}

.pqr-attachment-link:hover {
  background: #f0f7e4;
}

.pqr-response-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.pqr-response-item {
  background: #ffffff;
  border: 1px solid #e1ead4;
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.pqr-response-item__meta {
  font-size: 12px;
  color: var(--fefna-muted);
  margin-bottom: 6px;
}

.pqr-timeline li.state-recibido {
  background: #f3f8ea;
  border-color: #dbe7c4;
}

.pqr-timeline li.state-tramite {
  background: #fff8e1;
  border-color: #f3e1a6;
}

.pqr-timeline li.state-resuelto {
  background: #e8f7ee;
  border-color: #ccebd6;
}

.pqr-timeline li.state-cerrado {
  background: #f1f1f1;
  border-color: #e2e2e2;
}

.status-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid currentColor;
  color: #5b9a1f;
  background: transparent;
  flex: 0 0 28px;
}

.status-icon.state-tramite {
  color: #b46a00;
}

.status-icon.state-resuelto {
  color: #1f7a43;
}

.status-icon.state-cerrado {
  color: #6b7280;
}

.pqr-response {
  background: #f7fbf1;
  border-radius: 10px;
  padding: 12px;
  border: 1px solid #e1ead4;
  white-space: pre-wrap;
  margin-top: 8px;
}

.hidden {
  display: none;
}

.pqr-success {
  margin-top: 18px;
  background: var(--fefna-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--fefna-border);
  box-shadow: var(--fefna-shadow);
}

.pqr-success__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #eaf5db;
  color: var(--fefna-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.pqr-success__icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.pqr-success h3 {
  margin: 0 0 6px;
  font-size: 22px;
}

.pqr-success p {
  margin: 0 0 16px;
  color: var(--fefna-muted);
}

.pqr-success__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.pqr-success__meta span {
  display: block;
  font-size: 12px;
  color: var(--fefna-muted);
}

.pqr-success__meta strong {
  font-size: 16px;
  color: var(--fefna-ink);
}

.pqr-success__summary {
  background: #f7fbf1;
  border-radius: 12px;
  padding: 14px;
  border: 1px solid #e1ead4;
  margin-bottom: 16px;
}

.pqr-success__summary h4 {
  margin: 0 0 8px;
  font-size: 16px;
}

.pqr-success__summary ul {
  margin: 0;
  padding-left: 18px;
  color: var(--fefna-muted);
  line-height: 1.6;
}

.pqr-success__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 680px) {
  .pqr-header__content {
    flex-direction: column;
    gap: 12px;
  }
  .pqr-form__actions {
    flex-direction: column;
    align-items: stretch;
  }
}
