/* Platform — Custom styles */
:root {
    --suitehint-accent: #0170B9;
    --suitehint-header-h: 56px;
    --suitehint-sidebar-w: 264px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* ===== Layout: header + sidebar flotante ===== */
.suitehint-header {
    height: var(--suitehint-header-h);
}

.suitehint-sidebar {
    width: var(--suitehint-sidebar-w);
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}
.suitehint-sidebar.suitehint-open {
    transform: translateX(0);
}

.suitehint-overlay {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.suitehint-overlay.suitehint-open {
    opacity: 1;
    pointer-events: auto;
}

/* Efecto glass sutil en el header */
.suitehint-header-glass {
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    background: oklch(var(--b1) / 0.82);
}

/* Pulse sutil del botón menú al abrir */
@keyframes suitehint-menu-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.92); }
    100% { transform: scale(1); }
}
.suitehint-menu-btn.suitehint-pulse {
    animation: suitehint-menu-pulse 0.3s ease;
}

/* Botón menú — estilo moderno: icono limpio, hover suave */
.suitehint-menu-btn {
    background: transparent !important;
    border: none !important;
    color: oklch(var(--bc) / 0.6) !important;
    border-radius: 0.6rem;
    transition: all 0.15s ease;
}
.suitehint-menu-btn:hover {
    background: oklch(var(--bc) / 0.08) !important;
    color: oklch(var(--a)) !important;
}

/* Smooth transitions */
.btn, .input, .badge, .card {
    transition: all 0.15s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: oklch(var(--bc) / 0.2);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: oklch(var(--bc) / 0.3);
}

/* Code inputs */
.code-digit {
    font-variant-numeric: tabular-nums;
}

/* Table row hover */
.budget-row:hover {
    background: oklch(var(--p) / 0.05);
}

/* HTMX indicators */
.htmx-indicator {
    display: none;
}
.htmx-request .htmx-indicator {
    display: inline;
}
.htmx-request.htmx-indicator {
    display: inline;
}

/* Badge colors by estado */
.badge-borrador { background: oklch(var(--n) / 0.15); color: oklch(var(--nc) / 1); }
.badge-revision { background: oklch(var(--a) / 0.15); color: oklch(var(--ac) / 1); }
.badge-ajustado { background: oklch(var(--wa) / 0.15); color: oklch(0.75 0.15 90); }
.badge-aprobado { background: oklch(var(--su) / 0.15); color: var(--suc); }
.badge-finalizado { background: oklch(var(--in) / 0.15); color: var(--inc); }
.badge-enviado { background: oklch(var(--p) / 0.15); color: oklch(var(--pc)); }
.badge-archivado { background: oklch(var(--bc) / 0.1); color: oklch(var(--bc) / 0.5); }

/* ===== Wiki: estilos de contenido Markdown ===== */
/* Diseñado para legibilidad profesional 2026 — inspirado en Mintlify, Stripe Docs, Linear Docs */

.wiki-article {
    font-size: 16px;
    line-height: 1.75;
    color: oklch(var(--bc) / 0.85);
    max-width: 780px;
}

.wiki-article > h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem 0;
    color: oklch(var(--bc));
    line-height: 1.2;
}

.wiki-article > h1 + p {
    font-size: 1.15rem;
    color: oklch(var(--bc) / 0.55);
    margin-bottom: 2rem;
    line-height: 1.6;
    border-bottom: 1px solid var(--b3);
    padding-bottom: 1.5rem;
}

.wiki-article h2 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 2.5rem 0 1rem 0;
    color: oklch(var(--bc));
    line-height: 1.3;
    scroll-margin-top: 80px;
}

.wiki-article h2::before {
    content: "";
    display: block;
    width: 32px;
    height: 3px;
    border-radius: 2px;
    background: oklch(var(--p) / 1);
    margin-bottom: 0.75rem;
}

.wiki-article h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem 0;
    color: oklch(var(--bc));
    scroll-margin-top: 80px;
}

.wiki-article h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem 0;
    color: oklch(var(--bc) / 0.9);
}

.wiki-article p {
    margin: 0 0 1.25rem 0;
}

.wiki-article a {
    color: oklch(var(--p) / 1);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid oklch(var(--p) / 0.3);
    transition: border-color 0.15s ease;
}

.wiki-article a:hover {
    border-bottom-color: oklch(var(--p) / 1);
}

