@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
  /* Variables base de víntica (Tema Claro por defecto) */
  --bg-color: #f1f2f4;
  --bg-gradient: #ffffff;
  --main-color: #3e8ed0;
  --text-main: #1a2332;
  --text-muted: #8a9ba8;
  --btn-text: #ffffff;
  --shadow-dark: rgba(0, 0, 0, 0.09);
  --shadow-light: rgba(255, 255, 255, 0.9);
  --card-bg: rgba(255, 255, 255, 0.82);
  --border-color: rgba(255, 255, 255, 0.65);
  --orb1: rgba(62,142,208,0.12);
  --orb2: rgba(62,142,208,0.07);
  --radius-card: 28px;
  --radius-btn: 14px;
  --radius-input: 13px;
  
  /* Estados */
  --ok: #2ecc71;
  --err: #e74c3c;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  transition: background-color 0.5s ease, color 0.5s ease;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hidden { display: none !important; }

/* ── ANIMATED GRADIENT BACKGROUND (Víntica Style) ── */
.hero-bg {
  background: linear-gradient(145deg, var(--bg-color) 0%, var(--bg-gradient) 100%);
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}
.hero-bg::before, .hero-bg::after {
  content: ''; position: fixed; border-radius: 50%; pointer-events: none; z-index: 0;
  animation: driftOrb 18s ease-in-out infinite alternate;
}
.hero-bg::before {
  width: 600px; height: 600px; top: -200px; left: -200px;
  background: radial-gradient(circle, var(--orb1) 0%, transparent 70%);
  animation-duration: 20s;
}
.hero-bg::after {
  width: 500px; height: 500px; bottom: -150px; right: -150px;
  background: radial-gradient(circle, var(--orb2) 0%, transparent 70%);
  animation-duration: 15s; animation-direction: alternate-reverse;
}
@keyframes driftOrb {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 30px) scale(1.08); }
}

/* ── GLASS CARD ── */
.soft-card {
  background: var(--card-bg);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 40px var(--shadow-dark), 0 2px 8px rgba(0,0,0,0.03);
  padding: 2rem;
  transition: background 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  position: relative;
  z-index: 1;
  animation: screenEnter 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;

}

/* ── BRAND ── */
.vintica-brand {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  color: var(--text-main) !important;
  transition: color 0.4s ease;
  text-transform: lowercase;
  letter-spacing: -0.5px;
}
.vintica-brand .dot { color: var(--main-color); transition: color 0.4s ease; }

/* ── BUTTONS ── */
.soft-btn {
  border-radius: var(--radius-btn);
  border: 1px solid var(--border-color);
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(10px);
  color: var(--text-main) !important;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.65em 1.4em;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 0.2s cubic-bezier(0.4,0,0.2,1), box-shadow 0.2s ease, background 0.2s ease;
  line-height: 1.5; text-decoration: none;
}
.soft-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px var(--shadow-dark);
  background: rgba(255,255,255,0.88);
}
.soft-btn.is-primary {
  background: var(--main-color) !important;
  color: var(--btn-text) !important;
  border-color: transparent !important;
  box-shadow: 0 4px 18px rgba(0,0,0,0.18);
}
.soft-btn.is-primary:hover {
  filter: brightness(1.07);
  box-shadow: 0 8px 28px rgba(0,0,0,0.22);
}
.soft-btn.is-fullwidth { width: 100%; }
.soft-btn.is-medium { padding: 0.85em 1.6em; font-size: 0.95rem; }
.soft-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ── INPUTS ── */
.soft-input {
  border-radius: var(--radius-input);
  border: 1.5px solid var(--border-color);
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.05);
  padding: 0.75rem 1rem;
  color: var(--text-main);
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
  width: 100%;
}
.soft-input::placeholder { color: var(--text-muted); opacity: 0.8; }
.soft-input:focus {
  outline: none;
  border-color: var(--main-color);
  background: rgba(255,255,255,0.85);
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.03), 0 0 0 3.5px rgba(62,142,208,0.13);
}

