/* ============================================================
   BLIPMOTO — Stili condivisi app
   Palette "Voltage" — importa questo file in ogni pagina
   ============================================================ */

:root {
  --voltage-violet:       #6E2BFF;
  --signal-cyan:          #19E3D0;
  --carbon:               #0E0E16;
  --asphalt:              #1B1B28;
  --bone:                 #F4F1EA;
  --steel:                #8A8A9E;
  --voltage-violet-hover: #5A1FE0;
  --signal-cyan-hover:    #12C7B6;
  --surface-2:            #26263A;
  --danger:               #FF4D5E;

  --bg:           var(--carbon);
  --surface:      var(--asphalt);
  --text:         var(--bone);
  --text-muted:   var(--steel);
  --primary:      var(--voltage-violet);
  --primary-hover:var(--voltage-violet-hover);
  --on-primary:   var(--bone);
  --accent:       var(--signal-cyan);
  --border:       rgba(244, 241, 234, 0.10);
  --radius:       12px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── LAYOUT ── */
.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* ── TOPBAR ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
  position: sticky;
  top: 0;
  background: rgba(14,14,22,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 50;
}
.topbar-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.topbar-back {
  color: var(--steel);
  font-size: 13px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}
.topbar-back:hover { color: var(--bone); }

/* ── PROGRESS ── */
.progress-wrap {
  margin-bottom: 32px;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--steel);
  margin-bottom: 8px;
}
.progress-bar {
  height: 3px;
  background: var(--surface);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 99px;
  transition: width 0.4s ease;
}

/* ── HEADINGS ── */
.page-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: var(--bone);
  line-height: 1.05;
  margin-bottom: 8px;
}
.page-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

/* ── FORM ── */
.field-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 20px; }
.field-group label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--steel);
}
.field-group input,
.field-group select,
.field-group textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}
.field-group input::placeholder,
.field-group textarea::placeholder { color: var(--steel); }
.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus { border-color: var(--primary); }
.field-group select {
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238A8A9E' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}
.field-group select option { background: var(--asphalt); color: var(--bone); }
.field-group textarea { resize: vertical; min-height: 90px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* radio inline */
.radio-group { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-btn {
  flex: 1;
  min-width: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  user-select: none;
}
.radio-btn.active {
  border-color: var(--primary);
  color: var(--bone);
  background: rgba(110,43,255,0.12);
}

/* checkbox */
.check-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  margin-bottom: 20px;
}
.check-wrap input[type="checkbox"] { accent-color: var(--primary); width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.check-wrap span { font-size: 13px; color: var(--text-muted); }
.check-wrap a { color: var(--primary); text-decoration: none; }

/* ── AVATAR UPLOAD ── */
.avatar-upload {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.avatar-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s;
}
.avatar-circle:hover { border-color: var(--primary); }
.avatar-circle img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-upload-info { flex: 1; }
.avatar-upload-info p { font-size: 14px; color: var(--bone); font-weight: 500; margin-bottom: 2px; }
.avatar-upload-info span { font-size: 12px; color: var(--steel); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  margin-top: 8px;
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: var(--bone); color: var(--bone); }

/* ── FOTO MOTO UPLOAD ── */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 6px;
}
.photo-slot {
  aspect-ratio: 4/3;
  background: var(--surface-2);
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 22px;
  color: var(--steel);
  transition: border-color 0.2s, color 0.2s;
  overflow: hidden;
  position: relative;
}
.photo-slot:hover { border-color: var(--primary); color: var(--primary); }
.photo-slot.filled { border-style: solid; border-color: var(--surface-2); }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot .photo-remove {
  position: absolute;
  top: 4px; right: 4px;
  background: rgba(14,14,22,0.8);
  border-radius: 50%;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--bone);
  cursor: pointer;
}
.photo-slot .req-badge {
  position: absolute;
  bottom: 4px; left: 4px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--primary);
  text-transform: uppercase;
}
.photo-note { font-size: 12px; color: var(--steel); margin-bottom: 20px; }

/* ── DIVIDER ── */
.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}
.section-divider-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 20px;
  margin-top: 28px;
}

/* ── CTA ── */
.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  border: none;
  border-radius: var(--radius);
  padding: 15px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: background 0.2s, transform 0.1s;
  margin-top: 8px;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:active { transform: scale(0.99); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.cta-note {
  font-size: 12px;
  color: var(--steel);
  text-align: center;
  margin-top: 10px;
}

/* ── INLINE LOGO SVG ── */
.logo-inline { display: block; }

/* ── FIELD ERROR ── */
.field-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 2px;
  display: none;
}
.field-group.error input,
.field-group.error select,
.field-group.error textarea { border-color: var(--danger); }
.field-group.error .field-error { display: block; }
