/* ==========================================================================
   CompuExpress Editorial Hub — Sleek Dark Theme (Anti-Slop)
   Tipografía: Google Sans | Bordes: 8-10px | Responsive Laptops
   ========================================================================== */

:root {
    --center-channel-bg-rgb: 18, 19, 22;
    --center-channel-color-rgb: 237, 239, 242;
    --sidebar-bg-rgb: 13, 14, 17;
    --sidebar-text-rgb: 218, 222, 228;
    --sidebar-text-active-border-rgb: 59, 130, 246;
    --button-color-rgb: 255, 255, 255;
    --button-bg-rgb: 37, 99, 235;
    --button-danger-color-rgb: 255, 255, 255;
    --button-danger-bg-rgb: 220, 38, 38;
    --link-color-rgb: 96, 165, 250;
    --link-visited-color-rgb: 147, 197, 253;
    --error-text-rgb: 248, 113, 113;

    --elevation-1: none;
    --elevation-2: none;
    --elevation-3: 0 0 0 1px rgba(255, 255, 255, 0.1);
    --elevation-4: 0 0 0 1px rgba(255, 255, 255, 0.12);
    --elevation-5: 0 0 0 1px rgba(255, 255, 255, 0.14);
    --elevation-6: 0 0 0 1px rgba(255, 255, 255, 0.16);

    --default-rad: 8px;
    --modal-rad: 12px;

    --fc-border-color: rgba(255, 255, 255, 0.08);
    --fc-page-bg-color: #121316;
    --fc-neutral-bg-color: #18191f;
    --fc-neutral-text-color: #9ca3af;
    --fc-today-bg-color: rgba(37, 99, 235, 0.12);
    --fc-event-bg-color: #1a1c22;
    --fc-event-border-color: rgba(255, 255, 255, 0.1);
    --fc-event-text-color: #edeff2;
}