.wiki-article strong {
    font-weight: 700;
    color: oklch(var(--bc));
}

.wiki-article em {
    font-style: italic;
    color: oklch(var(--bc) / 0.8);
}

.wiki-article ul, .wiki-article ol {
    margin: 0 0 1.25rem 0;
    padding-left: 1.5rem;
}

.wiki-article ul {
    list-style: none;
    padding-left: 0;
}

.wiki-article ul > li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.wiki-article ul > li::before {
    content: "";
    position: absolute;
    left: 0.25rem;
    top: 0.65rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: oklch(var(--p) / 1);
}

.wiki-article ol {
    list-style: decimal;
    counter-reset: item;
}

.wiki-article ol > li {
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.wiki-article ol > li::marker {
    color: oklch(var(--p) / 1);
    font-weight: 600;
}

.wiki-article li > ul, .wiki-article li > ol {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.wiki-article code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.85em;
    background: oklch(var(--b2));
    color: oklch(var(--p) / 1);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    border: 1px solid oklch(var(--b3));
    font-weight: 500;
}

.wiki-article pre {
    background: oklch(var(--b2));
    border: 1px solid oklch(var(--b3));
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    margin: 0 0 1.5rem 0;
    font-size: 0.875rem;
    line-height: 1.6;
}

.wiki-article pre code {
    background: none;
    border: none;
    padding: 0;
    color: oklch(var(--bc) / 0.85);
    font-weight: 400;
    font-size: inherit;
}

.wiki-article blockquote {
    border-left: 4px solid oklch(var(--p) / 1);
    background: oklch(var(--p) / 0.05);
    border-radius: 0 12px 12px 0;
    padding: 1rem 1.5rem;
    margin: 0 0 1.5rem 0;
    color: oklch(var(--bc) / 0.7);
}

.wiki-article blockquote p {
    margin: 0;
}

.wiki-article blockquote p + p {
    margin-top: 0.75rem;
}

.wiki-article table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0 0 1.5rem 0;
    font-size: 0.9rem;
    border: 1px solid oklch(var(--b3));
    border-radius: 12px;
    overflow: hidden;
}

.wiki-article thead {
    background: oklch(var(--b2));
}

.wiki-article th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: oklch(var(--bc));
    background: oklch(var(--b2));
    border-bottom: 2px solid oklch(var(--b3));
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.wiki-article td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid oklch(var(--b3) / 0.5);
    color: oklch(var(--bc) / 0.8);
}

.wiki-article tr:last-child td {
    border-bottom: none;
}

.wiki-article tbody tr:hover {
    background: oklch(var(--b2) / 0.5);
}

.wiki-article img {
    width: 100%;
    border-radius: 16px;
    border: 1px solid oklch(var(--b3));
    margin: 1.5rem 0;
    box-shadow: 0 4px 24px oklch(var(--bc) / 0.06);
}

.wiki-article hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--b3), transparent);
    margin: 2.5rem 0;
}

/* ===== Wiki: sidebar ===== */
.wiki-sidebar {
    scrollbar-width: thin;
    scrollbar-color: var(--b3) transparent;
}

.wiki-sidebar::-webkit-scrollbar {
    width: 4px;
}
.wiki-sidebar::-webkit-scrollbar-thumb {
    background: oklch(var(--b3));
    border-radius: 2px;
}

/* ===== Wiki: tarjetas landing ===== */
.wiki-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.wiki-card:hover {
    transform: translateY(-2px);
}

/* ===== Wiki: navegación anterior/siguiente ===== */
.wiki-nav-btn {
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.wiki-nav-btn:hover {
    transform: translateY(-1px);
}

/* ===== Wiki: chat IA — renderizado de mensajes ===== */
.wiki-chat-msg a {
    color: oklch(var(--p) / 1);
    text-decoration: underline;
}
.wiki-chat-msg code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85em;
    background: oklch(var(--b3) / 0.5);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}
.wiki-chat-msg ul {
    list-style: disc;
    padding-left: 1.25rem;
    margin: 0.25rem 0;
}
.wiki-chat-msg li {
    margin: 0.15rem 0;
}


/* ===== Acento de marca — detalles sutiles ===== */

/* Item activo del menú: barra de acento a la izquierda */
aside nav a[class*="text-primary"] {
    box-shadow: inset 3px 0 0 oklch(var(--a));
}

