/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-hover: #1a1a1a;
  --border: #2a2a2a;
  --border-focus: #c9a96e;
  --gold: #c9a96e;
  --gold-light: #dfc08a;
  --gold-dark: #a8884e;
  --text: #e8e8e8;
  --text-muted: #888;
  --text-placeholder: #555;
  --error: #e05555;
  --success-bg: #1a2e1a;
  --radius: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* === Layout === */
.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 24px 60px;
}

/* === Header === */
header {
  text-align: center;
  margin-bottom: 48px;
}

.logo-area {
  margin-bottom: 12px;
}

.logo-img {
  max-height: 160px;
  width: auto;
}

.subtitle {
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* === Form fields === */
.field {
  margin-bottom: 24px;
}

.field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.req {
  color: var(--gold);
}

input[type="text"],
input[type="email"],
input[type="date"],
select {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.2s;
  outline: none;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
select:focus {
  border-color: var(--gold);
}

input::placeholder {
  color: var(--text-placeholder);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23888' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* === Radio group === */
.radio-group {
  display: flex;
  gap: 16px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 15px;
  padding: 10px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}

.radio-option:has(input:checked) {
  border-color: var(--gold);
  background: rgba(201, 169, 110, 0.08);
}

.radio-option input[type="radio"] {
  accent-color: var(--gold);
  width: 16px;
  height: 16px;
}

/* === Upload area === */
.upload-area {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.upload-area:hover,
.upload-area.dragover {
  border-color: var(--gold);
  background: rgba(201, 169, 110, 0.04);
}

.upload-area.has-file {
  border-style: solid;
  border-color: var(--gold-dark);
  background: rgba(201, 169, 110, 0.06);
}

.upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.upload-placeholder svg {
  color: var(--gold-dark);
}

.upload-placeholder small {
  font-size: 12px;
  color: var(--text-placeholder);
}

.upload-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gold-light);
  font-size: 14px;
}

.upload-preview .file-name {
  flex: 1;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-preview .btn-remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  transition: color 0.2s;
}

.upload-preview .btn-remove:hover {
  color: var(--error);
}

/* === Conditional blocks === */
.conditional {
  padding: 20px 24px;
  background: rgba(201, 169, 110, 0.03);
  border-left: 3px solid var(--gold-dark);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 24px;
}

/* === Filho row === */
.filho-row {
  display: grid;
  grid-template-columns: 1fr 160px auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
}

.filho-row .field {
  margin-bottom: 0;
}

.filho-row .btn-remove-filho {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  padding: 12px;
  font-size: 16px;
  transition: all 0.2s;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.filho-row .btn-remove-filho:hover {
  border-color: var(--error);
  color: var(--error);
}

/* === Buttons === */
.btn-primary {
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #0a0a0a;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  margin-top: 16px;
  letter-spacing: 0.5px;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-primary:active {
  transform: scale(0.99);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  padding: 10px 20px;
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold-dark);
  border-radius: var(--radius);
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: rgba(201, 169, 110, 0.1);
}

/* === Banner === */
.banner {
  display: block;
  width: 100%;
  max-width: 480px;
  height: auto;
  margin: 16px auto 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.event-info {
  font-size: 14px;
  color: var(--gold-light);
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* === Notice (aviso) === */
.notice {
  background: rgba(201, 169, 110, 0.08);
  border: 1px solid var(--gold-dark);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 32px;
  font-size: 14px;
  color: var(--text);
}

.notice strong {
  color: var(--gold-light);
}

/* === Acompanhante row === */
.bloco-regra {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.acompanhante-row {
  display: grid;
  grid-template-columns: 1fr 110px 1fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.acompanhante-row .field {
  margin-bottom: 0;
}

.acompanhante-row input[type="number"] {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

.acompanhante-row input[type="number"]:focus {
  border-color: var(--gold);
}

.acompanhante-row .btn-remove-acomp {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  padding: 12px;
  font-size: 16px;
  transition: all 0.2s;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.acompanhante-row .btn-remove-acomp:hover {
  border-color: var(--error);
  color: var(--error);
}

/* === Validation === */
.field.invalid input,
.field.invalid select {
  border-color: var(--error);
}

.field .error-text {
  color: var(--error);
  font-size: 12px;
  margin-top: 4px;
  display: none;
}

.field.invalid .error-text {
  display: block;
}

/* === Success message === */
.success-msg {
  text-align: center;
  padding: 60px 20px;
}

.success-msg svg {
  color: var(--gold);
  margin-bottom: 16px;
}

.success-msg h2 {
  color: var(--gold-light);
  font-size: 24px;
  margin-bottom: 8px;
}

.success-msg p {
  color: var(--text-muted);
}

/* === Footer === */
footer {
  text-align: center;
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

footer p {
  font-size: 12px;
  color: var(--text-placeholder);
  letter-spacing: 1px;
}

/* === Responsive === */
@media (max-width: 480px) {
  .container {
    padding: 24px 16px 40px;
  }

  .filho-row,
  .acompanhante-row {
    grid-template-columns: 1fr;
  }

  .filho-row .btn-remove-filho,
  .acompanhante-row .btn-remove-acomp {
    justify-self: end;
  }

  .radio-group {
    flex-direction: column;
    gap: 8px;
  }
}