/* 1. Tipografía Global Google Sans (preservando iconos nativos) */
body.focalboard-body,
.Button,
input,
textarea,
select,
button:not(.fc-button),
.octo-icontitle,
.Label,
.Editable,
.EditableArea,
.Kanban,
.Table,
.Sidebar,
.ViewHeader,
.Dialog,
.cardDialog,
.Menu,
.CalendarContainer .fc-event-title,
.CalendarContainer .fc-col-header-cell-cushion,
.CalendarContainer .fc-daygrid-day-number,
.CalendarContainer .fc-toolbar-title {
    font-family: 'Google Sans', 'Google Sans Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 2. Uniformidad Total del Panel Derecho y Top Head (#121316) */
html,
body.focalboard-body,
#focalboard-app,
.Workspace,
.Workspace > .mainFrame,
.CenterPanel,
.BoardPage,
.BoardComponent,
.BoardComponent > .top-head,
.BoardComponent > .top-head > .mid-head,
.ViewTitle,
.ViewHeader,
.TopBar,
.octo-board,
.octo-board-header,
.Kanban .octo-board-header,
.octo-app {
    background-color: #121316 !important;
    background: #121316 !important;
    color: #edeff2 !important;
}

::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* 3. Barra Lateral (Sidebar) & Logo PNG Limpio */
.Sidebar {
    background-color: #0d0e11 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.07) !important;
}

.Sidebar .SidebarBoardItem {
    border-radius: 8px;
    margin: 2px 8px;
    transition: background-color 120ms ease;
}

.Sidebar .SidebarBoardItem.active {
    background-color: rgba(37, 99, 235, 0.16) !important;
    color: #ffffff !important;
    font-weight: 500;
}

.TopBar a[href*="focalboard"],
.TopBar a[href*="feedback"],
.TopBar .versionFrame,
.SidebarUserMenu .versionFrame {
    display: none !important;
}

.ce-brand-wrapper {
    display: inline-flex;
    align-items: center;
    padding: 2px 0;
}

.ce-brand-logo-img {
    height: 24px;
    width: auto;
    max-width: 155px;
    object-fit: contain;
    display: block;
}

/* 4. Cabecera del tablero y controles */
.BoardComponent > .top-head > .mid-head {
    margin-top: 12px !important;
}

.ViewHeader {
    border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
    padding-bottom: 10px !important;
    margin-top: 10px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

.ViewHeader .viewSelector,
.ViewHeader .octo-spacer {
    min-width: 0;
}

.BoardComponent > * {
    padding: 0 24px !important;
}

.BoardComponent > *:first-child {
    padding-top: 10px !important;
}

.Button {
    border-radius: 8px !important;
    font-weight: 500 !important;
    box-shadow: none !important;
}

.Button.filled {
    background-color: #2563eb !important;
    color: #ffffff !important;
}

.Button.filled:hover {
    background-color: #1d4ed8 !important;
}

/* 5. Optimización específica para Laptops pequeñas (<= 1440px) */
@media screen and (max-width: 1440px) {
    .Sidebar {
        flex: 0 0 205px !important;
        max-width: 205px !important;
        padding: 16px 0 10px !important;
    }

    .BoardComponent > * {
        padding: 0 16px !important;
    }

    .ViewTitle {
        font-size: 18px !important;
    }

    .ViewHeader {
        gap: 6px !important;
        row-gap: 8px !important;
    }

    .ViewHeader .Button {
        padding: 4px 10px !important;
        font-size: 12.5px !important;
    }

    .Kanban .octo-board-column {
        min-width: 242px !important;
        width: 248px !important;
        margin-right: 12px !important;
    }
}

/* 6. Tablero Kanban y Tarjetas Compactas */
.Kanban .octo-board-column {
    min-width: 260px;
}

.Kanban .octo-board-header {
    padding-bottom: 8px;
}

.KanbanCard {
    background-color: #191b20 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
    border-radius: 10px !important;
    padding: 10px 12px !important;
    margin-bottom: 10px !important;
    transition: background-color 120ms ease, border-color 120ms ease !important;
    gap: 4px;
}

.KanbanCard:hover {
    background-color: #20232b !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
}

.KanbanCard.selected {
    background-color: rgba(37, 99, 235, 0.14) !important;
    border-color: rgba(59, 130, 246, 0.5) !important;
}

.KanbanCard .octo-icontitle {
    font-weight: 600 !important;
    font-size: 13.5px !important;
    line-height: 1.38 !important;
    color: #f3f4f6 !important;
    margin-bottom: 6px !important;
}

.KanbanCard .optionsMenu {
    background: #20232b !important;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 5;
}

/* 7. Portada Visual con Relación de Aspecto Correcta */
.ce-card-cover {
    width: 100%;
    background-color: #111318;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.ce-card-cover img {
    width: 100%;
    height: auto;
    max-height: 260px;
    object-fit: contain;
    display: block;
}

.ce-slide-count-pill {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(13, 14, 17, 0.85);
    color: #e5e7eb;
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.ce-cal-cover {
    width: 100%;
    background-color: #111318;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.ce-cal-cover img {
    width: 100%;
    height: auto;
    max-height: 115px;
    object-fit: contain;
    display: block;
}

.ce-table-cover {
    width: 28px;
    height: 28px;
    border-radius: 5px;
    object-fit: cover;
    margin-right: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

/* 8. Galería Horizontal + Lightbox con Flechas */
.ce-modal-gallery {
    margin: 14px 78px 12px 78px;
    padding: 12px 14px;
    background-color: #121316;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

@media screen and (max-width: 975px) {
    .ce-modal-gallery,
    .ce-quick-blocks-bar {
        margin-left: 32px !important;
        margin-right: 32px !important;
    }
}

.ce-modal-gallery-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
}

.ce-gallery-track {
    display: flex;
    flex-direction: row;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
}

.ce-gallery-item {
    flex: 0 0 auto;
    scroll-snap-align: start;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background-color: #0d0e11;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: zoom-in;
    transition: border-color 120ms ease;
}

.ce-gallery-item:hover {
    border-color: #3b82f6;
}

.ce-gallery-item img {
    height: 220px;
    width: auto;
    max-width: 340px;
    object-fit: contain;
    display: block;
}

.ce-gallery-badge {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(13, 14, 17, 0.86);
    color: #f3f4f6;
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

/* Lightbox con flechas Anterior / Siguiente */
.ce-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 68px;
    user-select: none;
}

.ce-lightbox-img {
    max-width: 88vw;
    max-height: 86vh;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.ce-lb-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(25, 27, 32, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 120ms ease, border-color 120ms ease;
    z-index: 100001;
}

.ce-lb-btn:hover {
    background: #2563eb;
    border-color: #3b82f6;
}

.ce-lb-prev {
    left: 18px;
}

.ce-lb-next {
    right: 18px;
}

.ce-lb-close {
    position: fixed;
    top: 18px;
    right: 22px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(25, 27, 32, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100001;
}

.ce-lb-close:hover {
    background: #dc2626;
}

.ce-lb-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(25, 27, 32, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #edeff2;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    z-index: 100001;
}

/* 9. Barra de Recuadros Rápidos (Idea, Guión, Copy, Caption) */
.ce-quick-blocks-bar {
    margin: 10px 78px 12px 78px;
    padding: 10px 14px;
    background-color: #121316;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.ce-quick-label {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    margin-right: 4px;
}

.ce-quick-btn {
    background-color: #1d2027;
    color: #e5e7eb;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 7px;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background-color 120ms ease, border-color 120ms ease;
}

.ce-quick-btn:hover {
    background-color: #262b36;
    border-color: rgba(59, 130, 246, 0.55);
}

.ce-quick-btn:disabled {
    opacity: 0.5;
    cursor: wait;
}

/* Recuadros Estructurados dentro de ContentBlock */
.ContentBlock.octo-block.ce-structured-box {
    background-color: #13151a !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    border-radius: 10px !important;
    padding: 12px 16px 14px 16px !important;
    margin-bottom: 14px !important;
    position: relative;
}

.ContentBlock.octo-block.ce-box-idea {
    border-left: 4px solid #f59e0b !important;
}

.ContentBlock.octo-block.ce-box-guion {
    border-left: 4px solid #a855f7 !important;
}

.ContentBlock.octo-block.ce-box-copy {
    border-left: 4px solid #3b82f6 !important;
}

.ContentBlock.octo-block.ce-box-caption {
    border-left: 4px solid #10b981 !important;
}

/* Botón Copiar exclusivo en recuadros de Copy */
.ce-copy-inline-bar {
    position: absolute;
    top: 10px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    z-index: 6;
}

.ce-inline-char-pill {
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 5px;
    background: rgba(59, 130, 246, 0.14);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.ce-copy-btn {
    background-color: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 4px 11px;
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background-color 120ms ease;
}

.ce-copy-btn:hover {
    background-color: #1d4ed8;
}

.ce-copy-btn.copied {
    background-color: #16a34a;
}

/* 10. Alertas de Cuellos de Botella */
.ce-card-alerts {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 6px;
    width: 100%;
}

.ce-alert-badge {
    font-size: 10.5px;
    font-weight: 500;
    padding: 1px 6px;
    border-radius: 5px;
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.28);
}

/* 11. Jerarquía Visual e Iconos para Etiquetas */
.KanbanCard .octo-propertyvalue {
    white-space: normal !important;
    overflow: visible !important;
    max-width: 100%;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.KanbanCard .octo-propertyvalue .octo-tooltip {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.ce-prop-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 13px;
    height: 13px;
    color: #7c8496;
    flex-shrink: 0;
    margin-right: 2px;
}

.ce-prop-canal .Label {
    font-weight: 600 !important;
    font-size: 11px !important;
    letter-spacing: 0.02em;
    padding: 2px 7px !important;
}

.ce-prop-pilar .Label {
    font-weight: 500 !important;
    font-size: 11px !important;
    padding: 2px 7px !important;
}

.ce-prop-formato .Label {
    background-color: rgba(255, 255, 255, 0.03) !important;
    color: #9ca3af !important;
    border: 1px solid rgba(255, 255, 255, 0.13) !important;
    font-weight: 500 !important;
    font-size: 10.5px !important;
    padding: 1px 6px !important;
}

.ce-prop-fecha {
    margin-top: 6px !important;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    font-size: 11.5px !important;
    color: #9ca3af !important;
}

.Label {
    border-radius: 6px !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
    padding: 2px 8px !important;
    line-height: 1.4 !important;
    max-width: 100%;
    white-space: normal !important;
    word-break: break-word;
    display: inline-flex;
    align-items: center;
}

/* Colores sutiles de alto contraste en Dark Mode */
.propColorDefault, .propColorDefault:hover {
    background-color: rgba(255, 255, 255, 0.07) !important;
    color: #e5e7eb !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
}

.propColor1, .propColor1:hover,
.propColorGray, .propColorGray:hover {
    background-color: rgba(156, 163, 175, 0.14) !important;
    color: #e5e7eb !important;
    border: 1px solid rgba(156, 163, 175, 0.28) !important;
}

.propColor2, .propColor2:hover,
.propColorBrown, .propColorBrown:hover {
    background-color: rgba(6, 182, 212, 0.16) !important;
    color: #67e8f9 !important;
    border: 1px solid rgba(6, 182, 212, 0.32) !important;
}

.propColor3, .propColor3:hover,
.propColorOrange, .propColorOrange:hover {
    background-color: rgba(249, 115, 22, 0.16) !important;
    color: #fdba74 !important;
    border: 1px solid rgba(249, 115, 22, 0.32) !important;
}

.propColor4, .propColor4:hover,
.propColorYellow, .propColorYellow:hover {
    background-color: rgba(234, 179, 8, 0.15) !important;
    color: #fde047 !important;
    border: 1px solid rgba(234, 179, 8, 0.3) !important;
}

.propColor5, .propColor5:hover,
.propColorGreen, .propColorGreen:hover {
    background-color: rgba(34, 197, 94, 0.15) !important;
    color: #86efac !important;
    border: 1px solid rgba(34, 197, 94, 0.3) !important;
}

.propColor6, .propColor6:hover,
.propColorBlue, .propColorBlue:hover {
    background-color: rgba(59, 130, 246, 0.18) !important;
    color: #93c5fd !important;
    border: 1px solid rgba(59, 130, 246, 0.35) !important;
}

.propColor7, .propColor7:hover,
.propColorPurple, .propColorPurple:hover {
    background-color: rgba(168, 85, 247, 0.17) !important;
    color: #d8b4fe !important;
    border: 1px solid rgba(168, 85, 247, 0.32) !important;
}

.propColor8, .propColor8:hover,
.propColorPink, .propColorPink:hover {
    background-color: rgba(236, 72, 153, 0.16) !important;
    color: #f9a8d4 !important;
    border: 1px solid rgba(236, 72, 153, 0.32) !important;
}

.propColor9, .propColor9:hover,
.propColorRed, .propColorRed:hover {
    background-color: rgba(239, 68, 68, 0.16) !important;
    color: #fca5a5 !important;
    border: 1px solid rgba(239, 68, 68, 0.32) !important;
}

/* 12. Modales, Detalle de Tarjeta y Menús */
.Dialog__backdrop,
.dialog-back,
.cardDialog .dialog-back,
.CardDialog .dialog-back {
    background-color: rgba(0, 0, 0, 0.72) !important;
}

.Dialog .dialog,
.cardDialog .dialog,
.CardDialog .dialog {
    background-color: #18191f !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    box-shadow: none !important;
}

.Editable,
.EditableArea,
.CardDetail .title,
.CardDetail .octo-propertyvalue input,
.CardDetail .octo-propertyvalue textarea {
    background-color: transparent !important;
    color: #edeff2 !important;
}

.Editable:focus,
.EditableArea:focus,
.CardDetail .octo-propertyvalue input:focus,
.CardDetail .octo-propertyvalue textarea:focus {
    background-color: rgba(255, 255, 255, 0.04) !important;
    border-radius: 6px;
}

.Menu {
    background-color: #1e2026 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
}

/* 13. Calendario en Dark Mode + Colores por Red Social + Fix '+' y Bloqueo Multi-día */
.CalendarContainer .fc-day .dateContainer .addEvent {
    position: relative !important;
    z-index: 25 !important;
    pointer-events: auto !important;
}

.CalendarContainer .fc-event-resizer {
    display: none !important;
    pointer-events: none !important;
}

.CalendarContainer .fc-event {
    background-color: #191b20 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px !important;
    padding: 6px 7px !important;
    box-shadow: none !important;
    overflow: hidden !important;
    max-width: 100% !important;
    position: relative;
}

/* Colores suaves por Red Social en el Calendario */
.CalendarContainer .fc-event.ce-cal-linkedin {
    background-color: rgba(10, 102, 194, 0.14) !important;
    border-color: rgba(10, 102, 194, 0.45) !important;
}

.CalendarContainer .fc-event.ce-cal-instagram {
    background-color: rgba(225, 48, 108, 0.14) !important;
    border-color: rgba(225, 48, 108, 0.45) !important;
}

.CalendarContainer .fc-event.ce-cal-facebook {
    background-color: rgba(24, 119, 242, 0.14) !important;
    border-color: rgba(24, 119, 242, 0.45) !important;
}

.CalendarContainer .fc-event.ce-cal-linkedin:hover {
    background-color: rgba(10, 102, 194, 0.24) !important;
}
.CalendarContainer .fc-event.ce-cal-instagram:hover {
    background-color: rgba(225, 48, 108, 0.24) !important;
}
.CalendarContainer .fc-event.ce-cal-facebook:hover {
    background-color: rgba(24, 119, 242, 0.24) !important;
}

.ce-cal-channel-badges {
    position: absolute;
    top: 5px;
    left: 5px;
    z-index: 8;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(13, 14, 17, 0.88);
    padding: 3px 5px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.ce-cal-no-cover .octo-icontitle {
    padding-top: 24px !important;
}

.CalendarContainer .fc-event-title {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    word-break: break-word !important;
    white-space: normal !important;
}

.CalendarContainer .fc-day-sat:not(.fc-popover),
.CalendarContainer .fc-day-sun:not(.fc-popover) {
    background-color: rgba(255, 255, 255, 0.015) !important;
}

/* 14. Vista de Tabla */
.Table .octo-table-row:hover {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

.Table .octo-table-cell,
.Table .octo-table-header-cell {
    border-color: rgba(255, 255, 255, 0.07) !important;
}
