/* ==========================================================================
   DULCECOSTO - Paleta y Estilos Responsivos Sin Scroll Horizontal
   THE FOME STUDIO
   ========================================================================== */
:root {
  --bg: #FAF8F5;
  --surface: #FFFFFF;
  --surface-subtle: #F3EFEA;
  --border: #E8E2D9;
  --text: #2D2422;
  --text-muted: #7A6F6D;
  --terracota: #D96B43;
  --terracota-hover: #C35B35;
  --accent: #2E7D32;
  --mpago: #009EE3;
  --paypal: #003087;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding-bottom: 95px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Header Ajustado a Pantalla */
.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
}

.header-inner {
  width: 100%;
  max-width: 580px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.logo-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.app-icon-header {
  width: 36px !important;
  height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  min-width: 36px !important;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}

.header-texts {
  min-width: 0;
  overflow: hidden;
}

.app-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--terracota);
  line-height: 1.1;
  white-space: nowrap;
}

.app-subtitle {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.header-actions {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-shrink: 0;
}

/* Contenedor Principal */
.main-container {
  width: 100%;
  max-width: 580px;
  padding: 14px;
  box-sizing: border-box;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Tarjetas */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 15px;
  margin-bottom: 15px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.02);
  width: 100%;
  box-sizing: border-box;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
  margin-bottom: 12px;
}

.text-center {
  text-align: center;
}

/* Formularios y Botones */
.form-group {
  margin-bottom: 12px;
  width: 100%;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 4px;
}

input, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  box-sizing: border-box;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--terracota);
}

.row {
  display: flex;
  gap: 6px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-subtle);
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  font-size: 0.84rem;
  box-sizing: border-box;
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--terracota);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--terracota);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}

.btn:active {
  background: var(--terracota-hover);
}

.btn-secondary {
  background: var(--surface-subtle);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-sm {
  padding: 5px 8px;
  font-size: 0.8rem;
}

.btn-mpago {
  background: var(--mpago);
  color: #fff;
}

.btn-paypal {
  background: var(--paypal);
  color: #fff;
}

/* Listas */
.lista-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.insumo-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-subtle);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  gap: 8px;
  box-sizing: border-box;
}

/* Navegación Inferior */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
  z-index: 100;
  width: 100%;
}

.bottom-nav-inner {
  width: 100%;
  max-width: 580px;
  display: flex;
  justify-content: space-around;
  padding: 8px 4px;
  box-sizing: border-box;
}

.nav-btn {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  flex: 1;
}

.nav-btn.active {
  color: var(--terracota);
}

.nav-icon {
  font-size: 1.25rem;
}

/* Modales */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: flex-end;
  z-index: 200;
  width: 100%;
}

.modal-overlay.open {
  display: flex;
}

.modal-sheet {
  background: var(--surface);
  width: 100%;
  max-width: 580px;
  border-radius: 16px 16px 0 0;
  padding: 18px;
  max-height: 85vh;
  overflow-y: auto;
  box-sizing: border-box;
}

/* Creadora y Apoyo */
.avatar-container {
  width: 90px !important;
  height: 90px !important;
  max-width: 90px !important;
  max-height: 90px !important;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 10px;
  border: 2px solid var(--terracota);
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.creator-title {
  font-size: 1.15rem;
  font-weight: 800;
}

.creator-bio {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 8px;
  width: 100%;
}

.support-card {
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  box-sizing: border-box;
}

.support-icon {
  font-size: 1.4rem;
  display: block;
}

.support-title {
  font-size: 0.82rem;
  font-weight: 700;
}

.support-price {
  font-size: 0.78rem;
  color: var(--terracota);
  font-weight: 800;
  display: block;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  display: none;
  z-index: 300;
  white-space: nowrap;
}

.toast.show {
  display: block;
}

/* Aviso de versión nueva */
.aviso-actualizacion {
  position: fixed;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: #fff;
  padding: 8px 8px 8px 14px;
  border-radius: 14px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 300;
  max-width: 92%;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
