/* Buzón de bugs · diseño mobile-first
   Paleta SpeedCell OS: verde #00A862, ink #0c1115, mint #e5f7ed */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:       #00A862;
  --green-glow:  #00E676;
  --ink:         #0c1115;
  --mint:        #e5f7ed;
  --gray-50:     #f8fafb;
  --gray-100:    #eef1f3;
  --gray-300:    #c7cdd2;
  --gray-500:    #6b7177;
  --red:         #d62828;
  --amber:       #f59e0b;
  --radius:      18px;
  --radius-lg:   28px;
  --shadow:      0 6px 24px rgba(12, 17, 21, 0.06);
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--mint);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

.header {
  background: var(--ink);
  color: white;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--green-glow);
  box-shadow: 0 0 0 0 var(--green-glow);
  animation: pulse 1.6s ease-out infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0, 230, 118, 0.6); }
  100% { box-shadow: 0 0 0 16px rgba(0, 230, 118, 0); }
}

.header h1 {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.container {
  max-width: 560px;
  margin: 0 auto;
  padding: 1rem;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.step {
  background: white;
  border: none;
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.step legend {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.85rem;
  color: var(--ink);
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  position: relative;
  cursor: pointer;
  user-select: none;
}

.chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip span {
  display: inline-block;
  padding: 0.7rem 1.1rem;
  background: var(--gray-100);
  color: var(--ink);
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  border: 2px solid transparent;
  transition: all 0.15s;
}

.chip:active span { transform: scale(0.97); }

.chip input:checked + span {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

.chip-danger input:checked + span { background: var(--red);   border-color: var(--red); }
.chip-warn   input:checked + span { background: var(--amber); border-color: var(--amber); color: var(--ink); }

/* Grabadora de audio */
.audio-recorder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.rec-btn {
  width: 100%;
  min-height: 120px;
  background: var(--mint);
  border: 3px solid var(--green);
  border-radius: var(--radius-lg);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.rec-btn:active { transform: scale(0.98); }

.rec-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--green);
  position: relative;
  transition: all 0.2s;
}

.rec-btn.recording {
  background: #ffe4e4;
  border-color: var(--red);
  animation: pulse-red 1s ease-in-out infinite;
}

.rec-btn.recording .rec-icon {
  background: var(--red);
  border-radius: 6px;
  width: 24px;
  height: 24px;
}

@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(214, 40, 40, 0); }
  50%      { box-shadow: 0 0 0 12px rgba(214, 40, 40, 0.15); }
}

.rec-btn.has-audio {
  background: var(--mint);
  border-color: var(--green);
}

.rec-btn.has-audio .rec-icon {
  background: var(--green);
  border-radius: 50%;
  width: 36px;
  height: 36px;
}

.rec-btn.has-audio .rec-icon::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
}

.rec-status {
  font-size: 0.95rem;
  color: var(--gray-500);
  min-height: 1.4em;
  font-variant-numeric: tabular-nums;
}

.audio-preview {
  width: 100%;
  height: 44px;
  border-radius: 12px;
}

/* Upload */
.upload-btn {
  display: block;
  cursor: pointer;
}

.upload-btn input { display: none; }

.upload-btn span {
  display: block;
  text-align: center;
  padding: 0.9rem;
  background: var(--gray-50);
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  font-weight: 500;
  color: var(--gray-500);
}

.upload-btn:active span { background: var(--gray-100); }

#ss-preview img {
  margin-top: 0.75rem;
  width: 100%;
  border-radius: var(--radius);
  max-height: 240px;
  object-fit: cover;
}

/* Textarea */
textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.85rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  resize: vertical;
  background: var(--gray-50);
}

textarea:focus {
  outline: none;
  border-color: var(--green);
  background: white;
}

/* Submit */
.submit-btn {
  width: 100%;
  padding: 1.1rem;
  background: var(--green);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 0.5rem;
}

.submit-btn:active:not(:disabled) { transform: scale(0.98); }
.submit-btn:disabled { background: var(--gray-300); cursor: not-allowed; }

/* Success */
.success {
  background: white;
  border-radius: var(--radius-lg);
  padding: 3rem 1.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.success-icon { font-size: 3rem; margin-bottom: 1rem; }
.success h2   { margin-bottom: 0.5rem; }
.success p    { color: var(--gray-500); margin-bottom: 1.5rem; }

/* Error */
.error-box {
  background: #fff5f5;
  border: 1px solid var(--red);
  color: var(--red);
  padding: 1rem;
  border-radius: var(--radius);
  margin-top: 1rem;
  font-size: 0.95rem;
}
