/* =========================================
   ESTILOS COMPARTIDOS (RESET)
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }

/* =========================================
   SECCIÓN: LOGIN (INDEX)
   ========================================= */
#lgn-app {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: #F5F3EE; font-family: 'DM Sans', system-ui, sans-serif; padding: 1rem;
}

#lgn-app .card {
  background: #FFFFFF; border-radius: 10px; box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 2rem; width: 100%; max-width: 380px;
}

#lgn-app .brand { text-align: center; margin-bottom: 1.5rem; }
#lgn-app .brand h1 { font-family: 'Bebas Neue', sans-serif; font-size: 2.2rem; color: #D85A30; letter-spacing: 3px; line-height: 1; }
#lgn-app .brand p { font-size: 0.68rem; color: #6B6B67; letter-spacing: 4px; margin-top: 4px; font-weight: 500; }
#lgn-app hr { border: none; border-top: 1px solid rgba(0,0,0,0.12); margin: 0 0 1.5rem; }
#lgn-app .field { margin-bottom: 1rem; }
#lgn-app label { display: flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 600; color: #6B6B67; letter-spacing: 1px; margin-bottom: 6px; }
#lgn-app label svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }

#lgn-app input[type="tel"], #lgn-app input[type="password"] {
  width: 100%; padding: 10px 12px; border: 1.5px solid rgba(0,0,0,0.12); border-radius: 10px;
  font-size: 0.95rem; font-family: 'DM Sans', sans-serif; color: #1A1A18; background: #FAFAF8; outline: none; transition: border-color 0.15s;
}
#lgn-app input:focus { border-color: #D85A30; box-shadow: 0 0 0 3px rgba(216,90,48,0.12); }
#lgn-app input.input-error { border-color: #E24B4A; box-shadow: 0 0 0 3px rgba(226,75,74,0.12); }

#lgn-app .rc-bar { display: flex; align-items: center; gap: 10px; background: #FAFAF8; border: 1px solid rgba(0,0,0,0.12); border-radius: 10px; padding: 10px 12px; margin: 1rem 0; }
#lgn-app .rc-spinner { width: 22px; height: 22px; border: 2px solid #D0CFC8; border-top-color: #D85A30; border-radius: 50%; animation: spin 0.8s linear infinite; }
#lgn-app .rc-check { width: 22px; height: 22px; background: #1D9E75; border-radius: 50%; display: none; align-items: center; justify-content: center; }
#lgn-app .rc-check svg { width: 12px; height: 12px; stroke: white; fill: none; stroke-width: 3; }
@keyframes spin { to { transform: rotate(360deg); } }

#lgn-app .btn-submit {
  width: 100%; padding: 12px; background: #D85A30; color: #fff; border: none; border-radius: 10px;
  font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 700; letter-spacing: 1.5px; cursor: pointer; margin-top: 0.75rem; transition: background 0.15s;
}
#lgn-app .btn-submit:disabled { opacity: 0.45; cursor: not-allowed; }
#lgn-app .attempts-bar { height: 3px; background: #E8E6E0; border-radius: 99px; margin-top: 8px; overflow: hidden; }
#lgn-app .attempts-fill { height: 100%; background: #D85A30; transition: width 0.3s; }

/* =========================================
   SECCIÓN: DASHBOARD
   ========================================= */
#dsh-app {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #F2F2F2; max-width: 480px; margin: 0 auto; position: relative;
}

#dsh-app .topbar {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px;
  height: 60px; background: #E8500A; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; z-index: 100;
}
#dsh-app .topbar-logo { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 800; color: #fff; letter-spacing: 1.5px; text-transform: uppercase; }
#dsh-app .topbar-logo svg { width: 24px; height: 24px; stroke: #fff; fill: none; stroke-width: 2; }

#dsh-app .order-pill {
  display: none; align-items: center; gap: 8px; background: rgba(255,255,255,0.2); border-radius: 50px; padding: 6px 14px 6px 10px; cursor: pointer; border: none;
}
#dsh-app .order-pill.show { display: flex; }
#dsh-app .order-pill-count { background: #fff; color: #E8500A; font-size: 13px; font-weight: 700; border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }

#dsh-app .content {
  position: fixed; top: 60px; bottom: 70px; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px;
  overflow-y: auto; padding: 16px 12px; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}

#dsh-app .products-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#dsh-app .product-card {
  background: #FFFFFF; border-radius: 14px; padding: 14px 12px 12px; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,0.06); transition: transform 0.12s; user-select: none;
}
#dsh-app .product-card:active { transform: scale(0.97); }

#dsh-app .bottombar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px;
  height: 70px; background: #fff; display: flex; align-items: center; justify-content: space-around; border-top: 1px solid #E8E8E8; z-index: 100;
}

#dsh-app .overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; align-items: flex-end; justify-content: center;
}
#dsh-app .overlay.show { display: flex; }
#dsh-app .overlay.center { align-items: center; }

#dsh-app .modal-product { background: #fff; border-radius: 24px 24px 0 0; padding: 20px 20px 32px; width: 100%; max-width: 480px; }
#dsh-app .counter { display: flex; align-items: center; justify-content: center; gap: 24px; margin-bottom: 20px; }
#dsh-app .counter-btn { width: 48px; height: 48px; border-radius: 50%; border: none; font-size: 24px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
#dsh-app .counter-plus { background: #E8500A; color: #fff; font-weight: 700; }
#dsh-app .btn-add { width: 100%; padding: 16px; background: #F5A623; border: none; border-radius: 50px; font-size: 15px; font-weight: 700; color: #fff; cursor: pointer; }

#dsh-app .modal-summary { background: #fff; border-radius: 24px; padding: 20px; width: calc(100% - 32px); max-width: 420px; }
#dsh-app .btn-kitchen { width: 100%; padding: 16px; background: #E8500A; border: none; border-radius: 50px; font-size: 15px; font-weight: 700; color: #fff; text-transform: uppercase; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