/* Calendario (FullCalendar): solo números de día en acento */
.fc-daygrid-day-number {
    color: oklch(var(--a));
}
.fc-day-today {
    background: oklch(var(--a) / 0.06) !important;
}
.fc-day-today .fc-daygrid-day-number {
    background: oklch(var(--a));
    color: oklch(var(--ac));
    border-radius: 9999px;
    padding: 0.1rem 0.45rem;
    font-weight: 600;
}

/* Tarjeta recién creada: resaltado interior (outline no se corta por overflow) */
.task-new-highlight {
    outline: 2px solid oklch(var(--p));
    outline-offset: -2px;
    border-radius: var(--rounded-box, 0.5rem);
}

/* ==========================================================================
   Responsive 2026 — utilidades compartidas
   ========================================================================== */

/* ----- tabs-chips: fila de pestañas con scroll horizontal + scroll-snap -----
   Uso: <nav class="tabs-chips"><a class="tab-chip ...">…</a></nav>
   El .tab-chip activo lleva .tab-chip-active. Los fades laterales indican
   que hay más contenido (clase .has-scroll en el nav, gestionada por JS). */
.tabs-chips {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;               /* Firefox */
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    padding: 0.25rem 0.125rem;
    min-width: 0;
    max-width: 100%;
}
.tabs-chips::-webkit-scrollbar {
    display: none;
}
.tab-chip {
    flex: 0 0 auto;
    scroll-snap-align: start;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.25;
    color: oklch(var(--bc) / 0.65);
    border: 1px solid oklch(var(--bc) / 0.12);
    background: transparent;
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    min-height: 34px;
}
.tab-chip:hover {
    color: oklch(var(--bc));
    background: oklch(var(--bc) / 0.06);
}
.tab-chip-active,
.tab-chip.router-link-active {
    color: oklch(var(--pc));
    background: oklch(var(--p));
    border-color: oklch(var(--p));
}
.tab-chip-active:hover,
.tab-chip.router-link-active:hover {
    color: oklch(var(--pc));
    background: oklch(var(--p));
}

/* ----- tabs-boxed/tabs-bordered: el wrap por defecto de DaisyUI parte el
   icono del texto y recorta la etiqueta en tiras estrechas. nowrap + columnas
   auto + contenedor con overflow-x resuelven todos los tablists de la app. ----- */
.tabs .tab {
    flex-wrap: nowrap;
    white-space: nowrap;
}
/* Ningún tablist debe desbordar el viewport: scroll propio si no cabe. */
.tabs {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
    display: none;
}

/* ----- FullCalendar: la toolbar cabe en pantallas estrechas ----- */
@media (max-width: 640px) {
    .fc .fc-toolbar {
        flex-wrap: wrap;
        gap: 0.375rem 0.25rem;
    }
    .fc .fc-toolbar-chunk {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
    }
    .fc .fc-toolbar-title {
        font-size: 1.05rem;
    }
}

/* ----- fade-x: degradado en el borde derecho/izquierdo de un scrollable -----
   Uso: wrapper con position:relative + ::after via clase .fade-x /
   .fade-x-left cuando hay contenido oculto (clases on/off vía JS o siempre). */
.fade-x-wrap {
    position: relative;
    min-width: 0;
}
.fade-x::after,
.fade-x-left::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2.5rem;
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.2s ease;
}
.fade-x::after {
    right: 0;
    background: linear-gradient(to left, oklch(var(--b1)), oklch(var(--b1) / 0));
}
.fade-x-left::before {
    left: 0;
    background: linear-gradient(to right, oklch(var(--b1)), oklch(var(--b1) / 0));
}
.fade-x.no-fade::after {
    opacity: 0;
}

/* ----- page-header: cabecera de página responsive -----
   Título truncable + acciones. En pantallas estrechas las acciones
   secundarias se mueven a un menú ⋮ (markup en las plantillas). */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
    /* los tooltips ocultos (absolute, visibility:hidden) no deben ensanchar la página */
    overflow-x: clip;
}
.page-header-title {
    min-width: 0;
    flex: 1 1 auto;
}
.page-header-title h1,
.page-header-title h2 {
    overflow: hidden;
    text-overflow: ellipsis;
}
.page-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: flex-end;
}
/* En móvil el CTA primario del header colapsa a icono (el texto lleva
   font-size:0; el icono conserva su tamaño propio). */
