/* ============================================================
   Cotizador Muebles El Paisa — colores corporativos
   Naranja: #cc630d  ·  Negro: #1a1a1a
   ============================================================ */

:root {
  --naranja:       #cc630d;
  --naranja-osc:   #a54f0a;
  --naranja-claro: #e07a1f;
  --naranja-bg:    #fdf3e9;
  --negro:         #1a1a1a;
  --crema:         #f7f3ee;
  --crema-2:       #fbf8f4;
  --tinta:         #2b2620;
  --gris:          #8a8074;
  --linea:         #e6ddd0;
  --verde:         #3f7d4e;
  --verde-bg:      #e7f2e9;
  --rojo:          #b23b3b;
  --rojo-bg:       #f7e6e6;
  --ambar-bg:      #fdf0da;
  --ambar-tx:      #96601a;
  --sombra:        0 2px 12px rgba(120, 70, 20, 0.09);
  --radio:         12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--crema);
  color: var(--tinta);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--naranja); }

/* ---------- Autenticación unificada (split: logo a la izquierda + formulario) ---------- */
.lg-body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: #fff; }
.lg-split { flex: 1; display: flex; min-height: 0; }
.lg-foto { flex: 1 1 50%; background: var(--naranja-bg); display: flex; align-items: center; justify-content: center; padding: 40px; min-height: 320px; }
.lg-marca { text-align: center; }
.lg-foto img { width: 82%; max-width: 460px; height: auto; display: block; margin: 0 auto; }
.lg-tagline { margin: 24px 0 0; color: var(--naranja); font-size: 20px; font-style: italic; letter-spacing: .3px; }
.lg-panel { flex: 1 1 50%; display: flex; align-items: center; justify-content: center; padding: 40px 32px; }
.lg-box { width: 100%; max-width: 420px; }
.lg-titulo { font-size: 28px; font-weight: 800; color: var(--negro); margin: 0 0 14px; line-height: 1.2; }
.lg-sub { color: var(--gris); margin: 0 0 22px; }
.lg-linea { width: 96px; height: 5px; border-radius: 3px; background: var(--naranja); margin-bottom: 24px; }
.lg-lbl { display: block; font-size: 14px; color: var(--tinta); margin: 18px 0 6px; }
.lg-input { width: 100%; padding: 13px 14px; font-size: 15px; border: 1px solid var(--linea); border-radius: 8px; background: var(--crema-2); color: var(--tinta); outline: none; transition: border-color .15s, box-shadow .15s; }
.lg-input:focus { border-color: var(--naranja); box-shadow: 0 0 0 3px rgba(204,99,13,.15); background: #fff; }
.lg-btn { border: none; cursor: pointer; font-weight: 700; font-size: 15px; border-radius: 24px; padding: 13px 30px; background: var(--naranja); color: #fff; transition: background .15s; width: 100%; margin-top: 22px; }
.lg-btn:hover { background: var(--naranja-osc); }
.lg-ayuda { display: block; font-size: 12.5px; color: var(--gris); margin-top: 6px; }
.lg-enlaces { margin-top: 20px; font-size: 14px; text-align: center; }
.lg-enlaces a { color: var(--naranja); text-decoration: none; }
.lg-enlaces a:hover { text-decoration: underline; }
.lg-foot { text-align: center; padding: 14px; background: var(--negro); color: #cfc8bf; font-size: 12px; }
.lg-alerta { border-radius: 8px; padding: 12px 14px; font-size: 14px; margin-bottom: 16px; }
.lg-alerta-error { background: var(--rojo-bg); color: var(--rojo); }
.lg-alerta-ok { background: var(--verde-bg); color: var(--verde); }
.lg-alerta-info { background: var(--ambar-bg); color: var(--ambar-tx); }
@media (max-width: 840px) {
  .lg-split { flex-direction: column; }
  .lg-foto { flex: none; min-height: 130px; padding: 22px; }
  .lg-foto img { width: auto; max-width: 60%; max-height: 92px; }
  .lg-tagline { font-size: 15px; margin-top: 10px; }
  .lg-panel { padding: 28px 20px; }
  .lg-titulo { font-size: 24px; }
}

/* ---------- Autenticación (login, registro) — estilo antiguo ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 430px; background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); overflow: hidden; }
.auth-head { background: #fff; padding: 28px 28px 22px; text-align: center; border-bottom: 3px solid var(--naranja); }
.auth-logo { max-width: 210px; height: auto; margin: 0 auto 6px; display: block; }
.auth-head .marca { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--naranja); margin: 0 0 6px; font-weight: 700; }
.auth-head h1 { font-size: 21px; margin: 8px 0 0; font-weight: 700; color: var(--negro); }
.auth-head p { margin: 8px 0 0; font-size: 14px; color: var(--gris); }
.auth-body { padding: 26px 28px 30px; }

/* ---------- Formularios ---------- */
.campo { margin-bottom: 16px; }
.campo label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--negro); }
.campo input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--linea); border-radius: 9px; font-size: 16px; color: var(--tinta); background: var(--crema-2); transition: border-color .15s, background .15s; }
.campo input:focus { outline: none; border-color: var(--naranja); background: #fff; }

.btn { display: inline-block; width: 100%; border: none; border-radius: 9px; padding: 13px 16px; font-size: 15px; font-weight: 700; cursor: pointer; text-align: center; text-decoration: none; transition: filter .15s, transform .05s; }
.btn-primario { background: var(--naranja); color: #fff; }
.btn-primario:hover { filter: brightness(1.06); }
.btn-primario:active { transform: translateY(1px); }
.btn-secundario { background: transparent; color: var(--naranja); border: 1.5px solid var(--naranja); }
.btn:disabled { opacity: .6; cursor: default; }

.enlaces { margin-top: 18px; text-align: center; font-size: 14px; }
.enlaces a { text-decoration: none; font-weight: 600; }
.enlaces a:hover { text-decoration: underline; }
.sep { color: var(--linea); margin: 0 8px; }

/* ---------- Alertas ---------- */
.alerta { padding: 12px 14px; border-radius: 9px; font-size: 14px; margin-bottom: 18px; line-height: 1.45; }
.alerta-ok    { background: var(--verde-bg); color: var(--verde); }
.alerta-error { background: var(--rojo-bg); color: var(--rojo); }
.alerta-info  { background: var(--ambar-bg); color: var(--ambar-tx); }

/* ---------- Código de verificación ---------- */
.campo-codigo input { text-align: center; font-size: 26px; letter-spacing: 10px; font-weight: 700; }

/* ---------- Panel admin ---------- */
.admin-top { background: #fff; color: var(--negro); padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 3px solid var(--naranja); gap: 14px; }
.admin-top .titulo { font-weight: 700; font-size: 17px; display: inline-flex; align-items: center; gap: 12px; }
.admin-top .titulo { font-weight: 700; font-size: 17px; }
.admin-top a { color: var(--naranja); text-decoration: none; font-size: 14px; font-weight: 600; }
.admin-logo { height: 38px; }
.admin-main { max-width: 980px; margin: 0 auto; padding: 24px 16px 60px; }
.tarjeta { background: #fff; border-radius: var(--radio); box-shadow: var(--sombra); padding: 20px 22px; margin-bottom: 20px; }
.tarjeta h2 { font-size: 16px; margin: 0 0 14px; color: var(--negro); }
.tabla { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabla th, .tabla td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--linea); }
.tabla th { color: var(--gris); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.tabla tr:last-child td { border-bottom: none; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.pill-espera { background: var(--ambar-bg); color: var(--ambar-tx); }
.pill-ok { background: var(--verde-bg); color: var(--verde); }
.pill-no { background: var(--rojo-bg); color: var(--rojo); }
.btn-mini { display: inline-block; border: none; border-radius: 7px; padding: 7px 12px; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn-aprobar { background: var(--verde); color: #fff; }
.btn-rechazar { background: transparent; color: var(--rojo); border: 1.5px solid var(--rojo-bg); }
.vacio { color: var(--gris); font-size: 14px; padding: 12px 0; }
.badge { background: var(--naranja-bg); color: var(--naranja); padding: 3px 10px; border-radius: 20px; font-size: 12px; }

/* ---------- Barra superior del catálogo ---------- */
.topbar { background: #fff; border-bottom: 3px solid var(--naranja); }
.topbar-in { max-width: 1200px; margin: 0 auto; padding: 12px 22px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.topbar-logo { height: 46px; }
.topbar-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.topbar-nav a { color: var(--naranja); text-decoration: none; font-size: 14px; font-weight: 600; }
.topbar-nav a:hover { color: var(--naranja-osc); }
.topbar-izq { display: flex; align-items: center; gap: 18px; min-width: 0; }
.topbar-izq .topbar-logo { height: 58px; padding-right: 18px; border-right: 1px solid var(--linea); }
.topbar-inicio { display: inline-flex; align-items: center; gap: 8px; background: var(--naranja); color: #fff; text-decoration: none; font-size: 15px; font-weight: 600; padding: 11px 20px; border-radius: 12px; transition: background .15s; }
.topbar-inicio:hover { background: var(--naranja-osc); }
.topbar-inicio svg { width: 21px; height: 21px; }
.modo-oscuro .topbar-inicio { color: #fff; }
@media (max-width: 520px) {
  .topbar-izq { gap: 12px; }
  .topbar-izq .topbar-logo { height: 46px; padding-right: 12px; }
  .topbar-inicio { font-size: 14px; padding: 9px 15px; }
}
.topbar-user { color: var(--gris); font-size: 13px; }
.topbar-salir { color: var(--rojo) !important; }

.cat-wrap { max-width: 1200px; margin: 0 auto; padding: 24px 22px 80px; }
.cat-head h1 { margin: 0 0 4px; color: var(--negro); font-size: 26px; }
.cat-head p { margin: 0 0 20px; color: var(--gris); font-size: 14px; }

.cat-controles { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.cat-buscador { flex: 1 1 420px; display: flex; gap: 10px; flex-wrap: wrap; }
.buscador-caja { position: relative; flex: 1; min-width: 220px; }
.buscador-caja > svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--gris); pointer-events: none; }
.buscador-caja input { width: 100%; padding: 12px 16px 12px 44px; border: 1.5px solid var(--linea); border-radius: 999px; font-size: 15px; background: #fff; }
.buscador-caja input:focus { outline: none; border-color: var(--naranja); box-shadow: 0 0 0 3px var(--naranja-bg); }
.cat-buscador .btn { width: auto; padding-left: 28px; padding-right: 28px; border-radius: 999px; }
.cat-conteo { color: var(--gris); font-size: 13px; margin: 0 0 14px; }

.vista-toggle { display: inline-flex; background: #fff; border: 1.5px solid var(--linea); border-radius: 999px; padding: 4px; }
.vt-btn { background: transparent; border: none; color: var(--gris); padding: 8px 16px; border-radius: 999px; cursor: pointer; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; }
.vt-btn svg { width: 16px; height: 16px; }
.vt-activo { background: var(--naranja); color: #fff; }

/* ---------- Tarjetas de producto (estilo Odoo) ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.prod-card { background: #fff; border: 1px solid var(--linea); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; transition: box-shadow .15s, border-color .15s; }
.prod-card:hover { box-shadow: 0 4px 18px rgba(204,99,13,.14); border-color: var(--naranja-claro); }
.prod-agotado { opacity: .72; }
.prod-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.prod-info { flex: 1; min-width: 0; }
.prod-titulo { display: flex; gap: 6px; align-items: flex-start; }
.prod-estrella { color: var(--naranja); font-size: 15px; line-height: 1.4; flex-shrink: 0; }
.prod-nombre { margin: 0; font-size: 15px; font-weight: 700; color: var(--negro); line-height: 1.3; }
.prod-ref { display: inline-block; margin-top: 4px; font-size: 12px; color: var(--gris); }
.prod-thumb { width: 74px; height: 74px; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: var(--crema); display: flex; align-items: center; justify-content: center; border: 1px solid var(--linea); }
.prod-thumb img { width: 100%; height: 100%; object-fit: cover; }
.prod-sinfoto { font-size: 26px; opacity: .3; }
.prod-datos { display: flex; flex-direction: column; gap: 4px; }
.prod-precio { font-size: 20px; font-weight: 700; color: var(--naranja); }
.prod-disp { font-size: 13px; font-weight: 600; }
.prod-disp-ok { color: var(--verde); }
.prod-disp-agotado { color: var(--rojo); }
.prod-disp-revisar { color: var(--ambar-tx); }
.prod-agregar { display: flex; gap: 8px; align-items: center; margin-top: 2px; }
.prod-cant { width: 64px; padding: 9px; border: 1.5px solid var(--linea); border-radius: 8px; font-size: 14px; text-align: center; }
.prod-cant:focus { outline: none; border-color: var(--naranja); }
.btn-agregar { flex: 1; background: var(--naranja); color: #fff; border: none; border-radius: 8px; padding: 10px 14px; font-size: 14px; font-weight: 600; cursor: pointer; transition: filter .15s; }
.btn-agregar:hover { filter: brightness(1.06); }
.btn-agregar-off { background: #cfc6ba; cursor: default; }
.btn-agregar-off:hover { filter: none; }

/* ---------- Carrito ---------- */
.carrito { position: fixed; right: 20px; bottom: 20px; width: 320px; max-height: 72vh; background: #fff; border: 1px solid var(--linea); border-radius: 14px; box-shadow: 0 12px 40px rgba(120,60,20,.22); display: flex; flex-direction: column; z-index: 50; }
.carrito-head { padding: 14px 16px; border-bottom: 1px solid var(--linea); display: flex; justify-content: space-between; align-items: center; }
.carrito-head b { color: var(--negro); }
.carrito-head span { font-size: 12px; color: var(--gris); }
.carrito-items { padding: 10px 16px; overflow-y: auto; flex: 1; }
.carrito-vacio { color: #b8ac9c; font-size: 13px; text-align: center; padding: 16px 0; }
.carrito-item { padding: 8px 0; border-bottom: 1px solid #f3ede4; }
.ci-nombre { font-size: 12.5px; color: var(--negro); margin-bottom: 3px; }
.ci-linea { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #6a6156; }
.ci-linea b { color: var(--naranja); }
.ci-quitar { margin-left: auto; border: none; background: var(--naranja-bg); color: var(--rojo); width: 22px; height: 22px; border-radius: 50%; cursor: pointer; font-size: 15px; line-height: 1; }
.carrito-foot { padding: 14px 16px; border-top: 1px solid var(--linea); }
.carrito-total { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14px; }
.carrito-total b { color: var(--naranja); font-size: 18px; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(40,20,6,.55); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-card { background: #fff; border-radius: 14px; padding: 26px; max-width: 460px; width: 100%; }
.modal-card h2 { margin: 0 0 10px; color: var(--negro); }
.modal-resumen ul { padding-left: 18px; font-size: 14px; color: #4a4034; }
.modal-resumen li { margin: 5px 0; }
.modal-total { border-top: 1px solid var(--linea); margin-top: 12px; padding-top: 10px; font-size: 16px; text-align: right; }
.modal-total b { color: var(--naranja); }
.modal-acciones { display: flex; gap: 10px; margin-top: 20px; }
.modal-acciones .btn { flex: 1; }

/* ---------- Toast ---------- */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); padding: 12px 22px; border-radius: 10px; color: #fff; font-size: 14px; z-index: 200; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.toast-ok { background: var(--verde); }
.toast-error { background: var(--rojo); }

/* ---------- Vista tabla tipo Odoo ---------- */
.tabla-odoo-buscar { position: relative; margin-bottom: 14px; max-width: 560px; }
.tabla-odoo-buscar input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--linea); border-radius: 9px; font-size: 15px; }
.tabla-odoo-buscar input:focus { outline: none; border-color: var(--naranja); }
.tabla-sugerencias { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid var(--linea); border-radius: 0 0 10px 10px; box-shadow: 0 8px 24px rgba(120,60,20,.15); z-index: 30; max-height: 320px; overflow-y: auto; display: none; }
.sug-item { padding: 10px 14px; display: flex; justify-content: space-between; gap: 12px; cursor: pointer; font-size: 13px; border-bottom: 1px solid #f3ede4; }
.sug-item:hover { background: var(--naranja-bg); }
.sug-item b { color: var(--naranja); white-space: nowrap; }
.sug-vacio { padding: 12px 14px; color: #b8ac9c; font-size: 13px; }
.tabla-odoo { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--sombra); }
.tabla-odoo th, .tabla-odoo td { padding: 12px 14px; border-bottom: 1px solid #f0e9df; font-size: 14px; text-align: left; }
.tabla-odoo th { background: var(--crema); color: var(--negro); font-weight: 600; font-size: 12px; text-transform: uppercase; }
.tabla-odoo tfoot td { background: var(--naranja-bg); font-size: 15px; border-bottom: none; }
.tabla-odoo tfoot b { color: var(--naranja); }
.ta-center { text-align: center !important; }
.ta-right { text-align: right !important; }
.tabla-vacia-msg { color: #b8ac9c; text-align: center !important; padding: 24px !important; }
.linea-cant { width: 60px; padding: 6px; border: 1.5px solid var(--linea); border-radius: 6px; text-align: center; }
.linea-quitar { border: none; background: var(--naranja-bg); color: var(--rojo); width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 16px; }

/* ---------- Tabla cotizaciones ---------- */
.tabla-wrap { overflow-x: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .topbar-logo { height: 38px; }
  .cat-grid { grid-template-columns: 1fr; }
  .carrito { right: 10px; left: 10px; width: auto; bottom: 10px; }
}
.prod-nota { font-size: 12px; color: var(--ambar-tx); background: var(--ambar-bg); padding: 4px 8px; border-radius: 6px; margin-top: 4px; text-align: center; }

/* ===== TARJETAS CENTRADAS (rediseño 2) ===== */
.prod-card { text-align: center; align-items: center; }
.prod-top { flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.prod-thumb { width: 120px; height: 120px; order: -1; }
.prod-info { width: 100%; }
.prod-titulo { justify-content: center; }
.prod-estrella { display: none; }
.prod-datos { align-items: center; width: 100%; }
.prod-agregar { justify-content: center; width: 100%; }

/* ===== CARRITO FLOTANTE QUE NO TAPA (botón + panel) ===== */
.carrito-btn {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  background: var(--naranja); color: #fff; border: none;
  border-radius: 50px; padding: 14px 22px; font-size: 15px; font-weight: 700;
  cursor: pointer; box-shadow: 0 6px 20px rgba(204,99,13,.4);
  display: flex; align-items: center; gap: 10px;
}
.carrito-btn:hover { filter: brightness(1.05); }
.carrito-btn .cb-count {
  background: #fff; color: var(--naranja); border-radius: 50%;
  min-width: 24px; height: 24px; display: inline-flex; align-items: center;
  justify-content: center; font-size: 13px; padding: 0 4px;
}
.carrito {
  position: fixed; right: 20px; bottom: 84px; width: 340px; max-height: 70vh;
  transform: translateY(20px); opacity: 0; pointer-events: none;
  transition: transform .2s, opacity .2s;
}
.carrito.abierto { transform: translateY(0); opacity: 1; pointer-events: auto; }
.carrito-cerrar {
  background: none; border: none; color: var(--gris); font-size: 22px;
  cursor: pointer; line-height: 1; padding: 0 4px;
}
@media (max-width: 640px) {
  .carrito { right: 10px; left: 10px; width: auto; }
}
.btn-avisar { width: 100%; margin-top: 6px; background: #fff; color: var(--naranja); border: 1.5px solid var(--naranja); border-radius: 8px; padding: 9px; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-avisar:hover { background: var(--naranja-bg); }

/* ===== Peso de productos (mejora) ===== */
.prod-peso { font-size: 12.5px; color: #6a6156; margin-top: 2px; }
.ci-peso { font-size: 11.5px; color: #8a8074; margin-top: 2px; }
.carrito-peso { font-size: 13px; margin-bottom: 6px; }
.carrito-peso b { color: var(--negro); font-size: 15px; }
#tabla-peso-total { color: var(--negro); }

/* ===== Cupo de crédito del cliente (mejora) ===== */
.cupo-barra {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  padding: 10px 22px 10px 12px;
  margin: 0 0 18px;
}
.cupo-ico { width: 38px; height: 38px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; flex: none; color: #fff; }
.cupo-ico svg { width: 20px; height: 20px; }
.cupo-barra .cupo-titulo { font-size: 14.5px; font-weight: 700; }
.cupo-barra .cupo-detalle { font-size: 13px; margin-top: 2px; }
.cupo-credito { background: var(--verde-bg); color: var(--verde); }
.cupo-credito .cupo-ico { background: var(--verde); }
.cupo-credito .cupo-titulo b { color: var(--verde); }
.cupo-credito .cupo-detalle { color: #4a6b52; }
.cupo-contado { background: var(--ambar-bg); color: var(--ambar-tx); }
.cupo-contado .cupo-ico { background: var(--ambar-tx); }

/* Estado vacío / error del catálogo */
.estado-caja { background: #fff; border: 1.5px dashed var(--linea); border-radius: 16px; padding: 44px 24px; text-align: center; max-width: 520px; margin: 30px auto; }
.estado-ico { width: 62px; height: 62px; border-radius: 50%; background: var(--naranja-bg); color: var(--naranja); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.estado-ico svg { width: 28px; height: 28px; }
.estado-caja h2 { font-size: 18px; margin: 0 0 6px; color: var(--negro); }
.estado-caja p { font-size: 14px; color: var(--gris); margin: 0 0 20px; line-height: 1.5; }
.estado-btn { width: auto; padding: 10px 28px; border-radius: 999px; }

/* Cupo dentro del carrito */
.carrito-cupo {
  font-size: 12.5px;
  color: #6a6156;
  margin-bottom: 8px;
  text-align: right;
}
.carrito-cupo b { color: var(--verde); }
.carrito-aviso-cupo {
  background: var(--ambar-bg);
  color: var(--ambar-tx);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.35;
  margin-bottom: 10px;
}

/* Cupo dentro del modal de confirmación */
.modal-cupo { font-size: 14px; color: #6a6156; margin-top: 4px; }
.modal-cupo b { color: var(--verde); }
.modal-aviso-cupo {
  background: var(--ambar-bg);
  color: var(--ambar-tx);
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 12.5px;
  line-height: 1.4;
  margin-top: 10px;
}

/* ===== Mis facturas (mejora) ===== */
.facturas-lista { display: flex; flex-direction: column; gap: 14px; }
.factura-card {
  background: #fff;
  border: 1px solid #e7e0d6;
  border-radius: 12px;
  padding: 16px 18px;
}
.factura-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid #f0ebe3;
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.factura-num { font-size: 17px; font-weight: 700; color: var(--negro); }
.factura-fecha { font-size: 12.5px; color: #8a8074; margin-top: 3px; }
.factura-montos { text-align: right; }
.factura-total { font-size: 18px; font-weight: 700; color: var(--naranja); }
.factura-saldo { font-size: 12px; color: var(--rojo); margin-top: 3px; }
.factura-montos .badge { margin-top: 4px; display: inline-block; }
.badge.pago-ok { background: var(--verde-bg); color: var(--verde); }
.badge.pago-parcial { background: var(--ambar-bg); color: var(--ambar-tx); }
.badge.pago-pend { background: var(--rojo-bg); color: var(--rojo); }

.factura-docs-titulo { font-size: 12.5px; font-weight: 600; color: #6a6156; margin-bottom: 8px; }
.factura-docs-lista { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--naranja-bg);
  border: 1px solid #f0d9c0;
  border-radius: 8px;
  padding: 7px 12px;
  text-decoration: none;
  color: var(--negro);
  font-size: 13px;
  transition: background .15s, border-color .15s;
}
.doc-chip:hover { background: #fbe8d5; border-color: var(--naranja); }
.doc-chip .doc-icono { font-size: 15px; }
.doc-chip .doc-nombre { font-weight: 600; }
.doc-chip .doc-baja { color: var(--naranja); font-weight: 700; }
.factura-sindocs { font-size: 13px; color: #8a8074; }
.factura-sindocs a { font-weight: 600; }

/* ===== Impersonación de admin (mejora) ===== */
.imp-barra {
  background: #3a2e22;
  color: #f6e9d8;
  padding: 9px 18px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.imp-barra b { color: #fff; }
.imp-volver {
  color: #fff;
  background: var(--naranja);
  padding: 5px 12px;
  border-radius: 7px;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}
.imp-volver:hover { background: var(--naranja-osc); }

/* Botones de acción por cliente en el panel admin */
.acc-cliente { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.btn-entrar { background: var(--naranja); color: #fff; }
.btn-entrar:hover { background: var(--naranja-osc); }
.btn-reset { background: transparent; color: var(--tinta); border: 1.5px solid var(--linea); list-style: none; }
.btn-reset::-webkit-details-marker { display: none; }
.btn-enlace { background: var(--tinta); color: #fff; }

.acc-reset { display: inline-block; position: relative; }
.acc-reset-panel {
  margin-top: 6px;
  background: #fff;
  border: 1px solid var(--linea);
  border-radius: 10px;
  padding: 12px;
  min-width: 240px;
  box-shadow: var(--sombra);
}
.acc-reset-form { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.acc-reset-form label { font-size: 12px; color: var(--gris); font-weight: 600; }
.acc-reset-form input[type="text"] {
  border: 1px solid var(--linea);
  border-radius: 7px;
  padding: 7px 9px;
  font-size: 13px;
}
.acc-reset-o { text-align: center; font-size: 12px; color: var(--gris); margin: 6px 0; }

/* Caja del enlace de reseteo generado */
.reset-enlace { display: flex; flex-direction: column; gap: 6px; }
.reset-enlace-label { font-size: 12.5px; font-weight: 600; }
.reset-enlace-input {
  width: 100%;
  border: 1px solid var(--verde);
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 12.5px;
  background: #fff;
  color: var(--tinta);
}

/* ===== Paginación de facturas (mejora) ===== */
.fact-paginacion {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: #fff;
  border: 1px solid #e7e0d6;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.fact-paginacion-abajo { margin-top: 14px; margin-bottom: 0; justify-content: flex-end; }
.fact-rango { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fact-rango-lbl { font-size: 13px; color: #6a6156; }
.fact-rango-input {
  width: 72px;
  border: 1px solid var(--linea);
  border-radius: 7px;
  padding: 6px 8px;
  font-size: 13px;
  text-align: center;
}
.fact-nav { display: flex; align-items: center; gap: 8px; }
.fact-contador { font-size: 13px; color: var(--tinta); font-weight: 600; }
.fact-flecha {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--linea);
  background: #fff;
  color: var(--tinta);
  text-decoration: none;
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
}
.fact-flecha:hover { background: var(--naranja-bg); border-color: var(--naranja); color: var(--naranja); }
.fact-flecha-off { color: #ccc; cursor: default; background: #f7f5f1; }

/* ===== Mis cuentas (mejora) ===== */
.cuentas-tabs {
  display: inline-flex;
  background: #fff;
  border: 1.5px solid var(--linea);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 16px;
}
.cuentas-tab {
  padding: 8px 22px;
  text-decoration: none;
  color: #6a6156;
  font-weight: 600;
  font-size: 14px;
  border-radius: 999px;
}
.cuentas-tab:hover { color: var(--naranja); }
.cuentas-tab.activa { background: var(--naranja); color: #fff; }
.cuentas-tab.activa:hover { color: #fff; }

.cuentas-filtro {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid #e7e0d6;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.cf-lbl { font-size: 13px; color: #6a6156; font-weight: 600; }
.cf-fecha {
  border: 1.5px solid var(--linea);
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
}
.cf-fecha:focus { outline: none; border-color: var(--naranja); }
.cuentas-filtro .btn-mini,
.estado-botones .btn-mini { border-radius: 999px; padding: 8px 20px; }
.pago-hora { color: #a89e90; font-size: 11px; display: block; }
.pago-sinfac { color: #a89e90; font-style: italic; font-size: 12.5px; }

.estado-acciones {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.estado-desc { font-size: 13.5px; color: #6a6156; font-weight: 600; }
.estado-botones { display: flex; gap: 8px; }

.estado-resumen {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.er-item {
  flex: 1;
  min-width: 160px;
  background: #fff;
  border: 1px solid #e7e0d6;
  border-radius: 10px;
  padding: 14px 16px;
}
.er-lbl { display: block; font-size: 12.5px; color: #8a8074; margin-bottom: 4px; }
.er-val { font-size: 22px; font-weight: 700; color: var(--negro); }
.er-saldo .er-val { color: var(--rojo); }

/* ===== Menú desplegable Mis cuentas ===== */
.menu-cuentas { position: relative; display: inline-block; }
.menu-cuentas-btn { cursor: pointer; }
.menu-cuentas-lista {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #e7e0d6;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  min-width: 190px;
  z-index: 50;
  padding: 6px;
}
.menu-cuentas:hover .menu-cuentas-lista,
.menu-cuentas:focus-within .menu-cuentas-lista { display: block; }
.menu-cuentas-lista a {
  display: block;
  padding: 9px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--tinta);
  font-size: 14px;
}
.menu-cuentas-lista a:hover { background: var(--naranja-bg); color: var(--naranja); }

/* Tabla con filas clickeables */
.tabla-clic tbody tr { cursor: pointer; }
.tabla-clic tbody tr:hover { background: var(--naranja-bg); }
.cuentas-ayuda { font-size: 12.5px; color: #8a8074; margin: 0 0 8px; }

/* Libro mayor */
.mayor-inicial { background: #faf7f2; }
.mayor-venc { color: #b06a2c; }
.monto-neg { color: var(--rojo); }

/* Detalle del pago */
.pago-volver { margin-bottom: 14px; }
.pago-volver a { font-weight: 600; font-size: 13.5px; }
.pago-card {
  background: #fff;
  border: 1px solid #e7e0d6;
  border-radius: 12px;
  padding: 20px 22px;
}
.pago-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  border-bottom: 1px solid #f0ebe3;
  padding-bottom: 14px;
  margin-bottom: 16px;
}
.pago-num { font-size: 22px; font-weight: 700; color: var(--negro); margin-bottom: 6px; }
.pago-importe { font-size: 24px; font-weight: 700; color: var(--naranja); }

.pago-facturas {
  background: #faf7f2;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.pago-facturas-tit { font-size: 13px; font-weight: 700; color: #6a6156; margin-bottom: 10px; text-transform: uppercase; letter-spacing: .3px; }
.pago-facturas-lista { display: flex; flex-direction: column; gap: 8px; }
.pago-fac-chip {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid #eadfd0;
  border-radius: 8px;
  padding: 10px 14px;
}
.pfc-num { font-weight: 700; color: var(--negro); }
.pfc-montos { display: flex; flex-direction: column; gap: 2px; }
.pfc-aplicado { color: var(--verde); font-size: 13px; }
.pfc-aplicado b { color: var(--verde); }
.pfc-total { color: #8a8074; font-size: 12px; }
.pfc-fecha { color: #8a8074; font-size: 12.5px; margin-left: auto; }
.pago-sinfac { color: #8a8074; font-style: italic; font-size: 13px; }

.pago-datos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}
.pago-dato { display: flex; flex-direction: column; gap: 2px; }
.pago-dato-ancho { grid-column: 1 / -1; }
.pd-lbl { font-size: 12px; color: #8a8074; }
.pd-val { font-size: 14.5px; color: var(--negro); font-weight: 600; }
@media (max-width: 560px) { .pago-datos { grid-template-columns: 1fr; } }

/* ===== Notas crédito (mejora) ===== */
.nc-badge { background: #eddcc9; color: #9a5a1e; }

/* ===== Botón vaciar carrito (mejora) ===== */
.btn-vaciar {
  background: transparent;
  color: var(--rojo);
  border: 1.5px solid var(--rojo-bg);
  width: 100%;
  margin-top: 8px;
}
.btn-vaciar:hover { background: var(--rojo-bg); }

/* ===== Ayuda de contraseña (seguridad) ===== */
.campo-ayuda {
  display: block;
  font-size: 12px;
  color: #8a8074;
  margin-top: 5px;
  line-height: 1.4;
}

/* ===== Herramientas admin (mejora) ===== */
.admin-herramientas { margin-bottom: 16px; }

/* ===== Badges de estado tipo Odoo (Mis cotizaciones) ===== */
.badge-venta {
  background: #d3f2e0;
  color: #1a7a44;
}
.badge-cotiza {
  background: #d0ebf5;
  color: #1a6b8a;
}
.badge-cancel {
  background: #e5e2dd;
  color: #6a6156;
}

/* ===== Lista notas crédito: clickeable + botón Ver ===== */
.factura-top-clic { cursor: pointer; }
.factura-top-clic:hover { background: #faf7f2; border-radius: 8px; }
.factura-num a { text-decoration: none; color: var(--negro); }
.factura-num a:hover { color: var(--naranja); }
.btn-ver-nota { background: var(--naranja); color: #fff; margin-top: 6px; display: inline-block; }
.btn-ver-nota:hover { background: var(--naranja-osc); }

/* ===== Detalle de nota crédito (estilo Odoo) ===== */
.nota-card {
  position: relative;
  background: #fff;
  border: 1px solid #e7e0d6;
  border-radius: 12px;
  padding: 24px 26px;
  overflow: hidden;
}
.nota-sello {
  position: absolute;
  top: 22px;
  right: -42px;
  background: #1a7a44;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  padding: 6px 54px;
  transform: rotate(45deg);
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.nota-titulo-bloque { margin-bottom: 20px; }
.nota-tipo { font-size: 13px; color: #8a8074; }
.nota-num { font-size: 30px; font-weight: 700; color: var(--negro); margin-top: 2px; }
.nota-datos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 40px;
  border-bottom: 1px solid #f0ebe3;
  padding-bottom: 20px;
  margin-bottom: 18px;
}
.nd-fila { display: flex; gap: 12px; align-items: baseline; }
.nd-lbl { font-size: 12.5px; color: #8a8074; min-width: 130px; flex-shrink: 0; }
.nd-val { font-size: 13.5px; color: var(--negro); font-weight: 600; }
.nota-lineas-tit { font-size: 13px; font-weight: 700; color: #6a6156; margin-bottom: 10px; text-transform: uppercase; letter-spacing: .3px; }
.nota-totales {
  margin-top: 18px;
  margin-left: auto;
  max-width: 340px;
}
.nt-fila { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; }
.nt-fila span { color: #6a6156; }
.nt-total { border-top: 2px solid #e0d8cc; margin-top: 6px; padding-top: 10px; font-size: 18px; }
.nt-total b { color: var(--naranja); }
.nota-docs-nota { margin-top: 20px; font-size: 12.5px; color: #8a8074; border-top: 1px solid #f0ebe3; padding-top: 12px; }
@media (max-width: 640px) { .nota-datos { grid-template-columns: 1fr; } }

/* ===== Pagos aplicados en detalle de factura ===== */
.fac-pagos { margin-top: 22px; border-top: 1px solid #f0ebe3; padding-top: 18px; }
.fac-entregas { margin-top: 22px; border-top: 1px solid #f0ebe3; padding-top: 18px; }
.fac-pago {
  border: 1px solid #eadfd0;
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}
.fac-pago-cab {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  background: #faf7f2;
}
.fac-pago-info { display: flex; flex-direction: column; gap: 2px; }
.fap-fecha { font-size: 12px; color: #8a8074; }
.fap-nombre { font-weight: 700; color: var(--negro); }
.fac-pago-montos { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fap-aplicado { font-size: 13.5px; color: var(--verde); }
.fap-aplicado b { color: var(--verde); }
.btn-info-pago {
  background: #fff;
  border: 1px solid var(--linea);
  border-radius: 7px;
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  color: var(--tinta);
}
.btn-info-pago:hover { background: var(--naranja-bg); border-color: var(--naranja); color: var(--naranja); }
.fac-pago-detalle {
  padding: 14px 16px;
  background: #fff;
  border-top: 1px solid #eadfd0;
}
.fpd-fila { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13px; }
.fpd-fila span { color: #6a6156; }
.fpd-fila b { color: var(--negro); }
.fpd-acciones { margin-top: 12px; }

/* =====================================================
   RECLAMACIONES (PQR)
   ===================================================== */
.rec-acciones { margin: 4px 0 18px; }
.rec-acciones .btn { width: auto; display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 11px 24px; }
.rec-acciones .btn svg { width: 18px; height: 18px; }
.btn-secundario { background: #efe9e0; color: #6a6156; }
.btn-secundario:hover { background: #e2dacb; }
.btn-add {
  width: auto; display: inline-flex; align-items: center; gap: 7px;
  background: transparent; border: 1.5px dashed var(--naranja, #cc630d);
  color: var(--naranja, #cc630d); border-radius: 999px;
  padding: 9px 18px; font-size: 13.5px; font-weight: 600;
}
.btn-add:hover { background: var(--naranja-bg, #fdf3e9); }
.btn-add svg { width: 16px; height: 16px; }

/* Formulario nuevo reclamo */
.rec-form-card {
  background: #fff; border: 1px solid #e7e0d6; border-radius: 12px;
  padding: 22px 24px; margin-bottom: 20px;
  max-width: 760px; margin-left: auto; margin-right: auto;
}
.rec-form-card h3 { margin: 0 0 16px; color: var(--negro); display: flex; align-items: center; gap: 9px; }
.rec-form-card h3 svg { width: 19px; height: 19px; color: var(--naranja, #cc630d); flex: none; }
.rec-lbl { display: block; font-size: 13px; font-weight: 600; color: #6a6156; margin: 12px 0 5px; }
.rec-input {
  width: 100%; padding: 10px 12px; border: 1px solid #d8cfc2;
  border-radius: 8px; font-size: 14px; font-family: inherit; box-sizing: border-box;
}
.rec-input:focus { outline: none; border-color: var(--naranja); }
.rec-ayuda { display: block; font-size: 12px; color: #8a8074; margin-top: 4px; }
.rec-form-botones { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.rec-form-botones .btn { width: auto; border-radius: 999px; }
.rec-form-botones .btn-primario { flex: 1 1 220px; }
.rec-form-botones .btn-secundario { padding-left: 26px; padding-right: 26px; }

/* Lista de reclamos (cliente) */
.rec-lista { display: flex; flex-direction: column; gap: 10px; }
.rec-item {
  display: flex; justify-content: space-between; align-items: center;
  background: #fff; border: 1px solid #e7e0d6; border-radius: 10px;
  padding: 14px 16px; text-decoration: none; color: inherit; transition: box-shadow .15s;
}
.rec-item:hover { box-shadow: 0 2px 10px rgba(0,0,0,.07); }
.rec-item-asunto { font-weight: 600; color: var(--negro); }
.rec-item-meta { font-size: 12.5px; color: #8a8074; margin-top: 3px; }
.rec-item-estado { text-align: right; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.rec-pendiente-encuesta { font-size: 12px; color: var(--naranja); font-weight: 600; }
.rec-calif { color: #e6a817; font-size: 14px; }

/* Badges de estado */
.rec-badge-enviado { background: #d0ebf5; color: #1a6b8a; }
.rec-badge-revisado { background: #fbeed0; color: #9a6a1e; }
.rec-badge-respondido { background: #e0d4f0; color: #6a3d9a; }
.rec-badge-solucionado { background: #d3f2e0; color: #1a7a44; }

/* Detalle del reclamo */
.rec-detalle, .tarjeta .rec-det-head {
  background: #fff;
}
.rec-detalle {
  border: 1px solid #e7e0d6; border-radius: 12px; padding: 22px 24px;
}
.rec-det-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.rec-det-num { font-size: 13px; color: #8a8074; }
.rec-det-asunto { font-size: 20px; font-weight: 700; color: var(--negro); }
.rec-det-meta { font-size: 12.5px; color: #8a8074; margin-top: 4px; }

/* Barra de progreso de estados */
.rec-progreso { display: flex; justify-content: space-between; margin: 20px 0; position: relative; }
.rec-progreso::before {
  content: ''; position: absolute; top: 14px; left: 5%; right: 5%;
  height: 2px; background: #e7e0d6; z-index: 0;
}
.rec-paso { display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; z-index: 1; flex: 1; }
.rec-paso-punto {
  width: 30px; height: 30px; border-radius: 50%; background: #e7e0d6; color: #8a8074;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
}
.rec-paso-ok .rec-paso-punto { background: var(--verde, #1a7a44); color: #fff; }
.rec-paso-txt { font-size: 11.5px; color: #6a6156; text-align: center; }
.rec-paso-ok .rec-paso-txt { color: var(--negro); font-weight: 600; }

.rec-sub { font-size: 13px; font-weight: 700; color: #6a6156; text-transform: uppercase; letter-spacing: .3px; margin: 18px 0 8px; }

/* Evidencias */
.rec-evi-lista { display: flex; flex-wrap: wrap; gap: 8px; }
.rec-evi-chip {
  display: inline-flex; align-items: center; gap: 6px; background: #faf7f2;
  border: 1px solid #eadfd0; border-radius: 8px; padding: 8px 12px;
  font-size: 13px; text-decoration: none; color: var(--negro);
}
.rec-evi-chip:hover { border-color: var(--naranja); color: var(--naranja); }

/* Hilo de mensajes */
.rec-hilo { margin: 14px 0; }
.rec-msg { border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; max-width: 85%; }
.rec-msg-cliente { background: #f2f0ec; margin-right: auto; }
.rec-msg-admin { background: var(--naranja-bg, #fdf3ea); margin-left: auto; border: 1px solid #f5dcc4; }
.rec-msg-autor { font-size: 12px; font-weight: 700; color: #6a6156; margin-bottom: 4px; }
.rec-msg-fecha { font-weight: 400; color: #a89f92; margin-left: 8px; }
.rec-msg-texto { font-size: 14px; color: #2b2620; line-height: 1.5; }

/* Responder */
.rec-responder, .rec-admin-responder { margin-top: 16px; }
.rec-responder button, .rec-admin-responder button { margin-top: 10px; }
.rec-admin-acciones { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.rec-input-inline { padding: 8px 10px; border: 1px solid #d8cfc2; border-radius: 8px; font-size: 14px; }

/* Encuesta de estrellas */
.rec-encuesta { margin-top: 20px; border-top: 1px solid #f0ebe3; padding-top: 16px; }
.rec-estrellas { display: inline-flex; flex-direction: row-reverse; gap: 4px; margin-bottom: 10px; }
.rec-estrellas input { display: none; }
.rec-estrellas label { font-size: 30px; color: #d8cfc2; cursor: pointer; transition: color .1s; }
.rec-estrellas input:checked ~ label,
.rec-estrellas label:hover,
.rec-estrellas label:hover ~ label { color: #e6a817; }

.rec-calif-final { margin-top: 20px; border-top: 1px solid #f0ebe3; padding-top: 16px; }
.rec-calif-estrellas { font-size: 24px; color: #e6a817; }
.rec-calif-coment { font-style: italic; color: #6a6156; margin-top: 6px; }

/* Admin: estadísticas y filtros */
.rec-stats { display: flex; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.rec-stat { background: #fff; border: 1px solid #e7e0d6; border-radius: 10px; padding: 14px 22px; text-align: center; flex: 1; min-width: 120px; }
.rec-stat-num { font-size: 26px; font-weight: 700; color: var(--naranja); }
.rec-stat-lbl { font-size: 12.5px; color: #8a8074; margin-top: 2px; }
.rec-filtros { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.rec-filtros a { padding: 6px 14px; border-radius: 20px; background: #efe9e0; color: #6a6156; text-decoration: none; font-size: 13px; }
.rec-filtros a:hover { background: #e2dacb; }
.rec-filtro-on { background: var(--naranja) !important; color: #fff !important; }
.rec-volver { margin-top: 16px; }

/* ===== Reclamos: productos, facturas, reabrir (mejoras) ===== */
.rec-prod-fila { border: 1px solid #eadfd0; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; background: #faf7f2; }
.rec-prod-row { display: flex; gap: 8px; align-items: center; }
.rec-prod-select { flex: 1; }
.rec-prod-quitar { background: none; border: none; color: var(--rojo, #c0392b); font-size: 22px; cursor: pointer; line-height: 1; padding: 0 6px; }
.rec-prod-quitar:hover { color: #a03025; }
.rec-prod-facturas { margin-top: 8px; }
.rec-lbl-sm { display: block; font-size: 12px; color: #6a6156; margin-bottom: 4px; }
.rec-cargando { font-size: 13px; color: #8a8074; font-style: italic; padding: 6px 0; }
.rec-sin-factura { font-size: 12.5px; color: #9a6a1e; background: #fbeed0; border-radius: 6px; padding: 8px 10px; }
.rec-file { display: block; }

.rec-info-prod { background: #faf7f2; border-radius: 8px; padding: 12px 14px; margin: 14px 0; }
.rec-info-fila { font-size: 13.5px; color: #2b2620; margin: 3px 0; }
.rec-info-lbl { color: #8a8074; font-weight: 600; }

.rec-reabrir { margin-top: 18px; border-top: 1px solid #f0ebe3; padding-top: 16px; }
.rec-reabierto-tag { color: #9a6a1e; font-weight: 600; }
.rec-reabierto-motivo { color: #9a6a1e; font-style: italic; margin-top: 4px; }

/* ===== Buscador de productos en reclamo ===== */
.rec-busca-wrap { position: relative; flex: 1; }
.rec-busca-input { width: 100%; box-sizing: border-box; }
.rec-busca-lista {
  display: none; position: absolute; z-index: 30; top: 100%; left: 0; right: 0;
  background: #fff; border: 1px solid #d8cfc2; border-radius: 8px;
  max-height: 260px; overflow-y: auto; box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
.rec-busca-op { padding: 9px 12px; font-size: 13.5px; cursor: pointer; border-bottom: 1px solid #f2ede5; }
.rec-busca-op:hover { background: var(--naranja-bg, #fdf3ea); color: var(--naranja); }
.rec-busca-vacio { padding: 10px 12px; color: #8a8074; font-size: 13px; }
.rec-max { color: var(--naranja); font-weight: 600; }
.rec-cant-input { max-width: 140px; }

/* ===== Archivos con nombre y quitar ===== */
.rec-file-item { display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
  background: #faf7f2; border: 1px solid #eadfd0; border-radius: 8px; padding: 6px 10px; }
.rec-file-input { flex-shrink: 0; max-width: 210px; }
.rec-file-nombre { flex: 1; font-size: 12.5px; color: #6a6156; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-file-quitar { background: none; border: none; color: #c0392b; font-size: 20px; cursor: pointer; line-height: 1; }

/* ===== Panel admin de reclamos: mejorado ===== */
.rec-admin-det { padding: 24px 26px; }
.rec-admin-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px 20px; background: #faf7f2; border-radius: 10px;
  padding: 16px 18px; margin: 16px 0;
}
.rec-admin-dato { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rec-admin-lbl { font-size: 11px; color: #8a8074; text-transform: uppercase; letter-spacing: .4px; font-weight: 600; }
.rec-admin-val { font-size: 14px; color: var(--negro); overflow-wrap: break-word; word-break: break-word; min-width: 0; }
.rec-sol-badge { display: inline-block; background: #e0d4f0; color: #6a3d9a;
  border-radius: 12px; padding: 2px 10px; font-size: 12.5px; font-weight: 600; }
.rec-admin-productos { margin: 14px 0; }
.rec-prod-ul { margin: 6px 0 0; padding-left: 20px; }
.rec-prod-ul li { font-size: 14px; color: #2b2620; margin: 3px 0; }
.rec-prod-cant { color: var(--naranja); font-weight: 700; margin-left: 4px; }
.rec-admin-reabierto { background: #fbeed0; border-radius: 8px; padding: 12px 14px; margin: 14px 0; }
.rec-admin-reabierto .rec-reabierto-motivo { color: #9a6a1e; font-style: italic; margin-top: 4px; }

/* ===== Entregas ===== */
.entrega-fila { cursor: pointer; }
.entrega-fila:hover { background: #faf7f2; }

.entrega-fotos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.entrega-foto {
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e7e0d6;
  aspect-ratio: 1 / 1;
  background: #faf7f2;
}
.entrega-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .2s;
}
.entrega-foto:hover img { transform: scale(1.05); }

/* ===== Checkbox "mantener sesión" en login ===== */
.campo-recordar { margin: 4px 0 16px; }
.recordar-lbl { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; color: #6a6156; }
.recordar-lbl input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--naranja, #cc630d); }

/* =====================================================
   MENÚ DE PERFIL (inicial + desplegable)
   ===================================================== */
.perfil-menu { position: relative; margin-left: 8px; }
.perfil-btn {
  display: flex; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer; padding: 4px 8px;
  border-radius: 24px; transition: background .15s;
}
.perfil-btn:hover { background: rgba(0,0,0,.05); }
.perfil-inicial {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--naranja, #cc630d); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; flex-shrink: 0;
}
.perfil-nombre { font-size: 14px; color: var(--negro, #2b2620); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.perfil-flecha { font-size: 11px; color: #8a8074; }

.perfil-lista {
  display: none; position: absolute; right: 0; top: calc(100% + 6px);
  background: #fff; border: 1px solid #e7e0d6; border-radius: 10px;
  box-shadow: 0 6px 22px rgba(0,0,0,.14); min-width: 230px; z-index: 60;
  overflow: hidden; padding: 6px 0;
}
.perfil-menu.abierto .perfil-lista { display: block; }
.perfil-lista a,
.perfil-modo {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; box-sizing: border-box;
  padding: 11px 16px; font-size: 14px; color: var(--negro, #2b2620);
  text-decoration: none; background: none; border: none; cursor: pointer;
  text-align: left; font-family: inherit;
}
.perfil-lista a:hover,
.perfil-modo:hover { background: #faf7f2; color: var(--naranja, #cc630d); }
.perfil-salir { border-top: 1px solid #f0ebe3; margin-top: 4px; color: #c0392b !important; }
.perfil-salir:hover { background: #fdecea !important; color: #a03025 !important; }

/* Switch de modo oscuro */
.perfil-switch {
  width: 40px; height: 22px; border-radius: 12px; background: #d8cfc2;
  position: relative; transition: background .2s; flex-shrink: 0;
}
.perfil-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  transition: transform .2s;
}
.perfil-switch.on { background: var(--naranja, #cc630d); }
.perfil-switch.on::after { transform: translateX(18px); }

/* =====================================================
   PÁGINA DE PERFIL
   ===================================================== */
.perfil-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px; margin-top: 8px; align-items: start;
}
.perfil-card {
  background: #fff; border: 1px solid #e7e0d6; border-radius: 12px;
  padding: 24px;
}
.perfil-card h3 { margin: 0 0 16px; color: var(--negro, #2b2620); display: flex; align-items: center; gap: 9px; }
.perfil-card h3 svg { width: 19px; height: 19px; color: var(--naranja, #cc630d); flex: none; }
.perfil-cabecera { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 8px 0 18px; margin-bottom: 16px; border-bottom: 1px solid #f2ede5; }
.perfil-avatar-grande {
  width: 78px; height: 78px; border-radius: 50%;
  background: var(--naranja, #cc630d); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 700; flex-shrink: 0;
}
.perfil-card-nombre { font-size: 19px; font-weight: 700; color: var(--negro, #2b2620); }
.perfil-card-email { font-size: 13.5px; color: #8a8074; margin-top: 2px; }
.perfil-datos { display: flex; flex-direction: column; }
.perfil-dato { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid #f2ede5; }
.perfil-dato:last-child { border-bottom: none; }
.pd-ico {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  background: var(--naranja-bg, #fdf3e9); color: var(--naranja, #cc630d);
  display: inline-flex; align-items: center; justify-content: center;
}
.pd-ico svg { width: 18px; height: 18px; }
.pd-lbl { display: block; font-size: 11px; color: #8a8074; text-transform: uppercase; letter-spacing: .4px; font-weight: 600; }
.pd-val { display: block; font-size: 14.5px; color: var(--negro, #2b2620); }
.perfil-nota {
  font-size: 12.5px; color: #6a6156; margin: 16px 0 0;
  background: #faf7f2; border-radius: 10px; padding: 10px 14px;
  display: flex; gap: 9px; align-items: flex-start; line-height: 1.5;
}
.perfil-nota > svg { width: 16px; height: 16px; flex: none; color: var(--naranja, #cc630d); margin-top: 1px; }
.perfil-card .btn { border-radius: 999px; }

/* =====================================================
   PÁGINA LEGAL
   ===================================================== */
.legal-wrap { max-width: 860px; }
.legal-doc {
  background: #fff; border: 1px solid #e7e0d6; border-radius: 12px;
  padding: 30px 34px; line-height: 1.65;
}
.legal-indice {
  background: #faf7f2; border-radius: 10px; padding: 16px 20px; margin-bottom: 26px;
  display: flex; flex-direction: column; gap: 6px;
}
.legal-indice b { font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: #6a6156; margin-bottom: 4px; }
.legal-indice a { color: var(--naranja, #cc630d); text-decoration: none; font-size: 14px; }
.legal-indice a:hover { text-decoration: underline; }
.legal-doc section { margin-bottom: 26px; scroll-margin-top: 80px; }
.legal-doc h2 { color: var(--negro, #2b2620); font-size: 21px; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 2px solid #f0ebe3; }
.legal-doc h3 { color: var(--negro, #2b2620); font-size: 16px; margin: 18px 0 6px; }
.legal-doc p { color: #4a443c; font-size: 14.5px; margin: 0 0 12px; }
.legal-aviso { background: #fbeed0; border-radius: 8px; padding: 12px 16px; color: #9a6a1e !important; font-size: 13px !important; margin-top: 20px !important; }

/* =====================================================
   MODO OSCURO
   Redefine las variables de color y neutraliza los fondos
   blancos hardcodeados para dar una superficie oscura.
   ===================================================== */
.modo-oscuro {
  --naranja:       #e07a1f;
  --naranja-osc:   #c9691a;
  --naranja-claro: #f0913a;
  --naranja-bg:    #3a2b1a;
  --negro:         #f0ece6;
  --crema:         #1a1815;
  --crema-2:       #232019;
  --tinta:         #e8e3db;
  --gris:          #a89f92;
  --linea:         #3a352e;
  --verde:         #5fa96f;
  --verde-bg:      #1e3524;
  --rojo:          #e06666;
  --rojo-bg:       #3a1f1f;
  --ambar-bg:      #3a2f1a;
  --ambar-tx:      #e0b060;
  --sombra:        0 2px 12px rgba(0, 0, 0, 0.35);
}
.modo-oscuro body,
body.modo-oscuro { background: var(--crema); color: var(--tinta); }

/* Superficies: convertir blancos a superficie oscura */
.modo-oscuro .auth-card,
.modo-oscuro .auth-head,
.modo-oscuro .tarjeta,
.modo-oscuro .topbar,
.modo-oscuro .admin-top,
.modo-oscuro .prod-card,
.modo-oscuro .carrito,
.modo-oscuro .modal-card,
.modo-oscuro .tabla-sugerencias,
.modo-oscuro .tabla-odoo,
.modo-oscuro .perfil-card,
.modo-oscuro .perfil-lista,
.modo-oscuro .legal-doc,
.modo-oscuro .nota-card,
.modo-oscuro .rec-form-card,
.modo-oscuro .rec-item,
.modo-oscuro .rec-detalle,
.modo-oscuro .rec-stat,
.modo-oscuro .rec-msg-admin,
.modo-oscuro .vt-btn,
.modo-oscuro .btn-avisar {
  background: var(--crema-2) !important;
  color: var(--tinta);
}

/* Zonas con fondo crema claro -> un poco más oscuras que la superficie */
.modo-oscuro .perfil-inicial,
.modo-oscuro .perfil-avatar-grande { color: #fff !important; }
.modo-oscuro .legal-indice,
.modo-oscuro .perfil-cabecera,
.modo-oscuro .rec-info-prod,
.modo-oscuro .rec-admin-grid,
.modo-oscuro .prod-thumb,
.modo-oscuro .rec-evi-chip,
.modo-oscuro .rec-file-item,
.modo-oscuro .rec-prod-fila,
.modo-oscuro .rec-msg-cliente,
.modo-oscuro .entrega-foto {
  background: #2b2721 !important;
}

/* Inputs y selects */
.modo-oscuro .campo input,
.modo-oscuro .rec-input,
.modo-oscuro .rec-input-inline,
.modo-oscuro input[type="text"],
.modo-oscuro input[type="email"],
.modo-oscuro input[type="password"],
.modo-oscuro input[type="number"],
.modo-oscuro input[type="search"],
.modo-oscuro select,
.modo-oscuro textarea,
.modo-oscuro .rec-busca-lista {
  background: #232019 !important;
  color: var(--tinta) !important;
  border-color: var(--linea) !important;
}
.modo-oscuro .campo input:focus,
.modo-oscuro .rec-input:focus { background: #2b2721 !important; }

/* Texto y bordes */
.modo-oscuro .perfil-nombre,
.modo-oscuro .perfil-card-nombre,
.modo-oscuro .pd-val,
.modo-oscuro .legal-doc h2,
.modo-oscuro .legal-doc h3,
.modo-oscuro .rec-det-asunto,
.modo-oscuro .rec-item-asunto,
.modo-oscuro h1, .modo-oscuro h2, .modo-oscuro h3 { color: var(--tinta); }
.modo-oscuro .legal-doc p,
.modo-oscuro .rec-msg-texto { color: #c4bdb0; }

/* Hovers de menús en oscuro */
.modo-oscuro .perfil-lista a:hover,
.modo-oscuro .perfil-modo:hover,
.modo-oscuro .menu-cuentas-lista a:hover,
.modo-oscuro .rec-item:hover,
.modo-oscuro .entrega-fila:hover { background: #2b2721 !important; }
.modo-oscuro .perfil-btn:hover { background: rgba(255,255,255,.08); }

/* Menú desplegable de cuentas en oscuro */
.modo-oscuro .menu-cuentas-lista { background: var(--crema-2) !important; border-color: var(--linea); }

/* Filas de tabla con hover */
.modo-oscuro .tabla tbody tr:hover { background: #2b2721 !important; }
.modo-oscuro .tabla th { background: #232019 !important; color: var(--tinta); }
.modo-oscuro .tabla td { border-color: var(--linea); }

/* Bordes generales */
.modo-oscuro .perfil-card,
.modo-oscuro .legal-doc,
.modo-oscuro .rec-form-card,
.modo-oscuro .tarjeta,
.modo-oscuro .prod-card { border-color: var(--linea) !important; }

/* La barra superior mantiene el borde naranja */
.modo-oscuro .topbar { border-bottom-color: var(--naranja); }
.modo-oscuro .topbar-nav a { color: var(--tinta); }

/* ===== Toggle "cliente de confianza" en admin ===== */
.conf-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  background: #efe9e0; border: 1px solid #d8cfc2; border-radius: 20px;
  padding: 5px 12px; cursor: pointer; font-size: 12.5px; color: #6a6156;
  font-family: inherit; transition: all .15s;
}
.conf-toggle:hover { background: #e2dacb; }
.conf-bolita { width: 12px; height: 12px; border-radius: 50%; background: #b0a696; transition: background .15s; }
.conf-toggle.conf-on { background: var(--verde-bg, #e7f2e9); border-color: var(--verde, #3f7d4e); color: var(--verde, #3f7d4e); font-weight: 600; }
.conf-toggle.conf-on .conf-bolita { background: var(--verde, #3f7d4e); }

/* ===== Módulo de reportar pago ===== */
.pago-card {
  background: #fff; border: 1px solid #e7e0d6; border-radius: 12px;
  padding: 24px 26px; margin-bottom: 20px;
}
.pago-card-subir { max-width: 720px; margin-left: auto; margin-right: auto; }
.pago-validar { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 16px; }
.pago-preview {
  background: #faf7f2; border: 1px solid #eadfd0; border-radius: 10px;
  padding: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.pago-img { max-width: 100%; max-height: 420px; border-radius: 8px; }
.pago-pdf { font-size: 15px; color: #6a6156; text-align: center; padding: 30px 10px; }
.pago-form { display: flex; flex-direction: column; }
.pago-botones { display: flex; gap: 10px; margin-top: 18px; align-items: center; }

@media (max-width: 720px) {
  .pago-validar { grid-template-columns: 1fr; }
}

/* ===== Selector de nivel de confianza en admin ===== */
.nivel-select {
  padding: 5px 10px; border-radius: 8px; font-size: 12.5px; cursor: pointer;
  border: 1px solid #d8cfc2; font-family: inherit; font-weight: 600;
}
.nivel-select.nivel-0 { background: #f2f0ec; color: #8a8074; border-color: #d8cfc2; }
.nivel-select.nivel-1 { background: #fbeed0; color: #9a6a1e; border-color: #e0b060; }  /* amarillo */
.nivel-select.nivel-2 { background: #d3f2e0; color: #1a7a44; border-color: #3f7d4e; }  /* verde */

/* ===== Datos detectados / a confirmar en reportar pago ===== */
.pago-datos-leidos {
  background: #f0f7f2; border: 1px solid #cde5d5; border-radius: 10px;
  padding: 14px 16px; margin-bottom: 16px;
}
.pago-dato-titulo { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: #6a6156; margin-bottom: 10px; }
.pago-dato { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid #e0ece4; }
.pago-dato:last-child { border-bottom: none; }
.pago-dato-lbl { font-size: 13px; color: #6a6156; }
.pago-dato-val { font-size: 14px; font-weight: 600; color: var(--negro, #2b2620); }
.pago-check { color: var(--verde, #3f7d4e); margin-left: 4px; }
.pago-dato-pendiente { font-size: 12.5px; color: #9a6a1e; font-style: italic; }
.pago-confirmar {
  background: #fdf3e9; border: 1px solid #f0d9bf; border-radius: 10px;
  padding: 14px 16px; margin-bottom: 16px;
}
.pago-confirmar .rec-lbl:first-of-type { margin-top: 0; }

/* ===== Lista de varios comprobantes ===== */
.pago-item {
  background: #fff; border: 1px solid #e7e0d6; border-radius: 12px;
  padding: 18px 20px; margin-bottom: 16px;
}
.pago-item-cab {
  font-size: 13px; font-weight: 700; color: var(--naranja, #cc630d);
  margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #f0ebe3;
}
.pago-campo-fijo {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 12px; margin-bottom: 10px;
  background: #f0f7f2; border: 1px solid #cde5d5; border-radius: 8px;
}
.pago-pide {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase;
  background: #fdf0da; color: #9a6a1e; padding: 2px 7px; border-radius: 10px;
  margin-left: 6px; letter-spacing: .3px;
}

/* ===== Agregar más comprobantes ===== */
.pago-agregar {
  background: #faf7f2; border: 1px dashed #d8cfc2; border-radius: 12px;
  padding: 16px 20px; margin-top: 4px; margin-bottom: 20px;
}
.pago-agregar-fila { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pago-agregar-fila .rec-input { flex: 1; min-width: 200px; }
@media (max-width: 620px) {
  .pago-agregar-fila { flex-direction: column; align-items: stretch; }
}

/* ===== Zona de subida de comprobantes ===== */
.subir-zona {
  border: 2px dashed #d8cfc2; border-radius: 14px; padding: 34px 20px;
  text-align: center; cursor: pointer; transition: all .15s;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: #6a6156; margin-bottom: 14px;
}
.subir-zona:hover { border-color: var(--naranja, #cc630d); background: #faf7f2; }
.subir-icono {
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--naranja-bg, #fdf3e9); color: var(--naranja, #cc630d);
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 2px;
}
.subir-icono svg { width: 24px; height: 24px; }
.subir-titulo { font-size: 15px; font-weight: 600; color: var(--negro, #2b2620); }
.subir-zona small { color: #8a8074; font-size: 12.5px; }
.subir-lista { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 6px; }
.subir-item {
  display: flex; justify-content: space-between; align-items: center;
  background: #f0f7f2; border: 1px solid #cde5d5; border-radius: 8px;
  padding: 8px 12px; font-size: 13.5px; color: var(--negro, #2b2620);
}
.subir-quitar {
  background: none; border: none; color: #c0392b; cursor: pointer;
  font-size: 15px; padding: 0 4px; line-height: 1;
}
.subir-quitar:hover { color: #a03025; }
.subir-botones { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.subir-botones .btn { width: auto; flex: 1 1 220px; border-radius: 999px; }
.subir-tips {
  background: #fdf3e9; border: 1px solid #f0d9bf; border-radius: 12px;
  padding: 12px 16px; margin-bottom: 14px; font-size: 12.5px; color: #6a5138;
  line-height: 1.5; display: flex; gap: 10px; align-items: flex-start; text-align: left;
}
.subir-tips > svg { width: 18px; height: 18px; flex: none; color: #b5762a; margin-top: 1px; }
.subir-cargando {
  display: flex; align-items: center; gap: 12px; margin-top: 16px;
  padding: 14px 18px; background: #fdf3e9; border: 1px solid #f0d9bf;
  border-radius: 10px; color: #9a6a1e; font-size: 14px;
}
.spinner {
  width: 20px; height: 20px; border: 3px solid #f0d9bf;
  border-top-color: var(--naranja, #cc630d); border-radius: 50%;
  animation: girar .8s linear infinite; flex-shrink: 0;
}
@keyframes girar { to { transform: rotate(360deg); } }

/* Etiquetas de pago múltiple y recibo */
.pago-multi {
  display: inline-block; font-size: 11px; font-weight: 700;
  background: #e7f0fb; color: #2c6cb0; padding: 2px 8px; border-radius: 10px;
  margin-left: 8px; text-transform: none; letter-spacing: 0;
}
.pago-recibo-tag {
  display: inline-block; font-size: 11px; font-weight: 600;
  background: #f0ebe3; color: #6a6156; padding: 2px 8px; border-radius: 10px;
  margin-left: 6px; text-transform: none; letter-spacing: 0;
}

/* ===== Barra de progreso de lectura ===== */
.subir-progreso { margin-top: 8px; }
.subir-progreso-texto { font-size: 14.5px; color: var(--negro, #2b2620); margin-bottom: 10px; font-weight: 600; }
.subir-barra {
  width: 100%; height: 26px; background: #f0ebe3; border-radius: 14px;
  overflow: hidden; border: 1px solid #e0d8cc;
}
.subir-barra-relleno {
  height: 100%; background: linear-gradient(90deg, var(--naranja, #cc630d), var(--naranja-claro, #e07a1f));
  width: 0%; transition: width .3s ease; color: #fff; font-size: 12.5px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; min-width: 34px;
}
.subir-progreso-detalle { font-size: 12.5px; color: #8a8074; margin-top: 8px; }

/* ===== Mejoras del reporte de pagos: quitar pago + recorte por tarjeta
   (antes estaban inline en pagar.php) ===== */
.pago-item-cab { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pago-quitar {
  margin-left: auto; color: #c0392b; text-decoration: none; font-size: 13px;
  border: 1px solid #e5b9b3; border-radius: 6px; padding: 3px 10px; white-space: nowrap;
}
.pago-quitar:hover { background: #fdeeec; }
.pago-img-recorte {
  max-height: 360px; width: auto; max-width: 100%; object-fit: contain;
  display: block; margin: 0 auto;
}
.pago-verfoto { display: block; text-align: center; font-size: 12px; margin-top: 6px; }
.subir-barra-relleno { transition: width .25s ease; }

/* =====================================================
   MODO OSCURO (2ª parte)
   Cobertura de los módulos que quedaron sin versión
   oscura: facturas y notas crédito, mis cuentas (estado
   del cliente), reportar pago y controles del panel admin.
   ===================================================== */

/* Tarjetas y superficies blancas -> superficie oscura */
.modo-oscuro .factura-card,
.modo-oscuro .fact-paginacion,
.modo-oscuro .cuentas-filtro,
.modo-oscuro .er-item,
.modo-oscuro .pago-card,
.modo-oscuro .pago-item {
  background: var(--crema-2) !important;
  border-color: var(--linea) !important;
  color: var(--tinta);
}
.modo-oscuro .fact-flecha { background: var(--crema-2); border-color: var(--linea); }
.modo-oscuro .fact-flecha-off { background: #2b2721; color: #6a6156; }

/* Bordes internos que eran claros */
.modo-oscuro .factura-top,
.modo-oscuro .pago-item-cab,
.modo-oscuro .nota-datos,
.modo-oscuro .nota-docs-nota { border-color: var(--linea) !important; }
.modo-oscuro .nt-total { border-top-color: var(--linea); }
.modo-oscuro .cuentas-tabs { border-bottom-color: var(--linea); }

/* Textos apagados que estaban en marrón claro fijo */
.modo-oscuro .factura-fecha,
.modo-oscuro .factura-docs-titulo,
.modo-oscuro .factura-sindocs,
.modo-oscuro .fact-rango-lbl,
.modo-oscuro .cf-lbl,
.modo-oscuro .estado-desc,
.modo-oscuro .er-lbl,
.modo-oscuro .cuentas-ayuda,
.modo-oscuro .campo-ayuda,
.modo-oscuro .nota-tipo,
.modo-oscuro .nd-lbl,
.modo-oscuro .nt-fila span,
.modo-oscuro .nota-lineas-tit,
.modo-oscuro .nota-docs-nota,
.modo-oscuro .pago-pdf,
.modo-oscuro .pago-dato-titulo,
.modo-oscuro .pago-dato-lbl,
.modo-oscuro .pago-hora,
.modo-oscuro .pago-sinfac,
.modo-oscuro .subir-zona,
.modo-oscuro .subir-zona small,
.modo-oscuro .subir-progreso-detalle,
.modo-oscuro .pago-recibo-tag { color: var(--gris) !important; }

/* Zonas y hovers crema claro -> tinte oscuro */
.modo-oscuro .factura-top-clic:hover,
.modo-oscuro .mayor-inicial,
.modo-oscuro .pago-preview,
.modo-oscuro .pago-agregar,
.modo-oscuro .subir-zona:hover { background: #2b2721 !important; border-color: var(--linea) !important; }
.modo-oscuro .subir-zona { border-color: var(--linea); }

/* Chips de documentos de factura */
.modo-oscuro .doc-chip { border-color: #5a4630; }
.modo-oscuro .doc-chip:hover { background: #4a371f; }

/* Badges de estado */
.modo-oscuro .nc-badge { background: var(--ambar-bg); color: var(--ambar-tx); }
.modo-oscuro .badge-venta { background: var(--verde-bg); color: var(--verde); }
.modo-oscuro .badge-cotiza { background: #1a2f3a; color: #6db3d1; }
.modo-oscuro .badge-cancel { background: #2b2721; color: var(--gris); }

/* Filtros de fecha (Mis cuentas) y pestañas */
.modo-oscuro .cf-fecha,
.modo-oscuro input[type="date"] {
  background: #232019 !important;
  color: var(--tinta) !important;
  border-color: var(--linea) !important;
}
.modo-oscuro .cuentas-tab { color: var(--gris); }
.modo-oscuro .cuentas-tab.activa,
.modo-oscuro .cuentas-tab:hover { color: var(--naranja); }

/* Toggle "cliente de confianza" y selector de nivel (admin) */
.modo-oscuro .conf-toggle { background: #2b2721; border-color: var(--linea); color: var(--gris); }
.modo-oscuro .conf-toggle:hover { background: #332e26; }
.modo-oscuro .conf-toggle.conf-on { background: var(--verde-bg); border-color: var(--verde); color: var(--verde); }
.modo-oscuro .nivel-select.nivel-0 { background: #2b2721; color: var(--gris); border-color: var(--linea); }
.modo-oscuro .nivel-select.nivel-1 { background: var(--ambar-bg); color: var(--ambar-tx); border-color: #7a5c20; }
.modo-oscuro .nivel-select.nivel-2 { background: var(--verde-bg); color: var(--verde); border-color: #2e5c3a; }

/* Datos leídos por la IA y campos fijos (verde suave -> verde oscuro) */
.modo-oscuro .pago-datos-leidos,
.modo-oscuro .pago-campo-fijo,
.modo-oscuro .subir-item {
  background: var(--verde-bg) !important;
  border-color: #2e5c3a !important;
  color: var(--tinta);
}
.modo-oscuro .pago-dato { border-bottom-color: #2e5c3a; }

/* Zonas ámbar (por confirmar / cargando) */
.modo-oscuro .pago-confirmar,
.modo-oscuro .subir-tips,
.modo-oscuro .subir-cargando {
  background: var(--ambar-bg) !important;
  border-color: #7a5c20 !important;
  color: var(--ambar-tx);
}
.modo-oscuro .pago-pide { background: var(--ambar-bg); color: var(--ambar-tx); }
.modo-oscuro .pago-dato-pendiente { color: var(--ambar-tx); }
.modo-oscuro .spinner { border-color: #4a371f; border-top-color: var(--naranja); }

/* Etiquetas de pago múltiple y recibo */
.modo-oscuro .pago-multi { background: #1a2f3a; color: #6db3d1; }
.modo-oscuro .pago-recibo-tag { background: #2b2721; }

/* Barra de progreso de lectura */
.modo-oscuro .subir-barra { background: #2b2721; border-color: var(--linea); }
.modo-oscuro .subir-progreso-texto { color: var(--tinta); }

/* Quitar pago (rojo sobre oscuro) */
.modo-oscuro .pago-quitar { color: var(--rojo); border-color: #6b3230; }
.modo-oscuro .pago-quitar:hover { background: var(--rojo-bg); }

/* Secciones del detalle de factura (pagos y despachos) */
.modo-oscuro .fac-pagos,
.modo-oscuro .fac-entregas { border-top-color: var(--linea); }

/* Botones secundarios que eran crema claro */
.modo-oscuro .btn-secundario { background: #2b2721; color: var(--tinta); }
.modo-oscuro .btn-secundario:hover { background: #332e26; }
.modo-oscuro .btn-enlace { background: #2b2721; color: var(--tinta); border: 1px solid var(--linea); }
.modo-oscuro .btn-enlace:hover { background: #332e26; }

/* ===== Campana de notificaciones (barra superior) ===== */
.topbar-campana {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; color: var(--tinta); text-decoration: none;
}
.topbar-campana:hover { background: var(--naranja-bg); color: var(--naranja); }
.topbar-campana svg { width: 21px; height: 21px; }
.campana-num {
  position: absolute; top: 1px; right: -1px;
  background: var(--rojo, #c0392b); color: #fff;
  font-size: 10.5px; font-weight: 700; min-width: 17px; height: 17px;
  border-radius: 999px; display: flex; align-items: center; justify-content: center;
  padding: 0 4px; border: 2px solid #fff;
}

/* ===== Centro de notificaciones ===== */
.notif-lista { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.notif-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: #fff; border: 1px solid #e7e0d6; border-radius: 12px; padding: 14px 18px;
}
.notif-item.notif-nueva { border-color: var(--naranja-claro); background: #fffaf3; }
.notif-ico {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: var(--naranja-bg); color: var(--naranja);
  display: inline-flex; align-items: center; justify-content: center;
}
.notif-ico svg { width: 19px; height: 19px; }
.notif-txt { flex: 1; min-width: 0; }
.notif-titulo { font-weight: 700; font-size: 14.5px; color: var(--negro); display: flex; gap: 8px; align-items: center; }
.notif-punto { width: 8px; height: 8px; border-radius: 50%; background: var(--naranja); flex: none; }
.notif-msg { font-size: 13.5px; color: #6a6156; margin-top: 3px; line-height: 1.5; }
.notif-fecha { font-size: 12px; color: var(--gris); margin-top: 5px; }
.notif-ver { border-radius: 999px; padding: 7px 18px; align-self: center; }

/* ===== Cotizaciones guardadas (borradores en la tienda) ===== */
.borr-caja { background: #fff; border: 1px solid #e7e0d6; border-radius: 12px; padding: 16px 18px; margin-bottom: 18px; }
.borr-tit { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14.5px; color: var(--negro); margin-bottom: 4px; }
.borr-tit svg { width: 18px; height: 18px; color: var(--naranja); flex: none; }
.borr-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f2ede5; }
.borr-item:last-child { border-bottom: none; }
.borr-info { flex: 1; min-width: 0; }
.borr-info b { display: block; font-size: 14px; color: var(--negro); }
.borr-info span { display: block; font-size: 12.5px; color: var(--gris); margin-top: 1px; }
.borr-item .btn-mini { border-radius: 999px; padding: 7px 16px; flex: none; }
.borr-editando {
  font-size: 12px; font-weight: 700; color: var(--verde);
  background: var(--verde-bg); padding: 5px 14px; border-radius: 999px; flex: none;
}
.borr-borrar { background: none; border: none; color: #c0392b; font-size: 19px; cursor: pointer; padding: 0 4px; line-height: 1; flex: none; }
.borr-borrar:hover { color: #a03025; }
.borr-ayuda { margin: 8px 0 0; font-size: 12px; color: var(--gris); }
.cotizada-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cotizada-banner .btn-mini { border-radius: 999px; padding: 8px 18px; flex: none; }

/* ===== Autorizaciones (rediseño + cancelar aprobación) ===== */
.aut-sec { display: flex; align-items: center; gap: 10px; font-size: 17px; margin: 26px 0 12px; color: var(--negro); flex-wrap: wrap; }
.aut-sec:first-of-type { margin-top: 6px; }
.aut-sec-ico {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  background: var(--naranja-bg); color: var(--naranja);
  display: inline-flex; align-items: center; justify-content: center;
}
.aut-sec-ico svg { width: 17px; height: 17px; }
.aut-sec-ico.aut-sec-ok { background: var(--verde-bg); color: var(--verde); }
.aut-chip { background: var(--naranja); color: #fff; font-size: 13px; font-weight: 700; padding: 3px 12px; border-radius: 999px; }
.aut-sec-nota { font-size: 13px; font-weight: 400; color: var(--gris); }
.aut-lista { display: flex; flex-direction: column; gap: 12px; }
.aut-card {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: #fff; border: 1px solid #e7e0d6; border-radius: 14px; padding: 16px 20px;
}
.aut-ico {
  width: 46px; height: 46px; border-radius: 12px; flex: none;
  background: var(--naranja-bg); color: var(--naranja);
  display: inline-flex; align-items: center; justify-content: center;
}
.aut-ico svg { width: 22px; height: 22px; }
.aut-aprobada .aut-ico { background: var(--verde-bg); color: var(--verde); }
.aut-info { flex: 1; min-width: 170px; }
.aut-info b { display: block; font-size: 15.5px; color: var(--negro); }
.aut-fecha { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--gris); margin-top: 4px; }
.aut-fecha svg { width: 14px; height: 14px; }
.aut-der { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; }
.aut-total { font-size: 19px; font-weight: 800; color: var(--naranja); }
.aut-btn-aprobar {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--verde); color: #fff; text-decoration: none;
  border-radius: 999px; padding: 9px 20px; font-size: 13.5px; font-weight: 700;
  transition: filter .15s;
}
.aut-btn-aprobar:hover { filter: brightness(1.08); }
.aut-btn-aprobar svg { width: 15px; height: 15px; }
.aut-acciones { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.aut-badge-ok { background: var(--verde-bg); color: var(--verde); font-size: 12.5px; font-weight: 700; padding: 6px 14px; border-radius: 999px; }
.aut-btn-cancelar {
  background: transparent; border: 1.5px solid var(--linea); color: var(--gris);
  border-radius: 999px; padding: 6px 15px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: border-color .15s, color .15s;
}
.aut-btn-cancelar:hover { border-color: var(--rojo); color: var(--rojo); }
/* Editar una orden ya enviada (mientras sea cotización: confirmada = cerrada) */
.aut-btn-editar {
  display: inline-flex; align-items: center; gap: 5px; text-decoration: none;
  background: transparent; border: 1.5px solid var(--naranja); color: var(--naranja);
  border-radius: 999px; padding: 6px 15px; font-size: 12.5px; font-weight: 700;
  transition: background .15s, color .15s;
}
.aut-btn-editar:hover { background: var(--naranja); color: #fff; }
@media (max-width: 560px) {
  .aut-der { align-items: flex-start; width: 100%; }
}
.aut-sec-hist { background: #efece6; color: #6a6156; }
.aut-hist { background: #fff; border: 1px solid #e7e0d6; border-radius: 14px; padding: 4px 20px; }
.aut-hist-fila { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid #f2ede5; flex-wrap: wrap; }
.aut-hist-fila:last-child { border-bottom: none; }
.aut-hist-num { font-weight: 700; color: var(--negro); font-size: 14px; min-width: 140px; }
.aut-hist-fecha { color: var(--gris); font-size: 12.5px; }
.aut-hist-origen { font-size: 11.5px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.og-portal { background: var(--naranja-bg); color: var(--naranja); }
.og-correo { background: #e3ecfb; color: #2f6fd6; }
.aut-hist-total { margin-left: auto; font-weight: 700; color: var(--negro); font-size: 14px; }

/* ===== Plataforma de bodega (tablet) — botones grandes, flujos simples ===== */
.tb-body { background: var(--crema); }
.tb-top {
  background: #fff; border-bottom: 3px solid var(--naranja);
  padding: 12px 20px; display: flex; justify-content: space-between; align-items: center;
  gap: 12px; position: sticky; top: 0; z-index: 50;
}
.tb-top img { height: 44px; }
.tb-user { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: var(--negro); }
.tb-user-ini {
  width: 38px; height: 38px; border-radius: 50%; background: var(--naranja); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700;
}
.tb-salir { color: var(--rojo); border: 1.5px solid var(--rojo); border-radius: 999px; padding: 9px 18px; font-weight: 700; font-size: 14px; text-decoration: none; }
.tb-wrap { max-width: 900px; margin: 0 auto; padding: 22px 16px 80px; }
.tb-tit { font-size: 25px; margin: 0 0 4px; color: var(--negro); }
.tb-tit2 { font-size: 18px; margin: 28px 0 12px; color: var(--negro); }
.tb-sub { color: var(--gris); margin: 0 0 18px; font-size: 14.5px; }
.tb-volver { display: inline-block; color: var(--naranja); text-decoration: none; font-weight: 700; font-size: 15px; margin-bottom: 14px; }
.tb-card {
  background: #fff; border: 1px solid #e7e0d6; border-radius: 16px;
  padding: 18px 20px; margin-bottom: 14px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.tb-card-hecho { opacity: .85; }
.tb-info { flex: 1; min-width: 200px; }
.tb-info b { font-size: 18px; display: block; color: var(--negro); }
.tb-info span { color: var(--gris); font-size: 14px; display: block; margin-top: 3px; }
.tb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--naranja); color: #fff; border: none; border-radius: 14px;
  padding: 16px 26px; font-size: 17px; font-weight: 700; text-decoration: none; cursor: pointer;
}
.tb-btn:active { transform: scale(.98); }
.tb-btn:disabled { opacity: .5; cursor: default; }
.tb-btn-verde { background: var(--verde); }
.tb-btn-suave { background: #efe9e0; color: #6a6156; }
.tb-btn-block { width: 100%; margin-top: 16px; }
.tb-chip { font-size: 13px; font-weight: 700; padding: 7px 15px; border-radius: 999px; background: var(--naranja-bg); color: var(--naranja); flex: none; }
.tb-chip-ok { background: var(--verde-bg); color: var(--verde); }
.tb-lbl { display: block; font-size: 14.5px; font-weight: 600; color: #6a6156; margin: 16px 0 6px; }
.tb-input {
  width: 100%; padding: 16px 14px; font-size: 17px;
  border: 1.5px solid var(--linea); border-radius: 12px; background: #fff;
}
.tb-input:focus { outline: none; border-color: var(--naranja); }
.tb-lineas td { font-size: 16px; padding: 13px 10px; }
.tb-despacho { background: #fff; border: 1px solid #e7e0d6; border-radius: 16px; padding: 20px; margin-top: 20px; }
.tb-despacho .tb-tit2 { margin-top: 0; }
.tb-fotozona {
  width: 100%; border: 2.5px dashed #d8cfc2; border-radius: 16px; background: #faf7f2;
  padding: 26px 18px; text-align: center; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: #6a6156; font-size: 16px; font-weight: 600; font-family: inherit;
}
.tb-fotozona:active { border-color: var(--naranja); }
.tb-fotozona svg { width: 40px; height: 40px; color: var(--naranja); }
.tb-fotozona small { font-weight: 400; font-size: 12.5px; color: #8a8074; }
.tb-login-card {
  max-width: 430px; margin: 7vh auto 0; background: #fff;
  padding: 30px 26px; border-radius: 20px; border: 1px solid #e7e0d6;
}
.tb-login-head { text-align: center; margin-bottom: 18px; }
.tb-login-head img { height: 74px; }
.tb-login-head h1 { font-size: 22px; margin: 12px 0 2px; color: var(--negro); }
.tb-login-head p { margin: 0; color: var(--gris); font-size: 14px; }
.tb-login-nota { text-align: center; color: var(--gris); font-size: 13px; margin-top: 16px; }
.tb-menu { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 8px; }
.tb-menu-card {
  background: #fff; border: 1px solid #e7e0d6; border-radius: 20px;
  padding: 28px 24px; text-decoration: none; color: var(--tinta);
  display: flex; align-items: center; gap: 18px;
  transition: transform .12s ease, border-color .12s ease;
}
.tb-menu-card:active { transform: scale(.985); border-color: var(--naranja); }
.tb-menu-ico {
  width: 72px; height: 72px; border-radius: 20px; flex: none;
  background: var(--naranja-bg); color: var(--naranja);
  display: inline-flex; align-items: center; justify-content: center;
}
.tb-menu-ico svg { width: 38px; height: 38px; }
.tb-menu-ico-azul { background: #e3ecfb; color: #2f6fd6; }
.tb-menu-ico-verde { background: var(--verde-bg); color: var(--verde); }
.tb-menu-txt b { display: block; font-size: 21px; color: var(--negro); }
.tb-menu-txt span { display: block; font-size: 14px; color: var(--gris); margin-top: 4px; }
.tb-busca { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.tb-busca .tb-input { flex: 1; min-width: 220px; }
.tb-busca .tb-btn { flex: none; }
.tb-res-conteo { color: var(--gris); font-size: 14px; margin: 0 0 12px; font-weight: 600; }
.tb-res-cont { color: #2f6fd6 !important; font-weight: 600; }
.tb-res-cant { text-align: right; flex: none; }
.tb-res-cant b { display: block; font-size: 30px; font-weight: 800; color: var(--naranja); line-height: 1; }
.tb-res-cant span { font-size: 13px; color: var(--gris); }
.tb-res-cant small { display: block; font-size: 12px; color: var(--verde); font-weight: 600; margin-top: 3px; }
.tb-imp-tit { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; color: #2f6fd6; margin: 22px 0 10px; text-transform: uppercase; letter-spacing: .5px; }
.tb-imp-tit span { font-weight: 600; color: var(--gris); text-transform: none; letter-spacing: 0; font-size: 13px; }
.tb-cont-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.tb-cont-chip { display: inline-flex; align-items: center; gap: 6px; background: #e3ecfb; color: #2f6fd6; font-weight: 700; font-size: 13px; padding: 7px 14px; border-radius: 999px; text-decoration: none; }
.tb-cont-chip.chip-curso { background: var(--naranja-bg); color: var(--naranja); }
.tb-cont-chip.chip-listo { background: var(--verde-bg); color: var(--verde); }
.tb-bodega { background: #fff; border: 1px solid #e7e0d6; border-radius: 16px; margin-bottom: 14px; overflow: hidden; }
.tb-bodega summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 18px 20px; }
.tb-bodega summary::-webkit-details-marker { display: none; }
.tb-bodega-nom { font-weight: 800; font-size: 18px; color: var(--negro); flex: 1; min-width: 150px; }
.tb-bodega-num { color: var(--gris); font-size: 13.5px; font-weight: 600; flex: none; }
.tb-bodega-flecha { color: var(--naranja); font-size: 20px; flex: none; transition: transform .15s; }
.tb-bodega[open] .tb-bodega-flecha { transform: rotate(180deg); }
.tb-bodega[open] summary { border-bottom: 1px solid #f2ede5; }
.tb-bodega-cuerpo { padding: 2px 16px 16px; }
.tb-bodega-cuerpo .tb-imp-tit { margin: 16px 0 10px; }
.tb-bodega-cuerpo .tb-card { border-color: #f0eae0; background: #fbf9f5; margin-bottom: 10px; }
.tb-cam-marco { border-radius: 16px; overflow: hidden; background: #000; margin-bottom: 10px; }
.tb-cam-marco video { width: 100%; display: block; max-height: 340px; object-fit: cover; transform: scaleX(-1); }
.tb-cam-estado { text-align: center; color: var(--gris); font-size: 14.5px; font-weight: 600; margin: 6px 0 12px; }
.tb-o { text-align: center; color: var(--gris); font-size: 13px; margin: 14px 0 10px; }
.tb-cara-link { text-align: center; margin-top: 22px; }
.tb-cara-link a { color: var(--naranja); font-weight: 700; text-decoration: none; font-size: 15px; }

/* (El bloque «Panel de administración embellecido» se retiró: el panel usa admin.css) */
.tabla tbody tr:hover td { background: #fbf8f2; }

/* ---- Disponibilidad por rangos (tienda) ---- */
.prod-disp-medio { color: #2f6fd6; background: #e9f1fd; }
.prod-disp-consultar { color: var(--gris); background: #f1ede4; }
.btn-empaque { border: 1.5px solid var(--naranja); background: var(--naranja-bg); color: var(--naranja); border-radius: 10px; padding: 9px 12px; font-weight: 800; font-size: 13.5px; cursor: pointer; flex: none; font-family: inherit; }
.btn-empaque:hover { background: var(--naranja); color: #fff; }

/* ---- Admin: umbrales de stock por categoría ---- */
.cat-fila { border: 1px solid #eee6d8; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: #fdfbf7; }
.cat-cab { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cat-nombre { font-weight: 800; font-size: 14px; color: var(--negro); }
.cat-num { color: var(--gris); font-size: 12.5px; font-weight: 600; }
.cat-chip { font-size: 11.5px; font-weight: 800; border-radius: 999px; padding: 2px 10px; }
.cat-chip-propia { background: var(--verde-bg); color: var(--verde); }
.cat-chip-hereda { background: #e9f1fd; color: #2f6fd6; }
.cat-chip-falta { background: #fdeaea; color: #c0392b; }
.cat-aviso { font-size: 12.5px; color: #9a6b00; background: #fdf3d7; border-radius: 8px; padding: 7px 10px; margin-top: 8px; }
.cat-prods { margin-top: 8px; font-size: 13px; }
.cat-prods summary { cursor: pointer; color: var(--naranja); font-weight: 700; font-size: 12.5px; }
.cat-prods ul { margin: 8px 0 0; padding-left: 20px; color: var(--gris); max-height: 240px; overflow-y: auto; }
.cat-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.cat-form label { font-size: 12.5px; color: var(--gris); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.cat-form input[type=number] { width: 72px; padding: 7px 8px; border: 1.5px solid #e0d8c8; border-radius: 8px; font-size: 13.5px; font-family: inherit; }

/* ---- Admin: reglas de compra por producto ---- */
.regla-buscar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.regla-buscar input[type=text] { flex: 1; min-width: 220px; padding: 10px 13px; border: 1.5px solid #e0d8c8; border-radius: 10px; font-size: 14px; font-family: inherit; }
.regla-item { border: 1px solid #eee6d8; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: #fdfbf7; }
.regla-nombre { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; font-size: 13.5px; }
.regla-resumen { color: var(--gris); font-size: 12.5px; font-weight: 600; }
.regla-form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.regla-form label { font-size: 12.5px; color: var(--gris); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.regla-form input[type=number] { width: 80px; padding: 7px 8px; border: 1.5px solid #e0d8c8; border-radius: 8px; font-size: 13.5px; font-family: inherit; }
.regla-check { cursor: pointer; }

/* ---- Reglas de compra: tarjetas con foto + guardado en lote ---- */
.rg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.rg-card { display: flex; gap: 14px; background: #fdfbf7; border: 1.5px solid #eee6d8; border-radius: 14px; padding: 14px; transition: border-color .15s ease, box-shadow .15s ease; }
.rg-card.rg-con-regla { background: #fff; }
.rg-card.rg-cambiado { border-color: var(--naranja); box-shadow: 0 0 0 3px var(--naranja-bg); background: #fffdf8; }
.rg-foto { width: 84px; height: 84px; border-radius: 12px; background: #f3eee4; flex: none; display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 30px; }
.rg-foto img { width: 100%; height: 100%; object-fit: contain; }
.rg-info { flex: 1; min-width: 0; }
.rg-nombre { font-weight: 700; font-size: 13.5px; color: var(--negro); line-height: 1.35; margin-bottom: 6px; }
.rg-ref { color: var(--naranja); font-weight: 800; }
.rg-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.rg-cambio-chip { display: none; font-size: 11.5px; font-weight: 800; border-radius: 999px; padding: 2px 10px; background: var(--naranja); color: #fff; }
.rg-card.rg-cambiado .rg-cambio-chip { display: inline-block; }
.rg-inputs { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rg-inputs label { font-size: 12px; color: var(--gris); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.rg-inputs input[type=number] { width: 68px; padding: 7px 8px; border: 1.5px solid #e0d8c8; border-radius: 8px; font-size: 13.5px; font-family: inherit; }
.rg-check { cursor: pointer; }
.rg-quitar { margin-left: auto; }
.rg-barra { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; align-items: center; justify-content: center; gap: 18px; padding: 14px 18px; background: #fff; border-top: 1px solid var(--linea); box-shadow: 0 -6px 20px rgba(0,0,0,.08); }
.rg-barra span { color: var(--gris); font-size: 14px; font-weight: 600; }
.rg-barra.rg-barra-activa span { color: var(--naranja); font-weight: 800; }
.rg-barra .btn[disabled] { opacity: .45; cursor: not-allowed; }
@media (max-width: 560px) { .rg-grid { grid-template-columns: 1fr; } }
.rg-filtro-sel { padding: 9px 12px; border: 1.5px solid #e0d8c8; border-radius: 10px; font-size: 13.5px; font-family: inherit; background: #fff; color: var(--negro); }
.rg-filtro-num { font-size: 12.5px; color: var(--gris); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.rg-filtro-num input { width: 84px; padding: 8px 9px; border: 1.5px solid #e0d8c8; border-radius: 8px; font-size: 13.5px; font-family: inherit; }
.rg-chips-rapidos { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; color: var(--gris); font-size: 12.5px; font-weight: 700; }
.rg-chips-rapidos .cat-chip { text-decoration: none; background: #f1ede4; color: var(--gris); }
.rg-chips-rapidos .cat-chip:hover { background: var(--naranja-bg); color: var(--naranja); }

/* ---- Umbrales de stock: árbol plegable ---- */
.us-cat { border: 1.5px solid #eee6d8; border-radius: 14px; margin: 10px 0; background: #fff; overflow: hidden; }
.us-cat summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 13px 16px; }
.us-cat summary::-webkit-details-marker { display: none; }
.us-cat summary:hover { background: #fbf8f2; }
.us-flecha { color: var(--naranja); font-size: 13px; transition: transform .15s; flex: none; }
.us-cat[open] > summary .us-flecha { transform: rotate(90deg); }
.us-nombre { font-weight: 800; font-size: 14px; color: var(--negro); }
.us-num { color: var(--gris); font-size: 12px; font-weight: 600; }
.us-cuerpo { padding: 4px 14px 14px 30px; }
.us-cuerpo .us-cat { background: #fdfbf7; }
.us-form-tit { font-size: 12.5px; font-weight: 800; color: var(--negro); }
.us-prods { margin: 10px 0; border: 1px dashed #e0d8c8; border-radius: 10px; padding: 10px 12px; background: #fdfbf7; }
.us-prods > summary { cursor: pointer; font-size: 12.5px; font-weight: 800; color: var(--naranja); list-style: none; }
.us-prods > summary::-webkit-details-marker { display: none; }
.us-prod { border-top: 1px solid #f0eae0; padding: 10px 0 4px; margin-top: 10px; }
.us-prod:first-of-type { margin-top: 8px; }
.us-prod-nom { font-size: 13px; font-weight: 700; color: var(--negro); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.us-prod-form { margin-top: 0; }
.tb-timer {
  font-size: 52px; font-weight: 800; text-align: center; color: var(--negro);
  letter-spacing: 2px; margin: 10px 0 14px; font-variant-numeric: tabular-nums;
}
.tb-timer-fila { display: flex; gap: 12px; flex-wrap: wrap; }
.tb-timer-quien { font-size: 13px; font-weight: 400; color: var(--gris); }
.tb-chip-pausa { background: #efe9e0; color: #6a6156; }
.tb-aviso {
  background: var(--naranja); color: #fff; border-radius: 14px;
  padding: 16px 20px; font-size: 17px; font-weight: 700; text-align: center;
  cursor: pointer; margin-bottom: 16px;
  animation: tb-parpadeo 1.2s ease-in-out infinite alternate;
}
@keyframes tb-parpadeo { from { opacity: 1; } to { opacity: .72; } }

/* Modo oscuro de campana, notificaciones y borradores */
.modo-oscuro .aut-card { background: var(--crema-2); border-color: var(--linea); }
.modo-oscuro .aut-hist { background: var(--crema-2); border-color: var(--linea); }
.modo-oscuro .aut-hist-fila { border-bottom-color: var(--linea); }
.modo-oscuro .aut-sec-hist { background: #2b2721; color: var(--gris); }
.modo-oscuro .og-correo { background: #1a2f3a; color: #6db3d1; }
.modo-oscuro .topbar-campana { color: var(--tinta); }
.modo-oscuro .campana-num { border-color: var(--crema-2); }
.modo-oscuro .notif-item, .modo-oscuro .borr-caja { background: var(--crema-2); border-color: var(--linea); }
.modo-oscuro .notif-item.notif-nueva { background: var(--naranja-bg); border-color: var(--naranja); }
.modo-oscuro .notif-msg { color: var(--gris); }
.modo-oscuro .borr-item { border-bottom-color: var(--linea); }

/* Rediseño Mis cuentas (jul 2026) */
.modo-oscuro .cuentas-tabs { background: var(--crema-2); border-color: var(--linea); }
.modo-oscuro .cuentas-tab.activa { background: var(--naranja); color: #fff; }
.modo-oscuro .cuentas-tab.activa:hover { color: #fff; }

/* Rediseño perfil (jul 2026) */
.modo-oscuro .perfil-cabecera { background: transparent !important; border-bottom-color: var(--linea); }
.modo-oscuro .perfil-nota { background: #2b2721; color: var(--gris); }
.modo-oscuro .perfil-dato { border-bottom-color: var(--linea); }

/* Rediseño reportar pago (jul 2026) */
.modo-oscuro .subir-tips > svg { color: var(--ambar-tx); }
.modo-oscuro .subir-titulo { color: var(--negro) !important; }

/* Rediseño del catálogo (jul 2026): buscador, selector de vista y estados */
.modo-oscuro .vista-toggle { background: var(--crema-2); }
.modo-oscuro .vt-btn { background: transparent !important; color: var(--gris); }
.modo-oscuro .vt-btn.vt-activo { background: var(--naranja) !important; color: #fff !important; }
.modo-oscuro .estado-caja { background: var(--crema-2); }
.modo-oscuro .cupo-credito .cupo-detalle { color: #9dbfa6; }
.modo-oscuro .cupo-ico { color: #1a1815; }
