*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { touch-action: manipulation; }
/* Sin "rebote" al arrastrar: solo se desliza si el contenido realmente no entra en la pantalla. */
html, body { overscroll-behavior: none; }
:root {
    --naranja: #e87a3c;
    --naranja-oscuro: #c65e26;
    --crema: #fdf6ee;
    --marron: #5a3d2b;
    --gris: #777;
    --rojo: #e74c3c;
    --verde: #2e9e5b;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--crema);
    color: var(--marron);
    line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
.btn { display: inline-block; background: var(--marron); color: #fff; padding: 13px 30px; border-radius: 30px; font-weight: 700; border: none; cursor: pointer; font-size: 14px; transition: transform .15s, background .15s; }
.btn:hover { background: #452e21; transform: translateY(-2px); }
.btn-secundario { display: inline-block; padding: 11px 24px; color: var(--marron); font-weight: 700; font-size: 14px; background: #fff; border: 2px solid var(--marron); border-radius: 30px; cursor: pointer; text-align: center; transition: background .15s, color .15s; }
.btn-secundario:hover { background: var(--marron); color: #fff; }

.seccion { max-width: 1100px; margin: 0 auto; padding: 60px 20px; }
.seccion h2 { font-size: 30px; margin-bottom: 28px; color: var(--naranja-oscuro); }
.foto-placeholder { width: 100%; height: 150px; display: flex; align-items: center; justify-content: center; font-size: 48px; background: #ffe9d2; }

.producto-unico { display: flex; gap: 32px; max-width: 820px; margin: 0 auto; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.producto-unico img, .foto-placeholder-grande { width: 340px; flex-shrink: 0; object-fit: cover; }
.foto-placeholder-grande { display: flex; align-items: center; justify-content: center; font-size: 80px; background: #ffe9d2; }
.producto-unico-info { padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.producto-unico-info h3 { font-size: 24px; }
.producto-unico-info .desc { color: var(--gris); font-size: 15px; }
.producto-unico-info .precio { font-size: 26px; font-weight: 800; color: var(--naranja-oscuro); }
.producto-unico-info label { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--gris); }
.producto-unico-info input[type=number] { width: 100px; padding: 10px; border: 1px solid rgba(0,0,0,.1); border-radius: 8px; margin: 6px 0 12px; display: block; }
.producto-unico-info button { align-self: flex-start; padding: 13px 30px; background: var(--naranja); color: #fff; border: none; border-radius: 30px; font-weight: 700; cursor: pointer; font-size: 14px; }
.producto-unico-info button:hover:not(:disabled) { background: var(--naranja-oscuro); }
.producto-unico-info button:disabled { background: #ccc; cursor: not-allowed; }

.vacio { color: var(--gris); }
.alert { background: rgba(231,76,60,.1); border-left: 3px solid var(--rojo); color: var(--rojo); padding: 10px 14px; font-size: 13px; border-radius: 0 8px 8px 0; margin-bottom: 16px; }
.alert.exito { background: rgba(46,158,91,.1); border-left-color: var(--verde); color: var(--verde); }
.btn-quitar { display: inline-block; padding: 8px 18px; background: #fff; border: 2px solid var(--rojo); border-radius: 30px; color: var(--rojo); cursor: pointer; font-weight: 700; font-size: 13px; transition: background .15s, color .15s; }
.btn-quitar:hover { background: var(--rojo); color: #fff; }
.total-carrito { font-size: 20px; font-weight: 800; margin-bottom: 20px; }

/* ---------- Login (admin y clientes) ---------- */
.login-body { display: flex; min-height: 100vh; min-height: 100dvh; padding: 20px; background: var(--naranja-oscuro); }
.login-wrap { width: 100%; max-width: 480px; margin: auto; }
.logo-area { text-align: center; margin-bottom: 6px; color: #fff; }
.logo-area h1 { font-size: 28px; }
.logo-area p { opacity: .85; margin-top: 6px; }
.logo-login { width: 302px; max-width: 100%; height: auto; object-fit: contain; display: block; margin: 0 auto; }
.box { background: #fff; border-radius: 16px; padding: 32px; box-shadow: 0 4px 24px rgba(0,0,0,.15); }
.box h2 { font-size: 20px; margin-bottom: 4px; }
.subtitulo { font-size: 13px; color: var(--gris); margin-bottom: 20px; }
.box form { display: flex; flex-direction: column; }
.box label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--gris); font-weight: 700; margin: 10px 0 6px; }
.box input, .box select { padding: 12px 14px; border: 1px solid rgba(0,0,0,.1); border-radius: 10px; font-family: inherit; font-size: 14px; background: #fff; }
.box button { margin-top: 18px; padding: 13px; background: var(--naranja); color: #fff; border: none; border-radius: 10px; font-weight: 700; cursor: pointer; }
.box button:hover { background: var(--naranja-oscuro); }
.back { display: block; text-align: center; margin-top: 18px; font-size: 12px; color: var(--gris); }
.box label.check-recordar { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: 13px; text-transform: none; letter-spacing: normal; font-weight: 400; color: var(--gris); cursor: pointer; }
.box label.check-recordar input { width: auto; padding: 0; margin: 0; flex: none; }
.tabs { display: flex; margin-bottom: 20px; border-radius: 10px; overflow: hidden; border: 1px solid rgba(0,0,0,.1); }
.tabs .tab { flex: 1; text-align: center; padding: 10px; font-weight: 700; font-size: 13px; color: var(--gris); background: #f4f4f4; }
.tabs .tab.activo { background: var(--naranja); color: #fff; }

/* ---------- Panel admin ---------- */
.admin-body { background: #f6f2ec; }
.admin-shell { display: flex; min-height: 100vh; min-height: 100dvh; }
.admin-menu { width: 220px; background: var(--marron); color: #fff; display: flex; flex-direction: column; padding: 20px 0; flex-shrink: 0; }
.admin-brand { font-weight: 800; font-size: 18px; padding: 0 20px 20px; }
.admin-brand img { max-width: 100%; height: auto; display: block; border-radius: 12px; }
.admin-menu nav { display: flex; flex-direction: column; flex: 1; gap: 2px; padding: 0 10px; }
.admin-menu .menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: none; border-radius: 10px; background: none; font: inherit; font-size: 14px; font-weight: 600; color: rgba(255,255,255,.8); text-align: left; cursor: pointer; transition: background .15s, color .15s; }
.admin-menu .menu-item:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-menu .menu-item.activo { background: var(--naranja); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.admin-menu .menu-grupo-btn.con-activo { color: #fff; }
.menu-icono { width: 22px; text-align: center; font-size: 16px; flex-shrink: 0; }
.menu-chev { margin-left: auto; font-size: 18px; line-height: 1; opacity: .6; transition: transform .2s; }
.menu-grupo.abierto .menu-chev { transform: rotate(90deg); }
.menu-grupo-links { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s ease; }
.menu-grupo.abierto .menu-grupo-links { grid-template-rows: 1fr; }
.menu-grupo-links > * { min-height: 0; }
.menu-grupo-links { overflow: hidden; }
.menu-grupo-links a { display: block; margin-left: 22px; padding: 8px 12px 8px 20px; border-left: 2px solid rgba(255,255,255,.12); font-size: 13.5px; color: rgba(255,255,255,.65); transition: color .15s, border-color .15s; }
.menu-grupo-links a:first-child { margin-top: 2px; }
.menu-grupo-links a:last-child { margin-bottom: 6px; }
.menu-grupo-links a:hover { color: #fff; }
.menu-grupo-links a.activo { color: #fff; font-weight: 700; border-left-color: var(--naranja); }
.admin-menu .salir { display: flex; align-items: center; gap: 10px; margin: 10px 10px 0; padding: 12px; font-size: 13px; color: rgba(255,255,255,.6); border-top: 1px solid rgba(255,255,255,.1); }
.admin-menu .salir:hover { color: #fff; }
.admin-contenido { flex: 1; padding: 20px 24px; overflow-x: auto; min-width: 0; }
.banner-impersonando { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: #fff3cd; border: 1px solid #ffe08a; color: #7a5b00; padding: 10px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 14px; }
.banner-impersonando form { margin: 0; }
.banner-impersonando .btn-secundario { padding: 6px 14px; background: #7a5b00; color: #fff; border-radius: 6px; }
.admin-header { position: relative; display: flex; justify-content: center; align-items: center; margin-bottom: 18px; min-height: 32px; }
.admin-header h1 { font-size: 22px; text-align: center; }
.admin-usuario { position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--gris); }

.grid-tarjetas { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tarjeta { background: #fff; border-radius: 12px; padding: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.05); display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; }
.tarjeta .valor { font-size: 26px; font-weight: 800; color: var(--naranja-oscuro); }
.tarjeta .etiqueta { font-size: 12px; color: var(--gris); text-transform: uppercase; }

.panel { background: #fff; border-radius: 12px; padding: 16px 18px; box-shadow: 0 2px 8px rgba(0,0,0,.05); margin-bottom: 18px; }
.panel h2 { font-size: 17px; margin-bottom: 14px; text-align: center; }
.panel h3 { font-size: 15px; margin: 16px 0 10px; }

.tabla { width: 100%; border-collapse: collapse; }
.tabla th, .tabla td { padding: 8px 10px; text-align: left; border-bottom: 1px solid rgba(0,0,0,.06); font-size: 13.5px; }
.tabla th { font-size: 12px; text-transform: uppercase; color: var(--gris); }
.tabla-centrada th, .tabla-centrada td { text-align: center; }
.fila-alerta td { background: rgba(231,76,60,.06); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.form-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--gris); }
.form-grid label.full { grid-column: 1 / -1; }
.form-grid label.checkbox { flex-direction: row; align-items: center; text-transform: none; font-weight: 400; font-size: 13px; }
.form-grid input, .form-grid textarea, .form-grid select { padding: 10px; border: 1px solid rgba(0,0,0,.12); border-radius: 8px; font-family: inherit; font-size: 14px; }
.form-grid .btn, .form-grid .btn-secundario { grid-column: span 1; align-self: start; }

.form-inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.form-inline label { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.form-inline input, .form-inline select { padding: 8px 10px; border: 1px solid rgba(0,0,0,.12); border-radius: 8px; font-family: inherit; }

.link-eliminar { display: inline-block; padding: 5px 12px; background: #fff; border: 1.5px solid var(--rojo); border-radius: 20px; color: var(--rojo); cursor: pointer; font-size: 12px; font-weight: 700; margin: 2px 0 2px 6px; line-height: 1.3; transition: background .15s, color .15s; }
.link-eliminar:hover { background: var(--rojo); color: #fff; }
.link-accion { display: inline-block; padding: 5px 12px; background: #fff; border: 1.5px solid var(--naranja-oscuro); border-radius: 20px; color: var(--naranja-oscuro); cursor: pointer; font-size: 12px; font-weight: 700; margin: 2px 0 2px 6px; line-height: 1.3; text-decoration: none; transition: background .15s, color .15s; }
.link-accion:hover { background: var(--naranja-oscuro); color: #fff; }

.filtros { display: flex; gap: 8px; }
.filtros a { padding: 6px 14px; border-radius: 20px; background: #f1f1f1; color: #555; text-decoration: none; font-size: 13px; }
.filtros a.activo { background: var(--naranja-oscuro); color: #fff; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; background: #eee; color: #555; }
.badge-pendiente, .badge-sin_asignar { background: #fde8d2; color: #b06a12; }
.badge-asignado { background: #dbe9ff; color: #2557a7; }
.badge-en_preparacion { background: #f3e2ff; color: #7a3ab0; }
.badge-en_camino { background: #fff3b0; color: #8a6d00; }
.badge-entregado { background: #d9f3e0; color: var(--verde); }
.badge-error { background: #fdd; color: var(--rojo); }
.badge-emitida { background: #d9f3e0; color: var(--verde); }

.pedido-card { border: 1px solid rgba(0,0,0,.08); border-radius: 10px; padding: 16px; margin-bottom: 14px; }
.pedido-head { margin-bottom: 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.items-pedido { margin: 8px 0; padding-left: 18px; font-size: 13px; color: var(--gris); }
.notas { font-size: 13px; color: var(--gris); font-style: italic; }


/* ---------- Responsive: app de clientes ---------- */
@media (max-width: 780px) {
    .seccion { padding: 40px 16px; }
    .seccion h2 { font-size: 24px; margin-bottom: 20px; }

    input, select, textarea { font-size: 16px; }

    .producto-unico { flex-direction: column; }
    .producto-unico img, .foto-placeholder-grande { width: 100%; height: 220px; }
    .producto-unico-info button { align-self: stretch; text-align: center; }
}

/* ---------- Responsive: carrito ---------- */
@media (max-width: 640px) {
    .form-inline { flex-direction: column; align-items: stretch; }
    .form-inline select, .form-inline input { width: 100%; }
}

/* ---------- Responsive: login / panel admin ---------- */
@media (max-width: 480px) {
    .box { padding: 24px 20px; }
    .logo-area h1 { font-size: 24px; }
}


@media (max-width: 480px) {
    .grid-tarjetas { grid-template-columns: 1fr; }
    .pedido-head { flex-direction: column; align-items: flex-start; }
}

/* ---------- App de clientes (menú lateral) ---------- */
.cliente-topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; padding: 10px 16px; background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,.06); }
.cliente-menu-btn { width: 42px; height: 42px; border: none; border-radius: 10px; background: var(--marron); color: #fff; font-size: 20px; cursor: pointer; flex-shrink: 0; }
.cliente-topbar-logo { height: 46px; width: auto; display: block; }
.cliente-menu { position: fixed; top: 0; left: 0; bottom: 0; width: 250px; max-width: 80vw; z-index: 60; background: var(--marron); color: #fff; display: flex; flex-direction: column; transform: translateX(-100%); transition: transform .25s ease; }
html.cliente-menu-abierto .cliente-menu { transform: translateX(0); box-shadow: 4px 0 20px rgba(0,0,0,.25); }
.cliente-menu-fondo { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: opacity .25s; }
html.cliente-menu-abierto .cliente-menu-fondo { opacity: 1; pointer-events: auto; }
.cliente-menu-brand { padding: 20px; text-align: center; }
.cliente-menu-brand img { width: 70%; height: auto; }
.cliente-menu nav { flex: 1; overflow-y: auto; }
.cliente-menu nav a { display: block; padding: 14px 22px; color: rgba(255,255,255,.85); font-weight: 600; font-size: 15px; border-left: 4px solid transparent; }
.cliente-menu nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.cliente-menu nav a.activo { background: rgba(255,255,255,.14); color: #fff; border-left-color: var(--naranja); }
.cliente-menu nav hr { border: none; border-top: 1px solid rgba(255,255,255,.15); margin: 8px 0; }
.cliente-menu-pie { padding: 16px 22px; border-top: 1px solid rgba(255,255,255,.15); font-size: 13px; text-align: center; }
.cliente-menu-pie strong { display: block; margin-bottom: 6px; }
.cliente-menu-pie a.cliente-salir { display: inline-block; margin-top: 4px; padding: 8px 26px; border: 2px solid #fff; border-radius: 30px; color: #fff; font-weight: 700; text-decoration: none; transition: background .15s, color .15s; }
.cliente-menu-pie a.cliente-salir:hover { background: #fff; color: var(--marron); }
.cliente-contenido { padding-top: 24px; }

/* Carrito de la app: una sola columna centrada. */
.cliente-centro { max-width: 460px; margin: 0 auto; text-align: center; }
.cliente-app .producto-unico { flex-direction: column; gap: 0; max-width: 460px; margin-bottom: 20px; }
.cliente-app .producto-unico img, .cliente-app .foto-placeholder-grande { width: 100%; height: 230px; }
.cliente-app .producto-unico-info { align-items: center; text-align: center; padding: 22px 22px 26px; gap: 8px; }
.cliente-app .producto-unico-info form { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.cliente-app .producto-unico-info button { align-self: center; width: 100%; max-width: 280px; padding: 15px 30px; font-size: 16px; }
.cliente-app .producto-unico-info .btn-quitar { width: auto; padding: 8px 18px; font-size: 13px; background: #fff; color: var(--rojo); border: 2px solid var(--rojo); }
.cliente-app .producto-unico-info .btn-quitar:hover { background: var(--rojo); color: #fff; }
.cliente-app .producto-unico-info .btn-secundario { background: #fff; color: var(--marron); padding: 11px 24px; font-size: 14px; border: 2px solid var(--marron); }
.cliente-app .producto-unico-info .btn-secundario:hover { background: var(--marron); color: #fff; }
.selector-cantidad { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.selector-cantidad select, .selector-cantidad input { width: 180px; padding: 12px 14px; font-size: 18px; font-weight: 700; text-align: center; text-align-last: center; color: var(--marron); background: #fff; border: 2px solid var(--naranja); border-radius: 12px; font-family: inherit; }
.cliente-app .producto-unico-info input[type=number].js-cantidad-otra { width: 180px; margin: 0; display: block; }
.cliente-topbar-titulo { flex: 1; min-width: 0; margin: 0; font-size: 21px; line-height: 1.15; font-weight: 800; color: var(--naranja-oscuro); text-align: center; }
.cliente-app .cliente-contenido { padding-top: 20px; }

/* Checkout por pasos (app de clientes) */
.checkout { display: flex; flex-direction: column; gap: 16px; margin-top: 4px; }
.checkout-paso { background: #fff; border-radius: 16px; padding: 22px 18px; box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.checkout-paso h3 { font-size: 20px; color: var(--marron); margin-bottom: 14px; }
.opciones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.opcion { cursor: pointer; display: block; min-width: 0; }
.opcion input { position: absolute; opacity: 0; pointer-events: none; }
.opcion span { display: block; padding: 18px 8px; border: 2px solid #eadfd3; border-radius: 14px; background: var(--crema); font-weight: 800; font-size: 14px; line-height: 1.6; color: var(--marron); transition: all .15s; overflow-wrap: anywhere; }
.opcion span::first-line { font-size: 30px; }
.opcion input:checked + span { border-color: var(--naranja); background: #fff1e5; box-shadow: 0 0 0 3px rgba(232,122,60,.2); transform: translateY(-2px); }
.checkout-detalle { margin-top: 18px; padding-top: 16px; border-top: 1px dashed #eadfd3; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.checkout-genial { font-size: 22px; font-weight: 800; color: var(--naranja-oscuro); }
.dato-copiable { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 12px 14px; background: var(--crema); border-radius: 12px; text-align: left; }
.dato-copiable small { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--gris); }
.dato-copiable strong { font-size: 15px; word-break: break-all; }
.btn-copiar { flex-shrink: 0; padding: 8px 14px; border: none; border-radius: 20px; background: var(--naranja); color: #fff; font-weight: 700; cursor: pointer; }
.checkout-mapa { width: 100%; height: 220px; border: 0; border-radius: 12px; }
.checkout-detalle label { width: 100%; text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--gris); }
.checkout-detalle input, .checkout-detalle select, .checkout-detalle textarea { display: block; width: 100%; margin-top: 6px; padding: 12px; font-size: 16px; font-family: inherit; color: var(--marron); border: 2px solid #eadfd3; border-radius: 10px; background: #fff; text-transform: none; font-weight: 400; }
.checkout-detalle input:focus, .checkout-detalle select:focus, .checkout-detalle textarea:focus { outline: none; border-color: var(--naranja); }
.btn-confirmar { align-self: center; width: 100%; max-width: 320px; padding: 17px; font-size: 17px; }

/* Ventana de confirmación del pedido */
.modal-fondo { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-caja { width: 100%; max-width: 380px; background: #fff; border-radius: 18px; padding: 26px 22px; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.modal-caja h3 { font-size: 21px; color: var(--marron); margin-bottom: 16px; }
.modal-resumen { list-style: none; text-align: left; background: var(--crema); border-radius: 12px; padding: 6px 14px; margin-bottom: 20px; }
.modal-resumen li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed #eadfd3; font-size: 15px; }
.modal-resumen li:last-child { border-bottom: none; }
.modal-resumen span { color: var(--gris); flex-shrink: 0; }
.modal-resumen strong { text-align: right; }
.modal-botones { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.modal-botones .btn, .modal-botones .btn-secundario { width: 100%; max-width: 280px; }
.pedido-entrega { margin: 8px 0 4px; padding: 8px 12px; background: var(--crema); border-radius: 10px; font-size: 14px; }

/* Seguimiento de pedidos: etiqueta de estado + pasos con color */
.cliente-app .pedido-card { background: #fff; }
.cliente-app .pedido-head { justify-content: space-between; }
.estado-pedido { display: inline-block; padding: 6px 14px; border-radius: 20px; font-size: 13px; font-weight: 800; color: #fff; }
.estado-pendiente      { --estado: #e8902c; }
.estado-en_preparacion { --estado: #8e44c9; }
.estado-en_camino      { --estado: #d4a106; }
.estado-entregado      { --estado: #2e9e5b; }
.estado-pedido { background: var(--estado); }
.seguimiento { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 14px 0 10px; padding: 0; }
.seguimiento li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.seguimiento li::before { content: ''; position: absolute; top: 15px; right: 50%; width: 100%; height: 4px; background: #eee3d8; z-index: 0; }
.seguimiento li:first-child::before { display: none; }
.seguimiento li.hecho::before, .seguimiento li.actual::before { background: var(--estado); }
.seguimiento-punto { position: relative; z-index: 1; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; background: #eee3d8; border: 3px solid #fff; }
.seguimiento li.hecho .seguimiento-punto, .seguimiento li.actual .seguimiento-punto { background: var(--estado); }
.seguimiento li.actual .seguimiento-punto { box-shadow: 0 0 0 4px color-mix(in srgb, var(--estado) 30%, transparent); transform: scale(1.12); }
.seguimiento-texto { font-size: 11px; font-weight: 700; line-height: 1.2; color: #b5a796; }
.seguimiento li.hecho .seguimiento-texto, .seguimiento li.actual .seguimiento-texto { color: var(--marron); }
.seguimiento li.actual .seguimiento-texto { color: var(--estado); }
.cliente-app .pedido-head { flex-direction: row; align-items: center; }
.pedido-fecha { display: block; font-size: 12px; color: var(--gris); margin-top: 2px; }
.seguimiento-texto { font-size: 9.5px; padding: 0; letter-spacing: -.2px; overflow-wrap: normal; hyphens: manual; }
.opcion span small { display: block; margin-top: 4px; font-size: 11px; font-weight: 600; color: var(--gris); line-height: 1.3; }
.checkout-detalle .opcion { text-transform: none; text-align: center; color: inherit; font-size: inherit; font-weight: inherit; }
.checkout-detalle .opcion span small { text-transform: none; }

/* Ojito para ver la contraseña (js/ver-password.js) */
.campo-password { position: relative; display: flex; flex-direction: column; width: 100%; }
.campo-password input { width: 100%; padding-right: 46px !important; }
.campo-password .btn-ver-password { position: absolute; margin: 0 !important; box-shadow: none !important; min-width: 0; right: 6px; top: 50%; transform: translateY(-50%); display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: none; border-radius: 8px; background: transparent; color: var(--gris); cursor: pointer; }
.campo-password .btn-ver-password:hover { color: var(--naranja-oscuro); background: rgba(0,0,0,.04); }
.total-vivo { font-size: 18px; color: var(--marron); margin: 2px 0; }
.total-vivo strong { color: var(--naranja-oscuro); font-size: 22px; }
/* Campo de cantidad sin flechitas de subir/bajar */
.selector-cantidad input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.selector-cantidad input[type=number]::-webkit-outer-spin-button,
.selector-cantidad input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
/* En pantallas anchas el título va centrado respecto de la página (alineado con el contenido). */
@media (min-width: 700px) {
    .cliente-topbar { position: sticky; }
    .cliente-topbar-titulo { position: absolute; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 320px); pointer-events: none; }
}
/* Mi cuenta: misma columna centrada que Comprar. */
.mis-datos { text-align: center; }
.mis-datos-head { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 16px; }
.mis-datos-head h3 { margin: 0; font-size: 20px; }
.mis-datos p { margin: 6px 0; }
.cliente-centro .form-grid { grid-template-columns: 1fr; text-align: left; }
.cliente-centro .form-grid label, .cliente-centro .form-grid > div { grid-column: 1 / -1; }
/* Seguimiento: encabezado "Pedido  07/10/2026 11:16" y tarjetas dentro de la columna centrada */
.pedido-titulo { font-size: 15px; }
.pedido-titulo span { color: var(--gris); }
.pedido-titulo strong { color: var(--marron); }
.cliente-centro .pedido-card { text-align: left; }
.cliente-centro .panel > h3 { text-align: center; }

/* Transferencias Mercado Pago (admin) */
.mp-cabecera { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.mp-filtros { margin-bottom: 14px; gap: 14px; }
.mp-resumen { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; background: #009ee3; color: #fff; border-radius: 12px; padding: 14px 20px; margin-bottom: 16px; font-weight: 700; }
.mp-chip { margin-left: auto; background: rgba(255,255,255,.22); border-radius: 20px; padding: 5px 14px; font-size: 13px; }
.mp-validado { color: var(--verde); font-weight: 700; }
.mp-validar { display: flex; gap: 6px; align-items: center; justify-content: center; flex-wrap: wrap; }
.mp-validar select { padding: 6px 8px; border: 1px solid rgba(0,0,0,.15); border-radius: 8px; font-size: 13px; max-width: 280px; }
.pago-estado { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.pago-validado { background: #d9f3e0; color: var(--verde); }
.pago-pendiente { background: #fde8d2; color: #b06a12; }

/* Facturación personal / Configuración del facturador / Padrón (páginas copiadas del estudio) */
.card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,.05); margin-bottom: 20px; max-width: 860px; }
.card.card-full { max-width: none; }
.card h2 { font-size: 18px; margin: 0 0 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.form-row { margin-bottom: 12px; }
.form-row label, .etiqueta { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--gris); margin-bottom: 5px; }
.card input[type=text], .card input[type=number], .card input[type=date], .card input:not([type]), .card select, .card textarea {
    width: 100%; padding: 9px 10px; border: 1px solid rgba(0,0,0,.15); border-radius: 8px; font-family: inherit; font-size: 14px; background: #fff; color: var(--marron); }
.card input:disabled, .card select:disabled { background: #f4f1ee; color: var(--gris); }
.hint { font-size: 12px; color: var(--gris); margin: 4px 0 10px; }
.opcion-radio { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; text-transform: none; font-weight: 400; color: var(--marron); }
.opcion-radio input { width: auto; margin: 0; }
.btn.btn-sec { background: #fff; color: var(--marron); border: 2px solid var(--marron); padding: 11px 24px; }
.btn.btn-sec:hover { background: var(--marron); color: #fff; }
.btn.btn-sm { padding: 7px 14px; font-size: 13px; }
.badge.bg-green { background: #d9f3e0; color: var(--verde); }
.badge.bg-red { background: #fdd; color: var(--rojo); }
.chip-actividad { display: inline-flex; align-items: center; gap: 6px; background: #f3e9df; border-radius: 20px; padding: 5px 8px 5px 12px; font-size: 13px; }
.chip-actividad .btnQuitarActividad { background: transparent; border: none; color: var(--rojo); font-size: 16px; line-height: 1; cursor: pointer; padding: 0 2px; }
.tabla-estado td { padding: 6px 10px; border-bottom: 1px solid #f3ece4; }
.tabla-estado td:first-child { color: var(--gris); white-space: nowrap; }
@media (max-width: 720px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

/* Pedidos (admin): estados como botones, el actual relleno */
.estados-pedido { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.btn-estado { padding: 8px 14px; border-radius: 20px; border: 2px solid var(--estado); background: #fff; color: var(--estado); font-weight: 700; font-size: 13px; cursor: pointer; transition: background .15s, color .15s, opacity .15s; }
.btn-estado:hover:not(:disabled) { background: color-mix(in srgb, var(--estado) 12%, #fff); }
.btn-estado.activo { background: var(--estado); color: #fff; cursor: default; }
.btn-estado.guardando { opacity: .6; }
.btn-estado:disabled:not(.activo) { opacity: .45; cursor: default; }

/* WhatsApp en registro y Mi cuenta: prefijo fijo + área + número */
.wa-numero { display: flex; gap: 8px; align-items: center; }
.wa-numero .wa-prefijo { font-weight: 600; white-space: nowrap; color: #555; }
.wa-numero input[name="wa_area"] { flex: 0 0 5.5em; min-width: 0; }
.wa-numero input[name="wa_numero"] { flex: 1 1 auto; min-width: 0; }
.input-codigo { font-size: 1.6em; letter-spacing: .4em; text-align: center; }
.form-link { margin-top: 10px; text-align: center; }

/* Simulador del bot de WhatsApp (admin/whatsapp.php) */
.wa-sim { max-width: 460px; margin: 0 auto; border: 1px solid rgba(0,0,0,.1); border-radius: 12px; overflow: hidden; background: #efeae2; }
.wa-sim-chat { height: 380px; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.wa-sim-msg { max-width: 85%; background: #fff; padding: 8px 10px; border-radius: 8px; white-space: pre-line; font-size: 14px; align-self: flex-start; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.wa-sim-msg.propio { background: #d9fdd3; align-self: flex-end; }
.wa-sim-opciones { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.wa-sim-opciones button { border: 1px solid #25a366; background: #fff; color: #128c4b; border-radius: 16px; padding: 4px 10px; font-size: 13px; cursor: pointer; }
.wa-sim-form { display: flex; gap: 8px; padding: 8px; background: #f0f0f0; }
.wa-sim-form input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid rgba(0,0,0,.15); border-radius: 18px; }
.origen-wa { font-size: 12px; background: #d9fdd3; color: #128c4b; border-radius: 10px; padding: 2px 8px; margin-left: 6px; }
.link-privacidad { display: block; text-align: center; margin-top: 14px; font-size: 12px; color: rgba(255,255,255,.85); text-decoration: underline; }
.link-privacidad:hover { color: #fff; }
.wa-sim-msg { overflow-wrap: anywhere; } .wa-sim-msg a { color: #027eb5; }
.wa-historial { max-width: 640px; }
.wa-historial .wa-sim-chat { height: 65vh; }
.wa-dia { align-self: center; background: #fff; color: #666; font-size: 12px; padding: 2px 10px; border-radius: 8px; }
.wa-hora { text-align: right; font-size: 11px; color: #888; margin-top: 4px; }
.wa-sim-opciones span { border: 1px solid #25a366; background: #fff; color: #128c4b; border-radius: 16px; padding: 3px 10px; font-size: 12px; }
.panel-compacto { max-width: 620px; margin-left: auto; margin-right: auto; }
/* Título de sección dentro de un formulario (ej: "Variante" en admin/productos.php) */
.form-subtitulo { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--gris); }
.form-grid label.checkbox-alineado { align-self: end; padding-bottom: 10px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid input[type=file] { width: 100%; min-width: 0; }

/* Panel admin: el escritorio no muestra la barra del celular (ver css/admin-movil.css). */
.admin-topbar-movil, .admin-menu-fondo { display: none; }
/* Paneles que son solo un formulario: angostos y centrados en vez de ocupar todo el ancho. */
.admin-contenido .panel:has(> form.form-grid):not(:has(table)) { max-width: 760px; margin-left: auto; margin-right: auto; }
.admin-contenido .panel-compacto { max-width: 620px; }
.admin-contenido .panel-pedidos { max-width: 820px; margin-left: auto; margin-right: auto; }
.tarjetas-estados { grid-template-columns: repeat(5, 1fr); }
.tarjeta-estado { border: none; border-top: 4px solid #ddd; font-family: inherit; cursor: pointer; transition: transform .12s, box-shadow .12s, opacity .12s; }
.tarjeta-estado:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.tarjetas-estados.filtrando .tarjeta-estado { opacity: .45; }
.tarjetas-estados.filtrando .tarjeta-estado.activa { opacity: 1; box-shadow: 0 0 0 2px currentColor, 0 4px 12px rgba(0,0,0,.1); }
.tarjeta-estado.estado-listo_retirar { border-top-color: #2b7bb9; color: #2b7bb9; }
.tarjeta-estado.estado-listo_retirar .valor { color: #2b7bb9; }
.tarjeta-estado.estado-pendiente { border-top-color: #e8922c; color: #e8922c; }
.tarjeta-estado.estado-en_preparacion { border-top-color: #8e44c9; color: #8e44c9; }
.tarjeta-estado.estado-en_camino { border-top-color: #d4a514; color: #b88a0b; }
.tarjeta-estado.estado-entregado { border-top-color: #2e9e5b; color: #2e9e5b; }
.tarjeta-estado.estado-pendiente .valor { color: #e8922c; }
.tarjeta-estado.estado-en_preparacion .valor { color: #8e44c9; }
.tarjeta-estado.estado-en_camino .valor { color: #b88a0b; }
.tarjeta-estado.estado-entregado .valor { color: #2e9e5b; }

/* Botón de avisos push de pedidos nuevos (admin/pedidos.php) */
.avisos-push { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 0 auto 12px; text-align: center; }
.btn-avisos { border: 1px solid rgba(0,0,0,.15); background: #fff; color: var(--marron); border-radius: 999px; padding: 8px 16px; font-size: 14px; cursor: pointer; }
.btn-avisos.activo { background: #e7f6ec; border-color: #2e9d57; color: #1f6b3b; }
.btn-avisos:disabled { opacity: .6; cursor: wait; }


/* Simulador de bot (admin/simulador_bot.php): teléfono con el chat al estilo WhatsApp. */
.sim-layout { display: flex; gap: 20px; align-items: flex-start; justify-content: center; flex-wrap: wrap; }
.sim-telefono { position: relative; width: 100%; max-width: 400px; height: 680px; max-height: calc(100vh - 140px); min-height: 460px; display: flex; flex-direction: column; border-radius: 28px; overflow: hidden; background: #efeae2; border: 8px solid #1f1f1f; box-shadow: 0 12px 30px rgba(0,0,0,.18); }
.sim-cabecera { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #075e54; color: #fff; }
.sim-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: contain; background: #fff; padding: 2px; }
.sim-cabecera-texto { display: flex; flex-direction: column; line-height: 1.2; }
.sim-cabecera-texto span { font-size: 12px; opacity: .85; }
.sim-chat { flex: 1; overflow-y: auto; padding: 12px 10px; display: flex; flex-direction: column; gap: 6px;
    background-color: #efeae2; background-image: radial-gradient(rgba(0,0,0,.035) 1px, transparent 1px); background-size: 14px 14px; }
.sim-aviso { align-self: center; background: #fdf4c5; color: #54656f; font-size: 12px; padding: 5px 10px; border-radius: 8px; margin-bottom: 6px; text-align: center; }
.sim-msg { max-width: 82%; align-self: flex-start; background: #fff; border-radius: 0 8px 8px 8px; box-shadow: 0 1px .5px rgba(0,0,0,.13); font-size: 14px; color: #111b21; overflow: hidden; }
.sim-msg.propio { align-self: flex-end; background: #d9fdd3; border-radius: 8px 0 8px 8px; }
.sim-msg-texto { padding: 6px 9px 4px; white-space: pre-line; overflow-wrap: anywhere; }
.sim-msg-texto a { color: #027eb5; }
.sim-msg-hora { float: right; margin: 6px 0 -2px 10px; font-size: 11px; color: #667781; }
.sim-msg.propio .sim-msg-hora { color: #53bdeb; }
.sim-msg.sim-msg-sistema { align-self: center; background: #e1f2fb; font-size: 12px; border-radius: 8px; }
.sim-boton { display: block; width: 100%; border: 0; border-top: 1px solid #e9edef; background: transparent; color: #027eb5; padding: 9px 8px; font-size: 14px; cursor: pointer; }
.sim-boton:hover { background: #f5f6f6; }
.sim-form { display: flex; gap: 6px; padding: 7px; background: #f0f2f5; }
.sim-form input { flex: 1; min-width: 0; border: 0; border-radius: 22px; padding: 10px 14px; font-size: 15px; background: #fff; outline: none; }
.sim-enviar { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: #00a884; color: #fff; font-size: 18px; cursor: pointer; }
.sim-enviar:hover { background: #008f72; }
.sim-hoja { position: absolute; left: 0; right: 0; bottom: 0; max-height: 70%; display: flex; flex-direction: column; background: #fff; border-radius: 16px 16px 0 0; box-shadow: 0 -6px 20px rgba(0,0,0,.2); z-index: 2; }
.sim-hoja[hidden] { display: none; }
.sim-hoja-titulo { display: flex; align-items: center; gap: 10px; padding: 12px 14px; font-weight: 700; border-bottom: 1px solid #e9edef; }
.sim-hoja-titulo button { border: 0; background: none; font-size: 16px; cursor: pointer; color: #54656f; }
.sim-hoja-opciones { overflow-y: auto; }
.sim-hoja-opciones button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid #f0f2f5; background: #fff; padding: 13px 16px; font-size: 14px; cursor: pointer; }
.sim-hoja-opciones button:hover { background: #f5f6f6; }
.sim-lateral { flex: 1 1 260px; max-width: 360px; }
.sim-lateral .btn, .sim-lateral .btn-secundario { width: 100%; margin: 4px 0 10px; }
@media (max-width: 900px) { .sim-telefono { border-width: 0; border-radius: 12px; height: 72vh; max-height: none; } .sim-lateral { max-width: none; } }
.sim-lateral .sim-forzar[aria-pressed="true"] { background: var(--verde); border-color: var(--verde); color: #fff; }
/* Sin esto los mensajes se achican para entrar en el alto del chat en vez de deslizar. */
.sim-chat > * { flex-shrink: 0; }
.sim-chat { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
/* Historial de mensajes (admin/historial_mensajes.php): mismo teléfono que el simulador, solo lectura. */
.sim-layout-columna { flex-direction: column; align-items: center; }
.hist-selector { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 4px; }
.hist-selector label { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--gris); }
.hist-selector select { width: 100%; padding: 10px; border-radius: 10px; border: 1px solid rgba(0,0,0,.15); font-size: 14px; background: #fff; }
.hist-avatar { display: flex; align-items: center; justify-content: center; color: #075e54; font-weight: 700; font-size: 18px; }
.hist-dia { background: #fff; }
.hist-boton { text-align: center; cursor: default; }
.hist-boton:hover { background: transparent; }
.hist-error { padding: 4px 9px 6px; font-size: 12px; color: var(--rojo); }
/* Pedidos: hora en que se tocó cada estado y demora total. */
.estado-con-hora { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.estado-con-hora .btn-estado { width: 100%; }
.estado-hora { font-size: 11px; color: var(--gris); min-height: 14px; }
.demora-pedido { margin: 8px 0 0; font-size: 14px; }

/* Pedidos: botón "Cobrado" (aparte de los estados) y enlace a Google Maps */
.btn-cobrado { --estado: #2e7d32; }
.btn-mapa { display: inline-block; margin-left: 6px; padding: 3px 10px; border-radius: 14px; background: #e8f0fe; color: #1a56c4; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.btn-mapa:hover { background: #d2e3fc; }

/* Pedidos: demorado (pasó PEDIDO_DEMORA_MINUTOS y todavía no salió) */
.pedido-card.pedido-demorado { border: 2px solid #d32f2f; background: #fff5f5; }
.aviso-demora { margin: 0 0 8px; padding: 6px 10px; border-radius: 8px; background: #d32f2f; color: #fff; font-weight: 700; font-size: 13px; }

/* ══════════ Pulido visual del panel admin (todas las páginas) ══════════ */
.admin-body { background: #f5efe7; -webkit-font-smoothing: antialiased; }
/* Menú fijo al hacer scroll en escritorio */
@media (min-width: 901px) {
    .admin-menu { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
}
.admin-contenido { padding: 24px 32px 40px; }
.admin-contenido > * { max-width: 1400px; margin-left: auto; margin-right: auto; }
.admin-header { margin-bottom: 22px; padding-bottom: 14px; border-bottom: 1px solid rgba(90,61,43,.1); }
.admin-header h1 { font-size: 24px; font-weight: 800; letter-spacing: -.3px; }
.admin-usuario { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; background: #fff; border-radius: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.06); font-weight: 600; color: var(--marron); }
.admin-usuario::before { content: '👤'; font-size: 12px; }

.panel, .card, .tarjeta { border: 1px solid rgba(90,61,43,.07); box-shadow: 0 1px 2px rgba(90,61,43,.04), 0 4px 14px rgba(90,61,43,.05); border-radius: 14px; }
.panel { padding: 20px 22px; }
.panel h2, .card h2 { font-size: 17px; font-weight: 800; color: var(--marron); }
.tarjeta { padding: 16px 14px; transition: transform .12s, box-shadow .12s; }
.tarjeta .valor { font-size: 28px; letter-spacing: -.5px; }
.tarjeta .etiqueta { font-size: 11.5px; font-weight: 700; letter-spacing: .03em; }

/* Tablas: encabezado con fondo, filas con hover, números alineados */
.tabla { border-collapse: separate; border-spacing: 0; }
.tabla th { background: #faf6f1; color: #8a7565; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid rgba(90,61,43,.1); white-space: nowrap; }
.tabla th:first-child { border-top-left-radius: 10px; }
.tabla th:last-child { border-top-right-radius: 10px; }
.tabla td { padding: 10px 12px; border-bottom: 1px solid rgba(90,61,43,.06); font-variant-numeric: tabular-nums; vertical-align: middle; }
.tabla tbody tr { transition: background .1s; }
.tabla tbody tr:hover td { background: #fdf9f4; }
.tabla tbody tr:last-child td { border-bottom: none; }

/* Campos: borde suave, foco naranja */
.admin-contenido input:not([type=checkbox]):not([type=radio]):not([type=file]), .admin-contenido select, .admin-contenido textarea { border: 1px solid rgba(90,61,43,.18); border-radius: 9px; background: #fff; color: var(--marron); transition: border-color .15s, box-shadow .15s; }
.admin-contenido input:not([type=checkbox]):not([type=radio]):not([type=file]):focus, .admin-contenido select:focus, .admin-contenido textarea:focus { outline: none; border-color: var(--naranja); box-shadow: 0 0 0 3px rgba(232,122,60,.18); }
.admin-contenido input[type=checkbox], .admin-contenido input[type=radio] { accent-color: var(--naranja-oscuro); width: 16px; height: 16px; }
.form-grid { gap: 16px 18px; }
.form-grid label { letter-spacing: .03em; font-size: 11.5px; }

/* Botones: un poco más compactos y con sombra suave */
.admin-contenido .btn { padding: 11px 24px; border-radius: 10px; box-shadow: 0 2px 6px rgba(90,61,43,.18); }
.admin-contenido .btn:hover { transform: translateY(-1px); }
.admin-contenido .btn-secundario { padding: 9px 20px; border-radius: 10px; border-width: 1.5px; }
.filtros a { background: #fff; border: 1px solid rgba(90,61,43,.12); font-weight: 600; transition: background .15s, color .15s; }
.filtros a:hover { background: #fdf3ea; }
.filtros a.activo { border-color: var(--naranja-oscuro); }
.alert { border-radius: 10px; border-left-width: 4px; padding: 12px 16px; font-weight: 600; }
.tabla td[colspan] { padding: 22px 12px; text-align: center; color: var(--gris); font-style: italic; }
.panel > p.notas { margin: -4px 0 14px; text-align: center; }
.pedido-card { background: #fff; border-color: rgba(90,61,43,.1); border-radius: 12px; box-shadow: 0 1px 3px rgba(90,61,43,.05); }

/* Pedidos: chat a mano con el cliente (solo admin) */
.btn-escribir { --estado: #128c4b; }
.chat-modal[hidden] { display: none; }
.chat-caja { width: 100%; max-width: 440px; height: min(640px, 90vh); display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #efeae2; box-shadow: 0 16px 50px rgba(0,0,0,.35); }
.chat-caja .sim-cabecera { justify-content: space-between; }
.chat-cerrar { border: 0; background: rgba(255,255,255,.15); color: #fff; width: 34px; height: 34px; border-radius: 50%; font-size: 16px; cursor: pointer; }
.sim-msg.chat-bot { background: #eef6ff; opacity: .85; }
.chat-adjuntar { width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 20px; cursor: pointer; }
.chat-adjuntar:hover { background: #e2e5e8; }
.chat-foto { display: block; max-width: 240px; max-height: 280px; width: auto; height: auto; margin: 4px 4px 0; border-radius: 6px; }
.chat-archivo { display: block; padding: 8px 10px 0; font-weight: 600; color: #027eb5; }
.chat-aviso { margin: 0; padding: 8px 12px; background: #fdf4c5; color: #7a5b00; font-size: 13px; text-align: center; }
@media (max-width: 600px) { .chat-modal { padding: 0; } .chat-caja { max-width: none; height: 100%; border-radius: 0; } }

/* Portada y login: fondo con degradé y caja más presente */
.login-body { background: radial-gradient(circle at 50% 20%, #e0793d 0%, var(--naranja-oscuro) 55%, #a94c1c 100%); }
.login-body .box { border-radius: 20px; box-shadow: 0 20px 50px rgba(60,25,5,.3); }
.login-body .logo-login { filter: drop-shadow(0 8px 18px rgba(0,0,0,.25)); }
@media (min-width: 1700px) {
    .login-wrap { max-width: 560px; }
    .logo-login { width: 380px; }
    .login-body .box { padding: 40px; font-size: 17px; }
}

/* 2K: más aire y letra apenas más grande */
@media (min-width: 2000px) {
    .admin-body { font-size: 15.5px; }
    .admin-menu { width: 250px; }
    .admin-menu .menu-item { font-size: 15px; padding: 11px 14px; }
    .menu-grupo-links a { font-size: 14.5px; }
    .admin-contenido { padding: 32px 48px 48px; }
    .admin-contenido > * { max-width: 1600px; }
    .admin-header h1 { font-size: 28px; }
    .tabla th, .tabla td { font-size: 14.5px; padding: 12px 14px; }
}

/* Botón para reanudar el bot en la cabecera del chat */
.chat-reanudar-form { margin-left: auto; }
.chat-reanudar { margin-left: auto; background: #fff; color: #075e54; border: 0; border-radius: 16px; padding: 6px 12px; font-size: .85rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.chat-reanudar:hover { background: #e8f5e9; }
.chat-reanudar-form .chat-reanudar { margin-left: 0; }

/* ===== Página WhatsApp (admin/whatsapp.php): estilo WhatsApp Web ===== */
.wa-app { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; height: 640px; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.08); border: 1px solid #e3e3e3; font-family: "Segoe UI", Helvetica, Arial, sans-serif; }
.wa-lista { display: flex; flex-direction: column; border-right: 1px solid #e9edef; min-height: 0; background: #fff; }
.wa-lista-cab { padding: 14px 16px; background: #f0f2f5; font-size: 1.15rem; color: #111b21; }
.wa-buscar { padding: 8px 12px; border-bottom: 1px solid #e9edef; }
.wa-buscar input { width: 100%; box-sizing: border-box; border: 0; background: #f0f2f5; border-radius: 8px; padding: 9px 12px; font-size: .92rem; outline: none; }
.wa-chats { flex: 1; overflow-y: auto; }
.wa-vacio { padding: 30px 16px; text-align: center; color: #667781; }
.wa-item { display: flex; gap: 12px; align-items: center; width: 100%; padding: 0 0 0 14px; border: 0; border-radius: 0; background: #fff; cursor: pointer; text-align: left; font: inherit; color: inherit; box-shadow: none; }
.wa-item:hover { background: #f5f6f6; transform: none; }
.wa-item.activo { background: #f0f2f5; }
.wa-item-cuerpo { flex: 1; min-width: 0; padding: 12px 14px 12px 0; border-bottom: 1px solid #e9edef; display: flex; flex-direction: column; gap: 3px; }
.wa-item-fila { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.wa-item-nombre { font-size: 1rem; color: #111b21; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-item-nombre small { color: #8696a0; font-size: .75rem; }
.wa-item-hora { font-size: .75rem; color: #667781; flex-shrink: 0; }
.wa-item.sin-leer .wa-item-hora { color: #1fa855; font-weight: 600; }
.wa-item-ultimo { font-size: .87rem; color: #667781; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-item.sin-leer .wa-item-ultimo { color: #111b21; font-weight: 600; }
.wa-badge { background: #25d366; color: #fff; border-radius: 12px; min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box; font-size: .75rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.wa-punto { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #25d366; margin-right: 6px; vertical-align: middle; }
.wa-avatar { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; color: #fff; font-weight: 700; font-size: 1.15rem; display: flex; align-items: center; justify-content: center; background: #8696a0; }
.wa-tilde { color: #8696a0; font-size: .78rem; letter-spacing: -2px; margin-right: 2px; }
.wa-tilde.leido { color: #53bdeb; }
.wa-tilde.error { letter-spacing: 0; }

.wa-chat { display: flex; flex-direction: column; min-height: 0; min-width: 0; position: relative;
  background-color: #efeae2;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23e3dccf' stroke-width='1.4' stroke-linecap='round'%3E%3Ccircle cx='18' cy='20' r='7'/%3E%3Cpath d='M60 12c4-6 12-2 8 4l-8 8-8-8c-4-6 4-10 8-4z'/%3E%3Cpath d='M95 15l6 10h-12z'/%3E%3Crect x='12' y='60' width='14' height='10' rx='3'/%3E%3Cpath d='M55 62q8-10 16 0t16 0'/%3E%3Ccircle cx='100' cy='65' r='3'/%3E%3Cpath d='M20 100l6-6 6 6-6 6z'/%3E%3Cpath d='M58 98h14M65 91v14'/%3E%3Cpath d='M92 102a8 8 0 1 0 16 0'/%3E%3C/g%3E%3C/svg%3E"); }
.wa-elegir { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #667781; background: #f0f2f5; text-align: center; padding: 20px; }
.wa-elegir[hidden], .wa-chat-cab[hidden], .wa-mensajes[hidden], .wa-aviso[hidden], .wa-escribir[hidden], .wa-reanudar[hidden] { display: none; }
.wa-elegir div { font-size: 3.5rem; opacity: .5; }
.wa-chat-cab { display: flex; align-items: center; gap: 12px; padding: 9px 16px; background: #f0f2f5; border-bottom: 1px solid #e3e3e3; }
.wa-chat-cab .wa-avatar { width: 40px; height: 40px; font-size: 1rem; }
.wa-cab-texto { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.wa-cab-texto strong { color: #111b21; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-cab-texto span { color: #667781; font-size: .8rem; }
.wa-volver { display: none; border: 0; background: none; font-size: 1.5rem; cursor: pointer; color: #54656f; padding: 0 4px; box-shadow: none; }
.wa-reanudar { border: 1px solid #25d366; background: #fff; color: #008069; border-radius: 18px; padding: 6px 12px; font-size: .85rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.wa-reanudar:hover { background: #e7fce3; }
.wa-mensajes { flex: 1; overflow-y: auto; padding: 14px 6% 10px; display: flex; flex-direction: column; gap: 2px; }
.wa-dia { text-align: center; margin: 10px 0 6px; }
.wa-dia span { background: #fff; color: #54656f; font-size: .78rem; padding: 5px 12px; border-radius: 8px; box-shadow: 0 1px .5px rgba(11,20,26,.13); }
.wa-msg { max-width: min(65%, 520px); padding: 6px 8px 7px 9px; border-radius: 8px; box-shadow: 0 1px .5px rgba(11,20,26,.13); position: relative; font-size: .93rem; color: #111b21; line-height: 1.35; word-wrap: break-word; overflow-wrap: anywhere; }
.wa-msg.primero { margin-top: 8px; }
.wa-msg.ajeno { align-self: flex-start; background: #fff; }
.wa-msg.propio { align-self: flex-end; background: #d9fdd3; }
.wa-msg.ajeno.primero { border-top-left-radius: 0; }
.wa-msg.propio.primero { border-top-right-radius: 0; }
.wa-msg.ajeno.primero::before { content: ""; position: absolute; top: 0; left: -8px; border-right: 8px solid #fff; border-bottom: 10px solid transparent; }
.wa-msg.propio.primero::before { content: ""; position: absolute; top: 0; right: -8px; border-left: 8px solid #d9fdd3; border-bottom: 10px solid transparent; }
.wa-msg.pendiente { opacity: .75; }
.wa-autor { font-size: .8rem; font-weight: 600; color: #008069; margin-bottom: 2px; }
.wa-autor.bot { color: #8e6bbf; }
.wa-texto a { color: #027eb5; }
.wa-meta { float: right; margin: 6px 0 -4px 10px; font-size: .68rem; color: #667781; white-space: nowrap; }
.wa-foto { display: block; max-width: 100%; width: 300px; max-height: 340px; object-fit: cover; border-radius: 6px; margin-bottom: 4px; }
.wa-foto.sticker { width: 150px; object-fit: contain; }
.wa-msg audio { width: 260px; max-width: 100%; display: block; margin-bottom: 2px; }
.wa-archivo { display: block; background: rgba(0,0,0,.05); padding: 10px; border-radius: 6px; margin-bottom: 4px; color: #111b21; text-decoration: none; }
.wa-botones { display: flex; flex-direction: column; margin: 6px -8px -7px -9px; border-top: 1px solid rgba(0,0,0,.08); }
.wa-botones span { text-align: center; color: #027eb5; padding: 7px; font-size: .88rem; border-bottom: 1px solid rgba(0,0,0,.05); }
.wa-botones span:last-child { border-bottom: 0; }
.wa-error { color: #c0392b; font-size: .75rem; margin-top: 3px; }
.wa-aviso { background: #f0f2f5; color: #54656f; font-size: .87rem; text-align: center; padding: 14px 16px; border-top: 1px solid #e3e3e3; }
.wa-escribir { display: flex; align-items: flex-end; gap: 8px; padding: 8px 12px; background: #f0f2f5; margin: 0; }
.wa-escribir textarea { flex: 1; resize: none; border: 0; border-radius: 8px; padding: 10px 12px; font: inherit; font-size: .95rem; line-height: 1.35; max-height: 160px; outline: none; background: #fff; box-sizing: border-box; box-shadow: none; }
.wa-adjuntar { font-size: 1.35rem; cursor: pointer; padding: 8px 4px; line-height: 1; margin: 0; }
.wa-enviar { width: 42px; height: 42px; padding: 0; border-radius: 50%; border: 0; background: #00a884; color: #fff; font-size: 1.1rem; cursor: pointer; flex-shrink: 0; }
.wa-enviar:hover { background: #008f72; }
.wa-enviar:disabled { opacity: .6; }
@media (min-width: 2000px) { .wa-app { grid-template-columns: 420px 1fr; } .wa-msg { font-size: 1rem; } }
@media (max-width: 900px) {
  .wa-app { grid-template-columns: 1fr; border-radius: 10px; }
  .wa-app .wa-chat { display: none; }
  .wa-app.con-chat .wa-lista { display: none; }
  .wa-app.con-chat .wa-chat { display: flex; }
  .wa-volver { display: block; }
  .wa-mensajes { padding: 10px 4%; }
  .wa-msg { max-width: 82%; }
  .wa-chat-cab { padding: 8px 10px; gap: 8px; }
  .wa-reanudar { padding: 5px 9px; font-size: .78rem; }
  .wa-escribir textarea { font-size: 16px; }
}
/* Barra de escribir más grande y sin flechitas de scroll */
.wa-escribir { padding: 10px 14px; gap: 10px; align-items: center; }
.wa-app .wa-escribir textarea { border: 1px solid transparent !important; min-height: 48px; padding: 13px 14px; font-size: 1rem; overflow-y: hidden; border-radius: 10px; }
.wa-app .wa-escribir textarea:focus { border-color: #00a884 !important; box-shadow: none; }
.wa-enviar { width: 48px; height: 48px; font-size: 1.25rem; }
.wa-adjuntar { font-size: 1.5rem; }

/* Responder citando (admin/whatsapp.php) */
.wa-msg { transition: transform .15s, background-color .4s; }
.wa-msg.resaltado { background-color: #fff3b0 !important; }
.wa-cita { display: flex; flex-direction: column; background: rgba(0,0,0,.05); border-left: 4px solid #06cf9c; border-radius: 6px; padding: 5px 8px; margin: 0 0 5px; font-size: .82rem; cursor: pointer; max-width: 100%; overflow: hidden; }
.wa-cita.de-cliente { border-left-color: #53bdeb; }
.wa-cita strong { color: #06a07a; font-size: .8rem; }
.wa-cita.de-cliente strong { color: #2a8fc7; }
.wa-cita span { color: #54656f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-btn-responder { position: absolute; top: 4px; width: 28px; height: 28px; padding: 0; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); color: #54656f; font-size: .95rem; cursor: pointer; opacity: 0; transition: opacity .15s; }
.wa-msg.ajeno .wa-btn-responder { right: -36px; }
.wa-msg.propio .wa-btn-responder { left: -36px; }
.wa-msg:hover .wa-btn-responder, .wa-btn-responder:focus { opacity: 1; }
@media (pointer: coarse) { .wa-btn-responder { display: none; } }
.wa-respondiendo { display: flex; align-items: center; gap: 8px; background: #f0f2f5; padding: 8px 14px 0; }
.wa-respondiendo[hidden] { display: none; }
.wa-respondiendo .wa-cita { flex: 1; margin: 0; background: #fff; cursor: default; }
.wa-respondiendo button { border: 0; background: none; font-size: 1.1rem; color: #54656f; cursor: pointer; padding: 4px 6px; box-shadow: none; }

/* Pedido manual (admin/pedidos.php → Nuevo pedido) */
.nuevo-pedido-barra { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.origen-manual { background: #fff1d6; color: #9a5b00; }
#npModal { align-items: flex-start; overflow-y: auto; padding: 24px 12px; }
#npModal[hidden] { display: none; }
.np-caja { background: #fff; border-radius: 14px; width: 100%; max-width: 560px; margin: 0 auto; box-shadow: 0 10px 40px rgba(0,0,0,.25); display: flex; flex-direction: column; }
.np-cab { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid #eee; font-size: 1.1rem; }
.np-cab .chat-cerrar { color: #555; }
.np-cuerpo { padding: 12px 18px; display: flex; flex-direction: column; gap: 12px; }
.np-cuerpo fieldset { border: 1px solid #eadfd5; border-radius: 10px; padding: 10px 12px 12px; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.np-cuerpo legend { font-weight: 700; padding: 0 6px; }
.np-cuerpo label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.np-cuerpo input[type=text], .np-cuerpo input[type=tel], .np-cuerpo input[type=search], .np-cuerpo input[type=number], .np-cuerpo select { width: 100%; box-sizing: border-box; }
.np-fila { display: flex; gap: 10px; }
.np-fila > label { flex: 1; min-width: 0; }
.np-fila > .np-cant { flex: 0 0 110px; }
.np-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.np-tabs label { flex-direction: row; align-items: center; gap: 6px; background: #f6f1ec; border-radius: 20px; padding: 6px 12px; cursor: pointer; }
.np-tabs label:has(input:checked) { background: #5a3d2b; color: #fff; }
.np-tabs input { margin: 0; }
.np-resultados { display: flex; flex-direction: column; }
.np-resultados button { display: flex; justify-content: space-between; gap: 10px; text-align: left; background: #fff; border: 0; border-bottom: 1px solid #f0e8e0; padding: 9px 6px; cursor: pointer; color: inherit; font: inherit; border-radius: 0; box-shadow: none; }
.np-resultados button:hover { background: #faf5f0; transform: none; }
.np-resultados span { color: #888; font-size: .85rem; }
.np-sin { color: #888; font-size: .88rem; padding: 8px 4px; }
.np-elegido { background: #e9f7ee; border-radius: 8px; padding: 9px 10px; font-size: .92rem; }
.np-elegido button { margin-left: 8px; font-size: .8rem; padding: 3px 10px; }
.np-ayuda { color: #888; }
.np-avisar { flex-direction: row !important; align-items: center; gap: 8px !important; }
.np-pie { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid #eee; position: sticky; bottom: 0; background: #fff; border-radius: 0 0 14px 14px; }
.np-total { font-size: 1.1rem; }
@media (max-width: 600px) { .np-fila { flex-direction: column; } .np-fila > .np-cant { flex: 1; } #npModal { padding: 0; } .np-caja { border-radius: 0; min-height: 100%; } }

/* Nuevo pedido como página propia (admin/pedido_nuevo.php): ancho de pantalla, campos grandes */
.np-pagina .np-caja { width: 100%; max-width: 1400px; box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.np-pagina .np-cab { padding: 12px 22px; }
.np-volver { color: #5a3d2b; text-decoration: none; font-weight: 600; font-size: .95rem; }
.np-pagina .np-cuerpo { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 20px 22px; }
.np-pagina .np-cuerpo fieldset:first-child { grid-column: 1 / -1; }
.np-pagina .np-avisar { grid-column: 1 / -1; }
.np-pagina .np-cuerpo label { font-size: 1rem; font-weight: 600; color: #5a3d2b; }
.np-pagina .np-cuerpo label small { font-weight: 400; color: #888; }
.np-pagina .np-cuerpo input[type=text], .np-pagina .np-cuerpo input[type=tel], .np-pagina .np-cuerpo input[type=search],
.np-pagina .np-cuerpo input[type=number], .np-pagina .np-cuerpo select {
  height: 48px; padding: 10px 14px; font-size: 1rem; font-weight: 400; color: #333; border: 1px solid #d9c9bb; border-radius: 10px; background: #fff; }
.np-pagina .np-cuerpo input:focus, .np-pagina .np-cuerpo select:focus { outline: none; border-color: #5a3d2b; box-shadow: 0 0 0 3px rgba(90,61,43,.12); }
.np-pagina .np-tabs label { font-size: 1rem; padding: 10px 18px; color: #5a3d2b; }
.np-pagina .np-tabs label:has(input:checked) { color: #fff; }
.np-pagina .np-resultados button { padding: 12px 10px; font-size: 1rem; }
.np-pagina .np-elegido { font-size: 1rem; padding: 12px 14px; }
.np-pagina .np-pie { padding: 16px 22px; }
.np-pagina .np-total { font-size: 1.35rem; }
.np-pagina #npGuardar { font-size: 1.05rem; padding: 14px 30px; }
@media (min-width: 2000px) { .np-pagina .np-caja { max-width: 1800px; } }
@media (max-width: 900px) { .np-pagina .np-cuerpo { grid-template-columns: 1fr; padding: 14px; } .np-pagina .np-caja { border-radius: 10px; min-height: 0; } }

/* Pedidos: avisos centrados y "Nuevo pedido" a la derecha, en la misma fila */
.barra-pedidos { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-bottom: 12px; }
.barra-pedidos .avisos-push { grid-column: 2; margin: 0; }
.barra-pedidos .btn-nuevo-pedido { grid-column: 3; justify-self: end; }
@media (max-width: 700px) { .barra-pedidos { grid-template-columns: 1fr; } .barra-pedidos .avisos-push, .barra-pedidos .btn-nuevo-pedido { grid-column: 1; justify-self: center; } }

/* Productos: listado ancho (1080/2K) y tarjetas en el celular */
.admin-contenido .prod-lista { max-width: 1000px; margin-left: auto; margin-right: auto; }
.prod-tabla { width: 100%; }
.prod-tabla td, .prod-tabla th { padding: 12px 10px; }
.prod-tabla td[data-label="Producto"] { font-weight: 600; }
@media (min-width: 2000px) { .admin-contenido .prod-lista { max-width: 1300px; } .prod-tabla { font-size: 1.1rem; } }
@media (max-width: 700px) {
  .admin-contenido .prod-lista { padding: 14px 10px; }
  .prod-tabla thead { display: none; }
  .prod-tabla, .prod-tabla tbody, .prod-tabla tr, .prod-tabla td { display: block; width: 100%; }
  .prod-tabla tr { border: 1px solid #eadfd4; border-radius: 12px; padding: 8px 12px; margin-bottom: 12px; background: #fff; }
  .prod-tabla td { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: right; padding: 7px 0; border: 0; border-bottom: 1px solid #f3ece5; }
  .prod-tabla td::before { content: attr(data-label); font-size: .75rem; font-weight: 700; text-transform: uppercase; color: #8a7565; text-align: left; flex-shrink: 0; }
  .prod-tabla td[data-label="Producto"] { justify-content: center; text-align: center; font-size: 1.05rem; }
  .prod-tabla td[data-label="Producto"]::before { display: none; }
  .prod-tabla td.prod-acc { justify-content: center; border-bottom: 0; padding-top: 10px; }
}

.prod-final { border-top: 1px solid rgba(0,0,0,.07); padding-top: 12px; }
.prod-final .tabla { width: 100%; margin-top: 6px; }

/* Inputs numéricos sin flechitas (ej: tope de la IA) */
.sin-flechas::-webkit-outer-spin-button, .sin-flechas::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sin-flechas { -moz-appearance: textfield; appearance: textfield; }

/* WhatsApp: borrar conversación de prueba (solo admin) */
.wa-borrar { background: none; border: 1px solid #e3b7b7; color: #c62828; border-radius: 18px; padding: 5px 10px; cursor: pointer; font-size: 1rem; margin-left: 6px; }
.wa-borrar:hover { background: #fdecea; }
.wa-borrar:disabled { opacity: .5; cursor: wait; }

/* ===== IA del bot (admin/ia_bot.php) ===== */
.ia-pagina { max-width: 1100px; margin: 0 auto; }
.ia-estado-cartel { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 12px; font-weight: 600; margin-bottom: 16px; }
.ia-estado-cartel span { font-size: 1.3rem; }
.ia-est-activada { background: #e8f5e9; color: #1b5e20; }
.ia-est-prueba   { background: #fff8e1; color: #8a5a00; }
.ia-est-apagada  { background: #f1f1f1; color: #555; }
.ia-est-alerta   { background: #fdecea; color: #b71c1c; }
.ia-tarjetas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.ia-tarjeta { background: #fff; border-radius: 14px; padding: 16px 18px; box-shadow: 0 2px 10px rgba(0,0,0,.05); display: flex; flex-direction: column; gap: 4px; text-align: center; }
.ia-tarjeta span { font-size: .85rem; color: #8a7565; font-weight: 600; }
.ia-tarjeta strong { font-size: 1.6rem; color: #5a3d2b; line-height: 1.2; }
.ia-tarjeta small { font-size: .78rem; color: #999; }
.ia-panel h2 { margin: 0 0 10px; }
.ia-tope-barra { height: 12px; background: #f1ebe5; border-radius: 6px; overflow: hidden; }
.ia-tope-relleno { height: 100%; border-radius: 6px; transition: width .3s; }
.ia-verde { background: #43a047; } .ia-naranja { background: #fb8c00; } .ia-rojo { background: #e53935; }
.ia-tope-texto { text-align: center; margin: 6px 0 16px; font-size: .9rem; color: #666; }
.ia-estados { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 0 0 14px; }
.ia-estado-btn { border: 2px solid #e2d6ca; background: #fff; color: #5a3d2b; border-radius: 12px; padding: 12px 22px; font-size: 1rem; font-weight: 600; cursor: pointer; min-width: 150px; }
.ia-estado-btn:hover { border-color: #5a3d2b; }
.ia-estado-btn.activo { color: #fff; cursor: default; }
.ia-on-activada { background: #2e7d32; border-color: #2e7d32; }
.ia-on-prueba   { background: #c77800; border-color: #c77800; }
.ia-on-apagada  { background: #757575; border-color: #757575; }
.ia-tope-form { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; font-size: .92rem; }
.ia-tope-form label { margin: 0; font-weight: 600; color: #5a3d2b; }
.ia-tope-form input { width: 90px; text-align: center; height: 38px; }
.ia-ayuda { text-align: center; margin: 14px 0 0; }
.ia-lista-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ia-lista-cab h2 { margin: 0; }
.ia-filtros { display: flex; gap: 6px; }
.ia-filtros button { border: 1px solid #e2d6ca; background: #fff; border-radius: 18px; padding: 6px 14px; cursor: pointer; font-size: .88rem; color: #5a3d2b; }
.ia-filtros button.activo { background: #5a3d2b; color: #fff; border-color: #5a3d2b; }
.ia-lista { display: flex; flex-direction: column; gap: 10px; }
.ia-item { border: 1px solid #eee3d8; border-left: 5px solid #cfc3b8; border-radius: 12px; padding: 12px 16px; background: #fffdfb; }
.ia-item-aviso   { border-left-color: #fb8c00; }
.ia-item-urgente { border-left-color: #e53935; background: #fff8f7; }
.ia-item-error   { border-left-color: #9e9e9e; background: #f7f7f7; }
.ia-item header { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.ia-item header a { font-weight: 700; color: #5a3d2b; text-decoration: none; }
.ia-item header a:hover { text-decoration: underline; }
.ia-item-meta { font-size: .82rem; color: #999; }
.ia-item p { margin: 4px 0; line-height: 1.4; }
.ia-cliente { color: #555; font-style: italic; }
.ia-respuesta { color: #1b5e20; }
.ia-error { color: #757575; font-size: .9rem; }
.ia-aviso { color: #b45f00; font-size: .92rem; }
.ia-item-urgente .ia-aviso { color: #c62828; }
.ia-vacio-filtro { text-align: center; }
.ia-meses { width: 100%; }
.ia-pie { text-align: center; margin: 4px 0 20px; }
@media (min-width: 2000px) { .ia-pagina { max-width: 1400px; } .ia-tarjeta strong { font-size: 2rem; } }
@media (max-width: 900px) {
  .ia-tarjetas { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .ia-tarjeta { padding: 12px; } .ia-tarjeta strong { font-size: 1.25rem; }
  .ia-estado-btn { flex: 1 1 100%; min-width: 0; }
  .ia-lista-cab { flex-direction: column; align-items: stretch; } .ia-filtros { justify-content: center; }
}

/* Nuevo pedido: búsqueda de cliente + botón para ver la lista completa */
.np-buscar-fila { display: flex; gap: 8px; align-items: stretch; }
.np-buscar-fila[hidden] { display: none; }
.np-buscar-fila input { flex: 1; min-width: 0; }
.np-btn-clientes { flex-shrink: 0; border: 1px solid #d9c9bb; background: #fff; color: #5a3d2b; font-weight: 700; border-radius: 10px; padding: 0 16px; cursor: pointer; font-size: .95rem; white-space: nowrap; }
.np-btn-clientes:hover, .np-btn-clientes.activo { background: #5a3d2b; color: #fff; border-color: #5a3d2b; }
.np-resultados.todos { max-height: 320px; overflow-y: auto; border: 1px solid #f0e8e0; border-radius: 10px; margin-top: 8px; }

/* Pedidos: fecha, cambiar fecha y programados */
.pedido-fecha { font-size: 12.5px; color: #8a7565; background: #f6efe8; border-radius: 10px; padding: 2px 8px; white-space: nowrap; }
.btn-fecha { border-color: #8a7565; color: #5a3d2b; }
.pedidos-programados-tit { margin: 6px 0 8px; font-size: 1.1rem; color: #5a3d2b; }
.pedidos-programados-tit small { color: #8a7565; font-weight: 600; }
.panel-programados { border: 2px dashed #e0a43a; background: #fffaf2; }
.fecha-caja { background: #fff; border-radius: 14px; padding: 20px 22px; width: min(92vw, 380px); box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.fecha-caja h3 { margin: 0 0 12px; font-size: 1.05rem; }
.fecha-caja input { width: 100%; box-sizing: border-box; padding: 10px; border: 1px solid #d9c9bb; border-radius: 10px; font: inherit; font-size: 16px; }
.fecha-botones { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
#fechaModal[hidden] { display: none; }
.btn-borrar-pedido { border-color: #d64545; color: #d64545; }
.btn-borrar-pedido:hover { background: #d64545; color: #fff; }
.cli-nota { font-size: 12.5px; color: #5a3d2b; background: #fff4d6; border-radius: 10px; padding: 2px 8px; }
.wa-nota { color: #8a7565; font-weight: 500; }