@media (max-width: 639px) {
    .page-header-actions > .btn-primary {
        font-size: 0;
        gap: 0;
        padding-left: 0.625rem;
        padding-right: 0.625rem;
    }
    .page-header-actions > .btn-primary i,
    .page-header-actions > .btn-primary svg {
        font-size: 1rem;
    }
}

/* En móvil las barras de tabs (.tabs) envuelven y los grupos .join hacen
   scroll horizontal en lugar de cortarse en el borde. */
@media (max-width: 639px) {
    .tabs {
        display: flex;
        flex-wrap: wrap;
        row-gap: 0.375rem;
    }
    .join {
        max-width: 100%;
        overflow-x: auto;
        scrollbar-width: none;
    }
    .join::-webkit-scrollbar {
        display: none;
    }
    /* steppers: scroll horizontal en vez de cortar el último paso */
    .steps {
        display: flex;
        overflow-x: auto;
        scrollbar-width: none;
        padding-bottom: 0.25rem;
    }
    .steps::-webkit-scrollbar {
        display: none;
    }
    .steps .step {
        flex: 0 0 auto;
        min-width: 4rem;
    }
}

/* ----- kanban-board: columnas con scroll horizontal + snap en móvil ----- */
.kanban-board {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    /* alto de la barra propia (18px) + 8px de separación de las columnas */
    padding-bottom: 26px;
    -webkit-overflow-scrolling: touch;
    min-width: 0;
    scrollbar-width: thin;
    scrollbar-color: oklch(var(--bc) / 0.3) transparent;
}
/* Barra horizontal clásica y agarrable: con overlay scrollbars no hay
   thumb utilizable; darle estilo fuerza la barra clásica en WebKit */
.kanban-board::-webkit-scrollbar {
    height: 10px;
}
.kanban-board::-webkit-scrollbar-track {
    background: transparent;
}
.kanban-board::-webkit-scrollbar-thumb {
    background: oklch(var(--bc) / 0.25);
    border-radius: 9999px;
}
.kanban-board::-webkit-scrollbar-thumb:hover {
    background: oklch(var(--bc) / 0.45);
}
.kanban-col {
    flex: 0 0 300px;
    width: 300px;
    max-width: 85vw;
    display: flex;
    flex-direction: column;
    min-width: 0;
}
@media (max-width: 767px) {
    .kanban-board {
        scroll-snap-type: x proximity;
    }
    .kanban-col {
        scroll-snap-align: start;
    }
}
@media (max-width: 480px) {
    .kanban-col {
        flex-basis: 272px;
        width: 272px;
    }
}
/* kanban-eq-lg: en escritorio las columnas reparten el ancho a partes iguales */
@media (min-width: 1024px) {
    .kanban-board.kanban-eq-lg > .kanban-col {
        flex: 1 1 0;
        width: auto;
        min-width: 0;
        max-width: none;
    }
}
/* SortableJS: estados visuales durante el arrastre */
.suitehint-kb-ghost {
    opacity: 0.35;
}
.suitehint-kb-chosen {
    box-shadow: 0 8px 20px -8px oklch(var(--bc) / 0.35);
}
/* El clon visual del fallback sigue al puntero: no debe interceptar
   elementFromPoint ni el pointerup del drop */
.sortable-fallback {
    pointer-events: none;
}
.kanban-no-drag {
    cursor: default;
}
/* Pan horizontal fluido del board: cursor de agarre, gestos táctiles
   nativos permitidos (SortableJS sigue pidiendo hold de 190ms para drag)
   y estado visual mientras se panea con el ratón. */
.kanban-board {
    touch-action: pan-x pan-y;
}
.kanban-board .card, .kanban-board a, .kanban-board button {
    cursor: pointer;
}
.kanban-board.kb-panning,
.kanban-board.kb-dragging {
    scroll-snap-type: none;
    user-select: none;
}
.kanban-board.kb-panning {
    cursor: grabbing;
}
.kanban-board.kb-panning *,
.kanban-board.kb-dragging * {
    cursor: grabbing !important;
}
/* Espacio pulsado: el board entero se panea con botón izquierdo y las
   tarjetas no se pueden arrastrar (el pointerdown se corta en captura) */
