/* ================= Oficina Digital — capa móvil =================
   Se carga solo en pantallas estrechas (media del <link>) y reorganiza la
   misma aplicación al estilo de una app Android: barra de navegación
   inferior, hojas deslizantes en lugar de modales/menús, botón de acción
   flotante y vistas a pantalla completa. Reutiliza los tokens de color de
   style.css, por lo que el modo oscuro funciona sin más.              */

:root {
  --mnav-h: 64px;
  --topnav-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --sheet-radius: 22px;
}

html, body { height: 100%; overscroll-behavior-y: contain; }
body { font-size: 15px; -webkit-tap-highlight-color: transparent; }
button, .btn, .icon-btn, a { touch-action: manipulation; }

.app { height: 100dvh; }

/* ---------- Barra superior ---------- */
.topnav { height: calc(var(--topnav-h) + var(--safe-t)); padding-top: var(--safe-t); position: relative; z-index: 60; }
.topnav-inner { padding: 0 8px 0 14px; gap: 6px; }
.topnav-nav { display: none; }
.brand-name { display: inline; font-size: 16.5px; }
.brand-logo { width: 30px; height: 30px; }
.topnav-right { gap: 2px; margin-left: 0; }
.topnav .icon-btn, .msearch-btn { width: 42px; height: 42px; border-radius: 50%; }
.topnav .icon-btn svg, .msearch-btn svg { width: 21px; height: 21px; }
.topnav-avatar { width: 34px; height: 34px; margin-left: 4px; }
.topnav-bell .nav-badge { top: 4px; right: 4px; }

/* Búsqueda global: icono en la barra; al tocarlo, hoja a pantalla completa */
.msearch-btn { display: inline-grid; place-items: center; color: var(--muted); margin-left: auto; }
.global-search-wrap { display: none; }
body.msearch .global-search-wrap {
  display: block; position: fixed; left: 0; right: 0; top: 0; z-index: 130;
  padding: calc(8px + var(--safe-t)) 12px 8px; background: var(--surface);
  border-bottom: 1px solid var(--border);
}
body.msearch .global-search-box { gap: 6px; }
body.msearch .global-search-box input,
body.msearch .global-search-box input:focus { width: 100%; height: 46px; font-size: 16px; padding-left: 40px; border-radius: 12px; }
body.msearch .global-search-box svg { left: 13px; }
input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.msearch-close { display: none; }
body.msearch .msearch-close { display: inline-grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; color: var(--muted); }
body.msearch .msearch-close svg { position: static; width: 22px; height: 22px; }
body.msearch .global-search-results,
body.msearch .global-search-results[hidden] {
  display: block; position: fixed; top: calc(63px + var(--safe-t)); left: 0; right: 0; bottom: 0;
  width: auto; max-height: none; border-radius: 0; border: none; box-shadow: none;
  overflow-y: auto; padding-bottom: calc(20px + var(--safe-b));
}
body.msearch .global-search-results[hidden] { visibility: hidden; }
body.msearch::before { content: ""; position: fixed; inset: 0; z-index: 120; background: var(--surface); }
body.msearch .global-search-results { z-index: 131; }
body.msearch .global-search-results [data-result] { padding: 12px 14px; }

/* ---------- Navegación inferior ---------- */
.mnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  display: flex; align-items: stretch;
  height: calc(var(--mnav-h) + var(--safe-b)); padding: 4px 4px var(--safe-b);
  background: var(--surface); border-top: 1px solid var(--border);
}
.mnav a, .mnav button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .01em;
  border-radius: 12px; min-width: 0; padding: 0 2px;
}
.mnav .ico {
  position: relative; display: grid; place-items: center;
  width: 58px; height: 30px; border-radius: 15px;
  transition: background var(--t-med) var(--ease), color var(--t-med) var(--ease);
}
.mnav .ico svg { width: 23px; height: 23px; }
.mnav .active { color: var(--accent-ink); }
.mnav .active .ico { background: var(--accent-soft); color: var(--accent); }
.mnav .active .ico svg { stroke-width: 2.4; }
.mnav .ico .nav-badge { top: -3px; right: 7px; border-color: var(--surface); }
.mnav span.lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.main { padding-bottom: calc(var(--mnav-h) + var(--safe-b)); }

