/* =========================================================
   APAMUY — Panel
   ========================================================= */
:root { --pri: #E63946; --pri2: #1A1430; --acc: #FFC21A; --ink: #18202b; --muted: #687384; --bg: #f4f3f0; --card: #fff; --line: #e4e2dc;
  --ok: #157a46; --okb: #e5f5ec; --bad: #b42318; --badb: #fdecec; --warn: #8a5a00; --warnb: #fff4d6; --prib: #e8edf4; --r: 14px; }
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 "Barlow", "Inter", system-ui, sans-serif; color: var(--ink); background: var(--bg); }
h1, h2 { font-family: "Manrope", system-ui, sans-serif; letter-spacing: -.02em; margin: 0; } h1 { font-size: 1.6rem; } h2 { font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }
.ic { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; } .muted { color: var(--muted); } .sm { font-size: .85rem; } .mono { font-family: ui-monospace, monospace; font-size: .86rem; }
:focus-visible { outline: 3px solid var(--acc); outline-offset: 2px; }
.btn { display: inline-flex; align-items: center; gap: 6px; justify-content: center; font: 600 .9rem "Inter", sans-serif; padding: 9px 15px; border-radius: 10px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, transform .1s; }
.btn:active { transform: scale(.98); } .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-pri { background: var(--pri); color: #fff; } .btn-pri:hover { background: var(--pri2); } .btn-acc { background: var(--acc); color: #2b1d00; }
.btn-light { background: var(--card); border-color: var(--line); color: var(--ink); } .btn-light:hover { background: #f8f7f4; } .btn-wa { background: #1fa855; color: #fff; }
.btn-sm { padding: 6px 11px; font-size: .83rem; } .btn-xs { padding: 3px 7px; font-size: .78rem; } .btn-lg { padding: 13px 20px; width: 100%; font-size: 1rem; } .danger { color: var(--bad) !important; }
.spin { display: inline-block; width: 20px; height: 20px; border: 2.5px solid var(--muted); border-right-color: transparent; border-radius: 50%; animation: sp .7s linear infinite; } @keyframes sp { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; min-height: 40vh; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 30% 20%, #2b2e36, #15171c); }
.l-box { background: #fff; padding: 30px; border-radius: 20px; width: min(400px, 100%); display: grid; gap: 12px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .6); }
.l-logo { width: 54px; height: 54px; border-radius: 16px; background: var(--pri); color: var(--acc); display: grid; place-items: center; } .l-logo .ic { width: 28px; height: 28px; fill: var(--acc); }
.l-box p { margin: 0; color: var(--muted); } .l-err { color: var(--bad) !important; font-weight: 600; min-height: 1em; }
.demo-n { background: var(--warnb); color: var(--warn); padding: 10px 12px; border-radius: 10px; font-size: .86rem; }

/* Estructura */
.shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: var(--pri2); color: #d6dbe3; padding: 18px 12px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.s-brand { display: flex; gap: 10px; align-items: center; padding: 0 8px 8px; color: #fff; } .s-brand .ic { width: 30px; height: 30px; fill: var(--acc); color: var(--acc); } .s-brand small { display: block; color: #93a0b2; font-size: .75rem; }
.s-nav { display: grid; gap: 2px; } .s-nav button { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; color: inherit; font: 500 .92rem "Inter"; padding: 9px 10px; border-radius: 10px; cursor: pointer; text-align: left; }
.s-nav button:hover { background: rgba(255, 255, 255, .06); } .s-nav button[aria-current="page"] { background: rgba(255, 255, 255, .12); color: #fff; font-weight: 600; }
.cnt { margin-left: auto; background: #e5484d; color: #fff; font-size: .72rem; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px; }
.s-user { margin-top: auto; display: grid; gap: 5px; padding: 12px 8px 0; border-top: 1px solid rgba(255, 255, 255, .1); } .s-user small { color: #93a0b2; } .s-user b { color: #fff; } .s-user .st { justify-self: start; }
.main { min-width: 0; display: flex; flex-direction: column; }
.tb { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 24px; background: rgba(244, 243, 240, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.tb-m { display: none; background: none; border: 0; padding: 6px; cursor: pointer; } .tb-m .ic { width: 24px; height: 24px; }
.tb-s { display: flex; align-items: center; gap: 6px; background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 0 0 0 10px; } .tb-s select { border: 0; background: none; font: 600 .9rem "Inter"; padding: 8px 10px 8px 0; color: var(--ink); }
.tb-s1 { display: flex; gap: 6px; align-items: center; font-weight: 600; } .tb-f { color: var(--muted); font-size: .88rem; margin-left: auto; text-transform: capitalize; }
.view { padding: 22px 24px 60px; display: grid; gap: 16px; align-content: start; max-width: 1400px; width: 100%; }
.v-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; } .v-h p { margin: 4px 0 0; color: var(--muted); } .v-a { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; } .card.hi { border-color: var(--acc); background: #fffaf0; } .card.hi p { color: var(--muted); }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 2px; } .kpi span { color: var(--muted); font-size: .82rem; font-weight: 600; } .kpi b { font: 800 1.6rem "Manrope"; } .kpi small { color: var(--muted); font-size: .78rem; }
.kpi.sm b { font-size: 1.1rem; }
.st { display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; background: #eef0f3; color: #4a5565; }
.st.ok { background: var(--okb); color: var(--ok); } .st.bad { background: var(--badb); color: var(--bad); } .st.warn { background: var(--warnb); color: var(--warn); } .st.pri { background: var(--prib); color: #23426b; }
.alert { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-radius: 12px; background: var(--prib); flex-wrap: wrap; } .alert > span { flex: 1; min-width: 200px; }
.alert.warn { background: var(--warnb); color: var(--warn); } .alert.bad { background: var(--badb); color: var(--bad); } .alert.sm { padding: 7px 10px; font-size: .84rem; margin-top: 6px; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); } .empty .ic { width: 40px; height: 40px; }
.lst { list-style: none; margin: 0; padding: 0; display: grid; } .lst li { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); } .lst li:last-child { border: 0; }
.lst li > div { flex: 1; min-width: 0; } .lst small { display: block; color: var(--muted); font-size: .8rem; } .lst p { margin: 4px 0 0; font-size: .88rem; }

/* Habitaciones (tablero) */
.leg { display: flex; gap: 6px; flex-wrap: wrap; } .lg { font-size: .72rem; font-weight: 600; padding: 3px 8px; border-radius: 6px; border-left: 4px solid; background: #f7f7f5; }
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; } .rooms.sm { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.room { text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 12px; display: grid; gap: 1px; cursor: pointer; font: inherit; color: inherit; border-left-width: 6px; min-height: 92px; align-content: start; }
.room b { font: 800 1.3rem "Manrope"; } .room small { color: var(--muted); font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .room span { font-size: .78rem; font-weight: 700; } .room em { font-style: normal; font-size: .76rem; color: var(--muted); }
.room .btn { margin-top: 6px; justify-self: start; }
.libre, .lg.libre { border-left-color: #2fb36d; } .room.libre span { color: var(--ok); }
.llega, .lg.llega { border-left-color: #3b82f6; } .room.llega { background: #f1f6ff; } .room.llega span { color: #1d4ed8; }
.ocup, .lg.ocup { border-left-color: #7c3aed; } .room.ocup { background: #f6f2ff; } .room.ocup span { color: #6d28d9; }
.sale, .lg.sale { border-left-color: #f59e0b; } .room.sale { background: #fff8eb; } .room.sale span { color: #b45309; }
.limp, .lg.limp { border-left-color: #ec4899; } .room.limp { background: #fff1f7; } .room.limp span { color: #be185d; }
.mant, .lg.mant { border-left-color: #6b7280; } .room.mant { background: #f3f4f6; } .room.mant span { color: #4b5563; }

/* Calendario */
.cal-w { overflow-x: auto; padding: 0; } .cal { min-width: 900px; display: grid; }
.cal-hd, .cal-r { display: grid; grid-template-columns: 110px repeat(var(--n), 1fr); } .cal-hd { position: sticky; top: 0; background: #fafaf8; border-bottom: 1px solid var(--line); }
.cal-hd span { text-align: center; padding: 6px 0; font-size: .75rem; color: var(--muted); } .cal-hd b { display: block; font-size: 1rem; color: var(--ink); } .cal-hd .hoy { background: var(--prib); } .cal-hd .fin { background: #f6f4ef; }
.cal-r { position: relative; border-bottom: 1px solid var(--line); min-height: 50px; grid-template-rows: 50px; }
.cal-n { grid-column: 1; grid-row: 1; padding: 6px 10px; border-right: 1px solid var(--line); } .cal-n b { display: block; } .cal-n small { color: var(--muted); font-size: .72rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-c { grid-row: 1; border: 0; border-right: 1px solid #f0eee9; background: transparent; cursor: pointer; } .cal-c:hover { background: #eef6f0; } .cal-c.hoy { background: rgba(232, 237, 244, .5); }
.cal-b { grid-row: 1; margin: 8px 3px; border-radius: 8px; border: 0; color: #fff; font: 600 .78rem "Inter"; padding: 0 8px; text-align: left; cursor: pointer; overflow: hidden; z-index: 1; background: #3b82f6; }
.cal-b span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.cal-b.checkin, .lg.b-checkin { background: #7c3aed; border-left-color: #7c3aed; } .cal-b.por-validar, .lg.b-por-validar { background: #f59e0b; border-left-color: #f59e0b; } .cal-b.finalizada, .lg.b-finalizada { background: #9ca3af; border-left-color: #9ca3af; } .lg.b-confirmada { border-left-color: #3b82f6; }
.lg.b-checkin, .lg.b-por-validar, .lg.b-finalizada { color: #fff; }

/* Tablas */
.tbl-w { overflow-x: auto; } .tbl { width: 100%; border-collapse: collapse; font-size: .88rem; } .tbl th { text-align: left; font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid #efede8; vertical-align: middle; } .tbl td small { display: block; color: var(--muted); font-size: .76rem; } .tbl .r { text-align: right; } .tbl tr.off { opacity: .5; } .neg { color: var(--bad); }
.tbl .emo { font-size: 1.5rem; width: 40px; } .stk { display: inline-flex; align-items: center; gap: 6px; } .stk b { min-width: 24px; text-align: center; }
.tbl.cuenta td:last-child { text-align: right; white-space: nowrap; } .tbl.cuenta tr.t td { font-weight: 700; font-size: 1rem; }
.q { font: 500 .9rem "Inter"; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; min-width: 220px; }
.seg { display: inline-flex; background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 3px; } .seg button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; font: 600 .85rem "Inter"; cursor: pointer; color: var(--muted); } .seg button.on { background: var(--pri); color: #fff; }

/* Pagos y pedidos */
.pws, .peds { display: grid; gap: 12px; }
.pw { display: grid; grid-template-columns: 140px 1fr; gap: 16px; } .pw p { margin: 4px 0; } .pw-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .pw-h > b { font: 800 1.3rem "Manrope"; }
.pw-img { border: 1px solid var(--line); border-radius: 12px; background: #f6f6f4; height: 200px; overflow: hidden; padding: 0; cursor: zoom-in; color: var(--muted); } .pw-img img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.zoom { max-width: 100%; max-height: 72vh; display: block; margin: 0 auto; border-radius: 10px; }
.ped { display: grid; grid-template-columns: 44px 1fr; gap: 12px; } .ped.nuevo { border-left: 5px solid #f59e0b; } .ped.preparando { border-left: 5px solid #3b82f6; }
.ped-i { width: 44px; height: 44px; border-radius: 12px; background: var(--prib); display: grid; place-items: center; color: #23426b; } .ped-i .ic { width: 22px; height: 22px; }
.ped-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .ped-h b { font-size: 1.02rem; } .ped p { margin: 4px 0; } .ped-f { max-height: 140px; border-radius: 10px; cursor: zoom-in; margin-top: 6px; }
.acts-g { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* Habitaciones y sedes */
.habs-a { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.hab-a { padding: 0; overflow: hidden; } .hab-a.off { opacity: .55; } .hab-f { height: 130px; background: #e9e6df center / cover; } .hab-ab { padding: 14px; } .hab-ab p { margin: 4px 0; font-size: .88rem; }
.hab-h { display: flex; justify-content: space-between; gap: 8px; align-items: center; } .hab-h b { font: 800 1.1rem "Manrope"; }
.amen-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 4px 10px; margin-top: 6px; }
.foto-up, .qr-up { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 6px; } .foto-up > span { width: 120px; height: 80px; border-radius: 10px; background: #eee center / cover; border: 1px solid var(--line); }
.qr-up { border: 1px solid var(--line); border-radius: 12px; padding: 12px; } .qr-up > span { width: 90px; height: 90px; border-radius: 10px; background: #f6f6f4; display: grid; place-items: center; overflow: hidden; } .qr-up > span img { width: 100%; height: 100%; object-fit: contain; }
.qr-up .fld { flex: 1; min-width: 160px; }
.qr-v { text-align: center; } .qr-v img { width: 240px; margin: 0 auto; image-rendering: pixelated; } .qr-v p { word-break: break-all; color: var(--muted); }
.bars { display: grid; gap: 10px; } .bar-r { display: grid; grid-template-columns: 160px 1fr 110px; gap: 4px 12px; align-items: center; } .bar-r small { grid-column: 2 / -1; color: var(--muted); font-size: .78rem; }
.bar { height: 12px; background: #f0eee9; border-radius: 6px; overflow: hidden; } .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--pri), #3b5b85); border-radius: 6px; } .bar-r b { text-align: right; }

/* Formularios y modal */
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; } .full { grid-column: 1 / -1; }
.fld { display: grid; gap: 4px; font-size: .82rem; font-weight: 600; color: var(--muted); } .fld small { font-weight: 400; }
.fld input, .fld select, .fld textarea { font: 500 .92rem "Inter"; padding: 9px 11px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--pri); box-shadow: 0 0 0 3px rgba(31, 42, 55, .12); }
.lbl { font-size: .82rem; font-weight: 600; color: var(--muted); }
.chk { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; cursor: pointer; } .chk input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--pri); flex: none; } .chk small { display: block; color: var(--muted); font-size: .78rem; } .chk.sm { font-size: .82rem; }
.in-b { display: flex; gap: 6px; } .in-b input { flex: 1; min-width: 0; }
.sep { font: 700 .8rem "Inter"; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.cot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: var(--prib); padding: 10px 12px; border-radius: 10px; font-size: .9rem; }
.f-end { display: flex; justify-content: flex-end; margin-top: 14px; } form.card h2 { margin: 6px 0 12px; } form.card h2:not(:first-child) { margin-top: 22px; }
.modal { position: fixed; inset: 0; background: rgba(15, 20, 28, .55); z-index: 60; display: none; place-items: center; padding: 16px; } .modal.open { display: grid; }
.m-box { background: #fff; border-radius: 18px; width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .5); } .m-box.wide { width: min(780px, 100%); }
.m-box header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); } .m-box header h2 { font-size: 1.15rem; }
.m-x { background: none; border: 0; cursor: pointer; padding: 6px; border-radius: 8px; } .m-x:hover { background: #f3f3f1; }
#mF { display: flex; flex-direction: column; min-height: 0; } #mB { padding: 18px 20px; overflow-y: auto; } #mB > p { margin-top: 0; }
.m-box footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); }
.dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 14px 0; } .dl dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; } .dl dd { margin: 2px 0 0; font-weight: 600; } .dl small { display: block; font-weight: 400; color: var(--muted); }
.nota { background: #fffaf0; padding: 10px; border-radius: 10px; } .mini-r { display: grid; gap: 2px; background: #f7f7f5; padding: 10px; border-radius: 10px; } .mini-r small { color: var(--muted); }
.pin-big { text-align: center; font-size: 1rem; } .pin-big b { display: block; font: 800 3rem "Manrope"; letter-spacing: .3em; color: var(--pri); }
.ok-t { color: var(--ok); font-weight: 600; display: flex; gap: 6px; align-items: center; margin: 0; }
#toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 160%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 12px; z-index: 99; transition: transform .25s; font-size: .9rem; max-width: calc(100% - 32px); }
#toast.show { transform: translate(-50%, 0); } #toast.bad { background: var(--bad); }

@media (max-width: 980px) { .two { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; } .side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 50; transform: translateX(-100%); transition: transform .2s; } .side.open { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, .4); }
  .tb-m { display: block; } .tb { padding: 8px 12px; } .tb-f { display: none; } .tb .btn span { display: none; } .view { padding: 16px 12px 60px; }
  .g2, .dl { grid-template-columns: 1fr; } .pw { grid-template-columns: 1fr; } .pw-img { height: 220px; } .bar-r { grid-template-columns: 1fr 90px; } .bar-r .bar { grid-column: 1 / -1; grid-row: 2; } .bar-r small { grid-column: 1 / -1; }
  .q { min-width: 0; width: 100%; } .rooms { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation-duration: .01ms !important; } }
.p-th { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; display: grid; place-items: center; background: #f4f3f0; border: 1px solid var(--line); }
.p-th.e { font-size: 1.5rem; }
.p-prev { width: 96px !important; height: 96px !important; display: grid; place-items: center; font-size: 2.6rem; overflow: hidden; background: #f4f3f0 !important; }
.p-prev img { width: 100%; height: 100%; object-fit: cover; }
.foto-up small { flex-basis: 100%; }
.logo-prev { width: 84px !important; height: 84px !important; display: grid; place-items: center; background: #fff !important; } .logo-prev img { width: 100%; height: 100%; object-fit: contain; } .logo-prev .ic { width: 36px; height: 36px; }
.s-logo { width: 34px; height: 34px; border-radius: 9px; object-fit: contain; background: #fff; padding: 2px; }
.fld input[type="color"] { height: 42px; padding: 3px; cursor: pointer; }
.gal-ed { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.g-th { position: relative; width: 120px; height: 86px; border-radius: 10px; background: #eee center / cover; border: 2px solid var(--line); }
.g-th.main { border-color: var(--acc); } .g-th span { position: absolute; left: 4px; bottom: 4px; background: var(--acc); color: #2b1d00; font-size: .68rem; font-weight: 700; padding: 1px 6px; border-radius: 6px; }
.g-th button { position: absolute; top: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .65); color: #fff; cursor: pointer; font-size: .9rem; line-height: 1; } .g-th [data-gx] { right: 4px; } .g-th [data-gp] { left: 4px; }
.g-add { width: 120px; height: 86px; border: 2px dashed var(--line); border-radius: 10px; display: grid; place-content: center; justify-items: center; gap: 4px; cursor: pointer; color: var(--muted); font-size: .78rem; font-weight: 600; }
.tour-ed { display: grid; gap: 8px; margin: 6px 0 8px; }
.t-row { display: grid; grid-template-columns: 72px 1fr auto; gap: 10px; align-items: center; background: #f8f7f4; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.t-foto { width: 72px; height: 56px; border-radius: 8px; background: #fff center / cover; border: 1.5px dashed var(--line); display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.t-f { display: grid; grid-template-columns: 1.3fr 1.3fr .6fr 1.5fr; gap: 6px; } .t-f input { font: 500 .86rem "Inter"; padding: 7px 9px; border: 1.5px solid var(--line); border-radius: 8px; min-width: 0; }
.t-x { background: none; border: 0; color: var(--bad); cursor: pointer; padding: 6px; border-radius: 8px; } .t-x:hover { background: var(--badb); }
@media (max-width: 820px) { .t-f { grid-template-columns: 1fr 1fr; } }
.zona-peligro { margin-top: 18px; border: 1.5px solid #f3c7c3; background: #fff8f7; border-radius: 12px; padding: 12px 14px; } .zona-peligro p { margin: 4px 0 10px; }

/* ---------- Ferretería ---------- */
.btn-pri { background: var(--acc); color: #15171c; } .btn-pri:hover { background: #e8b000; }
.s-nav button[aria-current="page"] { background: var(--acc); color: #15171c; } .s-brand .ic { color: var(--acc); fill: none; }
.l-logo { background: var(--acc); color: #15171c; } .l-logo .ic { fill: none; color: #15171c; }
.cnt { background: #e23b2e; }
.ped.por-validar { border-left: 5px solid #f59e0b; } .ped.nuevo { border-left: 5px solid var(--acc); } .ped.preparando, .ped.enviado { border-left: 5px solid #3b82f6; }
.it { display: inline-block; background: #f4f5f7; border-radius: 6px; padding: 2px 8px; margin: 2px 4px 2px 0; font-size: .86rem; }
.p-th { width: 46px; height: 46px; border-radius: 8px; display: block; background: #eceef1 center / cover; border: 1px solid var(--line); }
.p-prev { width: 110px !important; height: 110px !important; }
.pos { display: grid; grid-template-columns: 1fr 380px; gap: 16px; align-items: start; }
.pos-f { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; } .pos-f .q { flex: 1; min-width: 160px; }
.pos-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; max-height: 70vh; overflow-y: auto; }
.pos-p { background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 8px; display: grid; gap: 3px; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.pos-p:hover { border-color: var(--acc); } .pos-p.off { opacity: .45; cursor: not-allowed; }
.pos-i { aspect-ratio: 4/3; border-radius: 8px; background: #eceef1 center / cover; } .pos-p b { font-size: .86rem; line-height: 1.2; } .pos-p span:not(.pos-i) { font-weight: 800; } .pos-p small { color: var(--muted); font-size: .74rem; }
.pos-c { position: sticky; top: 70px; display: grid; gap: 10px; } .pos-c h2 { margin-bottom: 4px; }
.pos-l { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 34vh; overflow-y: auto; }
.pos-l li { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; font-size: .88rem; } .pos-l small { display: block; color: var(--muted); }
.qty-b { display: inline-flex; align-items: center; gap: 4px; } .qty-b button { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; } .qty-b .ic { width: 14px; height: 14px; }
.pos-t { display: flex; justify-content: space-between; align-items: center; background: #15171c; color: #fff; border-radius: 10px; padding: 10px 14px; } .pos-t b { font: 800 1.6rem "Manrope"; color: var(--acc); }
.vuelto { font: 800 1.2rem "Manrope"; color: var(--ok); padding: 8px 0; }
.cats li { gap: 12px; } .cat-ic { width: 40px; height: 40px; border-radius: 10px; background: var(--acc); display: grid; place-items: center; flex: none; } .cat-ic .ic { width: 22px; height: 22px; }
.ic-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; } .ic-pick label { cursor: pointer; } .ic-pick input { position: absolute; opacity: 0; }
.ic-pick span { width: 42px; height: 42px; border-radius: 10px; border: 2px solid var(--line); display: grid; place-items: center; } .ic-pick input:checked + span { border-color: #15171c; background: var(--acc); } .ic-pick input:focus-visible + span { outline: 3px solid var(--acc); }
.dias { display: grid; grid-template-columns: repeat(30, 1fr); gap: 3px; align-items: end; height: 160px; } .dias div { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.dias i { width: 100%; background: var(--acc); border-radius: 4px 4px 0 0; } .dias small { font-size: .66rem; color: var(--muted); height: 12px; }
.bar i { background: linear-gradient(90deg, #15171c, #3a3d45); }
@media (max-width: 1000px) { .pos { grid-template-columns: 1fr; } .pos-c { position: static; } }

/* Historial de recibos por cliente */
.tbl tr.clk { cursor: pointer; } .tbl tr.clk:hover td { background: #fffbea; }
.nw { white-space: nowrap; }
.hc-top { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.hc-top div { background: #f6f6f6; border-radius: 10px; padding: 10px 12px; } .hc-top small { display: block; color: #777; font-size: .78rem; } .hc-top b { font-size: 1.05rem; }
@media (max-width: 640px) { .hc-top { grid-template-columns: 1fr 1fr; } }

/* ---------- Tarjetas de resumen con color neón (Inicio, Caja, Facturación, Reportes) ---------- */
.kpis.neon .kpi { --nc: #10b981; --nt: #047857; position: relative; overflow: hidden; border: 1.5px solid color-mix(in srgb, var(--nc) 55%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--nc) 13%, #fff), #fff 70%); box-shadow: 0 0 0 1px color-mix(in srgb, var(--nc) 12%, transparent), 0 6px 18px color-mix(in srgb, var(--nc) 22%, transparent); transition: transform .15s, box-shadow .15s; }
.kpis.neon .kpi::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--nc); box-shadow: 0 0 12px var(--nc); }
.kpis.neon .kpi:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px color-mix(in srgb, var(--nc) 30%, transparent), 0 10px 26px color-mix(in srgb, var(--nc) 35%, transparent); }
.kpis.neon .kpi span { color: var(--nt); }
.kpis.neon .kpi b { color: var(--nt); text-shadow: 0 0 14px color-mix(in srgb, var(--nc) 45%, transparent); }
.kpis.neon .kpi b.neg { color: var(--bad); }
.kpis.neon .kpi:nth-child(7n+1) { --nc: #10f0a0; --nt: #047857; }   /* verde neón */
.kpis.neon .kpi:nth-child(7n+2) { --nc: #22d3ee; --nt: #0e7490; }   /* celeste neón */
.kpis.neon .kpi:nth-child(7n+3) { --nc: #fbbf24; --nt: #b45309; }   /* amarillo / naranja neón */
.kpis.neon .kpi:nth-child(7n+4) { --nc: #a855f7; --nt: #7e22ce; }   /* morado neón */
.kpis.neon .kpi:nth-child(7n+5) { --nc: #f472b6; --nt: #be185d; }   /* rosado / fucsia neón */
.kpis.neon .kpi:nth-child(7n+6) { --nc: #60a5fa; --nt: #1d4ed8; }   /* azul neón */
.kpis.neon .kpi:nth-child(7n+7) { --nc: #a3e635; --nt: #4d7c0f; }   /* lima neón */
@media (prefers-reduced-motion: reduce) { .kpis.neon .kpi { transition: none; } .kpis.neon .kpi:hover { transform: none; } }

/* ---------- Pollería: tablero de pedidos ---------- */
.l-logo .ic, .s-brand .ic { fill: var(--acc); stroke: var(--acc); }
.tb-ab { border: 1.5px solid var(--line); background: #fff; color: var(--ink); } .tb-ab i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.tb-ab.on { color: var(--ok); border-color: #a7dfc0; background: var(--okb); } .tb-ab.off { color: var(--bad); border-color: #f3b4ae; background: var(--badb); }
.radios, .tiempos { display: grid; gap: 8px; } .tiempos { grid-template-columns: repeat(3, 1fr); margin: 10px 0 14px; }
.rd { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 600; }
.rd input { accent-color: var(--pri); width: 18px; height: 18px; margin: 0; } .rd:has(input:checked) { border-color: var(--pri); background: #fff1f1; } .rd small { color: var(--muted); font-weight: 500; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 14px; } .chip { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 13px; font: 600 .85rem "Inter"; cursor: pointer; }
.chip.on { background: var(--pri2); color: #fff; border-color: var(--pri2); }
.board { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.col { background: #ebe7df; border-radius: 14px; padding: 10px; display: grid; gap: 10px; min-height: 120px; } .col h3 { margin: 2px 4px; font: 800 .95rem "Manrope"; display: flex; justify-content: space-between; }
.col h3 b { background: var(--pri2); color: #fff; border-radius: 999px; padding: 0 9px; font-size: .8rem; line-height: 1.6; } .col-v { text-align: center; margin: 14px 0; }
@media (max-width: 1100px) { .board { grid-template-columns: repeat(4, 280px); } }
.board .ped, .peds .ped { grid-template-columns: 1fr; padding: 12px 14px; gap: 4px; } .peds { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ped.cocina { border-left: 5px solid #f97316; } .ped.listo, .ped.camino { border-left: 5px solid #3b82f6; } .ped.entregado { border-left: 5px solid var(--ok); } .ped.anulado, .ped.rechazado { border-left: 5px solid var(--bad); opacity: .8; }
.ped.tarde { box-shadow: 0 0 0 2px #f87171, 0 6px 18px rgba(239, 68, 68, .2); }
.ent { font-weight: 800; font-size: .85rem; } .reloj { margin-left: auto; display: inline-flex; gap: 4px; align-items: center; font-weight: 700; font-size: .8rem; color: var(--muted); } .reloj.neg { color: var(--bad); }
.ped-h .st { margin-left: auto; } .ped-n { font-size: 1.05rem; }
.ped-it { list-style: none; margin: 4px 0; padding: 8px 10px; background: #faf8f4; border-radius: 10px; display: grid; gap: 5px; } .ped-it li { line-height: 1.3; } .ped-it small { display: block; color: var(--muted); font-size: .8rem; padding-left: 20px; }
.ped-nota { background: var(--warnb); color: var(--warn); padding: 6px 10px; border-radius: 8px; font-weight: 600; }
.ped .acts-g { margin-top: 6px; } .ped a { color: #1d4ed8; }
.st.fire { background: #ffedd5; color: #c2410c; } .st.info { background: #dbeafe; color: #1e40af; }
/* venta en local */
.pos-i.em { display: grid; place-items: center; font-size: 2rem; background: linear-gradient(135deg, #fde9b8, #f6c46a); }
.p-th.em { display: grid; place-items: center; font-size: 1.3rem; background: linear-gradient(135deg, #fde9b8, #f6c46a); }
.seg-f { display: grid; grid-auto-flow: column; width: 100%; margin: 8px 0 10px; } .seg-f button { padding: 8px 6px; }
.pos-l small { display: block; color: var(--muted); font-size: .78rem; line-height: 1.3; }
.og { border: 0; padding: 0; margin: 0 0 12px; } .og legend { font-weight: 800; margin-bottom: 6px; } .og-l { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; } .og-l .rd { padding: 8px 10px; font-size: .9rem; }
/* carta */
.precio { width: 92px; text-align: right; padding: 6px 8px; font-weight: 700; }
.sw { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .82rem; font-weight: 600; } .sw input { position: absolute; opacity: 0; }
.sw i { width: 38px; height: 22px; border-radius: 11px; background: #d4d0c8; position: relative; transition: .15s; flex: none; } .sw i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.sw input:checked + i { background: var(--ok); } .sw input:checked + i::after { left: 19px; } .sw input:focus-visible + i { outline: 3px solid var(--acc); } .sw input:disabled + i { opacity: .5; }
.sw input:not(:checked) ~ span { color: var(--bad); }
.grp { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 10px; display: grid; gap: 8px; background: #fcfbf9; }
.grp-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .grp-h input[data-gt] { flex: 1; min-width: 180px; } .grp textarea { width: 100%; font: inherit; }
.em-pick { display: flex; flex-wrap: wrap; gap: 6px; } .em-pick input { position: absolute; opacity: 0; } .em-pick span { display: grid; place-items: center; width: 42px; height: 42px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 1.35rem; cursor: pointer; }
.em-pick input:checked + span { border-color: var(--pri); background: #fff1f1; } .em-pick input:focus-visible + span { outline: 3px solid var(--acc); }
.cat-em { width: 42px; height: 42px; border-radius: 10px; background: #fff4d6; display: grid; place-items: center; font-size: 1.4rem; flex: none; }
.dias-ck { display: flex; gap: 10px; flex-wrap: wrap; } .dias.horas { height: 120px; }
/* Menú lateral en celular: que se pueda bajar hasta «Salir» */
.side { height: 100dvh; } .side > * { flex-shrink: 0; }
@media (max-width: 820px) { .side { top: 0; bottom: auto; height: 100dvh; max-height: 100dvh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: calc(24px + env(safe-area-inset-bottom)); } }

/* ===================== APAMUY ===================== */
.s-brand b { font-family: "Fredoka", sans-serif; } .s-logo { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; background: #fff; }
.l-box { max-width: 440px; } .l-img { border-radius: 50%; margin-bottom: 6px; } .l-box h1 { font-family: "Fredoka", sans-serif; }
.btn-google { background: #fff; color: #1f1f1f; border: 1.5px solid #dadce0; width: 100%; gap: 10px; } .btn-google:hover { background: #f8f9fa; }
.o-sep { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; margin: 16px 0 6px; } .o-sep::before, .o-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.l-f { display: grid; gap: 10px; text-align: left; } .l-f .btn { width: 100%; }
.btn-link { display: block; margin: 12px auto 0; background: none; border: 0; color: var(--pri); font: 700 .88rem "Inter", sans-serif; cursor: pointer; text-decoration: underline; }
.demo-l { display: grid; gap: 8px; margin-top: 10px; }
.reg { max-width: 920px; margin: 0 auto; padding: 24px 16px 60px; } .reg-h { display: flex; gap: 14px; align-items: center; margin-bottom: 16px; } .reg-h > div { flex: 1; } .reg-h img { border-radius: 50%; } .reg-h p { margin: 4px 0 0; color: var(--muted); }
#nF h2, #cF h2 { margin: 22px 0 10px; } #nF h2:first-child, #cF h2:first-child { margin-top: 0; }
.foto-up { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .foto-up > span { width: 72px; height: 72px; border-radius: 12px; background: #eee center/cover no-repeat; border: 1.5px solid var(--line); flex: none; }
.foto-up > span.fp-portada { width: 150px; height: 72px; } .foto-up > span.fp-yapeQR, .foto-up > span.fp-plinQR { background-size: contain; background-color: #fff; }
.mapa { height: 300px; border-radius: 14px; overflow: hidden; background: #e9e4dc; border: 1.5px solid var(--line); margin-bottom: 10px; z-index: 0; position: relative; }
.am-pin span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--c); border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.35); font-size: 15px; line-height: 1; }
.am-pin i { transform: rotate(45deg); font-style: normal; } .leaflet-div-icon.am-pin { background: none; border: 0; }
.terms { align-items: flex-start; background: #fff8e6; border-radius: 12px; padding: 12px; margin-top: 16px; }
.nv-p { width: 100%; height: 140px; object-fit: cover; border-radius: 12px; } .nv-h { display: flex; gap: 12px; align-items: center; margin: 10px 0; } .nv-h img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; } .nv-h small { display: block; color: var(--muted); }
.dl { display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; margin: 10px 0 16px; font-size: .92rem; } .dl dt { color: var(--muted); font-weight: 600; } .dl dd { margin: 0; }
.st.pri { background: #fde2e4; color: #9b1c27; }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } @media (max-width: 700px) { .g3 { grid-template-columns: 1fr; } }
.tel { font: 600 .82rem "Inter", sans-serif; color: #1d4ed8; margin-left: 6px; text-decoration: none; }
.rb-grid { display: grid; gap: 10px; } .rb-c { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1.5px solid var(--line); border-radius: 14px; } .rb-c.off { opacity: .55; } .rb-c > div:nth-child(2) { flex: 1; display: grid; } .rb-c small { color: var(--muted); }
.rb-i { width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; flex: none; } .rb-i img { width: 50px; height: 50px; object-fit: contain; } .rb-a { display: flex; gap: 4px; }
.bn-l { display: grid; gap: 10px; } .bn-c { display: flex; align-items: center; gap: 12px; background: var(--bn); color: #fff; border-radius: 16px; padding: 14px; } .bn-c.off { opacity: .5; } .bn-c > div { flex: 1; } .bn-c b { font-size: 1.1rem; } .bn-c p { margin: 2px 0; opacity: .9; } .bn-c small { opacity: .85; }
.bn-c img { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(255,255,255,.6); }
