
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700&display=swap');



/* =========================
   RESET
========================= */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #fff;
  scroll-behavior: smooth;
}


/* =========================
   SPLASH
========================= */
#splash {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, #ff6a00, #ff8c1a);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity .6s ease;
}

.splash-content img {
  width: 160px;
  animation: logoEnter .8s ease-out forwards;
}

@keyframes logoEnter {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1); }
}


/* =========================
   HEADER
========================= */
.app-header {
  padding: 32px 20px 20px;
  text-align: center;
  background: #fff7f0;
}

.app-header h1 {
  margin: 0 0 8px;
  font-size: 1.9rem;
  font-weight: 800;
  color: #ff6a00;
}

.app-header p {
  margin: 0;
  font-size: .95rem;
  color: #555;
}


/* =========================
   LAYOUT BIENVENIDA
========================= */
.welcome-box,
.welcome-container {
  max-width: 520px;
  margin: 40px auto;
  padding: 20px;
  text-align: center;
  animation: fadeIn .4s ease forwards;
}

@keyframes fadeIn { to { opacity: 1; } }

.question { margin-bottom: 18px; font-weight: 600; }

.hint {
  font-size: .8rem;
  color: #777;
  margin-top: 6px;
}


/* =========================
   BOTONES — SISTEMA ÚNICO
========================= */
.btn {
  width: 100%;
  display: block;
  padding: 15px;
  margin-bottom: 14px;
  font-size: 1rem;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  text-align: center;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.btn:active { transform: scale(.97); }
.btn:hover  { filter: brightness(1.1); }

.btn.primary {
  background: #ff6a00;
  color: #fff;
  box-shadow: 0 6px 14px rgba(255,106,0,.35);
}

.btn.secondary {
  background: #1f1f1f;
  color: #fff;
}

.btn.info { background: #1e88e5; }

.btn[disabled] { opacity:.6; }


/* =========================
   CARDS
========================= */
.card {
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  margin: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
}

.card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.card p  { margin: 4px 0; font-size: .9rem; color: #444; }


/* =========================
   AUTH
========================= */
body.auth { background: #fff7f0; }

.auth-box {
  max-width: 420px;
  margin: 80px auto;
  padding: 28px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  text-align: center;
}

.auth-box input {
  width: 100%;
  padding: 14px;
  margin-bottom: 14px;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-size: 15px;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #eee;
}


/* =========================
   ALERTAS
========================= */
.messages { max-width: 420px; margin: 20px auto; }

.alert {
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 14px;
}

.alert.error   { background:#ffe5e5; color:#b00020; }
.alert.success { background:#e8f8ee; color:#0a7a3d; }


/* =========================
   PANEL LEÑERO
========================= */
body.panel { background: #fff7f0; }

.panel-header {
  padding: 28px 20px;
  text-align: center;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,.05);
}

.panel-header h1 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
  color: #ff6a00;
}

.panel-actions {
  max-width: 520px;
  margin: 30px auto;
  padding: 0 20px;
  display: flex;
  gap: 12px;
}

@media (max-width: 600px) {
  .panel-actions { flex-direction: column; }
}


/* =========================
   EMPTY STATE
========================= */
.empty-state {
  max-width: 420px;
  margin: 40px auto;
  padding: 30px 24px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
  text-align: center;
  color: #666;
}


/* =========================
   MODAL (UNIFICADO)
========================= */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.modal.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #fff;
  border-radius: 18px;
  padding: 26px 22px;
  max-width: 360px;
  width: 90%;
  text-align: center;
  transform: translateY(20px);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
}

.modal.show .modal-content {
  transform: translateY(0);
  opacity: 1;
}

.modal-content h2 { margin-top: 0; color: #ff6a00; }
.modal-content p  { color:#555; font-size:.95rem; }

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-close {
  margin-top: 14px;
  background: none;
  border: none;
  font-size: .85rem;
  color: #777;
  cursor: pointer;
}

body.modal-open { overflow: hidden; }


/* =========================
   LOGIN LINK (HOME)
========================= */
.welcome-box .login-link {
  margin-top: 14px;
  text-align: center;
}

.welcome-box .login-link a,
.welcome-box .login-link a:visited {
  color: #4b4bff;
  font-weight: 600;
  text-decoration: underline;
  font-size: 15px;
  display: inline-block;
  opacity: .95;
}


/* =========================
   FOOTER ACCIONES FLOTANTES
========================= */
.floating-footer {
  position: fixed;
  bottom: 12px;
  left: 0;
  width: 100%;
  text-align: center;
}

/* FIX FINAL — fuerza estilo del enlace de login */
.welcome-box .login-link a {
  all: unset;               /* borra estilos del navegador */
  display: inline-block;
  cursor: pointer;

  color: #4b4bff !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  text-decoration: underline !important;

  padding: 2px 4px;
}

.welcome-box .login-link a:visited,
.welcome-box .login-link a:hover,
.welcome-box .login-link a:active {
  color: #4b4bff !important;
}


.login-link button {
  all: unset;
  display: inline-block;

  color: #4b4bff;
  font-weight: 600;
  font-size: 15px;
  text-decoration: underline;

  cursor: pointer;
  padding: 2px 4px;
}

.btn.ghost{
  background: transparent;
  color:#4b4bff;
  font-weight:600;
  border:1px dashed #bfc3ff;
  text-decoration:none;
  width:100%;
  display:block;
  padding:12px;
  border-radius:12px;
  margin-top:10px;
}

.btn.ghost:visited{
  color:#4b4bff;
}


.pub-card{
  border-radius:18px;
  padding:18px 16px;
  box-shadow:0 10px 28px rgba(0,0,0,.08);
  border:1px solid #f1f1f1;
  margin:14px 16px;
}

/* HEADER DE LA TARJETA */
.pub-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:6px;
}

.pub-header .price{
  font-size:1.35rem;
  font-weight:800;
}

.pub-header .price small{
  font-weight:500;
  font-size:.9rem;
  opacity:.9;
}

.badge{
  background:#eef3ff;
  color:#2b4bff;
  padding:4px 10px;
  border-radius:12px;
  font-size:.8rem;
  font-weight:600;
}

/* FILA DE ATRIBUTOS */
.pub-info{
  display:grid;
  grid-template-columns:1fr 1fr;
  margin-top:8px;
  gap:6px;
}

.pub-info div{
  display:flex;
  flex-direction:column;
  font-size:.9rem;
}

.pub-info span{
  opacity:.75;
  font-size:.8rem;
}

/* CTA */
.pub-card .btn{
  margin-top:12px;
  border-radius:12px;
}




.pedido-card {
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  margin: 10px auto;
  max-width: 420px;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

.pedido-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.pedido-id { font-weight: 700; }

.pedido-info {
  font-size: 14px;
  color: #444;
  margin-bottom: 10px;
}

/* Badges */
.badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.estado-creado     { background:#eef4ff; color:#2f5cff; }
.estado-aceptado   { background:#e8f8ee; color:#0a7a3d; }
.estado-confirmado { background:#fff3cd; color:#8a6d00; }
.estado-en_disputa { background:#ffe5e5; color:#b00020; }
.estado-entregado  { background:#dff3ff; color:#0b5fa4; }
.estado-cancelado  { background:#f3f3f3; color:#666; }

.cancel-hint {
  color: #777;
  font-size: 12px;
}

/* Botones */
.btn.outline {
  background: #fff;
  border: 1px solid #ddd;
  color: #333;
}

.pub-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.chip {
  padding: 8px 12px;
  border-radius: 14px;
  font-size: .85rem;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid #ddd;
}

.chip.neutral  { background:#f4f4f4; }
.chip.success  { background:#e8f8ec; color:#0a7a3d; }
.chip.warning  { background:#fff4e6; color:#d35400; }
.chip.danger   { background:#ffe5e5; color:#b00020; }


.pub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pub-status {
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 0.9rem;
  font-weight: 600;
}

.pub-on {
  background: rgba(46, 204, 113, 0.18);
  color: #1e7f4c;
}

.pub-off {
  background: rgba(231, 76, 60, 0.18);
  color: #a8342c;
}

.flash-wrapper {
  padding: 12px;
  margin: 10px auto;
  max-width: 900px;
}

.flash {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
}

.flash.success {
  background: #d9f7e2;
  color: #1b7d3f;
}

.flash.error {
  background: #ffe0e0;
  color: #a12626;
}


.flash-wrapper {
  padding: 10px;
  margin: 0 auto 12px auto;
  max-width: 900px;
}

.flash {
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

/* Mensaje de éxito */
.flash.success {
  background: #dff7e6;
  color: #137b3b;
  border: 1px solid #b5e8c7;
}

/* Mensaje de error */
.flash.error {
  background: #ffe5e5;
  color: #9c2222;
  border: 1px solid #ffcccc;
}

.flash {
  animation: fadein .25s ease-out;
}

@keyframes fadein {
  from { opacity: 0; transform: translateY(-3px); }
  to   { opacity: 1; transform: translateY(0); }
}

.flash {
  padding: 10px 14px;
  border-radius: 10px;
  margin: 10px;
  font-weight: 600;
}

.flash.success { background:#dfffdb; color:#1e7a2f; }
.flash.warning { background:#fff2c7; color:#7a5a00; }


/* ===== Tarjeta de pedido (versión mobile mejorada) ===== */

.pedido-card {
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 14px;
}

/* Encabezado */
.pedido-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  margin-bottom: 8px;
}

.pedido-id {
  font-size: 1rem;
}

/* Información */
.pedido-info {
  font-size: .95rem;
  line-height: 1.35rem;
  margin-bottom: 10px;
}

/* Botones */
.pedido-actions {
  display: grid;
  gap: 8px;
  margin-top: 6px;
}

.pedido-actions .btn {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  font-weight: 600;
  font-size: .95rem;
}

/* Estados */
.btn.success { background:#2ecc71; color:#fff; }
.btn.danger  { background:#e74c3c; color:#fff; }
.btn.primary { background:#3498db; color:#fff; }
.btn.outline {
  border: 2px solid #888;
  background:#fff;
  color:#333;
}

.panel-summary {
  padding: 10px 14px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 10px;
}

.summary-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 6px 14px rgba(0,0,0,.06);
  text-align: center;
}

.summary-title {
  font-size: 12px;
  opacity: .7;
}

.summary-value {
  display: block;
  font-size: 20px;
  font-weight: 800;
  margin-top: 4px;
}

.summary-actions {
  margin-top: 14px;
}



.btn.primary-orange {
  display:block;
  width:100%;
  text-align:center;
  padding:16px;
  border-radius:16px;
  font-weight:700;
  background:#ff7a00;
  color:white;
  border:none;
  box-shadow:0 8px 20px rgba(255,122,0,.25);
}

.btn.primary-orange:active {
  transform:scale(.98);
}

.btn.dark {
  display:block;
  width:100%;
  text-align:center;
  padding:16px;
  border-radius:16px;
  font-weight:700;
  background:#111;
  color:white;
}


/* Naranjo LeñaApp */
:root {
  --orange-lenna: #ff8c00;
  --orange-lenna-dark: #e67600;
}

.btn.primary,
.btn.action,
.btn-blue {
  background: var(--orange-lenna) !important;
  border-color: var(--orange-lenna-dark) !important;
  color: white !important;
}

.btn.primary:hover,
.btn.action:hover,
.btn-blue:hover {
  background: var(--orange-lenna-dark) !important;
}

/* =========================
   FORMULARIO ENTREGA LEÑERO
========================= */

.form-entrega {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-entrega h3 {
  margin-bottom: 6px;
}

.form-entrega label {
  display: block;
  margin-top: 14px;
  margin-bottom: 6px;
  font-weight: 600;
}

.form-entrega small {
  font-size: .85rem;
  color: #666;
  margin-top: -6px;
}

/* Inputs grandes y cómodos */
.form-entrega input,
.form-entrega select {
  height: 52px;
  font-size: 1rem;
  padding: 10px 12px;
  width: 100%;
  box-sizing: border-box;
}


/* Placeholder legible */
.form-entrega input::placeholder {
  color: #aaa;
}

/* Focus accesible */
.form-entrega input:focus,
.form-entrega select:focus {
  outline: none;
  border-color: #ff7a00;
  box-shadow: 0 0 0 2px rgba(255,122,0,.18);
}

/* Separadores visuales */
.form-entrega .divider {
  border: none;
  height: 1px;
  background: #eee;
  margin: 8px 0;
}

/* Acciones */
.form-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.form-actions .btn {
  width: 100%;
}

.divider {
  margin: 18px 0;
}

.form-publicacion label {
  display: block;
  margin-top: 16px;
  margin-bottom: 6px;
  font-weight: 600;
}

.form-publicacion input,
.form-publicacion select {
  width: 100%;
  height: 52px;
  font-size: 1rem;
  padding: 10px 12px;
  border-radius: 12px;
  box-sizing: border-box;
}

.form-publicacion button {
  margin-top: 22px;
}

/* ===== Formularios móviles ===== */

form label {
  display: block;
  margin-top: 18px;
  margin-bottom: 6px;
  font-weight: 600;
}

/* Inputs y selects bien grandes */
form input,
form select {
  width: 100%;
  height: 56px;               /* ⬅ más alto */
  font-size: 1rem;
  padding: 12px 14px;
  border-radius: 14px;
  appearance: none;           /* ⬅ quita estilo feo nativo */
  background-color: #fff;
}

/* Flecha del select (mejora visual) */
form select {
  background-image: url("data:image/svg+xml;utf8,<svg fill='%23999' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 20px;
}

/* ===== Ajuste formularios móviles ===== */

.auth-box {
  max-width: 480px;      /* ⬅ más ancho */
  padding: 20px;
}

.form-publicacion label {
  display: block;
  margin-top: 18px;
  margin-bottom: 6px;
  font-weight: 600;
}

.form-publicacion input,
.form-publicacion select {
  width: 100%;
  height: 56px;                 /* ⬅ CLAVE */
  padding: 12px 14px;
  font-size: 1rem;
  border-radius: 14px;
  border: 1px solid #ddd;
  background-color: #fff;
  box-sizing: border-box;
}

.form-publicacion select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%23999' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 20px;
}

/* =========================
   FIX FINAL SELECTS PUBLICACION
   NO ROMPE OTROS FORMULARIOS
========================= */

.form-publicacion select {
  width: 100%;
  height: 56px;
  padding: 14px 44px 14px 14px; /* ⬅ espacio real para la flecha */
  font-size: 1rem;
  line-height: 1.2;
  border-radius: 14px;
  border: 1px solid #ddd;
  background-color: #fff;

  appearance: none;
  -webkit-appearance: none;

  background-image: url("data:image/svg+xml;utf8,<svg fill='%23999' height='22' viewBox='0 0 24 24' width='22' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 22px;
}

/* Texto del select bien centrado */
.form-publicacion select option {
  font-size: 1rem;
}

/* =========================
   FORMULARIO DISPUTA CLIENTE
========================= */

.form-disputa {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Labels */
.form-disputa label {
  display: block;
  margin-top: 18px;
  margin-bottom: 6px;
  font-weight: 600;
}

/* Inputs, selects, textarea grandes */
.form-disputa input,
.form-disputa select,
.form-disputa textarea {
  width: 100%;
  height: 56px;
  font-size: 1rem;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #ddd;
  box-sizing: border-box;
  background-color: #fff;
}

/* Textarea especial */
.form-disputa textarea {
  height: 100px;
  resize: vertical;
}

/* Select con flecha consistente */
.form-disputa select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%23999' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 20px;
}

/* Focus */
.form-disputa input:focus,
.form-disputa select:focus,
.form-disputa textarea:focus {
  outline: none;
  border-color: #ff7a00;
  box-shadow: 0 0 0 2px rgba(255,122,0,.18);
}

/* Texto auxiliar */
.form-disputa small {
  font-size: .85rem;
  color: #666;
  margin-top: -6px;
}


/* ===== Textarea consistente con formularios ===== */

.form-publicacion textarea {
  width: 100%;
  min-height: 110px;
  padding: 14px;
  font-size: 1rem;
  border-radius: 14px;
  border: 1px solid #ddd;
  resize: vertical;
  box-sizing: border-box;
}

.form-publicacion textarea:focus {
  outline: none;
  border-color: #ff7a00;
  box-shadow: 0 0 0 2px rgba(255,122,0,.18);
}

.form-publicacion textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  padding: 12px 14px;
  font-size: 1rem;
  border-radius: 14px;
  border: 1px solid #ddd;
  box-sizing: border-box;
  font-family: inherit;
}

.form-publicacion textarea:focus {
  outline: none;
  border-color: #ff7a00;
  box-shadow: 0 0 0 2px rgba(255,122,0,.18);
}

.form-publicacion input[type="file"] {
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed #ccc;
  background: #fafafa;
  font-size: .95rem;
}

.form-publicacion > p {
  background: #fff7f0;
  border-radius: 12px;
  padding: 14px;
  font-size: .95rem;
  color: #444;
  margin-bottom: 18px;
}

.form-publicacion input,
.form-publicacion select,
.form-publicacion textarea {
  width: 100%;
  min-height: 56px;
  padding: 12px 14px;
  font-size: 1rem;
  border-radius: 14px;
  border: 1px solid #ddd;
  box-sizing: border-box;
  background-color: #fff;
  font-family: inherit;
}

.form-publicacion textarea {
  min-height: 120px;
  resize: vertical;
}

.form-publicacion input:focus,
.form-publicacion select:focus,
.form-publicacion textarea:focus {
  outline: none;
  border-color: #ff7a00;
  box-shadow: 0 0 0 2px rgba(255,122,0,.18);
}

.form-publicacion > p {
  background: #fff7f0;
  border-radius: 14px;
  padding: 14px;
  font-size: .95rem;
  margin-bottom: 18px;
}

.form-publicacion input[type="file"] {
  padding: 14px;
  border-radius: 14px;
  border: 1px dashed #ccc;
  background: #fafafa;
  font-size: .95rem;
}


/* ===============================
   COMISIÓN LEÑERO
================================ */

.commission-wrapper {
  padding: 12px 16px;
}

.commission-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #fff4e6, #ffe0b2);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.commission-icon {
  font-size: 28px;
}

.commission-info {
  display: flex;
  flex-direction: column;
}

.commission-label {
  font-size: 0.85rem;
  color: #555;
}

.commission-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: #e67e22;
  line-height: 1.2;
}

.commission-status {
  font-size: 0.75rem;
  margin-top: 2px;
  color: #e67e22;
  font-weight: 600;
}

.commission-status.ok {
  color: #27ae60;
}

/* Estado recuperación */
.commission-warning {
  background: linear-gradient(135deg, #fff0e0, #ffd6a5);
}

/* ===============================
   BOTONES (refuerzo visual)
================================ */

.btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  margin-bottom: 12px;
}

.primary-orange {
  background: #ff7a00;
  color: #fff;
  box-shadow: 0 4px 8px rgba(255,122,0,0.4);
}

.secondary {
  background: #222;
  color: #fff;
}

.logout-btn {
  background: transparent;
  color: #c0392b;
  font-weight: 600;
}

/* ===============================
   RESUMEN
================================ */

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 12px;
}

.summary-card {
  background: #fff;
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}

.summary-title {
  font-size: 0.75rem;
  color: #555;
}

.summary-value {
  font-size: 1.4rem;
  font-weight: 800;
  margin-top: 4px;
}

.link-muted {
  font-size: 0.9em;
  color: #7f8c8d;
  text-decoration: underline;
}

/* ==========================
   ACCESO A PERFIL
   ========================== */
.panel-account-link {
  text-align: center;
  margin: 12px 0 24px;
}

.link-muted {
  font-size: 0.95rem;
  color: #555;
  text-decoration: underline;
}

/* ==========================
   DIVISOR
   ========================== */
.panel-divider {
  margin: 32px 0;
  opacity: 0.25;
}

/* ==========================
   LOGOUT
   ========================== */
.panel-logout {
  text-align: center;
  margin-bottom: 24px;
}

.logout-link {
  color: #b00020;
  font-size: 0.95rem;
  text-decoration: none;
}

.logout-link:hover {
  text-decoration: underline;
}

/* ==========================
   ESTADO COMISIÓN
   ========================== */
.commission-status.ok {
  color: #2e7d32;
}

.commission-status.warning {
  color: #ef6c00;
}

.page-title {
  text-align: center;
  margin: 20px 0;
  font-size: 1.6rem;
}

.card-form {
  max-width: 420px;
  margin: 0 auto;
  padding: 20px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.card-form label {
  display: block;
  margin-top: 14px;
  font-weight: 600;
  font-size: 0.9rem;
}

.card-form input {
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-size: 1rem;
}

.card-form input:focus {
  outline: none;
  border-color: #ff7a00;
}

.btn {
  width: 100%;
  padding: 14px;
  margin-top: 16px;
  border-radius: 12px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.btn.primary {
  background: #ff7a00;
  color: #fff;
}

.btn.secondary {
  background: #f4f4f4;
  color: #333;
}

.card {
  max-width: 420px;
  margin: 14px auto;
  padding: 16px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.card h2 {
  margin-bottom: 10px;
}

.address-card {
  padding: 10px;
  border-bottom: 1px solid #eee;
  font-size: 0.95rem;
}

.address-card:last-child {
  border-bottom: none;
}

.map-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.9rem;
  color: #ff7a00;
  text-decoration: none;
}

.muted {
  color: #777;
  font-size: 0.85rem;
}

.coupon {
  padding: 8px 0;
  border-bottom: 1px dashed #ddd;
}

.btn.danger {
  background: #ffe5e5;
  color: #c00;
}

.btn-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  width: auto;
  min-width: 180px;
}

.actions-center {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.btn-danger {
  background: #fdeaea;
  color: #b00020;
  border: 1px solid #f5c2c7;
}

.btn-danger:hover {
  background: #f8d7da;
}

.direccion-card {
  background:#fff;
  padding:12px;
  border-radius:14px;
  margin-bottom:10px;
}

.badge.success {
  background:#e6fff1;
  color:#1f8f4a;
  padding:4px 8px;
  border-radius:8px;
  font-weight:600;
  font-size:.85rem;
}

.btn.small {
  font-size:.85rem;
  padding:6px 10px;
}


/* =========================
   PANEL LEÑERO – BOTONES
========================= */

.panel-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 20px auto;
  max-width: 420px;
}

/* Botón principal */
.panel-actions .btn-primary,
.panel-actions .primary-orange {
  background: #ff7a00;
  color: #fff;
  font-weight: 700;
  padding: 14px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 8px 20px rgba(255, 122, 0, 0.35);
}

/* Botones secundarios */
.panel-actions .btn-outline,
.panel-actions .btn-secondary {
  background: #fff;
  color: #333;
  border: 2px solid #ddd;
  padding: 12px;
  border-radius: 12px;
  text-align: center;
  font-weight: 600;
}

/* Hover */
.panel-actions a:hover {
  transform: translateY(-1px);
}

/* =========================
   LOGOUT
========================= */

.panel-logout {
  margin: 30px 0;
  text-align: center;
}

.logout-link {
  color: #c0392b;
  font-weight: 600;
  text-decoration: none;
}

/* =========================
   HEADER LEÑAAPP
========================= */

header {
  font-family: 'Poppins', system-ui, sans-serif;
}

.app-title {
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.2px;
  color: #6a1b9a; /* morado LeñaApp */
  text-decoration: none;
}

header nav a {
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 600;
}

/* =========================
   CONTENEDOR MÓVIL REAL
========================= */
.mobile-container {
  max-width: 480px;
  margin: 16px auto;
  padding: 12px;
}

/* Tarjetas más compactas */
.mobile-container .card {
  margin: 10px 0;
  border-radius: 14px;
  padding: 14px;
}

/* Botones en móvil */
.mobile-container .btn {
  margin-top: 8px;
}

.container,
.page,
.wrapper {
  width: 100%;
  padding: 16px;
  margin: 0;
  box-sizing: border-box;
}

/* =================================================
   MOBILE FIRST REAL – OVERRIDES SEGUROS
   NO ROMPE DESKTOP
================================================= */

@media (max-width: 768px) {

  /* 🔹 Quitar sensación desktop */
  body {
    background: #fff;
  }

  /* 🔹 Contenedores a ancho real móvil */
  .welcome-box,
  .welcome-container,
  .card,
  .card-form,
  .pedido-card,
  .auth-box,
  .panel-header,
  .panel-actions,
  .panel-summary,
  .commission-wrapper,
  .empty-state {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 0;
    box-shadow: none;
  }

  /* 🔹 Padding lateral consistente */
  .panel-header,
  .panel-actions,
  .panel-summary,
  .commission-wrapper,
  .page,
  .container,
  .wrapper {
    padding-left: 14px;
    padding-right: 14px;
  }

  /* 🔹 Header más compacto */
  .panel-header {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .panel-header h1 {
    font-size: 1.35rem;
  }

  /* 🔹 Cards más móviles */
  .card,
  .pedido-card,
  .pub-card {
    margin: 10px 0;
    padding: 14px;
    border-radius: 14px;
  }

  /* 🔹 Listas (pedidos, direcciones) */
  .direccion-card,
  .address-card {
    margin-bottom: 10px;
    padding: 12px;
  }

  /* 🔹 Botones: más compactos y táctiles */
  .btn,
  .btn.primary,
  .btn.secondary,
  .btn.primary-orange,
  .btn.dark {
    padding: 14px;
    font-size: 0.95rem;
    border-radius: 14px;
  }

  /* 🔹 Acciones de pedido */
  .pedido-actions {
    gap: 10px;
  }

  /* 🔹 Resumen en 1 fila scrolleable si hace falta */
  .summary-grid {
    grid-template-columns: repeat(3, minmax(90px, 1fr));
    gap: 8px;
  }

  .summary-value {
    font-size: 1.25rem;
  }

  /* 🔹 Formularios más compactos */
  form input,
  form select,
  form textarea {
    height: 52px;
    font-size: 0.95rem;
  }

  form textarea {
    min-height: 96px;
  }

  /* 🔹 Quitar sombras grandes en móvil */
  .commission-card,
  .summary-card {
    box-shadow: 0 2px 6px rgba(0,0,0,.06);
  }

  /* 🔹 Footer flotante no invade */
  .floating-footer {
    bottom: 6px;
  }
}


.publicacion-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 12px;
}

.publicacion-img.placeholder {
  background: #f2f2f2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
}

.galeria {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin-bottom: 16px;
}

.galeria-img {
  height: 160px;
  border-radius: 10px;
  object-fit: cover;
}

.password-wrapper {
  position: relative;
  width: 100%;
}

.password-wrapper input {
  width: 100%;
  height: 56px;              /* 🔴 clave */
  padding: 0 48px 0 16px;    /* espacio para el ojo */
  font-size: 16px;
  border-radius: 12px;
  box-sizing: border-box;
}

.toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 20px;
  color: #666;
  z-index: 2;
}


.password-wrapper {
  position: relative;
  width: 100%;
}

.password-input {
  width: 100%;
  height: 56px;
  padding: 0 48px 0 16px;
  border-radius: 12px;
  box-sizing: border-box;
  margin: 0 !important;      /* 🔥 clave */
}

.toggle-password {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 20px;
  color: #666;
  pointer-events: auto;
}

.saludo-cliente {
  background: #fff7ed; /* naranja muy suave */
  border-left: 4px solid #f97316; /* naranja LeñaApp */
  padding: 12px 14px;
  margin: 12px 16px 16px;
  border-radius: 8px;
}

.saludo-texto {
  display: block;
  font-size: 0.95rem;
  color: #1f2937; /* gris oscuro */
}

.saludo-sub {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: #6b7280; /* gris suave */
}

/* =========================
   SALUDO CLIENTE
   ========================= */

.saludo-cliente {
  margin: 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border-radius: 14px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.saludo-linea {
  font-size: 1rem;
  font-weight: 500;
  color: #1f2937;
}

.saludo-linea strong {
  color: #ea580c; /* naranja LeñaApp */
}

.saludo-sub {
  margin-top: 6px;
  font-size: 0.85rem;
  color: #6b7280;
}

/* =========================
   HEADER PRINCIPAL
   ========================= */

.app-header {
  text-align: center;
  margin: 20px 0 10px;
}

.app-header h1 {
  margin-bottom: 4px;
  color: #ff7a00;
}

.app-header p {
  opacity: 0.85;
}

/* =========================
   SALUDO CLIENTE
   ========================= */

.saludo-cliente {
  margin: 16px 16px 8px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fff4e6, #ffe8cc);
  border-radius: 14px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.saludo-texto {
  display: block;
  font-size: 1rem;
  font-weight: 500;
  color: #1f2937;
}

.saludo-texto strong {
  font-weight: 700;
  color: #ff7a00;
}

.saludo-sub {
  display: block;
  margin-top: 4px;
  font-size: 0.85rem;
  color: #6b7280;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;              /* 🔒 oculto por defecto */
  align-items: center;
  justify-content: center;
  z-index: 9999;              /* 🔥 MUY IMPORTANTE */
}

.modal.show {
  display: flex;              /* 👈 se muestra */
}

.modal-content {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  max-width: 320px;
  width: 90%;
  text-align: center;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 18px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: #fff7ed;
  border-radius: 14px;
  padding: 20px;
  max-width: 360px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
}

.modal-content h2 {
  color: #ff7a00;
  margin-bottom: 10px;
}

.alert {
  padding: 12px;
  border-radius: 8px;
  margin: 10px 0;
  font-weight: 500;
}

.alert-success { background: #e6f7ed; color: #1e7e34; }
.alert-error   { background: #fdecea; color: #b02a37; }
.alert-warning { background: #fff3cd; color: #856404; }
.alert-info    { background: #e7f3ff; color: #084298; }

.servicios-card {
  opacity: 0.9;
  text-align: center;
}

.servicios-header {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.servicios-text {
  font-size: 0.95rem;
  opacity: 0.8;
  margin-bottom: 14px;
}

.btn.disabled {
  pointer-events: none;
  opacity: 0.6;
}

.checkbox-group {
  margin: 1.2rem 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 1rem;
}

.checkbox-label input {
  transform: scale(1.2);
}

.checkbox-text {
  font-weight: 500;
}

.checkbox-field {
  margin: 16px 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #ff9800; /* naranja LeñaApp */
}

.checkbox-field {
  margin: 16px 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  z-index: 5; /* 🔥 CLAVE */
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #ff9800;
  cursor: pointer;
  z-index: 6; /* 🔥 MÁS ALTO */
}

.checkbox-text {
  cursor: pointer;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  position: relative;
  z-index: 20; /* 🔥 más alto que tus inputs */
}

.checkbox-field input[type="checkbox"] {
  width: 22px;
  height: 22px;
  pointer-events: auto; /* 🔥 CLAVE */
  z-index: 21;
}

.checkbox-field label {
  cursor: pointer;
  pointer-events: auto;
}
.checkbox-field,
.checkbox-field * {
  pointer-events: auto !important;
}

.checkbox-fix {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;

  position: relative;
  z-index: 9999; /* 🔥 por encima de TODO */
}

.checkbox-fix input {
  width: 24px;
  height: 24px;
  appearance: auto;
  -webkit-appearance: checkbox;

  pointer-events: auto !important;
  z-index: 10000;
}

.checkbox-fix span {
  pointer-events: none;
}

.badge-ok {
  display: inline-flex;
  align-items: center;   /* 👈 centra vertical real */
  gap: 6px;

  padding: 4px 8px;
  border-radius: 6px;

  font-size: 0.9rem;
  line-height: 1;        /* 👈 clave */
}