/* Caja Diaria · interfaz (identidad Suite Potenciadora de Digital Carmelo).
   Lo que se imprime NO lleva esta marca: solo la del negocio. */
:root {
  --gp-bg: #f5f6fb; --gp-surface: #ffffff; --gp-border: #e4e6f0; --gp-text: #171923; --gp-text-soft: #666b80;
  --gp-primary: #0d0e32; --gp-primary-dark: #06071f; --gp-gold: #d3ac49; --gp-gold-light: #fcca55;
  --gp-gold-grad: linear-gradient(135deg, #f7dc8a 0%, #d3ac49 45%, #a8812a 100%);
  --gp-danger: #e0455f; --gp-ok: #178a4c; --gp-warn: #b7791f; --gp-radius: 14px; --gp-radius-sm: 9px;
  --gp-shadow: 0 10px 30px -12px rgba(13,14,50,.18);
  font-family: 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { scroll-behavior: smooth; }
body { background: var(--gp-bg); color: var(--gp-text); min-height: 100vh; display: flex; flex-direction: column; }
body > .no-print:first-child { flex: 1; }
button, input, select, textarea { font-family: inherit; font-size: 1rem; color: inherit; }
.soft { color: var(--gp-text-soft); }
.small { font-size: .85rem; }
[hidden] { display: none !important; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .7rem 1.2rem; border-radius: var(--gp-radius-sm); border: none; cursor: pointer; font-weight: 700; transition: transform .12s ease, background .12s ease, filter .12s; background: var(--gp-border); color: var(--gp-text); text-decoration: none; touch-action: manipulation; font-size: .95rem; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn--primary { background: var(--gp-primary); color: #fff; }
.btn--primary:hover { background: var(--gp-primary-dark); }
.btn--outline { background: #fff; border: 1.5px solid var(--gp-primary); color: var(--gp-primary); }
.btn--ghost { background: transparent; color: var(--gp-text-soft); }
.btn--ghost:hover { background: rgba(13,14,50,.06); }
.btn--danger { background: transparent; color: var(--gp-danger); }
.btn--gold { background: var(--gp-gold-grad); color: var(--gp-primary); box-shadow: 0 12px 28px -12px rgba(211,172,73,.8); }
.btn--gold:hover { filter: brightness(1.05); }
.btn--small { min-height: 36px; padding: .4rem .8rem; font-size: .84rem; }
.btn--lg { padding: .95rem 1.5rem; font-size: 1.02rem; }
.btn--icon { min-height: 36px; width: 36px; padding: 0; }

/* Portada (igual a las demás apps de la suite) */
.home-hero { position: relative; overflow: hidden; background: var(--gp-primary); color: #fff; isolation: isolate; }
.home-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 18% 50%, rgba(211,172,73,.18), transparent 55%), radial-gradient(ellipse at 100% 0%, rgba(252,202,85,.10), transparent 45%); }
.home-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--gp-gold-grad); }
.home-hero__inner { max-width: 1100px; margin: 0 auto; padding: 2.6rem 1.5rem 2.8rem; display: grid; grid-template-columns: auto 1fr; gap: 2.4rem; align-items: center; }
.home-hero__logo { width: 170px; height: 170px; object-fit: contain; mix-blend-mode: lighten; }
.home-hero__eyebrow { margin: 0 0 .7rem; font-size: .72rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--gp-gold); }
.home-hero h1 { margin: 0; font-family: 'Cinzel', Georgia, serif; font-weight: 600; font-size: clamp(1.7rem, 4vw, 2.7rem); line-height: 1.12; letter-spacing: .02em; background: linear-gradient(180deg, #fff3cf 0%, #fcca55 45%, #c99a2e 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home-hero__lead { margin: .9rem 0 1.5rem; max-width: 38em; color: rgba(255,255,255,.8); font-size: 1.02rem; line-height: 1.55; }
.home-hero__lead b { color: var(--gp-gold-light); }
.home-hero__actions { display: flex; gap: .9rem; flex-wrap: wrap; align-items: center; }
.home-hero__note { font-size: .8rem; color: rgba(255,255,255,.55); }

/* Pestañas */
.tabs { position: sticky; top: 0; z-index: 30; display: flex; gap: .3rem; justify-content: center; flex-wrap: wrap; padding: .6rem 1rem; background: rgba(245,246,251,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--gp-border); }
.tab { display: inline-flex; align-items: center; gap: .5rem; min-height: 42px; padding: .5rem 1rem; border: 0; border-radius: 999px; background: transparent; color: var(--gp-text-soft); font-weight: 700; font-size: .9rem; cursor: pointer; }
.tab span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--gp-border); color: var(--gp-text-soft); font-size: .72rem; }
.tab:hover { background: rgba(13,14,50,.05); }
.tab.is-active { background: var(--gp-primary); color: #fff; }
.tab.is-active span { background: var(--gp-gold); color: var(--gp-primary); }

.app-main { max-width: 1100px; margin: 0 auto; padding: 1.8rem 1.5rem 4rem; }
.panel-head { margin-bottom: 1.2rem; }
.panel-head h2 { margin: 0 0 .3rem; color: var(--gp-primary); font-size: 1.45rem; }
.panel-head p { margin: 0; color: var(--gp-text-soft); max-width: 60em; line-height: 1.5; }

.card { background: #fff; border: 1px solid var(--gp-border); border-radius: 18px; padding: 1.3rem; box-shadow: var(--gp-shadow); }
.card + .card { margin-top: 1rem; }
.card h3 { margin: 0 0 .8rem; color: var(--gp-primary); font-size: 1.05rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.2rem; align-items: start; }
.split--half { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.sticky { position: sticky; top: 76px; }

/* Formularios */
.field { display: grid; gap: .35rem; margin-bottom: .9rem; }
.field label, .field > span { font-weight: 700; font-size: .86rem; color: var(--gp-primary); }
.field small { color: var(--gp-text-soft); font-size: .78rem; line-height: 1.4; }
.inp, select.inp, textarea.inp { width: 100%; min-height: 44px; padding: .6rem .8rem; border: 1.5px solid var(--gp-border); border-radius: var(--gp-radius-sm); background: #fff; font-size: 16px; }
textarea.inp { min-height: 110px; resize: vertical; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; }
.inp:focus { outline: none; border-color: var(--gp-gold); box-shadow: 0 0 0 3px rgba(211,172,73,.2); }
.inp.is-error { border-color: var(--gp-danger); }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.colors { display: flex; gap: 1rem; flex-wrap: wrap; }
.color { display: flex; align-items: center; gap: .5rem; font-size: .86rem; font-weight: 600; }
.color input[type=color] { width: 46px; height: 40px; padding: 2px; border: 1.5px solid var(--gp-border); border-radius: 10px; background: #fff; cursor: pointer; }
.check { display: flex; align-items: center; gap: .55rem; min-height: 38px; font-size: .92rem; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--gp-primary); }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .1rem .8rem; }
.seg { display: inline-flex; flex-wrap: wrap; gap: .35rem; }
.seg button { min-height: 40px; padding: .45rem .9rem; border-radius: 999px; border: 1.5px solid var(--gp-border); background: #fff; font-weight: 700; font-size: .86rem; cursor: pointer; color: var(--gp-text-soft); }
.seg button.is-on { border-color: var(--gp-primary); background: var(--gp-primary); color: #fff; }

.logo-drop { display: flex; align-items: center; gap: 1rem; }
.logo-drop__img { width: 84px; height: 84px; border-radius: 16px; border: 1.5px dashed #c9cbe0; display: grid; place-items: center; background: #fafbff; overflow: hidden; color: var(--gp-text-soft); font-size: .75rem; text-align: center; }
.logo-drop__img img { max-width: 100%; max-height: 100%; object-fit: contain; }

.note { display: flex; gap: .6rem; padding: .8rem 1rem; border-radius: 12px; background: #fff8e6; border: 1px solid #f1dfaa; color: #6b5413; font-size: .86rem; line-height: 1.45; }
.note--info { background: #eef1ff; border-color: #d6dcfb; color: #2b3170; }
.msg { font-size: .82rem; margin-top: .3rem; }
.msg--ok { color: var(--gp-ok); }
.msg--err { color: var(--gp-danger); }
.msg--warn { color: var(--gp-warn); }

/* Pie común de la suite */
.brand-footer { display: flex; align-items: center; justify-content: center; gap: .15rem .6rem; flex-wrap: wrap; padding: .55rem .9rem; background: var(--gp-primary); border-top: 1px solid rgba(211,172,73,.35); text-align: center; }
.brand-footer__label { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(211,172,73,.8); font-weight: 600; }
.brand-footer__name { font-weight: 700; font-size: .82rem; color: var(--gp-gold-light); }
.brand-footer__name a { color: inherit; text-decoration: none; }
.brand-footer__name a:hover { text-decoration: underline; }
.suite-by { font-weight: 600; font-style: italic; color: rgba(252,202,85,.8); margin-left: .35em; white-space: nowrap; }
.suite-legal { flex-basis: 100%; display: block; width: 100%; text-align: center; font-size: .64rem; line-height: 1.45; letter-spacing: .02em; font-weight: 500; color: rgba(255,255,255,.45); margin-top: .15rem; }

/* Promo suite */
.suite-promo{position:fixed;right:22px;bottom:22px;z-index:9999;width:min(330px,calc(100vw - 32px));padding:15px 17px 16px;border:1px solid rgba(211,172,73,.55);border-radius:18px;background:linear-gradient(145deg,#0d0e32,#1a1f38);color:#fff;box-shadow:0 18px 45px rgba(13,14,50,.28);font-family:Inter,ui-sans-serif,system-ui,sans-serif;animation:suitePromoIn .45s ease both}
.suite-promo.is-hiding{animation:suitePromoOut .35s ease both}
.suite-promo__close{position:absolute;right:9px;top:7px;width:24px;height:24px;border:0;border-radius:50%;background:transparent;color:#d9d9e5;font-size:18px;line-height:1;cursor:pointer}
.suite-promo__eyebrow{margin:0 28px 5px 0;color:#fcca55;font-size:10px;font-weight:800;letter-spacing:.14em;text-transform:uppercase}
.suite-promo__text{margin:0 0 11px;color:#fff;font-size:14px;line-height:1.35;font-weight:650}
.suite-promo__cta{display:inline-flex;align-items:center;justify-content:center;padding:9px 13px;border-radius:10px;background:linear-gradient(135deg,#f7dc8a,#d3ac49);color:#0d0e32;text-decoration:none;font-size:12px;font-weight:800}
@keyframes suitePromoIn{from{opacity:0;transform:translateY(14px) scale(.97)}to{opacity:1;transform:none}}
@keyframes suitePromoOut{to{opacity:0;transform:translateY(14px) scale(.97)}}

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); z-index: 10000; background: var(--gp-primary); color: #fff; padding: .7rem 1.1rem; border-radius: 12px; font-weight: 600; font-size: .9rem; opacity: 0; transition: all .3s; pointer-events: none; border: 1px solid rgba(211,172,73,.5); }
.toast.is-on { opacity: 1; transform: translateX(-50%); }

@media (max-width: 1000px) {
  .split { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .phead { display: none; }
  .pitem { grid-template-columns: 1fr 1fr; }
  .pitem > :nth-child(1), .pitem > :nth-child(4), .pitem > :nth-child(6) { grid-column: 1 / -1; }
  .pitem__actions { grid-column: 1 / -1; justify-content: flex-end; }
}
@media (max-width: 720px) {
  .home-hero__inner { grid-template-columns: 1fr; text-align: center; gap: 1rem; padding: 1.8rem 1.1rem 2rem; }
  .home-hero__logo { width: 110px; height: 110px; margin: 0 auto; }
  .home-hero__eyebrow { letter-spacing: .16em; font-size: .66rem; }
  .home-hero__actions { justify-content: center; }
  .tabs { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding: .5rem .7rem; }
  .tab { flex: 0 0 auto; padding: .45rem .8rem; font-size: .84rem; }
  .app-main { padding: 1.3rem 1rem 6rem; }
  .grid2 { grid-template-columns: 1fr; }
  .brand-footer__label { flex-basis: 100%; }
  .brand-footer__name { font-size: .72rem; }
  .suite-by { white-space: normal; }
  .suite-promo { right: 12px; bottom: 12px; width: min(310px, calc(100vw - 24px)); }
}
@media (prefers-reduced-motion: reduce) { .suite-promo { animation: none; } html { scroll-behavior: auto; } }


/* ===== Caja diaria ===== */
.empty { display: grid; gap: .3rem; padding: 1.5rem; border: 1.5px dashed #c9cbe0; border-radius: 16px; background: #fff; color: var(--gp-text-soft); text-align: center; }
.empty b { color: var(--gp-primary); }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin-bottom: 1rem; }
.kpi { background: #fff; border: 1px solid var(--gp-border); border-radius: 16px; padding: 1rem 1.1rem; box-shadow: var(--gp-shadow); }
.kpi span { display: block; color: var(--gp-text-soft); font-size: .82rem; font-weight: 600; margin-bottom: .35rem; }
.kpi strong { font-size: 1.45rem; letter-spacing: -.02em; color: var(--gp-primary); }
.kpi small { display: block; color: var(--gp-text-soft); font-size: .76rem; margin-top: .2rem; }
.kpi--in strong { color: #1c5cab; } .kpi--out strong { color: #b6431a; }
.kpi--neg strong { color: var(--gp-danger); }
.bigbtns { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-bottom: 1rem; }
.bigbtn { display: flex; align-items: center; justify-content: center; gap: .6rem; min-height: 74px; border-radius: 18px; border: 0; cursor: pointer; font-size: 1.15rem; font-weight: 800; color: #fff; box-shadow: 0 14px 30px -16px rgba(0,0,0,.5); transition: transform .12s; touch-action: manipulation; }
.bigbtn:active { transform: scale(.98); }
.bigbtn span { font-size: 1.7rem; line-height: 1; }
.bigbtn--in { background: linear-gradient(135deg, #2a78d6, #1c5cab); }
.bigbtn--out { background: linear-gradient(135deg, #eb6834, #c24d1d); }
.cajabar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; padding: .9rem 1.1rem; border-radius: 16px; margin-bottom: 1rem; border: 1px solid var(--gp-border); background: #fff; }
.cajabar.is-open { border-color: #b7e3cd; background: #f1fbf6; }
.cajabar.is-closed { border-color: #f1dfaa; background: #fff8e6; }
.cajabar b { color: var(--gp-primary); }
.mlist { display: grid; gap: .4rem; }
.mrow { display: grid; grid-template-columns: auto 1fr auto auto; gap: .7rem; align-items: center; padding: .65rem .8rem; border: 1px solid var(--gp-border); border-radius: 12px; background: #fff; }
.mrow__ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 900; }
.mrow--in .mrow__ic { background: #e8f1fc; color: #1c5cab; } .mrow--out .mrow__ic { background: #fdeee7; color: #b6431a; }
.mrow__t b { display: block; color: var(--gp-text); font-size: .95rem; } .mrow__t small { color: var(--gp-text-soft); font-size: .8rem; }
.mrow__amt { font-weight: 800; white-space: nowrap; } .mrow--in .mrow__amt { color: #1c5cab; } .mrow--out .mrow__amt { color: #b6431a; }
.mrow__act { display: flex; gap: .1rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { min-height: 40px; padding: .45rem .85rem; border-radius: 999px; border: 1.5px solid var(--gp-border); background: #fff; font-weight: 700; font-size: .88rem; cursor: pointer; color: var(--gp-text-soft); }
.chip.is-on { border-color: var(--gp-primary); background: var(--gp-primary); color: #fff; }
.chip--x { padding-right: .5rem; } .chip--x button { border: 0; background: none; color: inherit; cursor: pointer; font-weight: 900; margin-left: .2rem; }
.amount { font-size: 2rem !important; font-weight: 800; text-align: center; min-height: 64px !important; letter-spacing: -.02em; }
.diff { padding: .9rem 1rem; border-radius: 12px; font-weight: 800; text-align: center; font-size: 1.05rem; }
.diff--ok { background: #ecfdf3; color: #067647; } .diff--plus { background: #e8f1fc; color: #1c5cab; } .diff--minus { background: #fff1f0; color: #b42318; }
.lines { display: grid; gap: .1rem; }
.line { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid #f0f1f6; font-size: .92rem; }
.line b { color: var(--gp-primary); white-space: nowrap; } .line--total { border-bottom: 0; border-top: 2px solid var(--gp-primary); margin-top: .3rem; padding-top: .6rem; font-size: 1rem; }
.bars { display: grid; gap: .55rem; }
.bar { display: grid; grid-template-columns: minmax(90px, 30%) 1fr auto; gap: .6rem; align-items: center; font-size: .86rem; }
.bar__track { height: 12px; background: #f0f1f6; border-radius: 4px; overflow: hidden; }
.bar__fill { height: 100%; border-radius: 0 4px 4px 0; }
.bar b { white-space: nowrap; color: var(--gp-text); }
.legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .82rem; color: var(--gp-text-soft); margin-bottom: .6rem; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.days { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding: .5rem 0 0; border-bottom: 1px solid #d9dbe6; overflow-x: auto; }
.day { flex: 1 0 22px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; position: relative; }
.day__pair { display: flex; align-items: flex-end; gap: 2px; height: calc(100% - 18px); width: 100%; justify-content: center; }
.day__b { width: 42%; max-width: 14px; border-radius: 4px 4px 0 0; min-height: 0; }
.day small { font-size: .66rem; color: var(--gp-text-soft); }
.day:hover .day__b { filter: brightness(1.1); }
.tip { position: fixed; z-index: 10001; pointer-events: none; background: var(--gp-primary); color: #fff; padding: .5rem .7rem; border-radius: 10px; font-size: .8rem; line-height: 1.4; box-shadow: 0 10px 24px -10px rgba(0,0,0,.5); opacity: 0; transition: opacity .12s; }
.tip.is-on { opacity: 1; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tbl th { text-align: left; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--gp-text-soft); padding: .5rem; border-bottom: 1px solid var(--gp-border); }
.tbl td { padding: .55rem .5rem; border-bottom: 1px solid #f0f1f6; vertical-align: top; }
.tbl .num { text-align: right; white-space: nowrap; }
.tbl-wrap { overflow-x: auto; }
.badge { display: inline-block; padding: .2rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 800; }
.badge--ok { background: #ecfdf3; color: #067647; } .badge--plus { background: #e8f1fc; color: #1c5cab; } .badge--minus { background: #fff1f0; color: #b42318; } .badge--open { background: #fff4e8; color: #b54708; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.filters .inp { width: auto; min-height: 40px; }
/* Ventana emergente */
.modal { position: fixed; inset: 0; z-index: 10000; background: rgba(13,14,50,.55); display: none; align-items: flex-end; justify-content: center; padding: 1rem; }
.modal.is-on { display: flex; }
.modal__box { width: min(560px, 100%); max-height: 92vh; overflow: auto; background: #fff; border-radius: 22px; padding: 1.3rem; box-shadow: 0 30px 70px -20px rgba(0,0,0,.5); }
.modal__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.modal__head h3 { margin: 0; color: var(--gp-primary); }
@media (min-width: 720px) { .modal { align-items: center; } }
/* Cierre impreso: solo marca del negocio */
.ticket { width: 180mm; margin: 0 auto; padding: 12mm 0; font-family: Inter, Arial, sans-serif; color: #111; }
.ticket__head { display: flex; align-items: center; gap: 5mm; border-bottom: .6mm solid #111; padding-bottom: 4mm; margin-bottom: 5mm; }
.ticket__head img { max-height: 16mm; max-width: 40mm; object-fit: contain; }
.ticket h1 { font-size: 6mm; margin: 0; } .ticket h2 { font-size: 4.2mm; margin: 6mm 0 2mm; }
.ticket .line { font-size: 3.6mm; } .ticket small { color: #555; }
.ticket__sign { margin-top: 18mm; display: flex; justify-content: space-between; gap: 10mm; font-size: 3.2mm; color: #444; }
.ticket__sign span { flex: 1; border-top: .3mm solid #888; padding-top: 2mm; text-align: center; }
#print-area { display: none; }
@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff !important; }
  body { display: block; min-height: 0; }
  .no-print, .suite-promo, .toast, .modal, .tip { display: none !important; }
  #print-area { display: block; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@media (max-width: 900px) { .kpis { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) {
  .bigbtn { min-height: 64px; font-size: 1.02rem; }
  .mrow { grid-template-columns: auto 1fr auto; } .mrow__act { grid-column: 2 / -1; justify-content: flex-end; }
  .kpi strong { font-size: 1.2rem; }
  .bar { grid-template-columns: 1fr auto; } .bar__track { grid-column: 1 / -1; grid-row: 2; }
}

/* Venta rápida */
.chips.qs { max-height: 210px; overflow: auto; padding: 2px; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--gp-primary); font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
