body.agenda-focused .app-shell{display:block}
body.agenda-focused .sidebar{transform:translateX(-105%);transition:transform .24s ease;box-shadow:none}
body.agenda-focused .sidebar.open{transform:none;box-shadow:14px 0 45px #0004}
body.agenda-focused .app-shell>main{width:100%}
body.agenda-focused .menu-button{display:grid}
body.agenda-focused .topbar{height:60px;padding:0 16px}
body.agenda-focused .topbar .eyebrow{display:none}
body.agenda-focused .topbar h1{font-size:18px}
body.agenda-focused .content{max-width:none;padding:0}
body.agenda-focused #agenda .view-head{display:flex;align-items:center;gap:12px;min-height:53px;padding:7px 15px;border-bottom:1px solid var(--line)}
body.agenda-focused #agenda .view-head .eyebrow{display:none}
body.agenda-focused #agenda .view-head h2{font-size:16px;white-space:nowrap}
body.agenda-focused #agenda .artist-legend{flex-wrap:nowrap;overflow-x:auto;min-width:0;scrollbar-width:none}
body.agenda-focused #agenda .artist-legend button{flex:none;padding:7px 10px;font-size:12px}
body.agenda-focused #agenda .calendar{margin:0;padding:0;border:0;border-radius:0;box-shadow:none}
body.agenda-focused #agenda .calendar-toolbar{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:10px;padding:8px 15px;min-height:62px}
body.agenda-focused #agenda .calendar-navigation{min-width:0;gap:5px}
body.agenda-focused #agenda .calendar-navigation strong{font-size:15px;margin-left:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.agenda-focused #agenda .calendar-modes{flex:none}
body.agenda-focused #agenda .calendar-modes button{font-size:12px;padding:8px 10px}
#calendarGrid.calendar-grid{display:block;position:relative;width:100%;height:calc(100dvh - 175px);min-height:320px;max-height:none;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;overflow-anchor:none;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable}
body.agenda-focused #agenda .saved-appointments{display:none!important}
.calendar-period{width:100%;position:relative}
.calendar-period.calendar-month{min-width:0}
.calendar-period-title{position:sticky;top:0;z-index:2;margin:0;padding:9px 15px;background:#f4f1e9;border-block:1px solid #e4ddce;color:#5b4b2d;font:700 14px 'Manrope',sans-serif;text-transform:capitalize}
.calendar-period-days.week-days,.calendar-period-days.month-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));width:100%}
.calendar-period-days .calendar-day{min-width:0;border-right:1px solid var(--line);padding:10px;overflow:hidden}
.calendar-period-days.week-days .calendar-day{min-height:calc(100dvh - 210px)}
.calendar-period-days.week-days .calendar-day h3{display:flex;align-items:center;gap:5px;margin:0 0 10px;font-size:13px;white-space:nowrap}
.calendar-period-days.week-days .calendar-day h3 b{font-size:16px}
.calendar-period-days .calendar-event{display:block;width:100%;padding:8px;margin:0 0 5px;border-radius:8px}
.calendar-period-days .calendar-event b{font-size:12px;white-space:normal;line-height:1.35}
.calendar-period-days .calendar-event small{font-size:11px;line-height:1.3}
.calendar-period-days .calendar-more{width:100%;border:0;background:#f1eee6;border-radius:7px;text-align:left;font-size:12px;font-weight:700}
.calendar-period-days.month-days .calendar-day{min-height:72px;padding:8px;cursor:pointer}
.calendar-period-days.month-days .calendar-day h3{display:flex;align-items:center;gap:5px;margin:0 0 6px;font-size:12px;text-align:left}
.calendar-period-days.month-days .calendar-day h3 b{display:inline;font-size:15px;margin:0}
.calendar-period-days.month-days .calendar-event{padding:6px 7px;margin-bottom:4px;text-align:left}
.calendar-period-days.month-days .calendar-event b{display:block;font-size:11px;line-height:1.3;white-space:normal;overflow-wrap:anywhere}
.calendar-period-days.month-days .calendar-event small{display:block;font-size:10px;line-height:1.2;overflow-wrap:anywhere}
.calendar-period-days.month-days .calendar-weekday{padding:8px 2px;font-size:12px}
.calendar-date-number{font-size:15px}
.calendar-day-count{display:inline-grid;place-items:center;margin-left:7px;min-width:19px;height:19px;padding:0 4px;border-radius:10px;background:#c9a24f;color:#111;font-size:11px;font-weight:800}
.calendar-period-days .calendar-day.today{box-shadow:inset 0 0 0 2px #c9a24f}
.calendar-one-day .calendar-day{min-height:calc(100dvh - 215px)}
@media(max-width:900px){body.agenda-focused .topbar .role-preview{display:none}body.agenda-focused #agenda .calendar-toolbar{flex-wrap:wrap}body.agenda-focused #agenda .calendar-navigation{flex:1}#calendarGrid.calendar-grid{height:calc(100dvh - 195px)}.calendar-period-days.week-days .calendar-day{min-height:calc(100dvh - 240px);padding:7px}.calendar-period-days .calendar-event b{font-size:11px}}
@media(max-width:620px){body.agenda-focused .topbar{height:56px}body.agenda-focused .topbar .top-actions .icon-button{display:none}body.agenda-focused #agenda .view-head{min-height:49px}body.agenda-focused #agenda .view-head h2{font-size:15px}body.agenda-focused #agenda .artist-legend button{font-size:11px;padding:7px 8px}body.agenda-focused #agenda .calendar-toolbar{padding:6px 10px;min-height:74px}body.agenda-focused #agenda .calendar-navigation strong{font-size:13px}body.agenda-focused #agenda .calendar-navigation button{min-width:30px;height:32px;padding:0 8px}body.agenda-focused #agenda .calendar-modes{width:100%;display:flex}body.agenda-focused #agenda .calendar-modes button{flex:1}#calendarGrid.calendar-grid{height:calc(100dvh - 179px);min-height:320px;scrollbar-gutter:auto}.calendar-period-days.week-days{display:block}.calendar-period-days.week-days .calendar-day{display:grid;grid-template-columns:58px minmax(0,1fr);gap:7px;min-height:61px;padding:5px 10px;border-right:0;border-bottom:1px solid var(--line)}.calendar-period-days.week-days .calendar-day h3{display:block;margin:0;padding-top:5px;font-size:12px}.calendar-period-days.week-days .calendar-day h3 b{display:block;margin:0;font-size:17px}.calendar-period-days.week-days .calendar-day-events{min-width:0}.calendar-period-days.week-days .calendar-event{margin-bottom:3px;padding:5px 8px}.calendar-period-days.week-days .calendar-event b{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.calendar-period-days.week-days .calendar-event small{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.calendar-period-days.month-days .calendar-day{min-height:62px;padding:5px}.calendar-period-days.month-days .calendar-weekday{font-size:11px}.calendar-date-number{font-size:13px}.calendar-day-count{margin:2px 0 0;display:grid;width:max-content}.calendar-one-day .calendar-day{min-height:calc(100dvh - 220px)}}
@media(max-width:620px){.calendar-period-days.month-days{display:block}.calendar-period-days.month-days .calendar-weekday,.calendar-period-days.month-days .calendar-day.outside{display:none}.calendar-period-days.month-days .calendar-day{display:grid;grid-template-columns:58px minmax(0,1fr);gap:7px;min-height:55px;padding:5px 10px;border-right:0;border-bottom:1px solid var(--line)}.calendar-period-days.month-days .calendar-day h3{display:block;margin:0;padding-top:5px;font-size:12px}.calendar-period-days.month-days .calendar-day h3 b{display:block;font-size:17px}.calendar-period-days.month-days .calendar-day-events{min-width:0}.calendar-period-days.month-days .calendar-event{padding:6px 8px;margin-bottom:3px}.calendar-period-days.month-days .calendar-event b{font-size:12px;white-space:normal}.calendar-period-days.month-days .calendar-event small{font-size:11px}}
@media(max-width:620px){.calendar-period-days.month-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.calendar-period-days.month-days .calendar-day{display:block;min-height:72px;padding:3px 2px;border-right:1px solid var(--line);border-bottom:1px solid var(--line)}.calendar-period-days.month-days .calendar-day h3{display:block;padding:0;margin:0 0 3px;text-align:center;font-size:9px;line-height:1.15}.calendar-period-days.month-days .calendar-day h3 b{display:inline;margin-left:2px;font-size:12px}.calendar-period-days.month-days .calendar-event{padding:3px 2px;margin-bottom:2px;border-radius:4px}.calendar-period-days.month-days .calendar-event b{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;overflow-wrap:anywhere;font-size:9px;line-height:1.15}.calendar-period-days.month-days .calendar-event small{display:none}}

/* Semana y día muestran las 24 horas; las citas ocupan su duración real. */
.calendar-grid.week-view .calendar-period-days.week-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}
.calendar-grid .hourly-day{min-height:0!important;padding:7px 4px!important;overflow:visible}
.hourly-day h3{position:sticky;top:0;z-index:5;display:flex!important;align-items:center;gap:5px;min-height:30px;margin:0 0 5px!important;padding:3px 5px;background:#fff;font-size:12px;cursor:pointer}
.hourly-day.today h3{background:#f7edcf}
.calendar-timeboard{--hour-height:42px;position:relative;height:calc(24 * var(--hour-height));background:repeating-linear-gradient(to bottom,transparent 0,transparent calc(var(--hour-height) - 1px),#e6e0d4 calc(var(--hour-height) - 1px),#e6e0d4 var(--hour-height));cursor:cell}
.calendar-hour-label{position:absolute;left:2px;z-index:1;width:26px;color:#777164;font:700 10px/1.2 'Manrope',sans-serif;transform:translateY(2px);pointer-events:none}
.calendar-timeboard .calendar-hour-event{position:absolute;z-index:2;left:var(--event-left);width:var(--event-width);min-height:18px;margin:0!important;padding:4px 5px!important;overflow:hidden;border-left:3px solid var(--artist,#c9a24f);border-radius:5px;text-align:left;box-shadow:0 1px 3px #0002}
.calendar-timeboard .calendar-hour-event b{display:block;overflow:hidden;line-height:1.2;white-space:normal;overflow-wrap:anywhere;font-size:11px}
.calendar-timeboard .calendar-hour-event small{display:block;margin-top:3px;font-size:10px}
.calendar-one-day .hourly-day{min-height:0}
.calendar-one-day .calendar-timeboard{--hour-height:54px}
@media(max-width:620px){.calendar-grid.week-view .calendar-period-days.week-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.calendar-grid.week-view .hourly-day{display:block;min-width:0;padding:3px 1px!important;border-right:1px solid var(--line)}.calendar-grid.week-view .hourly-day h3{display:block;min-height:29px;margin:0 0 3px!important;padding:2px 0;text-align:center;font-size:9px}.calendar-grid.week-view .hourly-day h3 b{display:block;font-size:12px}.calendar-grid.week-view .calendar-timeboard{--hour-height:30px}.calendar-grid.week-view .calendar-hour-label{left:0;width:18px;font-size:7px}.calendar-grid.week-view .calendar-hour-event{left:var(--event-left-mobile);width:var(--event-width-mobile);padding:2px!important;border-left-width:2px}.calendar-grid.week-view .calendar-hour-event b{font-size:8px;line-height:1.1}.calendar-grid.week-view .calendar-hour-event small{display:none}.calendar-one-day .calendar-timeboard{--hour-height:48px}.calendar-one-day .calendar-hour-event b{font-size:12px}}
.calendar-month-marker{font-style:normal;font-weight:800;color:#9c7326;text-transform:capitalize;margin-left:auto}
@media(max-width:620px){.calendar-month-marker{display:block;margin:1px 0 0;font-size:9px}}
/* Una misma escala horaria para todos los días de la vista continua. */
.calendar-grid.month-view .calendar-period-days.month-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}
.calendar-grid.month-view .month-hourly-day{display:block;min-width:0;min-height:0;padding:4px 2px!important;border-right:1px solid var(--line);border-bottom:1px solid var(--line)}
.calendar-grid.month-view .month-hourly-day h3{display:flex;align-items:center;justify-content:center;min-height:34px;margin:0!important;padding:2px;text-align:center;background:#fff;font-size:11px}
.calendar-grid.month-view .month-hourly-day.today h3{background:#f7edcf}
.calendar-grid.month-view .month-hourly-day .calendar-timeboard{--hour-height:30px}
.calendar-grid.month-view .month-hourly-day .calendar-hour-label{font-size:8px}
.calendar-grid.month-view .month-hourly-day .calendar-hour-event{left:var(--event-left-mobile);width:var(--event-width-mobile);padding:2px!important}
.calendar-grid.month-view .month-hourly-day .calendar-hour-event b{font-size:10px;line-height:1.15}
.calendar-grid.month-view .month-hourly-day .calendar-hour-event small{display:none}
@media(max-width:620px){.calendar-grid.month-view .month-hourly-day h3{display:block!important;min-height:34px;font-size:9px}.calendar-grid.month-view .month-hourly-day h3 b{display:block!important;margin:0!important;font-size:12px}.calendar-grid.month-view .month-hourly-day .calendar-timeboard{--hour-height:26px}.calendar-grid.month-view .month-hourly-day .calendar-hour-label{left:0;width:13px;font-size:7px}.calendar-grid.month-view .month-hourly-day .calendar-hour-event b{font-size:8px}}
.client-access-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px;padding:10px 0;border-bottom:1px solid var(--line)}
.client-access-actions .danger{border-color:#c94b42;color:#a72f28;background:#fff7f6}.client-access-actions .danger:hover{border-color:#a72f28;background:#fff0ee}.client-directory-note{margin:9px 0;color:var(--muted);font-size:13px}
.client-action-dialog{width:min(620px,94vw);max-height:90dvh;overflow:auto;padding:22px;border:1px solid #ddd5c5;border-radius:18px;background:#fff;color:#24221e;box-shadow:0 18px 80px #0005}
.client-action-dialog::backdrop{background:#0008}.client-action-dialog header{display:flex;align-items:center;justify-content:space-between;gap:15px}.client-action-dialog h2{font-size:20px;margin:0}.client-action-dialog p{font-size:14px;line-height:1.6}.client-action-dialog input{width:100%;box-sizing:border-box;padding:12px;font-size:16px;border:1px solid #bbb;border-radius:8px}.client-link-buttons{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}.client-link-buttons button,.client-link-buttons a{padding:12px;border:1px solid #bfa979;border-radius:9px;color:#252117;background:#faf6ec;font:600 14px inherit;text-decoration:none;cursor:pointer}.client-action-dialog.document-dialog{width:min(1000px,96vw);height:90dvh;overflow:hidden;display:flex;flex-direction:column;gap:14px}.document-dialog iframe{width:100%;flex:1;min-height:0;border:0;background:#fff}.client-portal-dialog{padding:14px}.client-portal-dialog header{padding:2px 4px 0}.reminder-consent{display:grid!important;gap:6px;padding:12px 14px;border:1px solid #d8b65e55;border-radius:12px;background:#d8b65e0d}.reminder-consent span{display:flex;align-items:flex-start;gap:9px}.reminder-consent input{width:auto!important;margin-top:2px}.reminder-consent small{color:#777;line-height:1.45}
#appointmentClientAccess{display:grid;gap:8px;padding:13px;border:1px solid #e5ddc7;border-radius:12px;background:#faf8f0}
#appointmentClientAccess[hidden]{display:none}
#appointmentClientAccess .row-action{text-align:left;font-size:14px}
#appointmentClientAccess .security-note{margin:2px 0 0}
/* Mes y semana compactos: la altura del día no crece con 24 filas. */
.calendar-grid.month-view .calendar-period-days.month-days,.calendar-grid.week-view .calendar-period-days.week-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}
.calendar-grid .compact-day{display:block!important;min-width:0;min-height:0!important;padding:3px!important;overflow:hidden;border-right:1px solid var(--line);border-bottom:1px solid var(--line)}
.calendar-grid .compact-day h3{display:flex!important;align-items:center;justify-content:center;gap:3px;min-height:28px!important;margin:0!important;padding:2px!important;text-align:center;background:#fff;font-size:10px!important;cursor:pointer}
.calendar-grid .compact-day h3 b{display:inline!important;margin:0!important;font-size:13px!important}
.calendar-grid .compact-day.today h3{background:#f7edcf}
.compact-timeboard{position:relative;display:block!important;height:216px;min-height:0!important;overflow:hidden;background:repeating-linear-gradient(to bottom,transparent 0,transparent 17px,#e8e3d9 17px,#e8e3d9 18px);cursor:pointer}
.calendar-grid .summary-day{aspect-ratio:1;display:flex!important;flex-direction:column;min-height:0!important;cursor:pointer}
.calendar-grid .summary-day h3{flex:0 0 24px;min-height:24px!important;font-size:12px!important}
.calendar-summary-events{flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column;gap:3px;padding:2px}
.calendar-summary-event{flex:0 0 auto;border-left:2px solid var(--artist,#c9a24f);background:#f4f0e7;padding:2px 3px;border-radius:3px;font-size:12px;line-height:1.25;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.calendar-summary-event time{font-weight:700}.calendar-summary-event span{font-weight:500}
@media(max-width:620px){.calendar-grid .summary-day h3{display:flex!important;min-height:20px!important;flex-basis:20px;padding:0!important}.calendar-grid .summary-day h3 b{display:inline!important}.calendar-summary-events{padding:0;gap:1px}.calendar-summary-event{font-size:10px;padding:1px;line-height:1.1}.calendar-summary-event time{display:block}.calendar-summary-event span{display:block;overflow:hidden;text-overflow:ellipsis}}
.compact-hour-label{position:absolute;left:1px;width:15px;color:#766f61;font:700 8px/1 'Manrope',sans-serif;pointer-events:none}
.compact-hour-label:nth-of-type(7){transform:translateY(-100%)}
.compact-timeboard .compact-hour-event{position:absolute;z-index:2;display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:0;min-height:6px;margin:0!important;padding:1px 2px!important;overflow:hidden;border-left:2px solid var(--artist,#c9a24f);border-radius:2px;text-align:left;box-shadow:none}
.compact-hour-event b,.compact-hour-event span{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;line-height:1.05}
.compact-hour-event span{font-size:9px;font-weight:700}
.compact-outside-hours{position:absolute;right:1px;bottom:1px;z-index:3;max-width:calc(100% - 17px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:1px 2px;border-radius:2px;background:#fff8e6;color:#65502c;font-size:8px;pointer-events:none}
@media(max-width:620px){.calendar-grid .compact-day{padding:1px!important}.calendar-grid .compact-day h3{display:block!important;min-height:25px!important;padding:1px!important;font-size:8px!important}.calendar-grid .compact-day h3 b{display:block!important;font-size:11px!important}.compact-timeboard{height:192px;background:repeating-linear-gradient(to bottom,transparent 0,transparent 15px,#e8e3d9 15px,#e8e3d9 16px)}.compact-hour-label{width:12px;font-size:7px}.compact-hour-event b,.compact-hour-event span{font-size:7px;line-height:1}.compact-outside-hours{font-size:6px}}
.client-link-buttons a[aria-disabled="true"]{pointer-events:none;opacity:.5}
.manual-whatsapp-note{margin:9px 0 0;color:#655f53}
.drawer-return{margin:0 0 16px;padding:8px 11px}
.calendar-navigation #calendarBack{background:#25282a;color:#fff}

/* Consulta segura sin conexión: solo agenda cifrada de la sesión activa. */
.offline-agenda-banner{margin:8px 15px;padding:11px 13px;border:1px solid #b6493f;border-radius:10px;background:#fff2f0;color:#76231d;font-size:13px;font-weight:700;line-height:1.45}
.holiday-coverage-note{margin:7px 15px;color:#7b281f;font-size:12px;line-height:1.4}
.calendar-day.public-holiday{background:#fff3f1!important;box-shadow:inset 0 0 0 2px #c74337}
.calendar-day.public-holiday h3{color:#a3261d!important;background:#ffe9e5!important}
.holiday-label{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#ae2d24;font-size:9px;font-weight:900;line-height:1.15;text-transform:none}
.calendar-one-day .holiday-label{font-size:12px;white-space:normal}
.calendar-day.offline-unavailable{background:#f2f0eb!important;color:#8b877f}
.calendar-day.offline-unavailable .calendar-timeboard,.calendar-day.offline-unavailable .calendar-summary-events{background:repeating-linear-gradient(135deg,#f4f2ee 0,#f4f2ee 8px,#ebe8e1 8px,#ebe8e1 16px);cursor:not-allowed}
.offline-unavailable-label{display:block;margin:6px 2px;color:#726e66;font-size:9px;font-weight:800;line-height:1.2;text-align:center}
body.offline-agenda .nav-item[data-view]:not([data-view="agenda"]),body.offline-agenda #newAppointment,body.offline-agenda #quickAppointment,body.offline-agenda #emptyStartAppointment,body.offline-agenda #agenda .payment-intro,body.offline-agenda #calendarImportStatus{display:none!important}
body.offline-agenda #calendarGrid .calendar-timeboard{cursor:default}
body.offline-agenda #calendarGrid .calendar-event{cursor:pointer}
@media(max-width:620px){.offline-agenda-banner,.holiday-coverage-note{margin-inline:9px}.holiday-label{font-size:7px}.calendar-one-day .holiday-label{font-size:10px}}

/* Mensajes: el panel aprovecha el viewport en tablet y móvil sin perder el menú. */
.metric-action{width:100%;color:inherit;text-align:left}.metric-action:hover,.metric-action:focus-visible{border-color:#c6a85f;outline:2px solid #ead9a7;outline-offset:2px}.metric-open{display:block;margin-top:10px;color:#80672d;font-size:11px;font-weight:800}.chat-back{display:none;border:1px solid var(--line);border-radius:9px;background:#f4f4f2;width:38px;height:38px;flex:0 0 auto;font-weight:800}
.chat-header-actions{display:grid;justify-items:end;gap:5px;flex:0 0 auto}.chat-header-actions .row-action{padding:6px 9px}
@media(max-width:1100px){body.messages-focused .app-shell{display:block}body.messages-focused .sidebar{transform:translateX(-105%);transition:transform .24s ease;box-shadow:none}body.messages-focused .sidebar.open{transform:none;box-shadow:14px 0 45px #0004}body.messages-focused .app-shell>main{width:100%}body.messages-focused .menu-button{display:grid}body.messages-focused .content{max-width:none;padding:16px}body.messages-focused #mensajes{min-width:0}body.messages-focused #mensajes .workspace-grid{grid-template-columns:minmax(260px,34%) minmax(0,1fr);gap:12px;min-width:0;min-height:calc(100dvh - 128px)}body.messages-focused #mensajes .panel{min-width:0}body.messages-focused #mensajes .chat-content{min-width:0;max-height:calc(100dvh - 164px)}body.messages-focused #mensajes .chat-body{min-width:0;min-height:180px;overflow-y:auto}body.messages-focused #mensajes .reply-box{min-width:0}body.messages-focused #mensajes .reply-box textarea{min-width:0;max-width:100%}}
@media(max-width:760px){body.messages-focused{overflow-x:hidden}body.messages-focused .topbar{height:64px;padding:0 12px}body.messages-focused .topbar .eyebrow,body.messages-focused .topbar .role-preview{display:none}body.messages-focused .topbar h1{font-size:18px}body.messages-focused .content{padding:0;width:100%;overflow:hidden}body.messages-focused #mensajes .workspace-grid{display:block;min-height:calc(100dvh - 64px);width:100%;overflow:hidden}body.messages-focused #mensajes .conversation-list,body.messages-focused #mensajes .chat-panel{min-height:calc(100dvh - 64px);height:calc(100dvh - 64px);border:0;border-radius:0;box-shadow:none;padding:14px;overflow:hidden}body.messages-focused #mensajes .conversation-list{display:block;overflow-y:auto}body.messages-focused #mensajes .chat-panel{display:none}body.messages-focused.message-chat-open #mensajes .conversation-list{display:none}body.messages-focused.message-chat-open #mensajes .chat-panel{display:flex}body.messages-focused #mensajes .chat-content{height:100%;max-height:none;min-height:0}body.messages-focused #mensajes .chat-header{flex:0 0 auto;gap:8px;padding-bottom:10px}body.messages-focused #mensajes .chat-header .avatar{width:34px;height:34px}body.messages-focused #mensajes .chat-header .tag{max-width:82px;overflow:hidden;text-overflow:ellipsis}body.messages-focused #mensajes .chat-header-actions .row-action{padding:5px 7px;font-size:10px}body.messages-focused #mensajes .chat-back{display:grid;place-items:center}body.messages-focused #mensajes .chat-body{flex:1;min-height:0;max-height:none;margin:10px 0;padding:12px;overflow-y:auto;overscroll-behavior:contain}body.messages-focused #mensajes .bubble{max-width:88%;font-size:14px}body.messages-focused #mensajes .reply-box{flex:0 0 auto;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding-bottom:max(4px,env(safe-area-inset-bottom));background:#fff}body.messages-focused #mensajes .reply-box textarea{min-height:54px;max-height:120px}body.messages-focused #mensajes .reply-box button{min-width:76px;min-height:48px;padding:10px}body.messages-focused #mensajes .security-note{flex:0 0 auto;margin:8px 0 0}}

/* La reautenticación permanece visible: el IAB no necesita abrir un panel previo. */
.backup-actions{position:relative;isolation:isolate;align-items:flex-start;justify-content:flex-start;gap:10px;flex-wrap:wrap}
.backup-auth-disclosure{flex:1 0 100%;width:100%;max-width:100%}
.backup-auth-card{padding:18px;border:1px solid #ddd5c5;border-radius:14px;background:#fbfaf6}
.backup-auth-card h4{margin:0;font:700 17px 'Manrope',sans-serif}
.backup-auth-card form{display:grid;gap:13px;margin-top:12px}
.backup-auth-card form>p{margin:0;line-height:1.5}
.backup-auth-card label{display:grid;gap:7px;font-size:12px;font-weight:700}
.backup-auth-card input{width:100%;border:1px solid var(--line);border-radius:11px;padding:12px;background:#fff}
.backup-auth-buttons{display:flex;gap:9px;flex-wrap:wrap}
@media(max-width:620px){.backup-auth-disclosure{width:100%}.backup-auth-buttons>*{flex:1 1 150px}}

/* Bandeja separada: las consultas pendientes y atendidas conservan el mismo historial. */
body.messages-focused #mensajes .workspace-grid{grid-template-columns:minmax(520px,.95fr) minmax(0,1.05fr)}
.conversation-groups{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;min-width:0}
.conversation-column{min-width:0;border:1px solid var(--line);border-radius:13px;overflow:hidden;background:var(--card)}
.conversation-column>header{display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-bottom:1px solid var(--line);font-size:12px;font-weight:800}
.conversation-column>header b{display:grid;place-items:center;min-width:23px;height:23px;padding:0 6px;border-radius:99px;background:#e9ebec;color:#4d5256;font-size:11px}
.pending-column{background:#fffaf0}.pending-column>header b{background:#f5dfad;color:#765713}
.answered-column{background:#f2f8f3}.answered-column>header b{background:#d7ead9;color:#326039}
.conversation-scroll{max-height:560px;overflow-y:auto;padding:4px 7px}
.conversation-empty{display:grid;place-items:center;gap:7px;min-height:110px;padding:18px;text-align:center;color:var(--muted)}
.conversation-empty span{font-size:21px}.conversation-empty small{line-height:1.45}
@media(min-width:761px) and (max-width:1100px){body.messages-focused #mensajes .workspace-grid{grid-template-columns:1fr}body.messages-focused #mensajes .chat-panel{min-height:520px}}
@media(max-width:760px){.conversation-groups{grid-template-columns:1fr}.conversation-scroll{max-height:none}.answered-column{margin-bottom:16px}}

/* Tema oscuro local: mejora el contraste sin alterar permisos ni datos. */
html[data-theme="dark"]{color-scheme:dark;--bg:#090b0d;--ink:#f3f2ed;--muted:#a9adb1;--line:#303438;--card:#15181a;--dark:#090a0b;--shadow:0 12px 38px rgba(0,0,0,.32)}
html[data-theme="dark"] body{background:var(--bg);color:var(--ink)}
html[data-theme="dark"] .topbar{background:rgba(14,16,18,.9)}
html[data-theme="dark"] .panel,html[data-theme="dark"] .metric-card,html[data-theme="dark"] .conversation-column,html[data-theme="dark"] .chat-panel{background:var(--card);border-color:var(--line)}
html[data-theme="dark"] .icon-button,html[data-theme="dark"] .menu-button,html[data-theme="dark"] .row-action,html[data-theme="dark"] .secondary-button,html[data-theme="dark"] .calendar-head button,html[data-theme="dark"] .chat-back{background:#202427;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .search,html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea,html[data-theme="dark"] .drawer input,html[data-theme="dark"] .drawer select,html[data-theme="dark"] .drawer textarea,html[data-theme="dark"] .backup-auth-card input{background:#101315;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .search input{background:transparent}
html[data-theme="dark"] .drawer>section,html[data-theme="dark"] .backup-auth-card{background:#15181a;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .message{border-color:var(--line);color:var(--ink)}
html[data-theme="dark"] .message:hover{background:#22272a}
html[data-theme="dark"] .message.unread{background:#30270f}
html[data-theme="dark"] .pending-column{background:#211c12}
html[data-theme="dark"] .answered-column{background:#122018}
html[data-theme="dark"] .conversation-column>header b{background:#30363a;color:#e5e7e8}
html[data-theme="dark"] .pending-column>header b{background:#5a461c;color:#f4dda4}
html[data-theme="dark"] .answered-column>header b{background:#24442d;color:#c9e9cf}
html[data-theme="dark"] .chat-body{background:#0e1113}
html[data-theme="dark"] .bubble{background:#1b1f22;color:#f2f1ec;border-color:#33383c}
html[data-theme="dark"] .bubble-out{background:#2a261b;border-color:#69552d}
html[data-theme="dark"] .auto-note{background:#25291a;color:#d9dda9}
html[data-theme="dark"] .reply-box,html[data-theme="dark"] body.messages-focused #mensajes .reply-box{background:var(--card)}
html[data-theme="dark"] .empty-state>span{background:#24282b;color:#f2f1ec}
html[data-theme="dark"] .segmented{background:#24282b}
html[data-theme="dark"] .segmented .active{background:#3a3f42;color:#fff}
html[data-theme="dark"] .quick-actions button,html[data-theme="dark"] .care-actions button+button{background:#202427;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .calendar-event{color:#17191b}
html[data-theme="dark"] .calendar-period-title{background:#171a1d;color:#e6c66f;border-color:var(--line)}
html[data-theme="dark"] .calendar-day{background:#101315;color:var(--ink);border-color:var(--line)}
html[data-theme="dark"] .calendar-day.outside{background:#0c0f11;color:#6f7478}
html[data-theme="dark"] .calendar-day[data-calendar-date]:hover{background:#171b1e}
html[data-theme="dark"] .calendar-grid .compact-day h3,html[data-theme="dark"] .hourly-day h3,html[data-theme="dark"] .calendar-grid.month-view .month-hourly-day h3{background:#181c1f;color:#f3f2ed}
html[data-theme="dark"] .calendar-grid .compact-day.today h3,html[data-theme="dark"] .hourly-day.today h3,html[data-theme="dark"] .calendar-grid.month-view .month-hourly-day.today h3{background:#3b311b;color:#fff2c8}
html[data-theme="dark"] .calendar-summary-event{background:#24292c;color:#f7f5ef}
html[data-theme="dark"] .calendar-summary-event.artist-davo{background:#332b19;color:#f5df9c}
html[data-theme="dark"] .calendar-summary-event.artist-barbara{background:#2c2440;color:#e5dafa}
html[data-theme="dark"] .calendar-summary-event.artist-brandon{background:#17313a;color:#d7f4ff}
html[data-theme="dark"] .calendar-event.artist-davo{background:#332b19;color:#f5df9c}
html[data-theme="dark"] .calendar-event.artist-barbara{background:#2c2440;color:#e5dafa}
html[data-theme="dark"] .calendar-event.artist-brandon{background:#17313a;color:#d7f4ff}
html[data-theme="dark"] .calendar-event small{color:#c4c8ca}
html[data-theme="dark"] .calendar-timeboard,html[data-theme="dark"] .compact-timeboard{background-color:#0e1113;background-image:repeating-linear-gradient(to bottom,transparent 0,transparent calc(var(--hour-height,18px) - 1px),#2b3034 calc(var(--hour-height,18px) - 1px),#2b3034 var(--hour-height,18px))}
html[data-theme="dark"] .calendar-hour-label,html[data-theme="dark"] .compact-hour-label{color:#aeb3b7}
html[data-theme="dark"] .calendar-more{background:#23282b;color:#e7e9ea}
html[data-theme="dark"] .artist-legend button{background:#202427;color:#e5e7e8;border-color:var(--line)}
html[data-theme="dark"] .artist-legend button.active{background:#f2f0e9;color:#17191b;border-color:#f2f0e9}
html[data-theme="dark"] .calendar-day.public-holiday{background:#281514!important;box-shadow:inset 0 0 0 2px #b94a41}
html[data-theme="dark"] .calendar-day.public-holiday h3{background:#3a1d1a!important;color:#ffc2ba!important}
html[data-theme="dark"] .holiday-label{color:#ffaea5}
html[data-theme="dark"] .calendar-day.offline-unavailable{background:#151719!important;color:#8f9498}
html[data-theme="dark"] .calendar-day.offline-unavailable .calendar-timeboard,html[data-theme="dark"] .calendar-day.offline-unavailable .calendar-summary-events{background:repeating-linear-gradient(135deg,#171a1c 0,#171a1c 8px,#202427 8px,#202427 16px)}
.agenda-head-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}.availability-chip{display:block;width:100%;min-width:0;border:0;border-radius:5px;padding:3px 5px;text-align:left;font:800 10px/1.2 'Manrope',sans-serif;cursor:pointer}.availability-free{background:#d9f2df;color:#1c6633;box-shadow:inset 0 0 0 1px #72b985}.availability-busy{background:#f6dddd;color:#8b2626;box-shadow:inset 0 0 0 1px #cf7b7b}.calendar-availability.calendar-busy{position:absolute;z-index:1;left:29px;width:calc(100% - 31px);min-height:18px;border:1px dashed #b14f4f;border-radius:6px;background:repeating-linear-gradient(135deg,#f9e1e1dd 0,#f9e1e1dd 7px,#f3ccccdd 7px,#f3ccccdd 14px);color:#7b2323;padding:3px 6px;text-align:left;overflow:hidden;cursor:pointer}.calendar-availability.calendar-busy b,.calendar-availability.calendar-busy small{display:block;font-size:10px;line-height:1.2}.availability-form .availability-time-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.availability-form .availability-time-fields[hidden]{display:none}html[data-theme="dark"] .availability-free{background:#173a25;color:#b9f4ca;box-shadow:inset 0 0 0 1px #3c8052}html[data-theme="dark"] .availability-busy{background:#442122;color:#ffc7c7;box-shadow:inset 0 0 0 1px #8f4649}html[data-theme="dark"] .calendar-availability.calendar-busy{background:repeating-linear-gradient(135deg,#452326e8 0,#452326e8 7px,#52292ce8 7px,#52292ce8 14px);color:#ffd0d0;border-color:#a65e62}
@media(max-width:620px){.agenda-head-actions{width:100%;justify-content:space-between}.agenda-head-actions #manageAvailability{padding:7px 10px;font-size:11px}.availability-chip{padding:2px;font-size:8px}.calendar-availability.calendar-busy{left:18px;width:calc(100% - 19px);padding:2px}.calendar-availability.calendar-busy b{font-size:8px}.calendar-availability.calendar-busy small{display:none}}
html[data-theme="dark"] .compact-outside-hours{background:#332b19;color:#f5df9c}
.consent-archive-actions{margin:0}
.document-dialog>.manual-whatsapp-note{margin:0}
