/* ==========================================================================
   Catalogo Wha · styles.css
   Sistema de diseño propio. Variables, componentes y RTL.
   ========================================================================== */

:root {
  --brand: #5B1A80;
  --brand-2: #7C3AED;
  --brand-soft: rgba(91, 26, 128, .10);
  --brand-ink: #ffffff;
  --bg: #f7f7fb;
  --surface: #ffffff;
  --ink: #1c1b22;
  --ink-2: #55525f;
  --muted: #8a8794;
  --line: #ececf2;
  --line-2: #e2e1ea;
  --ok: #1f9d55;
  --ok-soft: #e6f7ee;
  --warn: #c47f17;
  --warn-soft: #fdf3e0;
  --bad: #c0392b;
  --bad-soft: #fdecea;
  --info: #2b6cb0;
  --info-soft: #e8f1fb;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 26px;
  --shadow: 0 8px 30px rgba(20, 16, 40, .06);
  --shadow-sm: 0 2px 10px rgba(20, 16, 40, .05);
  --shadow-lg: 0 24px 60px rgba(20, 16, 40, .16);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 16px; line-height: 1.55; overflow-x: hidden;
}
h1, h2, h3, h4, h5 { font-weight: 750; line-height: 1.18; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; border-radius: 6px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--brand); color: #fff; padding: 10px 16px; z-index: 999; }
.skip-link:focus { left: 8px; top: 8px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.wrap { width: min(1160px, 92vw); margin-inline: auto; }
.danger-text { color: var(--bad); font-size: .9rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  border: 1px solid transparent; border-radius: 999px; padding: 11px 20px;
  font-weight: 650; font-size: .95rem; transition: .18s; white-space: nowrap;
}
.btn.primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(91, 26, 128, .22); }
.btn.primary:hover { background: #4a1468; }
.btn.ghost { background: #fff; border-color: var(--line-2); color: var(--ink); }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn.danger { background: var(--bad); color: #fff; }
.btn.lg { padding: 14px 26px; font-size: 1.02rem; }
.btn.small { padding: 7px 14px; font-size: .85rem; }
.btn.block { width: 100%; }
.icon-btn { background: transparent; border: 0; font-size: 1.05rem; padding: 6px 9px; border-radius: 10px; color: var(--ink-2); }
.icon-btn:hover { background: var(--brand-soft); color: var(--brand); }
.link { background: none; border: 0; color: var(--brand); font-weight: 600; padding: 0; font-size: .92rem; }

/* ---------- Tarjetas / tags ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.kicker { font-size: .72rem; letter-spacing: .12em; font-weight: 800; color: var(--brand); }
.tag { display: inline-flex; align-items: center; gap: .3em; font-size: .74rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--line); color: var(--ink-2); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.info { background: var(--info-soft); color: var(--info); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }
.chip { border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 7px 14px; font-size: .86rem; font-weight: 600; }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.segmented { display: inline-flex; gap: 4px; background: #fff; border: 1px solid var(--line-2); border-radius: 999px; padding: 4px; flex-wrap: wrap; }
.segmented button { border: 0; background: transparent; border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: .88rem; color: var(--ink-2); }
.segmented button.active { background: var(--brand); color: #fff; }
.search { border: 1px solid var(--line-2); border-radius: 999px; padding: 10px 16px; min-width: 220px; background: #fff; }

/* ---------- Campos ---------- */
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-weight: 650; font-size: .9rem; margin-bottom: 6px; }
.field input, .field select, .field textarea, .field .slug-row {
  width: 100%; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 12px 14px; background: #fff; color: var(--ink);
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
.field small.muted { display: block; margin-top: 5px; font-size: .8rem; }
.two-col-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.check, .radio { display: flex; align-items: center; gap: 10px; margin: 10px 0; font-weight: 600; font-size: .92rem; }
.chips, .days-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.form-error { background: var(--bad-soft); color: var(--bad); border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: .88rem; }
.color-row { display: flex; gap: 10px; align-items: center; }
.color-row input[type=color] { width: 54px; height: 46px; padding: 4px; }
.slug-row { display: flex; align-items: center; gap: 6px; padding: 0 12px !important; }
.slug-row input { border: 0; flex: 1; padding: 12px 4px; }
.slug-row span { color: var(--muted); font-size: .9rem; white-space: nowrap; }

/* ==========================================================================
   LANDING
   ========================================================================== */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { font-size: 1.4rem; }
.brand-name { font-weight: 800; font-size: 1.2rem; }
.brand-name span { color: var(--brand); }
.site-nav { display: flex; gap: 22px; }
.site-nav a { font-weight: 600; font-size: .92rem; color: var(--ink-2); }
.site-nav a:hover { color: var(--brand); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-switch { display: inline-flex; gap: 2px; background: #fff; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; }
.lang-btn { border: 0; background: transparent; border-radius: 999px; padding: 6px 10px; font-size: .8rem; font-weight: 700; color: var(--ink-2); }
.lang-btn.active { background: var(--brand); color: #fff; }
.lang-btn span { display: none; }
.lang-btn.active span { display: inline; }

.hero { padding: clamp(30px, 6vw, 70px) 0; background: radial-gradient(1200px 500px at 80% -10%, var(--brand-soft), transparent 60%); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-block; background: #fff; border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 14px; font-size: .8rem; font-weight: 700; color: var(--brand); margin-bottom: 18px; }
.lead { font-size: 1.1rem; color: var(--ink-2); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 22px 0; }
.hero-points { list-style: none; padding: 0; display: flex; gap: 18px; flex-wrap: wrap; color: var(--ink-2); font-size: .9rem; font-weight: 600; }

/* Móvil CSS */
.phone { width: 280px; margin-inline: auto; background: #1b1a22; border-radius: 40px; padding: 12px; box-shadow: var(--shadow-lg); }
.phone.small { width: 220px; }
.phone-notch { width: 90px; height: 6px; background: #3a3844; border-radius: 999px; margin: 4px auto 8px; }
.phone-screen { background: var(--bg); border-radius: 30px; overflow: hidden; padding: 14px; min-height: 420px; }
.phone.small .phone-screen { min-height: 300px; }
.mini-hero { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-radius: 16px; padding: 16px; margin-bottom: 12px; }
.mini-logo { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.22); display: grid; place-items: center; font-weight: 800; margin-bottom: 8px; }
.mini-title { font-weight: 800; font-size: 1.05rem; }
.mini-sub { font-size: .78rem; opacity: .85; }
.mini-search { height: 34px; background: #fff; border-radius: 999px; margin-bottom: 12px; }
.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-card { background: #fff; border-radius: 14px; padding: 8px; }
.mini-img { height: 70px; border-radius: 10px; background: linear-gradient(135deg, #e9e4f5, #d9d2ef); }
.mini-img.alt { background: linear-gradient(135deg, #f5e4e0, #efd2d9); }
.mini-img.alt2 { background: linear-gradient(135deg, #e0f0e6, #d2efe2); }
.mini-line { height: 8px; background: #ececf2; border-radius: 999px; margin-top: 8px; }
.mini-line.short { width: 60%; }
.mini-wa { margin-top: 12px; background: #e6f7ee; color: #1f9d55; border-radius: 999px; padding: 10px; text-align: center; font-size: .82rem; font-weight: 700; }

.section { padding: clamp(34px, 6vw, 66px) 0; }
.section.alt { background: #fff; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.compare .card h3 { margin-top: 8px; }
.pill { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.good { background: var(--ok-soft); color: var(--ok); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.thumb { height: 120px; border-radius: 14px; margin-bottom: 14px; }
.thumb.t1 { background: linear-gradient(135deg, #ede7fa, #d9cdf5); }
.thumb.t2 { background: linear-gradient(135deg, #fdeee6, #f7d9c9); }
.thumb.t3 { background: linear-gradient(135deg, #e3f2ec, #cbe9dd); }
.steps .step { border-radius: var(--radius); padding: 24px; color: #fff; }
.step.c1 { background: linear-gradient(135deg, #5B1A80, #7C3AED); }
.step.c2 { background: linear-gradient(135deg, #3b2a6b, #5B1A80); }
.step.c3 { background: linear-gradient(135deg, #7a2ea8, #b06ad6); }
.step-n { font-size: 2rem; font-weight: 800; opacity: .6; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature { background: var(--bg); border-radius: var(--radius); padding: 20px; }
.feature span { font-size: 1.6rem; }
.feature h4 { margin: 10px 0 6px; }
.feature p { font-size: .88rem; color: var(--ink-2); margin: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; margin-bottom: 40px; }
.split.reverse .split-copy { order: 2; }
.split-copy h3 { font-size: 1.5rem; }
.split-mock { display: grid; place-items: center; }
.types-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.types-grid span { background: var(--bg); border-radius: 14px; padding: 16px 10px; text-align: center; font-weight: 650; font-size: .88rem; }
.band { background: #1c1b22; color: #fff; padding: 46px 0; }
.band-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.band-grid span { font-size: 1.8rem; font-weight: 800; color: var(--brand-2); }
.band-grid h4 { margin: 6px 0; }
.band-grid p { color: #b9b7c2; font-size: .9rem; margin: 0; }
.pricing { display: grid; place-items: center; }
.price-card { max-width: 380px; width: 100%; text-align: center; }
.price-card.featured { border: 2px solid var(--brand); }
.price { font-size: 2.6rem; font-weight: 800; color: var(--brand); }
.price small { font-size: 1rem; color: var(--muted); }
.price-card ul { list-style: none; padding: 0; text-align: start; margin: 16px 0; }
.price-card li { padding: 6px 0; font-size: .92rem; }
.templates { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.tpl { height: 150px; border-radius: 16px; }
.tpl.tp1 { background: linear-gradient(135deg, #5B1A80, #a06cd5); }
.tpl.tp2 { background: linear-gradient(135deg, #0f766e, #5eead4); }
.tpl.tp3 { background: linear-gradient(135deg, #b45309, #fcd34d); }
.tpl.tp4 { background: linear-gradient(135deg, #1e3a8a, #60a5fa); }
.tpl.tp5 { background: linear-gradient(135deg, #831843, #fb7185); }
.faq { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; }
.faq summary { font-weight: 650; cursor: pointer; }
.faq p { margin: 10px 0 0; color: var(--ink-2); font-size: .92rem; }
.cta-final { background: #1c1b22; color: #fff; padding: clamp(40px, 7vw, 80px) 0; }
.cta-final p { color: #b9b7c2; }
.site-footer { background: #fff; border-top: 1px solid var(--line); padding: 46px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.footer-grid h5 { margin-bottom: 10px; }
.footer-grid a { display: block; color: var(--ink-2); font-size: .9rem; padding: 4px 0; }
.footer-grid a:hover { color: var(--brand); }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 30px; padding-top: 16px; color: var(--muted); font-size: .85rem; }
.wa-float { position: fixed; inset-block-end: 20px; inset-inline-end: 20px; width: 56px; height: 56px; border-radius: 50%; background: #25D366; color: #fff; display: grid; place-items: center; font-size: 1.5rem; box-shadow: var(--shadow-lg); z-index: 40; }
.pwa-banner { position: fixed; inset-block-end: 16px; inset-inline: 16px; max-width: 460px; margin-inline: auto; background: #1c1b22; color: #fff; border-radius: 16px; padding: 12px 14px; display: none; align-items: center; gap: 10px; z-index: 60; }
.pwa-banner.show { display: flex; }

/* ==========================================================================
   AUTH
   ========================================================================== */
.auth-page { background: #fff; }
.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.auth-aside { background: linear-gradient(160deg, #2a0f3d, #5B1A80 60%, #7C3AED); color: #fff; padding: 46px; display: flex; flex-direction: column; gap: 20px; }
.auth-aside .brand-name { color: #fff; }
.auth-aside h2 { margin-top: 20px; }
.auth-benefits { list-style: none; padding: 0; display: grid; gap: 8px; }
.auth-mock { margin-top: auto; }
.auth-main { padding: 30px; display: flex; flex-direction: column; align-items: center; }
.auth-topbar { width: min(440px, 100%); display: flex; justify-content: flex-end; margin-bottom: 20px; }
.auth-card { width: min(440px, 100%); }
.auth-tabs { display: flex; gap: 6px; background: var(--bg); border-radius: 999px; padding: 5px; margin-bottom: 24px; }
.auth-tab { flex: 1; border: 0; background: transparent; border-radius: 999px; padding: 10px; font-weight: 700; color: var(--ink-2); }
.auth-tab.active { background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); }
.switch-line { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 16px; }
.row-between { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.demo-note { background: var(--brand-soft); color: var(--brand); border-radius: 12px; padding: 12px 16px; font-size: .85rem; margin-top: 18px; }

/* ==========================================================================
   APP / DASHBOARD
   ========================================================================== */
.app-page { background: var(--bg); }
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.app.blurred { filter: blur(3px); pointer-events: none; }
.sidebar { background: #fff; border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar-head { padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; }
.side-nav { padding: 8px 12px; flex: 1; }
.side-group { margin-bottom: 18px; }
.side-group > span { display: block; font-size: .68rem; letter-spacing: .12em; font-weight: 800; color: var(--muted); padding: 6px 12px; }
.side-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.side-nav a:hover { background: var(--bg); color: var(--brand); }
.side-nav a.active { background: var(--brand-soft); color: var(--brand); }
.side-nav a i { font-style: normal; }
.sidebar-foot { padding: 14px; border-top: 1px solid var(--line); }
.biz-chip { display: flex; align-items: center; gap: 10px; }
.biz-avatar { width: 38px; height: 38px; border-radius: 12px; color: #fff; display: grid; place-items: center; font-weight: 800; }
.biz-meta b { display: block; font-size: .9rem; }
.biz-meta small { color: var(--muted); font-size: .78rem; }
.app-main { display: flex; flex-direction: column; min-width: 0; }
.app-topbar { position: sticky; top: 0; z-index: 30; background: rgba(247,247,251,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: 12px 26px; display: flex; align-items: center; gap: 14px; }
.crumb { flex: 1; display: flex; flex-direction: column; font-size: .78rem; color: var(--muted); }
.crumb b { font-size: 1rem; color: var(--ink); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.app-view { padding: 26px; }
.only-mobile { display: none; }

.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.view-head h1 { margin: 0; }
.head-actions { display: flex; gap: 10px; align-items: center; }
.crumb-mini { font-size: .8rem; color: var(--muted); }
.hero-panel { background: linear-gradient(120deg, #f3ecfb, #fff 70%); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(24px, 4vw, 40px); position: relative; overflow: hidden; margin-bottom: 22px; }
.hero-panel::after { content: ''; position: absolute; inset-block-start: -60px; inset-inline-end: -60px; width: 220px; height: 220px; border-radius: 50%; background: var(--brand-soft); }
.badge-soft { display: inline-block; background: #fff; border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 14px; font-size: .78rem; font-weight: 700; color: var(--brand); }
.hero-panel h1 { margin: 14px 0 8px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.home-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; margin-bottom: 22px; }
.url-line { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: .86rem; color: var(--ink-2); word-break: break-all; margin: 12px 0; }
.url-line.empty { color: var(--muted); font-style: italic; }
.req-list { list-style: none; padding: 0; margin: 12px 0; }
.req-list li { padding: 5px 0; font-size: .9rem; color: var(--ink-2); }
.card-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.stat { background: var(--bg); border-radius: 12px; padding: 12px; text-align: center; }
.stat small { font-size: .68rem; color: var(--muted); letter-spacing: .06em; }
.stat b { display: block; font-size: 1.6rem; }
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.quick-card { text-align: start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); transition: .18s; }
.quick-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.qc-icon { font-size: 1.4rem; display: block; margin-bottom: 8px; }
.quick-card b { display: block; font-size: .95rem; }
.quick-card small { color: var(--muted); font-size: .82rem; }
.activity-item { background: var(--bg); border-radius: 12px; padding: 12px 14px; font-size: .9rem; }

.filter-bar { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 22px; }
.filter-bar .field { margin-bottom: 0; }
.data-table { width: 100%; border-collapse: collapse; }
.table-wrap { overflow-x: auto; }
.data-table th { text-align: start; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
.data-table td { padding: 12px; border-bottom: 1px solid var(--line); font-size: .9rem; vertical-align: middle; }
.row-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; }
.row-thumb.ph { background: var(--line); }
.row-actions { display: flex; gap: 6px; }
.switch { width: 42px; height: 24px; border-radius: 999px; background: var(--line-2); border: 0; position: relative; transition: .2s; }
.switch::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #fff; top: 3px; inset-inline-start: 3px; transition: .2s; }
.switch.on { background: var(--ok); }
.switch.on::after { inset-inline-start: 21px; }
.empty-state { text-align: center; padding: 50px 20px; }
.empty-state.big { padding: 80px 20px; }
.es-icon { font-size: 2.4rem; margin-bottom: 10px; }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stat-card span { font-size: 1.3rem; }
.stat-card small { display: block; color: var(--muted); font-size: .8rem; margin: 8px 0 2px; }
.stat-card b { font-size: 1.5rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 22px; }
.mini-list { list-style: none; padding: 0; margin: 0; }
.mini-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.appt { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.appt.past { opacity: .5; }
.appt-time { font-weight: 800; color: var(--brand); min-width: 54px; }
.appt-info { flex: 1; }
.appt-info small { display: block; color: var(--muted); }
.detail-block { margin-bottom: 14px; }
.detail-block p { margin: 2px 0; }
.detail-total { display: flex; justify-content: space-between; font-size: 1.1rem; padding: 12px 0; border-top: 1px solid var(--line); }
.status-picker { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.form-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 22px; align-items: start; }
.form-card { margin-bottom: 20px; }
.form-side .card { margin-bottom: 18px; }
.tip-card { background: var(--brand-soft); border-color: transparent; }
.tip-icon { font-size: 1.3rem; }
.tip-card ul { padding-inline-start: 18px; margin: 8px 0 0; font-size: .88rem; color: var(--ink-2); }
.img-picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 12px; }
.img-slot { aspect-ratio: 1; border: 2px dashed var(--line-2); border-radius: 12px; display: grid; place-items: center; position: relative; overflow: hidden; cursor: pointer; color: var(--muted); }
.img-slot.filled { border-style: solid; }
.img-slot img { width: 100%; height: 100%; object-fit: cover; }
.slot-x { position: absolute; top: 4px; inset-inline-end: 4px; background: rgba(0,0,0,.6); color: #fff; border: 0; border-radius: 50%; width: 24px; height: 24px; }
.form-sticky { position: sticky; bottom: 0; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 14px 0; display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }

.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.lib-item { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); cursor: pointer; }
.lib-item img { width: 100%; height: 100%; object-fit: cover; }
.lib-del { position: absolute; top: 6px; inset-inline-end: 6px; background: rgba(0,0,0,.6); color: #fff; border: 0; border-radius: 50%; width: 26px; height: 26px; }
.lib-item.pick.selected { outline: 4px solid var(--brand); outline-offset: -4px; }
.lib-item.pick.selected::after { content: ''; position: absolute; inset: 0; background: var(--brand-soft); }
.pick-check { position: absolute; top: 8px; inset-inline-start: 8px; background: var(--brand); color: #fff; border-radius: 50%; width: 28px; height: 28px; display: none; place-items: center; z-index: 2; }
.lib-item.pick.selected .pick-check { display: grid; }
.picker-actions { margin-bottom: 12px; }
.picker-bar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); padding: 12px 0 0; display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }

.set-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.set-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); }
.set-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.set-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); display: grid; place-items: center; font-size: 1.2rem; }
.set-card h3 { font-size: 1rem; margin-bottom: 4px; }
.set-card p { font-size: .85rem; color: var(--ink-2); min-height: 40px; }
.logo-preview { height: 120px; border-radius: 14px; background: var(--bg); display: grid; place-items: center; margin-bottom: 14px; font-size: 2rem; font-weight: 800; color: var(--brand); }
.logo-preview img { max-height: 90px; object-fit: contain; }
.pro-lock { background: var(--warn-soft); color: var(--warn); border-radius: 12px; padding: 12px 14px; font-size: .85rem; margin-top: 12px; }
.google-preview { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fff; }
.gp-url { color: var(--ok); font-size: .82rem; }
.gp-title { color: #1a0dab; font-size: 1.1rem; font-weight: 600; margin: 4px 0; }
.gp-desc { color: var(--ink-2); font-size: .88rem; }
.plan-row { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 22px; margin-bottom: 20px; }
.plan-cell h3 { display: flex; align-items: center; gap: 8px; }
.progress { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 10px 0; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.coverage-add, .coverage-transfer { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.coverage-add input, .coverage-transfer input { flex: 1; border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; }
.coverage-add select { border: 1px solid var(--line-2); border-radius: 12px; padding: 10px; }
.cov-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cov-biz small { display: block; color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 10px; height: 160px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bar { width: 100%; background: linear-gradient(180deg, var(--brand-2), var(--brand)); border-radius: 8px 8px 0 0; min-height: 4px; }
.wa-preview { background: var(--ok-soft); color: var(--ok); border-radius: 12px; padding: 12px 14px; font-weight: 700; }

/* Modal */
.cw-modal-overlay { position: fixed; inset: 0; background: rgba(20,16,40,.5); display: grid; place-items: center; padding: 18px; z-index: 200; opacity: 0; transition: .2s; }
.cw-modal-overlay.show { opacity: 1; }
.cw-modal { background: #fff; border-radius: var(--radius-lg); width: min(680px, 100%); max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.cw-modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 2; }
.cw-modal-head h3 { margin: 0; }
.cw-modal-body { padding: 22px; }
.cw-modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.toast { position: fixed; inset-block-end: 24px; inset-inline: 0; margin-inline: auto; width: fit-content; max-width: 90vw; background: #1c1b22; color: #fff; padding: 12px 20px; border-radius: 999px; z-index: 300; opacity: 0; transform: translateY(12px); transition: .25s; }
.toast.show { opacity: 1; transform: none; }
.toast.error { background: var(--bad); }

/* Onboarding */
.onb { position: fixed; inset: 0; background: var(--bg); z-index: 150; overflow-y: auto; padding: 24px; }
.onb-card { width: min(680px, 100%); margin: 20px auto; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.onb-progress { display: flex; gap: 6px; padding: 18px 24px 0; }
.onb-progress span { flex: 1; height: 6px; border-radius: 999px; background: var(--line); }
.onb-progress span.on { background: var(--brand); }
.onb-body { padding: 24px; }
.onb-foot { display: flex; justify-content: space-between; padding: 16px 24px; border-top: 1px solid var(--line); }
.onb-done { text-align: center; padding: 20px; }
.done-icon { font-size: 3rem; }
.onb-done-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }

/* ==========================================================================
   CATÁLOGO PÚBLICO
   ========================================================================== */
.catalog-page { background: var(--bg); }
.cat-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.cat-head-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.cat-brand { display: flex; align-items: center; gap: 12px; }
.cat-brand b { display: block; font-size: 1.05rem; }
.cat-brand small { color: var(--muted); font-size: .8rem; }
.cat-logo { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; }
.cat-logo.ph { display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.2rem; }
.cat-head-actions { display: flex; align-items: center; gap: 10px; }
.cat-hero { background: var(--brand); color: #fff; background-size: cover; background-position: center; padding: clamp(30px, 7vw, 70px) 0; }
.cat-hero h1 { margin: 0 0 6px; }
.cat-info { background: #fff; border-bottom: 1px solid var(--line); }
.cat-info-grid { display: flex; gap: 20px; padding: 16px 0; flex-wrap: wrap; }
.info-card { display: flex; align-items: center; gap: 12px; }
.info-card span { font-size: 1.4rem; }
.info-card b { display: block; font-size: .9rem; }
.info-card small { color: var(--muted); font-size: .82rem; }
.filter-bar-cat { position: sticky; top: 71px; z-index: 40; background: rgba(247,247,251,.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.filter-inner { display: flex; gap: 10px; align-items: center; padding: 12px 0; flex-wrap: wrap; }
.filter-inner select { border: 1px solid var(--line-2); border-radius: 999px; padding: 9px 14px; background: #fff; }
.filter-inner .search { flex: 1; min-width: 160px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; padding: 26px 0 60px; }
.item-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.item-media { position: relative; aspect-ratio: 4/3; cursor: pointer; background: var(--line); }
.item-media img { width: 100%; height: 100%; object-fit: cover; }
.ph-img { width: 100%; height: 100%; display: grid; place-items: center; font-size: 2rem; color: var(--muted); background: var(--line); }
.ph-img.big { min-height: 260px; }
.card-chip { position: absolute; background: rgba(255,255,255,.94); border-radius: 999px; padding: 4px 10px; font-size: .72rem; font-weight: 700; }
.card-chip.top { top: 10px; inset-inline-start: 10px; }
.card-chip.bottom { bottom: 10px; inset-inline-start: 10px; }
.in-cart { position: absolute; top: 10px; inset-inline-end: 10px; background: var(--brand); color: #fff; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; }
.item-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.item-body h3 { font-size: 1.02rem; margin-bottom: 8px; }
.card-line { font-size: .84rem; color: var(--ink-2); padding: 2px 0; }
.card-line.promo { color: var(--brand); font-weight: 700; }
.card-line.save { color: var(--ok); font-weight: 700; }
.card-line.ok { color: var(--ok); }
.item-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 12px; }
.item-actions .btn { flex: 1; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.dg-main { border-radius: 14px; overflow: hidden; background: var(--line); aspect-ratio: 1; }
.dg-main img { width: 100%; height: 100%; object-fit: cover; }
.dg-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.dg-thumbs button { width: 54px; height: 54px; border-radius: 10px; overflow: hidden; border: 2px solid var(--line); background: none; padding: 0; }
.dg-thumbs button.active { border-color: var(--brand); }
.dg-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail-price { font-size: 1.4rem; margin: 10px 0; }
.detail-price s { color: var(--muted); font-size: 1rem; }
.detail-rows { list-style: none; padding: 0; margin: 12px 0; }
.detail-rows li { padding: 5px 0; font-size: .9rem; }
.detail-desc { color: var(--ink-2); font-size: .92rem; }
.detail-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.cart-overlay { position: fixed; inset: 0; background: rgba(20,16,40,.45); z-index: 90; }
.cart-drawer { position: fixed; inset-block: 0; inset-inline-end: 0; width: min(440px, 100%); background: #fff; z-index: 100; display: flex; flex-direction: column; transform: translateX(110%); transition: transform .25s; box-shadow: var(--shadow-lg); }
[dir=rtl] .cart-drawer { transform: translateX(-110%); }
.cart-drawer.show { transform: none; }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.cart-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.cart-foot { border-top: 1px solid var(--line); padding: 16px 20px; background: #fff; }
.cart-items { list-style: none; padding: 0; margin: 0 0 16px; }
.cart-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ci-thumb { width: 54px; height: 54px; border-radius: 12px; background: var(--line); overflow: hidden; display: grid; place-items: center; }
.ci-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ci-info { flex: 1; }
.ci-info b { display: block; font-size: .92rem; }
.ci-info small { color: var(--muted); }
.qty { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; }
.qty button { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line-2); background: #fff; font-weight: 700; }
.ci-right { text-align: end; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; }
.cart-form h4 { margin-top: 8px; }
.cart-totals { margin-bottom: 12px; }
.cart-totals > div { display: flex; justify-content: space-between; padding: 3px 0; font-size: .9rem; }
.cart-totals .grand { font-size: 1.15rem; font-weight: 800; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.cart-fab { position: fixed; inset-block-end: 20px; inset-inline-end: 20px; background: var(--brand); color: #fff; border: 0; border-radius: 999px; padding: 14px 20px; font-weight: 800; box-shadow: var(--shadow-lg); z-index: 80; }
.cat-footer { background: #fff; border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: .85rem; text-align: center; }
.loading-block { padding: 60px 0; text-align: center; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1000px) {
  .hero-grid, .split, .auth-wrap, .form-grid, .two-col, .plan-row, .home-grid { grid-template-columns: 1fr; }
  .split.reverse .split-copy { order: 0; }
  .feature-grid, .set-grid, .stat-cards, .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .types-grid, .templates { grid-template-columns: repeat(3, 1fr); }
  .auth-aside { display: none; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: 270px; z-index: 120; transform: translateX(-110%); transition: transform .25s; }
  [dir=rtl] .sidebar { transform: translateX(110%); }
  body.sidebar-open .sidebar { transform: none; }
  .only-mobile { display: inline-flex; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grid-3, .compare, .band-grid, .faq, .types-grid, .feature-grid, .set-grid, .stat-cards, .quick-grid, .templates { grid-template-columns: 1fr; }
  .two-col-inline { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .header-actions .btn.ghost { display: none; }
  .img-picker { grid-template-columns: repeat(3, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .app-view { padding: 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .cart-drawer { width: 100%; }
  .filter-inner { flex-direction: column; align-items: stretch; }
  .filter-inner select, .filter-inner .search { width: 100%; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; }
}

/* RTL ajustes finos */
[dir=rtl] .side-nav a, [dir=rtl] .quick-card, [dir=rtl] .field > span { text-align: right; }
[dir=rtl] .data-table th, [dir=rtl] .data-table td { text-align: right; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