/* ── UPLOAD AREA (Específico de Photo Wall) ── */
.upload-area {
  background: rgba(255,255,255,0.4);
  border: 2px dashed var(--main-color);
  border-radius: var(--radius-card);
  padding: 40px 20px;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 20px;
}
.upload-area:hover, .upload-area.drag-over {
  background: rgba(255,255,255,0.7);
  transform: scale(1.02);
  box-shadow: 0 8px 24px var(--shadow-dark);
}
.upload-icon-svg { color: var(--main-color); font-size: 3rem; margin-bottom: 12px; }

/* ── PREVIEW (Photo Wall) ── */
.preview-wrap { position: relative; display: inline-block; max-width: 100%; }
.preview-wrap img { max-width: 100%; max-height: 340px; border-radius: 16px; object-fit: contain; box-shadow: 0 8px 30px var(--shadow-dark); }
.btn-circle-remove {
  position: absolute; top: -10px; right: -10px;
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: var(--err); color: #fff; font-size: 1rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(231,76,60,0.4);
}
.btn-circle-remove:hover { transform: scale(1.15); box-shadow: 0 6px 16px rgba(231,76,60,0.6); }

/* ── ANIMACIONES DE CARGA ── */
.pulse-anim { animation: pulseAnim 1.6s infinite ease-in-out; }
@keyframes pulseAnim {
  0% { transform: scale(0.92); opacity: 0.5; }
  50% { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(0.92); opacity: 0.5; }
}

/* ── HELPERS VÍNTICA ── */
.stat-label {
  text-transform: uppercase; letter-spacing: 1.5px;
  font-size: 0.65rem; font-weight: 700;
  color: var(--text-muted) !important; opacity: 0.9;
}
.brand-text { color: var(--main-color) !important; font-weight: 600; transition: color 0.4s ease; }

/* Botón Peligro (Eliminar) */
.soft-btn.is-danger {
    background: var(--err) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 18px rgba(231,76,60,0.3) !important;
}
.soft-btn.is-danger:hover {
    filter: brightness(1.1) !important;
}

/* ── INLINE INPUT GROUP (Estilo Tecito / Píldora) ── */
.inline-input-group {
  display: flex;
  align-items: stretch;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 14px;
  padding: 6px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
  transition: all 0.3s ease;
}

.inline-input-group:focus-within {
  border-color: var(--main-color);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(62, 142, 208, 0.15);
}

.inline-input {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
  -webkit-appearance: none; /* Fuerza a iOS Safari a no ocultar/deformar el input */
  appearance: none;
  border-radius: 0;
  border: none;
  background: transparent;
  padding: 0.5rem 0.5rem 0.5rem 1rem;
  color: var(--text-main);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  outline: none;
}

.inline-input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
  letter-spacing: 1px;
}

.inline-btn {
  flex: 0 0 auto;
  margin: 0;
  border-radius: 10px;
  padding: 0.4rem 1.2rem;
  font-size: 0.95rem;
  height: auto; 
  box-shadow: none !important;
}

.inline-btn:hover {
  transform: translateY(0);
  filter: brightness(1.08);
}

/* ── CUSTOM SPINNER (Ruedita de carga premium) ── */
.vintica-spinner {
  width: 56px;
  height: 56px;
  border: 4px solid rgba(62, 142, 208, 0.15);
  border-top-color: var(--main-color);
  border-radius: 50%;
  animation: spinAnim 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes spinAnim {
  to { transform: rotate(360deg); }
}

/* ── ANIMACIONES DE TRANSICIÓN DE PANTALLA ── */
@keyframes screenEnter {
  0% { opacity: 0; transform: translateY(15px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.soft-card.fade-out {
  animation: screenExit 0.25s ease forwards !important;
}

@keyframes screenExit {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-15px) scale(0.97); }
}