.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { background: var(--ink); color: #fff; padding: 22px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.side .logo { font-family: var(--display); font-weight: 800; font-size: 1.35rem; display: flex; gap: .45em; align-items: center; padding: 0 10px 20px; }
.side .logo svg { width: 28px; height: 28px; }
.side nav a { display: flex; align-items: center; gap: .7em; color: #C9C8E8; text-decoration: none; font-weight: 700; padding: .7em .8em; border-radius: 10px; margin-bottom: 2px; }
.side nav a svg { width: 20px; height: 20px; flex: 0 0 20px; }
.side nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.side nav a.on { background: var(--primary); color: #fff; }
.side .biz { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid rgba(255,255,255,.12); font-size: .9rem; color: #C9C8E8; }
.side .biz b { color: #fff; display: block; }
.side .biz button { background: none; border: 0; color: #C9C8E8; padding: 0; margin-top: 8px; cursor: pointer; font: inherit; text-decoration: underline; }

main.view { padding: 28px 32px 110px; max-width: 1040px; width: 100%; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.head h1 { font-size: 1.9rem; font-weight: 800; margin: 0; }
.panel { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 18px; }
.panel h2 { font-size: 1.2rem; }
.panel > p:first-child { margin-top: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-family: var(--display); font-size: 1.7rem; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .88rem; }

.daynav { display: flex; align-items: center; gap: 8px; }
.daynav input { width: auto; }
.appt { display: grid; grid-template-columns: 66px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.appt:first-child { border-top: 0; }
.appt .time { font-family: var(--display); font-weight: 800; font-size: 1.25rem; }
.appt .who b { display: block; }
.appt .who small { color: var(--muted); }
.appt .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.appt.cancelled .who, .appt.cancelled .time { opacity: .45; text-decoration: line-through; }
.empty { color: var(--ink-2); padding: 18px; border: 2px dashed var(--line); border-radius: var(--radius); text-align: center; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .95rem; }
th { color: var(--muted); font-weight: 700; font-size: .85rem; }
.scroll { overflow-x: auto; }

.chat { background: var(--wa-bg); border-radius: var(--radius); padding: 14px; min-height: 180px; max-height: 380px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.bub { max-width: 82%; padding: 8px 11px; border-radius: 10px; background: #fff; white-space: pre-wrap; font-size: .95rem; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.bub.me { align-self: flex-end; background: var(--wa-out); }
.chatform { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 10px; }

.msg { padding: 12px 0; border-top: 1px solid var(--line); }
.msg .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }
.msg p { margin: .35em 0 0; white-space: pre-wrap; }

.svc { display: grid; grid-template-columns: 1fr 118px 84px 52px 30px; gap: 8px; align-items: center; margin-bottom: 8px; }
.svc-head { font-weight: 700; color: var(--muted); font-size: .85rem; margin-bottom: 4px; }
.svc-new { grid-template-columns: 1fr 118px 84px 90px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.x { background: none; border: 0; font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 4px; }
.x:hover { color: var(--bad); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: .88rem; color: var(--primary); cursor: pointer; text-decoration: underline; }

/* Interruptor */
.sw { display: inline-flex; align-items: center; gap: .6em; margin: 0; font-weight: 700; font-size: 1rem; cursor: pointer; }
.sw input { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; }
.sw i { flex: 0 0 42px; width: 42px; height: 24px; border-radius: 99px; background: #C9CADB; position: relative; transition: background .15s; }
.sw i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.sw input:checked + i { background: var(--primary); }
.sw input:checked + i::after { transform: translateX(18px); }
.sw input:focus-visible + i { outline: 3px solid var(--sun); outline-offset: 2px; }
.sw input:disabled + i { opacity: .5; }
.opt-row { padding: 10px 0; border-top: 1px solid var(--line); }
.opt-row:first-child { border-top: 0; }
.opt-row .hint { margin: .3em 0 0 calc(42px + .6em); }
.opt-row.disabled { opacity: .55; }

/* Horario */
.day-row { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: start; padding: 11px 0; border-top: 1px solid var(--line); }
.day-row:first-child { border-top: 0; }
.day-row .sw { padding-top: 8px; }
.day-row.closed .sw span { color: var(--muted); }
.closed-label { display: inline-block; color: var(--muted); padding-top: 8px; }
.range { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.range select { width: 104px; padding: .5em .6em; }
.range-acts { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 2px; }
.row-error { color: var(--bad); font-size: .88rem; font-weight: 700; }
.row-error:not(:empty) { margin-top: 6px; }

.head-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.block-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; margin: 6px 0; background: #EEEEF5; border-radius: var(--radius-sm); }
.closure-form { display: grid; grid-template-columns: 150px 150px 1fr auto; gap: 10px; align-items: end; margin-bottom: 10px; }
.closure-form label { margin-top: 0; }
.check { display: flex; gap: .5em; align-items: center; font-weight: 400; }
.check input { width: auto; }
.auth-logo { display: flex; gap: .4em; align-items: center; font-family: var(--display); font-weight: 800; font-size: 1.3rem; color: var(--ink); text-decoration: none; margin-bottom: 18px; }
.auth-logo span { width: 28px; display: inline-flex; }

.slug { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.slug-prefix { color: var(--muted); font-size: .92rem; overflow-wrap: anywhere; }
.slug input { flex: 1 1 140px; width: auto; min-width: 120px; }

/* Calendario */
.cal-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-title { font-family: var(--display); font-size: 1.2rem; display: inline-block; }
.cal-title::first-letter { text-transform: uppercase; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); padding: 3px; }
.seg button { border: 0; background: none; font: 700 .9rem var(--body); padding: .4em .95em; border-radius: 999px; cursor: pointer; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.cal { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 10px; }
.cal-top, .cal-body { display: grid; grid-template-columns: 54px repeat(var(--cols), minmax(0, 1fr)); }
.cal-top { border-bottom: 1.5px solid var(--line); }
.cal-day { text-align: center; padding: 8px 2px; text-decoration: none; color: var(--ink); text-transform: capitalize; }
.cal-day small { display: block; color: var(--muted); font-size: .8rem; }
.cal-day b { font-family: var(--display); font-size: 1.2rem; display: inline-block; min-width: 32px; line-height: 32px; border-radius: 50%; }
.cal-day.is-today b { background: var(--primary); color: #fff; }
.cal-body { max-height: min(68vh, 760px); overflow-y: auto; position: relative; }
.cal-axis { position: relative; }
.cal-h { position: absolute; right: 8px; transform: translateY(-1px); font-size: .76rem; color: var(--muted); }
.cal-col { position: relative; border-left: 1px solid var(--line); cursor: copy; background-image: repeating-linear-gradient(to bottom, var(--line) 0, var(--line) 1px, transparent 1px, transparent 69px); }
.cal-closed { position: absolute; inset-inline: 0; background: repeating-linear-gradient(135deg, #F0F0F7 0 6px, #E9E9F2 6px 12px); }
.cal-now { position: absolute; inset-inline: 0; height: 2px; background: var(--bad); z-index: 3; pointer-events: none; }
.cal-now::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.cal-ev { position: absolute; left: 2px; right: 3px; z-index: 2; text-align: left; border: 0; border-left: 4px solid var(--primary); border-radius: 7px; background: var(--primary-soft); color: var(--ink); padding: 3px 6px; font: .82rem/1.2 var(--body); cursor: pointer; overflow: hidden; display: flex; flex-direction: column; gap: 1px; touch-action: pan-y; }
.cal-ev[data-movable] { cursor: grab; }
.cal-ev:hover { box-shadow: 0 2px 8px rgba(30,27,75,.2); z-index: 4; }
.cal-ev b, .cal-ev .cal-s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev .cal-t { font-weight: 700; font-size: .75rem; color: var(--ink-2); }
.cal-ev .cal-s { color: var(--ink-2); }
.cal-ev.tight { flex-direction: row; align-items: center; gap: 5px; }
.cal-ev.tight .cal-s { display: none; }
.cal-ev.pending { background: var(--warn-soft); border-left-color: var(--warn); }
.cal-ev.confirmed { background: var(--ok-soft); border-left-color: var(--ok); }
.cal-ev.completed { background: #EEEEF5; border-left-color: var(--muted); }
.cal-ev.no_show { background: var(--bad-soft); border-left-color: var(--bad); }
.cal-ev.no_show b { text-decoration: line-through; }
.cal-ev.dragging { opacity: .85; z-index: 9; box-shadow: 0 8px 22px rgba(30,27,75,.35); cursor: grabbing; }
.cal-off { position: absolute; inset-inline: 2px; z-index: 1; border: 1.5px dashed var(--muted); border-radius: 7px; background: rgba(255,255,255,.75); color: var(--ink-2); font: 700 .78rem var(--body); cursor: pointer; padding: 3px 6px; text-align: left; overflow: hidden; }
.cal-help { margin: 0 0 16px; }
.plate.intl b { padding: 0 .6em; }
.plate.small { font-size: .74rem; align-self: flex-start; }
.sheet-grid { display: grid; gap: 8px; margin-top: 14px; }

/* Legal y Google */
.gstart { width: 100%; gap: .6em; }
.terms-list { padding-left: 1.2em; line-height: 1.9; }
.appfoot { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .85rem; }
.appfoot a { color: var(--muted); }
.accents { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.accents button { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; }
.accents button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--ink); }
.coverbox { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: center; }
.coverbox img, .coverbox .noimg { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius); background: var(--primary-soft); display: grid; place-items: center; color: var(--muted); font-size: .9rem; }
@media (max-width: 820px) { .coverbox { grid-template-columns: 1fr; } }

/* Hoy */
.linkchip { display: inline-block; background: var(--primary-soft); color: var(--primary); border-radius: 999px; padding: 0 .55em; font-size: .85em; font-weight: 700; white-space: nowrap; }
.sub { color: var(--ink-2); margin: .1em 0 0; }
.head h1::first-letter { text-transform: uppercase; }
.today-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; align-items: start; margin-bottom: 16px; }
.today-grid .panel { margin: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.panel-head h2 { margin: 0; }
.today-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.panel-head + .today-row { border-top: 0; }
.today-open { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: center; background: none; border: 0; padding: 2px; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.today-open .t { font-family: var(--display); font-size: 1.15rem; flex: 0 0 56px; }
.today-open span { min-width: 0; }
.today-open span b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.today-open small { color: var(--muted); }
.row-acts { display: flex; gap: 6px; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; color: var(--ink-2); font-size: .92rem; }
.facts.panel { padding: 16px 20px; margin-bottom: 16px; }
.facts b { display: block; font-family: var(--display); font-size: 1.45rem; color: var(--ink); line-height: 1.2; }
.facts .warn b { color: var(--bad); }
.upsell.soft { background: var(--primary-soft); }
.empty p { margin: 0 0 10px; }
.client-link { color: inherit; }
.danger-link { color: var(--bad); }
details.panel summary, .panel details summary { cursor: pointer; font-weight: 700; }

/* Ajustes */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; padding-bottom: 4px; }
.tabs a { flex: 0 0 auto; padding: .5em 1em; border-radius: 999px; font-weight: 700; font-size: .92rem; text-decoration: none; color: var(--ink-2); border: 1.5px solid var(--line); background: var(--surface); }
.tabs a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.side .biz a { color: #C9C8E8; }

/* Tablero de encargos */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: start; }
.col { background: #EEEEF5; border-radius: var(--radius); padding: 10px; min-height: 120px; }
.col h2 { font-size: .98rem; display: flex; justify-content: space-between; align-items: center; gap: 6px; margin: 2px 2px 10px; }
.col .hint { margin: 4px 2px; }
.job { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 10px; margin-bottom: 8px; display: grid; gap: 8px; }
.job-open { display: grid; gap: 3px; color: inherit; text-decoration: none; justify-items: start; }
.job-open small { color: var(--muted); overflow-wrap: anywhere; }
.job-open .job-when { color: var(--warn); font-weight: 700; }
.job .btn { width: 100%; }
.closed-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.plate { display: inline-flex; align-items: stretch; height: 1.95em; font: 800 1rem/1 var(--display); color: #111418; background: #fff; border: .1em solid #111418; border-radius: .3em; overflow: hidden; vertical-align: middle; white-space: nowrap; }
.plate .eu { flex: 0 0 1.08em; background: #003DA5 url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2020%2036%22%3E%3Ccircle%20cx%3D%2215.20%22%20cy%3D%2211.50%22%20r%3D%220.95%22%20fill%3D%22%23FFCC00%22/%3E%3Ccircle%20cx%3D%2214.50%22%20cy%3D%2214.10%22%20r%3D%220.95%22%20fill%3D%22%23FFCC00%22/%3E%3Ccircle%20cx%3D%2212.60%22%20cy%3D%2216.00%22%20r%3D%220.95%22%20fill%3D%22%23FFCC00%22/%3E%3Ccircle%20cx%3D%2210.00%22%20cy%3D%2216.70%22%20r%3D%220.95%22%20fill%3D%22%23FFCC00%22/%3E%3Ccircle%20cx%3D%227.40%22%20cy%3D%2216.00%22%20r%3D%220.95%22%20fill%3D%22%23FFCC00%22/%3E%3Ccircle%20cx%3D%225.50%22%20cy%3D%2214.10%22%20r%3D%220.95%22%20fill%3D%22%23FFCC00%22/%3E%3Ccircle%20cx%3D%224.80%22%20cy%3D%2211.50%22%20r%3D%220.95%22%20fill%3D%22%23FFCC00%22/%3E%3Ccircle%20cx%3D%225.50%22%20cy%3D%228.90%22%20r%3D%220.95%22%20fill%3D%22%23FFCC00%22/%3E%3Ccircle%20cx%3D%227.40%22%20cy%3D%227.00%22%20r%3D%220.95%22%20fill%3D%22%23FFCC00%22/%3E%3Ccircle%20cx%3D%2210.00%22%20cy%3D%226.30%22%20r%3D%220.95%22%20fill%3D%22%23FFCC00%22/%3E%3Ccircle%20cx%3D%2212.60%22%20cy%3D%227.00%22%20r%3D%220.95%22%20fill%3D%22%23FFCC00%22/%3E%3Ccircle%20cx%3D%2214.50%22%20cy%3D%228.90%22%20r%3D%220.95%22%20fill%3D%22%23FFCC00%22/%3E%3Ctext%20x%3D%2210%22%20y%3D%2231.5%22%20text-anchor%3D%22middle%22%20font-family%3D%22Arial%2CHelvetica%2Csans-serif%22%20font-weight%3D%22700%22%20font-size%3D%2211%22%20fill%3D%22%23fff%22%3EE%3C/text%3E%3C/svg%3E") center / contain no-repeat; }
.plate b { display: flex; align-items: center; padding: 0 .55em 0 .5em; letter-spacing: .07em; font-weight: 800; }
.plate.none { height: auto; font: 700 .78rem/1 var(--body); letter-spacing: 0; border: 1.5px dashed var(--line); color: var(--muted); padding: .35em .6em; }
.plate-input { text-transform: uppercase; font-weight: 800; letter-spacing: .05em; }
.job-title { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.back { display: block; font-weight: 700; text-decoration: none; margin-bottom: 6px; }
.stage-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photo { margin: 0; }
.photo img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-sm); display: block; }
.photo figcaption { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; font-size: .85rem; }
.photo .sw { font-size: .85rem; font-weight: 400; }
.ev { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.ev:first-of-type { border-top: 0; }
.ev small { color: var(--muted); white-space: nowrap; }
.assets { font-weight: 700; color: var(--ink-2); }

/* Asistente de bienvenida */
.wizard { min-height: 100vh; padding: 22px 16px 60px; display: grid; justify-items: center; align-content: start; }
.wz-box { width: min(760px, 100%); }
.wz-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.wz-logo { display: flex; gap: .4em; align-items: center; font-family: var(--display); font-weight: 800; font-size: 1.25rem; }
.wz-logo span { width: 26px; display: inline-flex; }
.wz-steps { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.wz-steps li { display: flex; flex-direction: column; gap: 5px; font-size: .8rem; color: var(--muted); font-weight: 700; border-top: 4px solid var(--line); padding-top: 6px; }
.wz-steps li b { display: none; }
.wz-steps li.on { color: var(--primary); border-color: var(--primary); }
.wz-steps li.ok { color: var(--ink-2); border-color: var(--ok); }
#wz { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-lg); padding: 26px; }
#wz h1 { font-size: 1.75rem; font-weight: 800; }
.wz-sub { color: var(--ink-2); margin: 0 0 16px; }
.wz-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 24px; }
.sector-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sector { margin: 0; cursor: pointer; font-weight: 700; }
.sector input { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; }
.sector span { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 12px; border: 2px solid var(--line); border-radius: var(--radius); font-size: .92rem; line-height: 1.2; }
.sector em { font-style: normal; font-size: 1.4rem; }
.sector span:hover { border-color: var(--ink-2); }
.sector input:checked + span { border-color: var(--primary); background: var(--primary-soft); }
.sector input:focus-visible + span { outline: 3px solid var(--sun); outline-offset: 2px; }
.presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.preset { text-align: left; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; font: inherit; color: inherit; }
.preset:hover { border-color: var(--primary); }
.preset small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.25; margin-top: 2px; }
.wz-split { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; }
.phone { border: 8px solid var(--ink); border-radius: 26px; overflow: hidden; height: 520px; background: var(--bg); }
.phone iframe { width: 100%; height: 100%; border: 0; display: block; }
.wz-done { text-align: center; }
.wz-tick { width: 58px; height: 58px; line-height: 58px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 1.9rem; font-weight: 800; margin: 0 auto 12px; }
.wz-done .copy { text-align: left; }
.wz-share { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 14px 0 22px; }
.wz-done h2 { font-size: 1.1rem; margin-bottom: .4em; }
.wz-tips { text-align: left; color: var(--ink-2); max-width: 420px; margin: 0 auto 22px; padding-left: 1.2em; }
.copy { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.integr { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.integr div { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 10px 12px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 8px; }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.plan { border: 2px solid var(--line); border-radius: var(--radius-lg); padding: 20px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.plan.cur { border-color: var(--primary); }
.plan .price { font-family: var(--display); font-size: 2.1rem; font-weight: 800; }
.plan ul { padding-left: 1.1em; margin: 0 0 8px; color: var(--ink-2); flex: 1; }
.meter { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 6px 0 2px; }
.meter i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.upsell { background: var(--sun); border-radius: var(--radius); padding: 12px 16px; font-weight: 700; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

.linkchip, .side .logo svg { flex: 0 0 auto; }
.modal { position: fixed; inset: 0; background: rgba(30,27,75,.5); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal .box { background: var(--bg); width: min(540px, 100%); max-height: 90vh; overflow-y: auto; border-radius: var(--radius-lg); padding: 24px; }
.modal .box h2 { display: flex; justify-content: space-between; align-items: center; }
.modal .x { background: none; border: 0; font-size: 1.6rem; cursor: pointer; color: var(--ink-2); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.slots button { padding: 8px 0; border: 2px solid var(--line); border-radius: 8px; background: var(--surface); font: 700 .95rem var(--body); cursor: pointer; color: inherit; }
.slots button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }

.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 44%) 1fr; }
.auth-side { background: var(--ink); color: #fff; padding: 40px 48px; display: flex; flex-direction: column; }
.auth-side .auth-logo { color: #fff; }
.auth-side h2 { font-size: clamp(2rem, 3.4vw, 3.1rem); font-weight: 800; line-height: 1.05; margin: auto 0 24px; }
.auth-side ul { list-style: none; padding: 0; margin: 0 0 auto; color: #C9C8E8; font-size: 1.05rem; }
.auth-side li { padding: 7px 0 7px 30px; position: relative; }
.auth-side li::before { content: ''; position: absolute; left: 2px; top: 13px; width: 13px; height: 7px; border-left: 3px solid var(--sun); border-bottom: 3px solid var(--sun); transform: rotate(-45deg); }
.auth-main { display: grid; place-items: center; padding: 28px 22px; }
.auth .box { width: min(400px, 100%); }
.auth h1 { font-size: 2rem; font-weight: 800; margin-bottom: .15em; }
.auth-sub { color: var(--ink-2); margin: 0 0 20px; }
.auth .alt { margin-top: 18px; color: var(--ink-2); text-align: center; }
.auth-logo.mobile { display: none; }
.pw-label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.pw-label a { font-size: .88rem; }
.social { margin-bottom: 4px; }
#gbtn { min-height: 44px; display: flex; justify-content: center; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .88rem; margin: 18px 0 6px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.tabbar { display: none; }

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  main.view { padding: 18px 16px 110px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .grid2, .plans { grid-template-columns: 1fr; }
  .appt { grid-template-columns: 54px 1fr; }
  .appt .acts { grid-column: 1 / -1; justify-content: flex-start; }
  .svc-head { display: none; }
  .svc { grid-template-columns: 1fr 1fr 52px 30px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .svc > input[data-k="name"], .svc-new > input[name="name"] { grid-column: 1 / -1; }
  .svc-new { grid-template-columns: 1fr 1fr; border-bottom: 0; }
  .svc-new .btn { grid-column: 1 / -1; }
  .closure-form { grid-template-columns: 1fr 1fr; }
  .closure-form > div:nth-child(3), .closure-form .btn { grid-column: 1 / -1; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-logo.mobile { display: flex; }
  .cal-head { margin-bottom: 10px; }
  .cal-head h1 { display: none; }
  .cal-head .head-acts { width: 100%; flex-wrap: nowrap; }
  .cal-head .btn { padding: .6em .7em; font-size: .88rem; white-space: nowrap; flex: 1 1 0; }
  .cal-bar { gap: 8px; }
  .cal-bar #pick { display: none; }
  .cal-title { order: 3; width: 100%; font-size: 1.05rem; }
  .cal.day .cal-top { display: none; }
  .cal.week .cal-body, .cal.week .cal-top { grid-template-columns: 44px repeat(var(--cols), minmax(86px, 1fr)); }
  .cal.week { overflow-x: auto; }
  .cal-body { max-height: 66vh; }
  .modal { padding: 0; place-items: end stretch; }
  .modal .box { width: 100%; border-radius: 22px 22px 0 0; max-height: 92vh; }
  .today-grid { grid-template-columns: 1fr; }
  .head-acts .btn { flex: 1 1 auto; }
  .board { grid-auto-flow: row; grid-auto-columns: auto; overflow-x: visible; }
  .col { min-height: 0; }
  /* En el móvil solo estorban: las columnas vacías se quedan en el ordenador. */
  .col.is-empty { display: none; }
  .day-row { grid-template-columns: 1fr; gap: 6px; }
  .day-row .sw { padding-top: 0; }
  .closed-label { display: none; }
  .wz-split, .sector-grid, .presets { grid-template-columns: 1fr 1fr; }
  .wz-split { grid-template-columns: 1fr; }
  .presets { grid-template-columns: 1fr; }
  #wz { padding: 18px; }
  .wz-steps li span { font-size: .68rem; }
  .modal { place-items: end stretch; }
  .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: var(--surface); border-top: 1.5px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 40; justify-content: space-around; }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .72rem; font-weight: 700; color: var(--muted); text-decoration: none; padding: 4px 6px; }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.on { color: var(--primary); }
}

/* Evita desbordes horizontales en móvil (enlaces largos, tablas) */
.shell > * { min-width: 0; }
.bub, .msg p, td { overflow-wrap: anywhere; }

/* v2: prueba, pendientes de enviar, retraso */
.trialbar { background: var(--primary-soft); color: var(--primary); font-weight: 700; padding: 10px 16px; border-radius: var(--radius); margin-bottom: 16px; }
.trialbar a { color: var(--primary); }
.side nav a { position: relative; }
.side nav a .dot, .tabbar a .dot { font-style: normal; background: var(--bad); color: #fff; font-size: .7rem; font-weight: 800; border-radius: 999px; padding: 1px 6px; margin-left: auto; }
.tabbar a .dot { position: absolute; top: 0; right: 8px; margin: 0; }
.tabbar a { position: relative; }
.outbox { border-color: var(--sun); border-width: 2px; }
.ob { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.ob p { margin: .35em 0 0; white-space: pre-wrap; font-size: .92rem; color: var(--ink-2); }
.ob .acts { display: flex; gap: 6px; flex-direction: column; }
.appt .time s { color: var(--muted); font-size: .95rem; font-weight: 500; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.chips button { padding: 10px 14px; border: 2px solid var(--line); border-radius: 999px; background: var(--surface); font: 700 1rem var(--body); cursor: pointer; color: inherit; }
.chips button[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.preview { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-top: 10px; display: grid; gap: 4px; max-height: 220px; overflow-y: auto; }
@media (max-width: 820px) { .ob { grid-template-columns: 1fr; } .ob .acts { flex-direction: row; } }

.ob p { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.sheet-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; }
.sheet-actions .btn { white-space: nowrap; }
@media (max-width: 820px) {
  .sheet-actions { grid-template-columns: 1fr; }
  .scroll table { min-width: 560px; }
  .head h1 { font-size: 1.6rem; }
}