.kanban-board.kb-space-pan {
    cursor: grab;
}
.kanban-board.kb-space-pan * {
    cursor: grab !important;
}
/* Flechas de navegación de columnas (inyectadas por suitehintKanbanPan) */
.kb-nav {
    position: absolute;
    top: 45%;
    z-index: 40;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    line-height: 1;
    background: oklch(var(--b1) / 0.9);
    border: 1px solid oklch(var(--b3));
    color: oklch(var(--bc));
    box-shadow: 0 4px 12px oklch(var(--bc) / 0.18);
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}
.kb-nav:hover {
    background: oklch(var(--b2));
}
.kb-nav[hidden] {
    display: none;
}
.kb-nav-l { left: 0.375rem; }
.kb-nav-r { right: 0.375rem; }
/* Barra horizontal propia (overlay scrollbars no tienen thumb agarrable) */
.kb-scrollbar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 18px;
    z-index: 30;
}
.kb-scrollbar[hidden] {
    display: none;
}
.kb-scrollbar-thumb {
    position: absolute;
    top: 4px;
    left: 0;
    height: 9px;
    border-radius: 9999px;
    background: oklch(var(--bc) / 0.3);
    cursor: grab;
    transition: background 0.15s;
    touch-action: none;
}
.kb-scrollbar-thumb:hover {
    background: oklch(var(--bc) / 0.5);
}
.kb-scrollbar-thumb:active {
    cursor: grabbing;
    background: oklch(var(--bc) / 0.55);
}
/* Columna sortable: estado visual mientras se arrastra */
.kanban-ghost {
    opacity: 0.4;
}
.kanban-chosen {
    box-shadow: 0 4px 16px oklch(var(--bc) / 0.15);
}
.kanban-drag {
    cursor: grabbing;
}

/* ----- sticky-first-col: primera columna fija en tablas densas ----- */
.table-sticky-first {
    border-collapse: separate;
    border-spacing: 0;
}
.table-sticky-first > thead > tr > th:first-child,
.table-sticky-first > tbody > tr > td:first-child,
.table-sticky-first > tbody > tr > th:first-child {
    position: sticky;
    left: 0;
    z-index: 4;
    background: oklch(var(--b1));
    box-shadow: 2px 0 0 0 oklch(var(--b3) / 0.6);
}
.table-sticky-first > thead > tr > th:first-child {
    background: oklch(var(--b2));
    z-index: 6;
}

/* ----- scroll-x: contenedor de tabla con scroll horizontal seguro ----- */
.scroll-x {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    min-width: 0;
    max-width: 100%;
}

/* ----- Bottom bar móvil ----- */
.suitehint-bottombar {
    height: 60px;
    padding-bottom: env(safe-area-inset-bottom, 0);
    background: oklch(var(--b1) / 0.92);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    border-top: 1px solid oklch(var(--bc) / 0.1);
}
.suitehint-bottombar nav {
    display: flex;
    align-items: stretch;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    height: 100%;
    padding: 0 0.25rem;
}
.suitehint-bottombar nav::-webkit-scrollbar {
    display: none;
}
.suitehint-bottombar a,
.suitehint-bottombar button {
    flex: 1 0 auto;
    min-width: 52px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 0.625rem;
    font-weight: 500;
    color: oklch(var(--bc) / 0.55);
    transition: color 0.15s ease;
    padding: 0 0.375rem;
}
.suitehint-bottombar a:active,
.suitehint-bottombar a.suitehint-bb-active {
    color: oklch(var(--a));
}
.suitehint-bottombar a i,
.suitehint-bottombar button i {
    font-size: 1.25rem;
    line-height: 1;
}
/* Hueco para que la bottom bar no tape el final del contenido */
@media (max-width: 1023px) {
    .suitehint-bottombar-space {
        height: 76px;
    }
}

/* ----- Modal de tarea: fullscreen en móvil ----- */
@media (max-width: 767px) {
    dialog.modal .modal-box.modal-full-mobile,
    .modal-open .modal-box.modal-full-mobile {
        width: 100vw;
        max-width: none;
        height: 100dvh;
        max-height: none;
        border-radius: 0;
        margin: 0;
    }
}

/* ----- Banner dismissable (WBS móvil, editor email, etc.) ----- */
.suitehint-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
    border-radius: 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.4;
    background: oklch(var(--in) / 0.1);
    color: oklch(var(--bc) / 0.85);
    border: 1px solid oklch(var(--in) / 0.25);
}
.suitehint-banner i {
    color: oklch(var(--in));
    font-size: 1rem;
    flex: 0 0 auto;
    margin-top: 1px;
}

