/* Reset e Variáveis de Design */
:root {
  --primary: #00494E;
  --primary-hover: #00363a;
  --primary-light: rgba(0, 73, 78, 0.08);
  --primary-border: rgba(0, 73, 78, 0.3);
  --text-main: #2b2b2b;
  --text-muted: #595959;
  --text-light: #767676;
  --bg-page: #f8f9fa;
  --bg-card: #ffffff;
  --border-color: #d1d5db;
  --border-focus: #00494E;
  --error-color: #d93025;
  --error-bg: #fdf2f2;
  --success-color: #107c41;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  font-size: 16px;
  padding: 0;
  margin: 0;
}

/* Layout Container */
.sm-layout-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.sm-layout-content {
  width: 100%;
  max-width: 896px;
  margin: 0 auto;
  background-color: var(--bg-card);
  min-height: 100vh;
  box-shadow: 0 0 35px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
}

/* Header & Logos */
.sm-header-container {
  padding: 32px 40px 20px;
  border-bottom: 1px solid #f0f2f5;
  background: #ffffff;
}

.sm-logo-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.logo-baianeira {
  height: 85px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.logo-divider {
  width: 2px;
  height: 55px;
  background-color: #e2e8f0;
}

.logo-fco {
  height: 65px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.logo-gemeos {
  height: 55px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

/* Main Form Area */
.sm-main-container {
  padding: 40px 60px 60px;
  flex: 1;
}

@media (max-width: 768px) {
  .sm-header-container {
    padding: 24px 20px 16px;
  }
  .sm-main-container {
    padding: 24px 20px 40px;
  }
  .sm-logo-wrapper {
    gap: 16px;
  }
  .logo-baianeira {
    height: 60px;
  }
  .logo-fco {
    height: 46px;
  }
  .logo-gemeos {
    height: 42px;
  }
  .logo-divider {
    height: 35px;
  }
}

/* Titles & Sector Badge */
.sm-title-container {
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 2px solid #edf2f7;
}

.sector-highlight-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(0, 73, 78, 0.08) 0%, rgba(0, 73, 78, 0.16) 100%);
  border: 1.5px solid rgba(0, 73, 78, 0.35);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(0, 73, 78, 0.06);
}

.badge-tag {
  background: var(--primary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
}

.badge-text {
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
}

.badge-text strong {
  font-weight: 800;
}

.survey-title {
  color: var(--primary);
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.survey-subtitle {
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 500;
}

/* Question Rows */
.question-row {
  margin-bottom: 32px;
  position: relative;
}

.question-header {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 10px;
}

.required-asterisk {
  color: var(--error-color);
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
  user-select: none;
}

.question-title {
  color: var(--text-main);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
}

.sub-label {
  font-size: 13px;
  color: var(--text-light);
  font-weight: 400;
  display: inline-block;
  margin-top: 2px;
}

/* Inputs */
.input-wrapper {
  position: relative;
  width: 100%;
}

.form-input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  font-size: 16px;
  font-family: var(--font-family);
  font-weight: 500;
  color: var(--text-main);
  background-color: #fff;
  border: 1.5px solid #cbd5e1;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  outline: none;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.form-input.is-invalid {
  border-color: var(--error-color) !important;
  background-color: var(--error-bg);
}

.form-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='%2300494E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
  cursor: pointer;
}

/* Checkbox Cards */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.custom-checkbox-card {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.custom-checkbox-card:hover {
  border-color: var(--primary);
  background-color: #fbfdfe;
}

.custom-checkbox-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-indicator {
  width: 22px;
  height: 22px;
  border: 2px solid #94a3b8;
  border-radius: 4px;
  margin-right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  flex-shrink: 0;
  background-color: #fff;
}

.checkmark-icon {
  width: 14px;
  height: 14px;
  color: #fff;
  opacity: 0;
  transform: scale(0.6);
  transition: all 0.18s ease;
}

.custom-checkbox-card input[type="checkbox"]:checked + .checkbox-indicator {
  background-color: var(--primary);
  border-color: var(--primary);
}

.custom-checkbox-card input[type="checkbox"]:checked + .checkbox-indicator .checkmark-icon {
  opacity: 1;
  transform: scale(1);
}

.custom-checkbox-card.is-checked {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.checkbox-label {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.4;
}

/* Condicional Aluno */
.conditional-aluno-box {
  display: none;
  background: linear-gradient(180deg, #f0f9f9 0%, #e8f5f5 100%);
  border: 1.5px solid #b2dfdb;
  border-radius: var(--radius-md);
  padding: 20px;
  margin: 6px 0 14px 10px;
  animation: slideDown 0.25s ease-out;
}

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

.conditional-aluno-box.active {
  display: block;
}

.conditional-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}

.conditional-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

@media (max-width: 680px) {
  .conditional-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .conditional-aluno-box {
    margin-left: 0;
    padding: 16px;
  }
}

.form-subfield {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.subfield-label {
  font-size: 13.5px;
  color: var(--text-main);
}

.form-input-sm {
  height: 44px;
  font-size: 14.5px;
}

/* Termo Card */
.termo-card {
  align-items: flex-start;
  padding: 16px 18px;
  background: #fdfdfd;
}

.termo-card .checkbox-indicator {
  margin-top: 2px;
}

.termo-card .checkbox-label {
  font-size: 15px;
  color: #374151;
  line-height: 1.45;
}

/* Error Messages */
.error-message {
  display: none;
  color: var(--error-color);
  font-size: 13.5px;
  font-weight: 500;
  margin-top: 6px;
  padding-left: 2px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.error-message.visible {
  display: block;
}

/* Regulamento Section */
.regulamento-section {
  margin-top: 48px;
  padding: 32px;
  background-color: #fafbfc;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-md);
}

@media (max-width: 600px) {
  .regulamento-section {
    padding: 20px 16px;
  }
}

.regulamento-header {
  text-align: center;
  margin-bottom: 28px;
}

.regulamento-instruction {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.regulamento-divider {
  border: none;
  height: 1px;
  background-color: #d1d5db;
  margin: 16px auto;
  max-width: 320px;
}

.regulamento-main-title {
  font-size: 18px;
  font-weight: 800;
  color: #1f2937;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

.regulamento-sub-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.regulamento-edition {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.regulamento-body {
  font-size: 13.5px;
  line-height: 1.65;
  color: #4b5563;
  text-align: justify;
}

.regulamento-topic {
  margin-bottom: 22px;
}

.regulamento-topic h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}

.regulamento-topic p {
  margin-bottom: 8px;
}

.regulamento-topic ul {
  padding-left: 20px;
  margin-bottom: 8px;
  list-style-type: none;
}

.regulamento-topic ul li {
  margin-bottom: 4px;
}

.regulamento-footer-info {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px dashed #d1d5db;
  text-align: center;
  font-size: 13px;
  color: #6b7280;
}

.regulamento-footer-info p {
  margin-bottom: 10px;
}

.regulamento-footer-info .info-destaque {
  margin-top: 16px;
  color: var(--primary);
  font-size: 13.5px;
}

/* Submit Button */
.submit-container {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

.btn-submit {
  background-color: var(--primary);
  color: #ffffff;
  border: none;
  height: 52px;
  min-width: 240px;
  padding: 0 40px;
  font-size: 17px;
  font-weight: 700;
  font-family: var(--font-family);
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 73, 78, 0.2);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-submit:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 73, 78, 0.28);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-submit.loading .btn-spinner {
  display: inline-block;
}

/* Success Card */
.success-card {
  text-align: center;
  padding: 48px 32px;
  background: #ffffff;
  border: 2px solid #bbf7d0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.3s ease;
}

.success-card.hidden {
  display: none;
}

.success-icon-wrap {
  width: 72px;
  height: 72px;
  background-color: #dcfce7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.success-icon {
  width: 38px;
  height: 38px;
  color: #16a34a;
}

.success-title {
  color: #15803d;
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 12px;
}

.success-message {
  font-size: 16px;
  color: #374151;
  line-height: 1.6;
  max-width: 580px;
  margin: 0 auto 24px;
}

.success-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 18px;
  max-width: 480px;
  margin: 0 auto 28px;
  text-align: left;
  font-size: 14.5px;
}

.success-summary-item {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px dashed #e2e8f0;
}

.success-summary-item:last-child {
  border-bottom: none;
}

.btn-secondary {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Admin Conference Link & Modal */
.admin-drawer-toggle {
  margin-top: 40px;
  text-align: center;
}

.admin-btn-link {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.admin-btn-link:hover {
  color: var(--primary);
  background-color: var(--primary-light);
}

.admin-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.admin-modal.hidden {
  display: none;
}

.admin-modal-content {
  background: #fff;
  border-radius: var(--radius-md);
  max-width: 960px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.admin-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-modal-header h3 {
  font-size: 18px;
  color: var(--primary);
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #9ca3af;
}

.close-btn:hover {
  color: #111;
}

.admin-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
}

.admin-tip {
  font-size: 13.5px;
  color: #64748b;
  margin-bottom: 16px;
}

.admin-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.btn-admin-action {
  background-color: var(--primary);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-admin-action:hover {
  background-color: var(--primary-hover);
}

.btn-admin-action.btn-danger {
  background-color: #ef4444;
}

.btn-admin-action.btn-danger:hover {
  background-color: #dc2626;
}

.table-responsive {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.admin-table th {
  background-color: #f8fafc;
  color: #475569;
  padding: 10px 14px;
  border-bottom: 1.5px solid #e2e8f0;
  font-weight: 600;
  white-space: nowrap;
}

.admin-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #edf2f7;
  color: #334155;
  white-space: nowrap;
}

.admin-table tr:hover td {
  background-color: #f8fafc;
}

/* Footer */
.sm-footer-container {
  padding: 24px;
  text-align: center;
  border-top: 1px solid #f1f5f9;
  font-size: 13px;
  color: #94a3b8;
  background-color: #fff;
}
