/* Tipografías alojadas en la propia web (sin servicios externos) */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 600 800; font-display: swap; src: url(assets/fonts/bricolage-grotesque-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 600 800; font-display: swap; src: url(assets/fonts/bricolage-grotesque-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(assets/fonts/manrope-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(assets/fonts/manrope-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* =============================================================
   1. Tokens — paleta cálida (crema, durazno, terracota, mostaza, verde cálido)
   ============================================================= */
:root {
  --bg: #FFF6EA;
  --surface: #FFFDF9;
  --surface-2: #FCEEDD;
  --peach: #FBD9C2;
  --peach-2: #FDE8D8;
  --ink: #3B2A20;
  --ink-2: #6B5444;
  --ink-3: #9A8473;
  --line: #EEDCC8;
  --accent: #C8553D;
  --accent-2: #F28C38;
  --mustard: #E3A82B;
  --green: #5E8B43;
  --green-soft: #E7F0DA;
  --bad: #A8402B;
  --bad-soft: #FBE1D6;
  --warn-soft: #FCEFCF;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(59,42,32,.05), 0 14px 40px -20px rgba(120,60,30,.30);
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Bricolage Grotesque", "Manrope", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: 16px;
}

/* 2. Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-behavior: smooth; }
body { font-family: var(--sans); font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select { font: inherit; color: inherit; }
a { color: inherit; }
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; line-height: 1.12; letter-spacing: -0.015em; }
::selection { background: var(--peach); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

.container { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; top: -100px; left: 1rem; padding: .6rem 1rem; background: var(--ink); color: #fff; z-index: 9999; border-radius: 8px; }
.skip-link:focus { top: 1rem; }

h1 { font-family: var(--display); font-weight: 800; font-size: clamp(1.45rem, 5.4vw, 2.6rem); }
h2 { font-family: var(--display); font-weight: 800; font-size: clamp(1.3rem, 3.6vw, 1.9rem); margin-bottom: .9rem; }
h3 { font-size: 1.05rem; font-weight: 800; margin: 0 0 .4rem; }

/* 3. Header / hero */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 56px; }
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.08rem; }
.brand small { font-family: var(--sans); font-weight: 600; font-size: .72rem; color: var(--ink-3); }
.brand-mark { width: 30px; height: 30px; }
.header-nav { display: flex; gap: 1rem; font-size: .9rem; font-weight: 700; }
.header-nav a { text-decoration: none; color: var(--ink-2); }
.header-nav a:hover { color: var(--accent); }
@media (max-width: 640px) { .header-nav a:not(:last-child) { display: none; } }

.hero { padding-top: 1rem; padding-bottom: .7rem; text-align: center; }
.hero-sub { color: var(--ink-2); margin: .45rem auto 0; max-width: 40rem; font-size: .98rem; }
@media (min-width: 760px) { .hero { padding-top: 2rem; padding-bottom: 1.2rem; } .hero-sub { font-size: 1.08rem; } }

/* 4. Tool card */
.tool-wrap { max-width: 860px; }
.tool-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; }
@media (min-width: 760px) { .tool-card { padding: 1.6rem 1.8rem; } }
.noscript-note { background: var(--warn-soft); padding: .8rem; border-radius: var(--radius-sm); margin-bottom: 1rem; }
.currency select { appearance: none; border: 1px solid var(--line); background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236B5444' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right .6rem center / 10px; border-radius: 99px; padding: .35rem 1.8rem .35rem .8rem; font-size: .85rem; font-weight: 700; min-height: 36px; }
.field-label { display: block; font-size: .86rem; font-weight: 700; color: var(--ink-2); margin: .7rem 0 .35rem; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chips-2 .chip, .chips-goal .chip { flex: 1 1 calc(50% - .45rem); }
.chip { position: relative; flex: 1 1 auto; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 46px; padding: .5rem .8rem; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; font-size: .92rem; line-height: 1.2; transition: background-color .15s, border-color .15s; }
.chip input:checked + span { background: var(--peach-2); border-color: var(--accent); color: #8a3420; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.field { display: block; }
.money { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); padding-left: .8rem; transition: border-color .15s; }
.money:focus-within { border-color: var(--accent); }
.money b { font-weight: 800; color: var(--ink-3); font-size: .92rem; white-space: nowrap; }
.money input { border: 0; background: transparent; width: 100%; min-width: 0; padding: .7rem .7rem .7rem .45rem; font-size: 1.1rem; font-weight: 700; outline: none; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.hint { font-size: .84rem; color: var(--ink-3); margin-top: .5rem; }
.q-error { color: var(--bad); font-weight: 700; font-size: .9rem; margin-top: .6rem; }
.q-nav { display: flex; gap: .6rem; margin-top: 1.1rem; }
.q-nav .btn-primary { flex: 1; }

.btn-primary, .btn-ghost, .btn-wa { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 50px; padding: .6rem 1.2rem; border-radius: 99px; font-weight: 800; font-size: 1rem; text-decoration: none; transition: transform .15s, background-color .15s; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -10px rgba(200,85,61,.8); }
.btn-primary:hover { background: #B4472F; }
.btn-primary:active, .btn-wa:active { transform: scale(.98); }
.btn-primary[disabled] { opacity: .65; cursor: wait; }
.btn-ghost { background: var(--surface-2); color: var(--ink); }
.btn-ghost:hover { background: var(--peach-2); }
.btn-wa { background: #5E8B43; color: #fff; }
.btn-wa:hover { background: #4E7737; }
.btn-link { color: var(--accent); font-weight: 700; font-size: .9rem; padding: .4rem 0; text-decoration: underline; text-underline-offset: 3px; }
.btn-link.danger { color: var(--bad); }

.actions { display: grid; gap: .6rem; margin: 1.2rem 0 .4rem; }
@media (min-width: 640px) { .actions { grid-template-columns: 1.4fr 1fr; } }
.btn-big { min-height: 56px; font-size: 1.05rem; }
.excel-status { margin: .4rem 0 .8rem; font-size: .85rem; color: var(--ink-2); }
.excel-status.err p { color: var(--bad); font-weight: 700; }
.bar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-bottom: .35rem; }
.bar span { display: block; height: 100%; width: 40%; background: var(--accent-2); border-radius: 99px; animation: barMove 1.1s ease-in-out infinite; }
@keyframes barMove { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

.fine { font-size: .76rem; color: var(--ink-3); margin-top: .5rem; }
.r-foot { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: 1.2rem; }
.privacy { margin-top: 1rem; text-align: center; font-size: .9rem; background: var(--green-soft); border-radius: 14px; padding: .7rem .9rem; }
.limits { margin-top: .5rem; text-align: center; font-size: .78rem; color: var(--ink-3); }

/* 7. Content */
.section { padding-block: 2rem; }
.steps { list-style: none; padding: 0; display: grid; gap: .8rem; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; }
.step-ico { font-size: 1.8rem; display: block; margin-bottom: .4rem; }
.steps p, .method p, .idea p { color: var(--ink-2); font-size: .93rem; }
.methods { display: grid; gap: .8rem; }
@media (min-width: 760px) { .methods { grid-template-columns: repeat(2, 1fr); } }
.method { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; border-top: 5px solid var(--accent-2); }
.method:nth-child(2) { border-top-color: var(--mustard); }
.method:nth-child(3) { border-top-color: var(--accent); }
.method:nth-child(4) { border-top-color: var(--green); }
.method:nth-child(5) { border-top-color: #D4A373; }
.method p + p { margin-top: .3rem; }
.seo-text { max-width: 780px; }
.seo-text h3 { margin-top: 1.2rem; }
.seo-text p { color: var(--ink-2); }
.ideas { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.idea { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.idea-ico { font-size: 1.6rem; display: block; margin-bottom: .3rem; }
.faq { display: grid; gap: .5rem; max-width: 780px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .2rem 1rem; }
.faq summary { cursor: pointer; font-weight: 800; padding: .7rem 0; list-style-position: outside; }
.faq details p { padding-bottom: .8rem; color: var(--ink-2); }
.more-tools { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tool-link { display: grid; grid-template-columns: auto 1fr; gap: 0 .7rem; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.tool-link span { grid-row: span 2; font-size: 1.8rem; }
.tool-link small { color: var(--ink-3); }

/* 8. Ads (placeholders vacíos) */
.ad-slot { display: grid; place-items: center; border: 1.5px dashed #D9BFA4; border-radius: 12px; background: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(120,60,30,.03) 10px 20px); color: #B39A84; }
.ad-slot > span { font-size: .72rem; font-weight: 800; letter-spacing: .18em; }
.ad-leaderboard { min-height: 100px; margin: 1rem 0; }
.ad-incontent { min-height: 250px; margin: 1rem 0; }
.ad-popup { min-height: 250px; width: 100%; margin: .8rem 0; }
.ad-corner { min-height: 90px; }
.ad-dialog { border: 0; border-radius: 20px; padding: 1.1rem; width: min(380px, calc(100vw - 32px)); box-shadow: 0 30px 80px -20px rgba(59,42,32,.5); text-align: center; position: fixed; inset: 0; margin: auto; height: fit-content; background: var(--surface); color: var(--ink); }
.ad-dialog::backdrop { background: rgba(59,42,32,.5); }
.ad-dialog-title { font-weight: 800; padding-right: 1.5rem; }
.ad-dialog .btn-ghost { width: 100%; }
.ad-close { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 50%; font-size: 1.4rem; line-height: 1; background: var(--surface-2); z-index: 2; }
.ad-close:hover { background: var(--line); }
.ad-toast { position: fixed; right: 12px; bottom: 12px; z-index: 60; width: min(300px, calc(100vw - 24px)); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: .6rem; box-shadow: var(--shadow); animation: toastIn .4s var(--ease-out); }
.ad-toast .ad-close { top: -10px; right: -8px; width: 30px; height: 30px; font-size: 1.1rem; box-shadow: 0 2px 6px rgba(0,0,0,.15); background: var(--surface); }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px); } }

/* 9. Footer + legal */
.site-footer { border-top: 1px solid var(--line); padding: 1.4rem 0 5rem; margin-top: 1rem; font-size: .88rem; color: var(--ink-2); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; }
.footer-inner nav { display: flex; gap: 1rem; }
.legal { max-width: 780px; padding-block: 2rem; }
.legal h1 { margin-bottom: .6rem; }
.legal h2 { font-size: 1.2rem; margin: 1.5rem 0 .4rem; }
.legal p, .legal li { color: var(--ink-2); margin-bottom: .5rem; }
.legal ul { padding-left: 1.2rem; }

.check { display: flex; gap: .5rem; align-items: center; font-size: .88rem; font-weight: 600; margin-top: .7rem; color: var(--ink-2); }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.legend-mini { display: flex; flex-wrap: wrap; gap: .8rem; font-size: .78rem; color: var(--ink-2); margin-top: .5rem; }
.legend-mini i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .3rem; vertical-align: -1px; }

/* =============================================================
   11. Mis Números: pestañas, tabla de ventas, indicadores, gráficos
   ============================================================= */
.tool-wrap { max-width: 1040px; }
.card-top { flex-wrap: wrap; }
.tabs { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; padding: .15rem; margin: -.15rem; flex: 1 1 auto; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: 0 0 auto; min-height: 42px; padding: .4rem .9rem; border-radius: 99px; background: var(--surface-2); font-weight: 800; font-size: .92rem; white-space: nowrap; }
.tab.is-active { background: var(--ink); color: #FFF6EA; }
@media (max-width: 520px) { .tab { padding: .4rem .7rem; font-size: .84rem; } .card-top .currency { margin-left: auto; } }
.panel { animation: qIn .25s var(--ease-out); }
@keyframes qIn { from { opacity: 0; transform: translateY(6px); } }
.p-title { font-size: clamp(1.15rem, 4.2vw, 1.5rem); margin: .4rem 0 .2rem; }
.btn-sm { min-height: 42px; padding: .45rem .95rem; font-size: .92rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin: .3rem 0 .7rem; }
.file-btn { cursor: pointer; }
.file-btn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.tpl-menu { position: relative; }
.tpl-menu summary { list-style: none; cursor: pointer; }
.tpl-menu summary::-webkit-details-marker { display: none; }
.tpl-pop { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: 250px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: .6rem .8rem; display: grid; justify-items: start; }
@media (max-width: 520px) { .tpl-pop { left: auto; right: 0; } }
.sample-note, .file-msg { font-size: .88rem; background: var(--warn-soft); border-radius: 12px; padding: .5rem .75rem; margin-bottom: .7rem; }
.file-msg.ok { background: var(--green-soft); }
.file-msg.err { background: var(--bad-soft); color: var(--bad); font-weight: 700; }

.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; margin-bottom: .8rem; }
@media (min-width: 640px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .kpis { grid-template-columns: repeat(6, 1fr); } }
.kpi { border-radius: 16px; padding: .6rem .75rem; background: var(--surface-2); min-width: 0; }
.kpi.k1 { background: #FBE0D3; } .kpi.k2 { background: #E5EED6; } .kpi.k3 { background: #FCEBC9; }
.kpi.k4 { background: #FDE8D8; } .kpi.k5 { background: #F3E6D3; } .kpi.k6 { background: #EEF0DD; }
.k-label { display: flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 800; color: var(--ink-2); }
.kpi b { display: block; font-family: var(--display); font-size: clamp(1.15rem, 4.4vw, 1.45rem); font-weight: 800; line-height: 1.15; margin-top: .1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi small { display: block; font-size: .74rem; color: var(--ink-3); font-weight: 600; line-height: 1.25; }
.kpi b.neg { color: var(--bad); } .kpi b.pos { color: var(--green); }

.tip { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.85); border: 1px solid var(--line); color: var(--ink-2); font-size: .68rem; font-weight: 800; line-height: 1; flex: 0 0 auto; vertical-align: 1px; }
.tip:hover, .tip[aria-expanded="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.tip-bubble { position: absolute; z-index: 80; max-width: 260px; background: var(--ink); color: #FFF6EA; font-size: .82rem; font-weight: 600; line-height: 1.4; border-radius: 12px; padding: .55rem .7rem; box-shadow: 0 10px 30px -10px rgba(0,0,0,.4); }

.table-wrap { border: 1px solid var(--line); border-radius: 16px; overflow: auto; max-height: 460px; background: var(--surface); }
.sales { width: 100%; border-collapse: collapse; font-size: .9rem; }
.sales th { position: sticky; top: 0; z-index: 2; background: #F6D9C2; text-align: left; font-size: .76rem; font-weight: 800; color: var(--ink); padding: .5rem .4rem; white-space: nowrap; }
.sales th .tip { background: #fff; }
.sales td { padding: .25rem .2rem; border-top: 1px solid #F3E3D3; vertical-align: middle; }
.sales tr:nth-child(even) td { background: #FFF8F0; }
.sales input, .sales select { width: 100%; min-width: 0; border: 1.5px solid transparent; background: transparent; border-radius: 9px; padding: .42rem .4rem; font-weight: 600; font-size: .9rem; }
.sales input:hover, .sales select:hover { border-color: var(--line); }
.sales input:focus, .sales select:focus { border-color: var(--accent); background: #fff; outline: none; }
.sales input[type="number"] { text-align: right; }
.sales .c-date { width: 128px; } .sales .c-prod { min-width: 170px; } .sales .c-ch { width: 112px; }
.sales .c-q { width: 64px; } .sales .c-num { width: 92px; } .sales .c-gan { width: 92px; text-align: right; font-weight: 800; white-space: nowrap; padding-right: .5rem; }
.sales .c-gan.neg { color: var(--bad); }
.sales .c-rm { width: 34px; }
.sales .rm { width: 30px; height: 30px; border-radius: 50%; color: var(--ink-3); font-size: 1.15rem; }
.sales .rm:hover { background: var(--bad-soft); color: var(--bad); }
.m-lbl { display: none; }
@media (max-width: 720px) {
  .table-wrap { max-height: none; border: 0; background: transparent; overflow: visible; }
  .sales thead { display: none; }
  .sales, .sales tbody { display: block; }
  .sales tr { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .25rem .4rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .45rem .5rem .5rem; margin-bottom: .45rem; position: relative; }
  .sales tr:nth-child(even) td { background: transparent; }
  .sales td { display: block; border: 0; padding: 0; width: auto !important; min-width: 0 !important; }
  .sales td.c-prod { grid-column: 1 / -1; padding-right: 2rem; }
  .sales td.c-date { grid-column: span 2; }
  .sales td.c-gan { text-align: left; padding: 0; align-self: end; }
  .sales td.c-rm { position: absolute; top: 4px; right: 4px; }
  .m-lbl { display: block; font-size: .68rem; font-weight: 800; color: var(--ink-3); margin: 0 0 .05rem .3rem; }
  .sales input, .sales select { border-color: var(--line); background: var(--surface); }
  .sales input[type="number"] { text-align: left; }
}
.row-actions { display: flex; align-items: center; gap: .7rem; margin-top: .5rem; flex-wrap: wrap; }
.row-actions .hint { margin: 0; }
.extras { display: grid; gap: .6rem; margin-top: .7rem; }
@media (min-width: 640px) { .extras { grid-template-columns: 1fr 1fr; } }
.extras .field-label small, .field-label small { font-weight: 600; color: var(--ink-3); }

.results { margin-top: 1rem; }
.stars { display: grid; gap: .5rem; }
@media (min-width: 640px) { .stars { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .stars { grid-template-columns: repeat(4, 1fr); } }
.star { border-radius: 16px; padding: .7rem .85rem; background: #FFF3E4; border: 1px solid var(--line); }
.star .s-ico { font-size: 1.3rem; }
.star .s-lbl { display: block; font-size: .76rem; font-weight: 800; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.star b { display: block; font-size: 1.02rem; line-height: 1.2; margin-top: .1rem; }
.star small { color: var(--ink-2); font-size: .8rem; font-weight: 600; }
.insights { margin-top: .8rem; border-radius: 16px; padding: .8rem 1rem; background: var(--green-soft); }
.insights h3 { font-size: 1rem; margin-bottom: .3rem; }
.insights ul { padding-left: 0; list-style: none; display: grid; gap: .35rem; }
.insights li { font-size: .95rem; line-height: 1.45; }
.charts { display: grid; gap: .7rem; margin-top: .8rem; }
@media (min-width: 760px) { .charts { grid-template-columns: 1fr 1fr; } }
.chart { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: .7rem .8rem .5rem; min-width: 0; }
.chart figcaption { font-weight: 800; font-size: .92rem; margin-bottom: .3rem; }
.chart canvas { width: 100%; height: 220px; }
.empty { margin-top: 1rem; text-align: center; color: var(--ink-2); background: var(--surface-2); border-radius: 16px; padding: 1rem; font-size: .95rem; }

.grid-2 { display: grid; gap: 1rem; margin-top: .6rem; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.range-val { margin-left: auto; color: var(--accent); font-family: var(--display); font-size: 1.05rem; }
.field-label { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
input[type="range"] { width: 100%; accent-color: var(--accent); height: 30px; }
.fee-row { display: grid; grid-template-columns: 1fr 6.5rem; gap: .45rem; }
.fee-row select, .helper select { width: 100%; border: 1.5px solid var(--line); border-radius: 14px; padding: .6rem .7rem; background: var(--surface); font-weight: 700; font-size: .9rem; min-width: 0; }
.money.pct { padding-left: 0; padding-right: .8rem; }
.money.pct input { padding-left: .8rem; }
.out-card { border-radius: 18px; padding: 1rem 1.1rem; background: #FFF3E4; border: 1px solid var(--line); }
#be-out { background: #F1F4E6; }
.out-kicker { font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--green); }
.out-big { font-family: var(--display); font-weight: 800; font-size: clamp(1.9rem, 7vw, 2.5rem); line-height: 1.1; color: var(--accent); margin-top: .15rem; }
#be-out .out-big { color: var(--green); }
.out-sub { font-weight: 700; color: var(--ink-2); margin-top: .15rem; }
.out-msg { margin-top: .6rem; font-weight: 700; font-size: .95rem; }
.out-msg.bad { color: var(--bad); }
.breakdown { list-style: none; padding: 0; margin-top: .7rem; display: grid; gap: .25rem; }
.breakdown li { display: flex; justify-content: space-between; gap: .5rem; font-size: .92rem; padding: .3rem .55rem; border-radius: 10px; background: rgba(255,255,255,.6); }
.breakdown li b { white-space: nowrap; }
.breakdown li.me { background: var(--green-soft); font-weight: 800; }
.breakdown li.me b { color: var(--green); }
.out-current { margin-top: .7rem; border-radius: 12px; padding: .6rem .7rem; background: var(--surface); font-size: .92rem; }
#ch-be { width: 100%; height: 200px; margin-top: .7rem; }
.helper { margin: .4rem 0 .2rem; background: var(--surface-2); border-radius: 14px; padding: .2rem .8rem .6rem; }
.helper summary { cursor: pointer; font-weight: 800; font-size: .9rem; padding: .4rem 0; }
.check .tip { margin-left: .1rem; }
.check.small { font-size: .82rem; margin: 0; }
.check.small input { width: 18px; height: 18px; }
.limits.left { text-align: left; max-width: 780px; margin-top: 1rem; }
.methods { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.method:nth-child(6) { border-top-color: #8C4A32; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .6rem; }

/* 12. Estados extra */
.out-current.pos { background: var(--green-soft); }
.out-current.warn { background: #FCEFCF; }
.out-current.neg { background: #F9D9CF; color: var(--bad); }
.file-msg.err { color: var(--bad); }
/* Ajustes de ancho: más espacio para el nombre del producto */
.sales .c-date { width: 114px; } .sales .c-ch { width: 110px; } .sales .c-q { width: 50px; } .sales .c-num { width: 76px; } .sales .c-gan { width: 82px; } .sales .c-rm { width: 30px; }
.sales .c-prod { min-width: 180px; }
@media (max-width: 520px) {
  .tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; flex-basis: 100%; }
  .tab { white-space: normal; line-height: 1.15; font-size: .8rem; padding: .4rem .35rem; text-align: center; }
}

/* =============================================================
   13. Resumen en 5 segundos, gastos, meta y alertas
   ============================================================= */
.verdict { border-radius: 18px; padding: .9rem 1.1rem; margin: .2rem 0 .8rem; background: var(--surface-2); border: 2px dashed var(--line); }
.verdict.is-win { background: #E7F0DA; border: 2px solid #B9D29E; }
.verdict.is-low { background: #FCEFCF; border: 2px solid #EBC77A; }
.verdict.is-lose { background: #FBE1D6; border: 2px solid #E6A58F; }
.v-kicker { font-size: .74rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.v-status { font-family: var(--display); font-size: clamp(1.45rem, 5.6vw, 2rem); font-weight: 800; line-height: 1.12; margin-top: .15rem; }
.verdict.is-win .v-status { color: #3F6B2A; } .verdict.is-low .v-status { color: #8C5A12; } .verdict.is-lose .v-status { color: var(--bad); }
.v-sub { color: var(--ink-2); font-weight: 600; margin-top: .2rem; }
.v-money { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .6rem; margin-top: .55rem; padding-top: .55rem; border-top: 1px solid rgba(59,42,32,.12); }
.v-money .v-q { font-weight: 800; font-size: .95rem; }
.v-money b { font-family: var(--display); font-size: clamp(1.5rem, 6vw, 2.1rem); font-weight: 800; line-height: 1.1; }
.v-money b.neg { color: var(--bad); }
.v-money small { flex-basis: 100%; font-size: .78rem; color: var(--ink-3); font-weight: 600; line-height: 1.3; }
.v-action { margin-top: .55rem; background: rgba(255,255,255,.75); border-radius: 12px; padding: .55rem .75rem; font-weight: 800; line-height: 1.4; }
.v-note { margin-top: .45rem; font-size: .85rem; font-weight: 700; color: #8C5A12; }
.step-h { font-family: var(--display); font-size: 1.08rem; font-weight: 800; margin: 1rem 0 .15rem; display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.step-h small { font-family: var(--sans); font-size: .8rem; color: var(--ink-3); font-weight: 600; }
.step-hint { margin: 0 0 .45rem; }
.block { margin-top: .4rem; }
.gtable { width: 100%; border-collapse: collapse; font-size: .9rem; }
.gtable th { background: #F6D9C2; text-align: left; font-size: .76rem; font-weight: 800; padding: .5rem .4rem; white-space: nowrap; }
.gtable th small { font-weight: 600; }
.gtable td { padding: .25rem .2rem; border-top: 1px solid #F3E3D3; }
.gtable tr:nth-child(even) td { background: #FFF8F0; }
.gtable input, .gtable select { width: 100%; min-width: 0; border: 1.5px solid transparent; background: transparent; border-radius: 9px; padding: .42rem .4rem; font-weight: 600; font-size: .9rem; }
.gtable input:hover, .gtable select:hover { border-color: var(--line); }
.gtable input:focus, .gtable select:focus { border-color: var(--accent); background: #fff; outline: none; }
.gtable .g-cat { width: 190px; } .gtable .g-m { width: 130px; } .gtable .g-m input { text-align: right; } .gtable .c-rm { width: 34px; }
.gtable .rm { width: 30px; height: 30px; border-radius: 50%; color: var(--ink-3); font-size: 1.15rem; }
.gtable .rm:hover { background: var(--bad-soft); color: var(--bad); }
@media (max-width: 720px) {
  .gtable thead { display: none; }
  .gtable, .gtable tbody { display: block; }
  .gtable tr { display: grid; grid-template-columns: 1.3fr 1fr; gap: .25rem .4rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .45rem .5rem .5rem; margin-bottom: .45rem; position: relative; }
  .gtable tr:nth-child(even) td { background: transparent; }
  .gtable td { display: block; border: 0; padding: 0; width: auto !important; min-width: 0; }
  .gtable td.g-con { grid-column: 1 / -1; grid-row: 2; }
  .gtable td.g-cat { padding-right: 0; }
  .gtable td.g-m { padding-right: 2rem; }
  .gtable td.c-rm { position: absolute; top: 4px; right: 4px; }
  .gtable input, .gtable select { border-color: var(--line); background: var(--surface); }
  .gtable .g-m input { text-align: left; }
}
.meta .field { max-width: 420px; }
.meta-out { margin-top: .5rem; }
.pbar { height: 16px; border-radius: 99px; background: #F3E3D3; overflow: hidden; }
.pbar span { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent-2), var(--mustard)); transition: width .5s var(--ease-out); }
.meta-out.done .pbar span { background: var(--green); }
.meta-msg { margin-top: .35rem; font-size: .92rem; line-height: 1.45; }
.more { margin-top: .9rem; border-radius: 14px; background: var(--surface-2); padding: .55rem .8rem; }
.more summary { cursor: pointer; font-weight: 800; font-size: .92rem; }
.more summary small { font-weight: 600; color: var(--ink-3); }
.more .extras { margin-top: .5rem; }
.alerts { margin-top: .8rem; border-radius: 16px; padding: .8rem 1rem; background: #FFF1DF; }
.alerts h3 { font-size: 1rem; margin-bottom: .4rem; }
.alerts ul { list-style: none; padding: 0; display: grid; gap: .45rem; }
@media (min-width: 760px) { .alerts ul { grid-template-columns: repeat(2, 1fr); } }
.al { display: flex; gap: .55rem; background: #fff; border-radius: 12px; padding: .55rem .7rem; border-left: 5px solid var(--line); }
.al-3 { border-left-color: var(--bad); background: #FFF4F0; } .al-2 { border-left-color: var(--mustard); } .al-1 { border-left-color: var(--ink-3); }
.al-ico { font-size: 1.3rem; line-height: 1.2; }
.al b { display: block; line-height: 1.3; } .al p { font-size: .88rem; color: var(--ink-2); line-height: 1.4; margin-top: .1rem; }
.al .al-tip { color: var(--ink); font-weight: 700; }
.al-ok { font-weight: 700; color: #3F6B2A; }
.alerts > .hint { margin-top: .5rem; font-size: .8rem; }
.be-link { margin: -.1rem 0 .5rem; }
.be-link .hint { margin-top: .25rem; font-size: .84rem; }
#be-fixed.is-linked { background: #F3EBDD; color: var(--ink-2); }