/* ----- table-cards: tabla → tarjetas apiladas en <lg -----
   Usar: <table class="table table-cards"> + data-th="Etiqueta" en cada td.
   td sin data-th (o con data-th="") ocupa la fila completa (acciones/título). */
@media (max-width: 1023.98px) {
    table.table-cards { display: block; }
    table.table-cards > thead { display: none; }
    table.table-cards > tbody { display: block; }
    table.table-cards > tbody > tr {
        display: block;
        border: 1px solid oklch(var(--b3));
        border-radius: 0.75rem;
        padding: 0.375rem 0.875rem;
        margin-bottom: 0.625rem;
        background: oklch(var(--b1));
    }
    table.table-cards > tbody > tr > td,
    table.table-cards > tbody > tr > th {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.3rem 0;
        border: none;
        background: transparent;
        font-size: 0.8125rem;
        min-height: 0;
    }
    table.table-cards > tbody > tr > td[data-th]:not([data-th=""])::before,
    table.table-cards > tbody > tr > th[data-th]:not([data-th=""])::before {
        content: attr(data-th);
        flex: 0 0 6.5rem;
        font-size: 0.65rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: oklch(var(--bc) / 0.45);
    }
    /* Primera celda sin etiqueta: actúa como título de la tarjeta
       (salvo si solo contiene un checkbox de selección) */
    table.table-cards > tbody > tr > td:first-child[data-th=""]:not(:has(input[type="checkbox"])),
    table.table-cards > tbody > tr > td:first-child:not([data-th]):not(:has(input[type="checkbox"])) {
        font-weight: 600;
        font-size: 0.9rem;
        padding-top: 0.5rem;
    }
    table.table-cards > tbody > tr > td:first-child:has(input[type="checkbox"]) {
        justify-content: flex-end;
        padding-top: 0.4rem;
        padding-right: 0.125rem;
    }
    table.table-cards > tbody > tr > td.table-cards-actions {
        justify-content: flex-end;
        padding-bottom: 0.5rem;
    }
    /* La card padre ya no necesita borde propio */
    .card > table.table-cards,
    .table-cards-wrap { background: transparent; border: none; }
    /* En modo tarjeta el contenido truncado (cuyo texto completo solo estaba
       en title=) se muestra entero — no hay hover en táctil */
    table.table-cards .truncate,
    table.table-cards td.truncate {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
        max-width: none;
    }
}

/* ----- Barra flotante de acciones masivas ----- */
.suitehint-bulkbar {
    position: fixed;
    bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 75;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.4rem 0.625rem;
    border-radius: 9999px;
    background: oklch(var(--n) / 0.97);
    color: oklch(var(--nc));
    border: 1px solid oklch(var(--nc) / 0.14);
    box-shadow: 0 12px 32px -8px oklch(var(--bc) / 0.35), 0 4px 12px oklch(var(--bc) / 0.2);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    width: max-content;
    max-width: calc(100vw - 1.5rem);
    white-space: nowrap;
    animation: suitehint-bulkbar-in 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.suitehint-bulkbar.hidden { display: none; }

.suitehint-bulkbar-info {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding-left: 0.375rem;
    flex-shrink: 0;
}
.suitehint-bulkbar .bulk-count,
.suitehint-bulkbar .suitehint-bulkbar-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: oklch(var(--nc));
    line-height: 1;
}

.suitehint-bulkbar-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.375rem;
    height: 1.375rem;
    border-radius: 9999px;
    border: none;
    background: oklch(var(--nc) / 0.12);
    color: oklch(var(--nc) / 0.8);
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.suitehint-bulkbar-clear:hover { background: oklch(var(--nc) / 0.25); color: oklch(var(--nc)); }

.suitehint-bulkbar-sep {
    width: 1px;
    height: 1.375rem;
    background: oklch(var(--nc) / 0.18);
    margin: 0 0.125rem;
    flex-shrink: 0;
}

.suitehint-bulkbar-actions {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    overflow-x: auto;
    scrollbar-width: none;
    min-width: 0;
}
.suitehint-bulkbar-actions::-webkit-scrollbar { display: none; }