/* ---------- Cabecera del módulo ---------- */
.topbar { padding: 10px 16px 0; gap: 8px; flex-wrap: wrap; }
.topbar-title { font-size: 22px; letter-spacing: -.02em; }
.topbar-right { margin-left: auto; gap: 4px; }
.topbar-actions { display: none; }
.topbar .search-box { width: 100%; }
.topbar .search-box input { width: 100%; height: 42px; font-size: 16px; border-radius: 12px; padding-left: 38px; }
.topbar-right:has(.search-box) { width: 100%; margin-left: 0; order: 3; }
.mtb-more { display: inline-grid; width: 42px; height: 42px; border-radius: 50%; }
.mtb-more svg { width: 20px; height: 20px; }
.topbar-right:has(.search-box) .mtb-more { position: absolute; right: 8px; top: 8px; }
.topbar { position: relative; }

.content { padding: 10px 12px 96px; }
.card { border-radius: 14px; }
.empty-state { padding: 40px 20px; }

/* ---------- Botón de acción flotante ---------- */
.mfab {
  position: fixed; right: 16px; bottom: calc(var(--mnav-h) + var(--safe-b) + 16px); z-index: 70;
  display: inline-flex; align-items: center; gap: 10px;
  height: 56px; min-width: 56px; padding: 0 20px 0 16px;
  border-radius: 16px; background: var(--accent); color: #fff;
  font-weight: 700; font-size: 15px; letter-spacing: -.005em;
  box-shadow: 0 6px 20px rgba(84, 87, 224, .38), 0 2px 6px rgba(0, 0, 0, .12);
  transition: transform var(--t-fast) var(--ease), opacity var(--t-med) var(--ease), box-shadow var(--t-fast);
}
.mfab svg { width: 22px; height: 22px; stroke-width: 2.4; }
.mfab:active { transform: scale(.95); }
.mfab[hidden] { display: none; }
body:has(#modal-root .modal) .mfab,
body:has(.mail-layout.show-view) .mfab,
body.msearch .mfab { opacity: 0; pointer-events: none; transform: translateY(12px); }

/* ---------- Controles táctiles ---------- */
.btn { min-height: 40px; padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn-sm { min-height: 36px; padding: 6px 11px; font-size: 13px; }
.icon-btn { width: 40px; height: 40px; }
.icon-btn svg { width: 18px; height: 18px; }
.field input, .field textarea, .field select, .task-add input, .task-add select, .chips-input {
  font-size: 16px; min-height: 44px; border-radius: 10px;
}
.field > span { font-size: 13px; }
.field { margin-bottom: 14px; }
.filters { margin-left: 0; width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.filters button { padding: 9px 6px; font-size: 13px; }
.chips-input input { min-width: 100px; }

/* ---------- Inicio ---------- */
.dash-header { margin: 6px 0 16px; }
.dash-header h2 { font-size: 22px; }
.stat-cards { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.stat-card { padding: 12px 12px 12px 14px; gap: 10px; flex-direction: column; align-items: flex-start; }
.stat-icon { width: 36px; height: 36px; border-radius: 10px; }
.stat-value { font-size: 24px; }
.stat-label { font-size: 12px; }
.dash-grid { grid-template-columns: 1fr; gap: 10px; }
.dash-grid > * { min-width: 0; overflow: hidden; }
.stat-cards > * { min-width: 0; }
.dash-panel h3 { padding: 12px 14px; }
.dash-item { padding: 11px 14px; }
.chart-panel { margin-bottom: 10px; }

/* ---------- Correo ---------- */
body[data-route="correo"] .content { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
body[data-route="correo"] .topbar { padding-bottom: 8px; border-bottom: 1px solid var(--border); background: var(--surface); }
.mail-layout {
  flex: 1; min-height: 0; height: auto;
  display: flex; flex-direction: column;
  border: none; border-radius: 0; box-shadow: none; background: var(--surface);
}
.mail-splitter { display: none; }
.mail-folders {
  flex: none; padding: 8px 12px; border-right: none; border-bottom: 1px solid var(--border);
  background: var(--surface); max-height: none;
}
#mail-folders { display: flex; flex-direction: row; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
#mail-folders::-webkit-scrollbar { display: none; }
#mail-folders .mail-folder {
  flex: 0 0 auto; width: auto; gap: 7px;
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text-2); font-size: 13px; font-weight: 600;
}
#mail-folders .mail-folder.active { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
#mail-folders .mail-folder .badge { margin-left: 0; }
#mail-folders .folder-add-btn { flex: 0 0 auto; border-radius: 999px; min-height: 0; padding: 7px 12px; }
#mail-quota { display: none; }

.mail-list { flex: 1; min-height: 0; overflow-y: auto; border-right: none; max-height: none; border-bottom: none; padding-bottom: 92px; }
.mail-list-header { position: sticky; top: 0; z-index: 4; padding: 6px 10px; gap: 6px; }
.mail-density { display: none; }
.mail-list-tools { gap: 2px; margin-left: auto; }
.mail-list-tools select { height: 36px; font-size: 13px; }
.bulk-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 6px; padding: 8px 10px; }
.bulk-bar > span { flex: 0 0 auto; }
.bulk-bar .btn { flex: 0 0 auto; }

.mail-item { padding: 12px 10px 12px 12px; gap: 12px; cursor: pointer; }
.mail-item .msg-check { display: none; }
.mail-item > .avatar { width: 42px; height: 42px; font-size: 13.5px; position: relative; }
.mail-item:has(.msg-check:checked) > .avatar { background: var(--accent) !important; color: transparent; }
.mail-item:has(.msg-check:checked) > .avatar::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: no-repeat center / 20px 20px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E");
}
.mail-item:has(.msg-check:checked) { background: var(--accent-softer); }
.mi-sender { font-size: 15px; }
.mi-date { font-size: 12px; }
.mi-subject { font-size: 14px; margin-top: 2px; }
.mi-snippet { font-size: 12.5px; margin-top: 2px; }
.mi-star { width: 40px; height: 40px; display: grid; place-items: center; margin-right: -6px; }
.mi-star svg { width: 20px; height: 20px; }
.mail-more { margin: 12px auto 20px; display: flex; }

/* Lectura a pantalla completa */
.mail-view { display: none; }
.mail-layout.show-view .mail-view {
  display: flex; flex-direction: column;
  position: fixed; inset: 0; z-index: 95;
  background: var(--surface); overflow-y: auto;
  padding-top: var(--safe-t);
  padding-bottom: calc(76px + var(--safe-b));
  animation: slideIn .2s var(--ease);
}
@keyframes slideIn { from { transform: translateX(28px); opacity: .6; } }
.mv-header {
  display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 8px;
  padding: 6px 12px 12px; border-bottom: 1px solid var(--border);
}
.mv-back { display: inline-grid; order: -1; width: 44px; height: 44px; margin: 0 0 0 -6px; flex-shrink: 0; }
.mv-back svg { width: 20px; height: 20px; }
.mv-subject { flex: 1 1 calc(100% - 60px); font-size: 17px; line-height: 1.3; margin: 10px 0 10px; }
.mv-meta { flex-basis: 100%; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.mv-meta .avatar { width: 40px; height: 40px; }
.mv-meta .who { flex: 1 1 0; min-width: 0; }
.mv-meta .from { font-size: 14px; word-break: break-word; line-height: 1.35; }
.mv-meta .to { font-size: 12.5px; white-space: normal; line-height: 1.4; margin-top: 2px; }
.mv-meta .date { flex-basis: 100%; padding-left: 50px; font-size: 12.5px; margin-top: -4px; }
.mv-attachments { padding: 10px 12px; }
.mv-att-bar { gap: 6px; }
.mv-body-wrap { padding: 0; }
.mv-body-frame { width: 100%; }

/* Barra de acciones del mensaje: fija abajo, deslizable horizontalmente */
.mail-layout.show-view .mv-actions {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 96;
  display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none;
  padding: 10px 10px calc(10px + var(--safe-b));
  background: var(--surface); border-top: 1px solid var(--border); border-bottom: none;
  box-shadow: 0 -6px 18px rgba(0, 0, 0, .06);
}
.mv-actions::-webkit-scrollbar { display: none; }
.mv-actions .btn { flex: 0 0 auto; border-radius: 999px; min-height: 40px; padding: 8px 14px; font-size: 13.5px; }
.mv-actions .btn svg { width: 16px; height: 16px; }

/* Redactar: pantalla completa */
.compose-row { position: relative; }
.compose-row .chips-field { position: static; }
.compose-row .chips-dd { left: 0; right: 0; top: calc(100% + 2px); max-height: 46dvh; }
.chips-dd-item { padding: 10px 10px; gap: 10px; }
.chips-dd-item > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-lg .compose-row { flex-wrap: wrap; }
.compose-label { width: 44px; font-size: 12.5px; }
.compose-cc-toggle { min-height: 36px; }
.compose-footer-row { flex-wrap: wrap; gap: 10px; }

/* ---------- Tareas ---------- */
.tasks-layout { display: flex; flex-direction: column; height: auto; gap: 10px; }
.tasks-lists {
  display: flex; flex-direction: row; align-items: center; gap: 6px;
  overflow-x: auto; scrollbar-width: none; padding: 8px;
}
.tasks-lists::-webkit-scrollbar { display: none; }
.tasks-lists h4 { display: none; }
.task-list-item {
  flex: 0 0 auto; width: auto; gap: 7px;
  padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2);
  font-size: 13px; font-weight: 600; color: var(--text-2);
}
.task-list-item.active { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.task-list-item .name { overflow: visible; }
.task-list-item .count { font-size: 12px; }
.task-list-item .icon-btn { display: none; }
.task-list-item.active .icon-btn { display: inline-grid; opacity: 1; width: 26px; height: 26px; margin: -4px -4px -4px 0; }
.tl-add { width: auto; flex: 0 0 auto; margin-top: 0; border-radius: 999px; min-height: 36px; }
.tasks-main { padding: 14px 12px; overflow: visible; }
.tasks-head { gap: 10px; margin-bottom: 12px; }
.tasks-head h3 { font-size: 17px; width: 100%; }
.task-add { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.task-add input[type="text"], .task-add .btn { grid-column: 1 / -1; min-width: 0; }
.task-add input, .task-add select { min-width: 0; width: 100%; }
.task-row { position: relative; flex-wrap: wrap; gap: 6px 8px; padding: 12px 12px 10px 48px; margin-bottom: 8px; border-radius: 12px; }
.task-row .task-check { position: absolute; left: 13px; top: 13px; width: 24px; height: 24px; border-radius: 7px; }
.task-row .task-check svg { width: 15px; height: 15px; }
.task-row .tr-main { flex: 1 1 100%; }
.task-row .tr-title { font-size: 15px; line-height: 1.35; }
.task-row .tr-notes { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.task-row .icon-btn { width: 36px; height: 36px; margin: -6px 0; }
.task-row .icon-btn:not(.danger) { margin-left: auto; }
.task-row .tr-due, .task-row .pill { font-size: 12px; }

/* ---------- Tablero ---------- */
.board-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px 10px; padding: 0 12px 2px; }
.board-tabs::-webkit-scrollbar { display: none; }
.board-tab { flex: 0 0 auto; min-height: 36px; }
.kanban-board {
  height: calc(100dvh - var(--topnav-h) - var(--safe-t) - var(--mnav-h) - var(--safe-b) - 128px);
  gap: 10px; margin: 0 -12px; padding: 0 12px 8px;
  scroll-snap-type: x mandatory; scroll-padding-left: 12px; scrollbar-width: none;
}
.kanban-board::-webkit-scrollbar { display: none; }
.kanban-col { width: min(84vw, 360px); scroll-snap-align: start; border-radius: 14px; }
.kanban-col-header { padding: 12px 12px 8px; }
.kanban-col-name { font-size: 15px; }
.kanban-col-header .icon-btn { opacity: 1; width: 34px; height: 34px; }
.kanban-cards { padding: 0 10px; gap: 8px; }
.kanban-card { padding: 12px 13px; border-radius: 12px; cursor: pointer; }
.kc-title { font-size: 14.5px; }
.kanban-add { margin: 8px 10px 10px; padding: 10px; min-height: 40px; }
.kanban-new-col { width: 62vw; scroll-snap-align: start; padding: 16px; }

/* ---------- Calendario ---------- */
.cal-layout { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.cal-main { padding: 10px; }
.cal-header { flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.cal-header h2 { flex: 1 1 240px; min-width: 0; text-align: center; font-size: 16px; line-height: 1.25; }
.cal-header #cal-today { order: 5; flex: 1 1 40%; justify-content: center; }
.cal-header #cal-busy-toggle { order: 6; flex: 1 1 40%; justify-content: center; }
.cal-header .filters { order: 10; margin-top: 4px; }
.cal-weekdays, .cal-grid-days { gap: 3px; }
.cal-weekdays div { font-size: 10.5px; padding: 2px 0 6px; }
.cal-cell { min-height: 60px; padding: 3px 3px 2px; border-radius: 7px; }
.cal-day-num { font-size: 12px; margin-bottom: 2px; }
.cal-cell.today .cal-day-num { width: 20px; height: 20px; font-size: 11px; }
.cal-chip { font-size: 0; height: 6px; padding: 0; margin: 0 0 2px; border-radius: 3px; }
.cal-chip svg { display: none; }
.cal-more { font-size: 9.5px; }
.cal-side { flex-direction: column; }
.mini-cal { display: none; }
.cal-agenda { padding: 12px 14px; }
.agenda-item { padding: 12px 0; }
.agenda-item .t1 { font-size: 14px; }
.week-head, .week-grid { grid-template-columns: 34px repeat(7, 1fr); }
.week-grid { max-height: calc(100dvh - 400px); min-height: 320px; }
.week-hour { font-size: 9.5px; padding-right: 4px; }
.week-day-head .wd-name { font-size: 9.5px; }
.week-day-head .wd-num { width: 24px; height: 24px; font-size: 13px; }
.week-event { font-size: 10px; padding: 2px 4px; left: 1px; right: 1px; }
.week-event span { display: none; }

/* ---------- Contactos ---------- */
.contacts-grid { grid-template-columns: 1fr; gap: 10px; }
.contact-card { padding: 14px; gap: 10px; }
.cc-actions { margin-top: 0; }

/* ---------- Modales → hojas inferiores ---------- */
.modal-backdrop { place-items: end center; padding: 0; background: rgba(10, 12, 24, .5); }
.modal {
  width: 100%; max-width: 100%; max-height: 92dvh;
  display: flex; flex-direction: column;
  border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
  overflow: hidden;
  animation: sheetUp .24s var(--ease);
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .5; } }
.modal::before {
  content: ""; display: block; flex-shrink: 0;
  width: 40px; height: 4px; border-radius: 2px;
  background: var(--border-strong); margin: 8px auto 0;
}
.modal-header { flex-shrink: 0; padding: 8px 18px 10px; border-bottom: none; }
.modal-header h3 { font-size: 18px; }
.modal-header .icon-btn { width: 40px; height: 40px; margin-right: -8px; border-radius: 50%; }
.modal-form { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.modal-body { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 18px 10px; }
.modal-footer {
  flex-shrink: 0; flex-wrap: wrap; gap: 8px;
  padding: 10px 16px calc(12px + var(--safe-b));
  border-top: 1px solid var(--border); background: var(--surface);
}
.modal-footer .spacer { display: none; }
.modal-footer .btn { flex: 1 1 auto; justify-content: center; min-height: 46px; font-size: 15px; border-radius: 12px; }
.modal-footer .btn-primary { flex-basis: 45%; order: 10; }
.modal-lg { height: 100dvh; max-height: 100dvh; border-radius: 0; padding-top: var(--safe-t); }
.modal-lg::before { display: none; }
.modal-lg .modal-header { padding-top: 12px; border-bottom: 1px solid var(--border); }
.drop-overlay { display: none; }

/* ---------- Menús → hojas inferiores ---------- */
.msheet-scrim { position: fixed; inset: 0; z-index: 149; background: rgba(10, 12, 24, .42); animation: fadeIn .15s ease; }
.menu-pop {
  position: fixed !important; top: auto !important; left: 0 !important; right: 0; bottom: 0;
  width: 100%; min-width: 0; max-height: 78dvh; overflow-y: auto;
  border: none; border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
  padding: 6px 10px calc(10px + var(--safe-b));
  box-shadow: var(--shadow-xl);
  animation: sheetUp .22s var(--ease);
}
.menu-pop::before {
  content: ""; display: block; width: 40px; height: 4px; border-radius: 2px;
  background: var(--border-strong); margin: 6px auto 8px;
}
.menu-head { padding: 8px 10px 10px; }
.menu-item { padding: 13px 12px; font-size: 15.5px; gap: 14px; border-radius: 12px; min-height: 50px; }
.menu-item svg { width: 21px; height: 21px; }
.menu-item:active { background: var(--surface-2); }
.menu-foot { padding: 10px 12px 2px; }
.menu-sep { height: 1px; background: var(--border); margin: 6px 4px; }

/* ---------- Avisos ---------- */
#toast-root { bottom: calc(var(--mnav-h) + var(--safe-b) + 12px); left: 12px; right: 12px; transform: none; width: auto; }
.toast { width: 100%; justify-content: space-between; padding: 13px 16px; border-radius: 14px; font-size: 14px; }
body:has(.mail-layout.show-view) #toast-root { bottom: calc(72px + var(--safe-b)); }

/* ---------- Login ---------- */
.login-screen { padding: 0; place-items: end center; background: var(--bg); }
.login-card {
  width: 100%; border-radius: var(--sheet-radius) var(--sheet-radius) 0 0; border: none;
  padding: 30px 24px calc(28px + var(--safe-b)); box-shadow: none;
}
.login-card h1 { font-size: 24px; }
.login-card .brand-logo { width: 56px; height: 56px; border-radius: 16px; }
.login-card .brand-logo svg { width: 32px; height: 32px; }
.login-card .brand { flex-direction: column; gap: 12px; margin-bottom: 8px; }
.login-card .btn-block { min-height: 50px; font-size: 16px; border-radius: 12px; }
.login-demo { font-size: 13px; }

/* Con teclado en pantalla el alto útil se reduce: que las hojas sigan cabiendo */
@media (max-height: 520px) {
  .modal { max-height: 100dvh; border-radius: 0; }
  .modal::before { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .modal, .menu-pop, .mail-layout.show-view .mail-view, .msheet-scrim { animation: none; }
}

/* ---------- Guía del alta automática ---------- */
.onboard { margin: 10px 12px 0; }
.onboard-inner { flex-wrap: wrap; gap: 10px 12px; padding: 12px 14px; }
.onboard-text { flex: 1 1 calc(100% - 52px); }
.onboard-actions { width: 100%; justify-content: flex-end; }

/* ---------- Redactar: el editor aprovecha la pantalla; invitaciones ---------- */
.modal-lg .rte-area { max-height: none; min-height: 200px; }
.mv-invite { margin: 10px 12px 0; padding: 12px; gap: 10px; }
.mv-invite-actions .btn { flex: 1 1 auto; justify-content: center; }