/* Botones/selects dentro de la píldora oscura */
.suitehint-bulkbar .btn {
    --tw-text-opacity: 1;
    border-radius: 9999px;
    height: 1.75rem;
    min-height: 1.75rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}
.suitehint-bulkbar .btn-ghost { color: oklch(var(--nc) / 0.85); }
.suitehint-bulkbar .btn-ghost:hover { background-color: oklch(var(--nc) / 0.15); color: oklch(var(--nc)); }
.suitehint-bulkbar .btn-outline.btn-error { color: oklch(var(--nc)); border-color: oklch(var(--er) / 0.8); }
.suitehint-bulkbar .btn-outline.btn-error:hover { background-color: oklch(var(--er)); color: oklch(var(--erc, var(--nc))); }
.suitehint-bulkbar .select { background-color: oklch(var(--nc) / 0.1); border-color: oklch(var(--nc) / 0.2); color: oklch(var(--nc)); height: 1.75rem; min-height: 1.75rem; border-radius: 9999px; }

@keyframes suitehint-bulkbar-in {
    from { opacity: 0; transform: translateX(-50%) translateY(14px) scale(0.97); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

/* Elevar sobre la bottom bar móvil (60px, visible <1024px) */
@media (max-width: 1023px) {
    .suitehint-bulkbar { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 640px) {
    .suitehint-bulkbar {
        left: 0.75rem;
        right: 0.75rem;
        width: auto;
        transform: none;
        max-width: none;
        border-radius: 1.25rem;
        white-space: normal;
        flex-wrap: wrap;
    }
    @keyframes suitehint-bulkbar-in {
        from { opacity: 0; transform: translateY(14px); }
        to   { opacity: 1; transform: translateY(0); }
    }
    .suitehint-bulkbar-actions { flex-wrap: wrap; }
}

[x-cloak] { display: none !important; }

/* ----- Gestor de correo /correo ----- */
/* Riel de navegación: iconos que se expanden al pasar el ratón */
.mail-rail { width: 64px; transition: width .18s ease; }
@media (min-width: 1024px) {
    .mail-rail:hover, .mail-rail:focus-within { width: 200px; }
}
.mail-rail .rail-label {
    opacity: 0; white-space: nowrap; overflow: hidden;
    transition: opacity .12s ease .04s;
}
.mail-rail:hover .rail-label, .mail-rail:focus-within .rail-label { opacity: 1; }

/* Filas de hilos: acciones rápidas solo al pasar el ratón / focus */
.mail-row .row-actions { display: none; }
.mail-row:hover .row-actions, .mail-row:focus-within .row-actions { display: inline-flex; }
.mail-row:hover .row-fecha, .mail-row:focus-within .row-fecha { display: none; }

/* Composer dock (estilo Gmail) — .min colapsa el cuerpo */
.composer-dock .dock-body { display: block; }
.composer-dock.min .dock-body { display: none; }
.composer-dock.min .dock-card { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

/* Cuerpo de mensaje: imágenes contenidas */
.mail-body img { max-width: 100%; height: auto; }

/* Estado no-leído de las filas vía data-unr (permite toggle sin recarga) */
.mail-row[data-unr="0"] .r-dot { opacity: 0 !important; }
.mail-row:not([data-unr="0"]) .r-dot { opacity: 1 !important; }
.mail-row[data-unr="0"] .r-b { display: none; }
.mail-row[data-unr="0"] .act-read { display: none; }
.mail-row:not([data-unr="0"]) .act-unread { display: none; }
/* Barra de respuesta — se oculta cuando el reply inline está abierto */
.reply-bar:has(+ #reply-slot:not(:empty)) { display: none; }

/* Botón "limpiar búsqueda" dentro de inputs — diseño 2026: chip circular sutil,
   aparece solo cuando hay texto, el input lleva padding-right para no solaparse */
.search-clear {
    position: absolute; right: .375rem; top: 50%; transform: translateY(-50%);
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.25rem; height: 1.25rem; border-radius: 9999px;
    color: oklch(var(--bc) / 0.45); background: transparent; border: 0;
    cursor: pointer; padding: 0; z-index: 1;
    transition: background .15s ease, color .15s ease, transform .1s ease;
}
.search-clear:hover { background: oklch(var(--bc) / 0.1); color: oklch(var(--bc) / 0.85); }
.search-clear:active { transform: translateY(-50%) scale(0.88); }
.search-clear svg { width: .75rem; height: .75rem; }
