/* MDAM+ CSS 2025.11.26 martinarnedo.com */

/* ================= VARIABLES BASE (TEMA CLARO) ================== */
:root {
    --arrabal-orange: #ff9300;
    --arrabal-dark: #242b31;
    --arrabal-dark-soft: #283139;

    --sidebar-width: 260px;           /* compatibilidad */
    --sidebar-width-expanded: 260px;  /* para futuro responsive */
    --sidebar-width-collapsed: 72px;
    --sidebar-toggle-width: 24px;     /* ancho del botón flecha */

    /* Tema claro */
    --bg-body: #ffffff;
    --bg-topbar: #e6e6e6;
    --bg-sidebar: var(--arrabal-dark);
    --bg-dropdown: #d9d9d9;
    --bg-content: #ffffff;

    --text-main: #222222;
    --text-muted: #8b8b8b;
    --text-topbar-link: #555555;
    --text-topbar-link-hover: #111111;
}

/* Texto en negrita */
strong {
    color: #363636;
    font-weight: 700;
}

/* En modo oscuro, usar naranja Arrabal para contrastar */
body.theme-dark strong {
    color: var(--arrabal-orange);
}


/* Fuerza el layout a verse siempre como tablet/desktop */
@media (max-width: 1024px) {
    .app-shell {
        min-width: 1024px;  /* ancho mínimo */
    }
    body {
        overflow-x: auto !important; /* permitir scroll horizontal si hace falta */
    }
}

html, body {
    height: 100%;
}
body {
    background: var(--bg-body);
    color: var(--text-main);
    /* ✅ CAMBIO: el body ya no hace scroll, lo hará el contenido */
    overflow: hidden;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Scroll corporativo naranja --------------------------------------- */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--arrabal-orange) #f2f2f2;
}
*::-webkit-scrollbar {
    width: 8px;
}
*::-webkit-scrollbar-track {
    background: #f2f2f2;
}
*::-webkit-scrollbar-thumb {
    background-color: var(--arrabal-orange);
    border-radius: 4px;
}

/* ✅ CAMBIO: app-shell ocupa siempre el alto completo y es el contenedor fijo */
.app-shell {
    height: 100vh;
    min-height: 100vh;
    display: flex;
    flex-direction: row;
}

/* SIDEBAR ---------------------------------------------------------- */
.app-sidebar {
    width: var(--sidebar-width-expanded);
    background: var(--bg-sidebar);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: width 0.2s ease;
    /* ✅ CAMBIO: sidebar fijo a toda la altura */
    height: 100vh;
}
.app-sidebar-header {
    padding: 1.5rem 2rem 1rem;
}
.app-sidebar-logo img {
    max-width: 200px;
    height: auto;
    display: block;
}

.app-sidebar-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    /*padding: 1.5rem 0;*/
}
.app-sidebar-menu-top,
.app-sidebar-menu-bottom {
    list-style: none;
    margin: 0;
    padding: 0;
}
.app-sidebar-menu-spacer {
    flex: 1;
}

.app-sidebar-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .85rem 2rem;
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    border-bottom: 1px solid rgba(255,255,255,0);
    position: relative;
}
.app-sidebar-link .icon {
    width: 1.5rem;
    text-align: center;
}
.app-sidebar-link .icon i {
    font-size: 1rem;
}
.app-sidebar-link:hover,
.app-sidebar-link.is-active {
    background: var(--arrabal-dark-soft);
    color: var(--arrabal-orange);
    border-bottom:1px solid rgba(255,255,255,0.12);
}

/* Botón flecha lateral inferior ----------------------------------- */
.app-sidebar-toggle {
    position: absolute;
    right: calc(var(--sidebar-toggle-width) * -1); /* -24px */
    width: var(--sidebar-toggle-width);
    height: 48px;
    bottom: 76px;
    background: var(--arrabal-dark);
    color: #fff;

    border: none;
    border-radius: 0 8px 8px 0;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    font-size: 1rem;

    box-shadow: none;
    outline: none;
    padding: 0;
    z-index: 100;
    transition: background 0.2s ease, right 0.2s ease;
}

.app-sidebar-toggle:hover {
    background: var(--arrabal-dark-soft);
}

/* En colapsado queremos el mismo offset (sigue pegado visualmente) */
body.sidebar-collapsed .app-sidebar-toggle {
    right: calc(var(--sidebar-toggle-width) * -1); /* -24px */
}

/* MAIN AREA -------------------------------------------------------- */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    /* ✅ CAMBIO: el main también ocupa la altura completa */
    height: 100vh;
}

/* TOP BAR (LINKS + BUSCADOR + USUARIO) ---------------------------- */
.app-topbar {
    background: var(--bg-topbar);
    padding: 0 .5rem 0 1rem;
    display: flex;
    align-items: center;
    height: 56px;
    /* ✅ CAMBIO: que no se encoja al hacer scroll */
    flex-shrink: 0;
}
.app-topbar-links {
    display: flex;
    gap: 2.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* enlace topbar con subrayado animado naranja */
.app-topbar-links a {
    position: relative;
    color: var(--text-topbar-link);
    text-decoration: none;
    padding-bottom: 4px;
}
.app-topbar-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 0;
    background: var(--arrabal-orange);
    transition: width 0.25s ease;
}
.app-topbar-links a:hover {
    color: var(--text-topbar-link-hover);
}
.app-topbar-links a:hover::after {
    width: 100%;
}

.app-topbar-spacer {
    flex: 1;
}
.app-topbar-search {
    max-width: 260px;
    margin-right: 1.5rem;
}

/* BOTÓN TEMA (SOL / LUNA) ---- ancho fijo para evitar movimientos */
.app-topbar-theme-toggle {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: .25rem .5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;           /* ancho fijo: evita mover el buscador */
    margin-right: .25rem;
}
.app-topbar-theme-toggle .icon {
    width: 1.1rem;
    text-align: center;
    font-size: 1rem;
}

.app-topbar-user {
    position: relative;
}
.app-topbar-user-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: .25rem .75rem;
}

/* dropdown usuario ------------------------------------------------- */
.app-topbar-user-menu {
    position: absolute;
    right: 0;
    top: 44px;
    background: var(--bg-dropdown);
    min-width: 190px;
    display: flex;
    flex-direction: column;
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    transform: translateY(11px);
    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0s linear 0.2s;
}

.app-topbar-user:hover .app-topbar-user-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0s;
}

/* CONFIGURAR / DESCONECTAR con efecto similar al menú superior */
.app-topbar-user-menu a {
    position: relative;
    color: #333;
    text-decoration: none;
    padding: .75rem 1rem .75rem 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    overflow: hidden;
    background: transparent;
}

.app-topbar-user-menu a .icon {
    width: 1.1rem;
    text-align: center;
}

/* Línea naranja desde padding izquierdo hasta derecho */
.app-topbar-user-menu a::after {
    content: "";
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 0.35rem;
    height: 3px;
    background: var(--arrabal-orange);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.25s ease;
}

.app-topbar-user-menu a:hover {
    color: #111;
    background: transparent;
}

.app-topbar-user-menu form {
    margin: 0;
    padding: 0;
}
.app-topbar-user-menu-link {
    position: relative;
    color: #333;
    text-decoration: none;
    padding: .75rem 1rem .75rem 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    overflow: hidden;
    background: transparent;
    border: 0;
    width: 100%;
    text-align: left;
    cursor: pointer;
}
.app-topbar-user-menu-link::after {
    content: "";
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 0.35rem;
    height: 3px;
    background: var(--arrabal-orange);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.25s ease;
}
.app-topbar-user-menu-link:hover {
    color: #111;
    background: transparent;
}
.app-topbar-user-menu-link:hover::after {
    transform: scaleX(1);
}

.app-topbar-user-menu a:hover::after {
    transform: scaleX(1);
}

/* HEADER (TÍTULO) -------------------------------------------------- */
.app-header-title {
    padding: 1.25rem 1.75rem 0.75rem;
    /* ✅ CAMBIO: que no se encoja */
    flex-shrink: 0;
}
.app-header-title h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* CONTENT ---------------------------------------------------------- */
.app-content-wrapper {
    position: relative;
    /* ✅ CAMBIO: aquí vive el scroll del contenido */
    flex: 1 1 auto;
    overflow: auto;
}
.app-content-inner {
    padding: 1.5rem 2rem 2rem;
    min-height: calc(100% - 60px);
    background:
        url('/img/triangulos-light.svg') no-repeat right center;
    background-size: 320px auto;
}

/* FOOTER ----------------------------------------------------------- */
.app-footer {
    background: var(--arrabal-orange);
    color: #ffffff;
    padding: .35rem 1.75rem;
    font-size: .85rem;
    /* ✅ CAMBIO: también fijo abajo del main */
    flex-shrink: 0;
}
.app-footer-inner {
    display: flex;
    align-items: center;
}
.app-footer-inner-left {
    flex: 1;
}
.app-footer-inner-left span {
    margin-right: .5rem;
}
.app-footer-inner-right {
    text-align: right;
    min-width: 120px;
}

/* ESTADO COLAPSADO: solo iconos + tooltips ------------------------- */

body.sidebar-collapsed .app-sidebar {
    width: var(--sidebar-width-collapsed);
}

body.sidebar-collapsed .app-sidebar-link {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

body.sidebar-collapsed .app-sidebar-link .app-sidebar-link-label {
    opacity: 0;
    width: 0;
    margin: 0;
    overflow: hidden;
    pointer-events: none;
}

body.sidebar-collapsed .app-sidebar-link .icon i {
    font-size: 1.4rem;
}

/* Tooltip naranja al hacer hover sobre iconos ---------------------- */
body.sidebar-collapsed .app-sidebar-link::after {
    content: attr(data-label);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translate(8px, -50%) scale(0.95);
    background: var(--arrabal-orange);
    color: #ffffff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 0.75rem;
    opacity: 0;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition:
        opacity 0.15s ease,
        transform 0.15s ease;
}

/* pequeña flecha del tooltip */
body.sidebar-collapsed .app-sidebar-link::before {
    content: "";
    position: absolute;
    left: auto;
    right: -12%;
    top: 40%;
    transform: rotate(180deg);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent transparent var(--arrabal-orange);
    opacity: 0;
    z-index: 9999;
    transition: opacity 0.15s ease;
}

body.sidebar-collapsed .app-sidebar-link:hover::after {
    opacity: 1;
    transform: translate(8px, -50%) scale(1);
}
body.sidebar-collapsed .app-sidebar-link:hover::before {
    opacity: 1;
}

/* ===================== MODO OSCURO ===================== */

body.theme-dark {
    --bg-body: #11161b;
    --bg-topbar: #1f262d;
    --bg-sidebar: #161c22;
    --bg-dropdown: #262f38;
    --bg-content: #0d1116;

    --text-main: #f5f5f5;
    --text-muted: #b3b3b3;
    --text-topbar-link: #c0c4c8;
    --text-topbar-link-hover: #ffffff;
}

/* ajustes específicos en dark (por si hace falta) */
body.theme-dark .app-content-inner {
    background:
        url('/img/triangulos-light.svg') no-repeat right center;
    background-size: 320px auto;
}

body.theme-dark .app-topbar-user-menu a {
    color: var(--text-main);
}

body.theme-dark .app-topbar-user-menu a:hover {
    color: #ffffff;
}
body.theme-dark .app-topbar-user-menu-link {
    color: var(--text-main);
}
body.theme-dark .app-topbar-user-menu-link:hover {
    color: #ffffff;
}
/* ICONOS DEL HEADER EN MODO OSCURO ------------------------------*/

/* icono del usuario */
body.theme-dark .app-topbar-user-btn .icon i {
    color: #ffffff !important;
}

/* icono sol/luna */
body.theme-dark .app-topbar-theme-toggle .icon i {
    color: #ffffff !important;
}

/* iconos dentro del dropdown del usuario */
body.theme-dark .app-topbar-user-menu .icon i {
    color: #ffffff !important;
}

body.theme-dark .app-topbar .icon i {
    color: #ffffff !important;
}

/* === BUSCADOR EN MODO OSCURO === */
body.theme-dark input.input.is-small {
    background: #2a333c !important;  /* gris oscuro */
    color: #ffffff !important;       /* texto blanco */
    border-color: #3a444d !important;
}

body.theme-dark input.input.is-small::placeholder {
    color: #b8bcc0 !important;       /* gris claro */
}

/* icono de la lupa en modo oscuro */
body.theme-dark .app-topbar-search .icon i {
    color: #ffffff !important;
}


/* =========================
   INPUT BUSCADOR - FOCUS GLOW
   ========================= */

/* Estado normal (light & dark), sin bordes agresivos */
.app-topbar-search input.input.is-small {
    border: 1px solid #ccc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* En modo claro */
body:not(.theme-dark) .app-topbar-search input.input.is-small:focus {
    border-color: var(--arrabal-orange) !important;
    box-shadow: 0 0 0 1px rgba(255,147,0,0.35); /* glow naranja suave */
}

/* En modo oscuro */
body.theme-dark .app-topbar-search input.input.is-small:focus {
    border-color: var(--arrabal-orange) !important;
    box-shadow: 0 0 0 1px rgba(255,147,0,0.45); /* glow más visible en oscuro */
}



/* ======== Ajustes suaves para Bulma en modo claro/oscuro ======== */

/* Cajas en modo claro: fondo blanco limpio */
body:not(.theme-dark) .box {
    background-color: #ffffff;
    color: var(--text-main);
}

/* Cajas en modo oscuro: integrar con tu paleta */
body.theme-dark .box {
    background-color: #181f26;   /* un pelín más claro que el fondo general */
    color: var(--text-main);
    border: 1px solid #232b33;
}

/* Titulares dentro de .box */
body.theme-dark .box .title,
body.theme-dark .box .subtitle {
    color: #ffffff;
}

/* Notificaciones Bulma */
body.theme-dark .notification {
    background-color: #1f262d;
    color: #f5f5f5;
}

/* Bordes de tablas Bulma en dark */
body.theme-dark table.table {
    background-color: #181f26;
    color: #f5f5f5;
}
body.theme-dark table.table th,
body.theme-dark table.table td {
    border-color: #28313a;
}

/* Inputs en general en dark (además del buscador que ya tienes) */
body.theme-dark .input,
body.theme-dark .textarea,
body.theme-dark .select select {
    background-color: #2a333c;
    color: #ffffff;
    border-color: #3a444d;
}
body.theme-dark .input::placeholder,
body.theme-dark .textarea::placeholder {
    color: #b8bcc0;
}


/* =====================
   STRONG — ACCESIBLE EN AMBOS TEMAS
   ===================== */

/* Modo claro */
body:not(.theme-dark) strong {
    color: #363636; /* adecuado en claro */
}

/* Modo oscuro */
body.theme-dark strong {
    color: #ffffff !important; /* contraste máximo */
}


/* === Estilo del título principal === */

.app-header-title {
    padding: 1.25rem 1.75rem 0.75rem;
    position: relative;
}

.app-header-title .page-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-muted); /* respeta light/dark mode */
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

/* =======================================================
   BANDA DEL TÍTULO – 15px de margen lateral + texto naranja
   ======================================================= */

.page-title-wrapper {
    position: relative;
    width: 100%;
    min-height: 96px;
    margin: 0 0 18px 0;
    overflow: hidden;
    border-radius: 6px;
}

/* Banda completa */
.page-title-bg {
    position: absolute;
    inset: 0; /* top:0, right:0, bottom:0, left:0 */
    background: url('/img/fondo-triangular-titulos.png') center/cover no-repeat;
    opacity: 1;
    z-index: 1;
}

/* TÍTULO DENTRO DE LA BANDA */
.page-title-text {
    position: relative;
    z-index: 2;
    color: var(--arrabal-orange);   /* NARANJA ARRABAL */
    text-transform: uppercase;
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 26px 32px; /* Ajusta según la altura de la banda */
    display: inline-block;
}

/* MODO OSCURO */
body.theme-dark .page-title-wrapper {
    background-color: #0f1317;
}

body.theme-dark .page-title-bg {
    opacity: 0.55; /* atenuar la imagen en modo oscuro */
}

body.theme-dark .page-title-text {
    color: var(--arrabal-orange); /* sigue naranja en modo oscuro */
}


/* ==============================
   TABLAS: ESTILO GENERAL
   ============================== */

.table {
    background-color: transparent;
    border-radius: 6px;
    overflow: hidden;
}

/* Cabecera más marcada */
.table thead th {
    background-color: #f3f3f3;
    color: #363636;
    font-weight: 700;
    border-bottom: 2px solid #dddddd;
}

/* Celdas */
.table td {
    vertical-align: middle;
}


/* MODO CLARO: filas y hover */

body:not(.theme-dark) .table tbody tr {
    background-color: #ffffff;
}

/* Striped */
body:not(.theme-dark) .table.is-striped tbody tr:nth-child(2n) {
    background-color: #f7f7f7;
}

/* Hover bien marcado */
/* MODO CLARO: */
body:not(.theme-dark) .table.is-hoverable tbody tr:hover {
    background-color: rgba(255, 147, 0, 0.18) !important; /* naranja más visible */
}



/* MODO OSCURO: tabla adaptada */

body.theme-dark .table {
    background-color: transparent;
    color: #f5f5f5;
}

/* Cabecera en oscuro */
body.theme-dark .table thead th {
    background-color: #242b31;
    color: #ffffff;
    border-bottom: 2px solid #38424d;
}

/* Filas base */
body.theme-dark .table tbody tr {
    background-color: #161c22;
}

/* Striped */
body.theme-dark .table.is-striped tbody tr:nth-child(2n) {
    background-color: #1c232b;
}


/* MODO OSCURO: hover gris suave, sin quemar el texto */
body.theme-dark .table.is-hoverable tbody tr:hover {
    background-color: #2a333c !important; /* gris intermedio */
    color: #ffffff !important;
}

.table.is-hoverable tbody tr:hover td,
.table.is-hoverable tbody tr:hover th {
    background-color: inherit !important;
}

/* ============================================
   FORMULARIOS — MODO OSCURO
   ============================================ */

body.theme-dark .box,
body.theme-dark .field,
body.theme-dark .label,
body.theme-dark .help,
body.theme-dark .control,
body.theme-dark .select select,
body.theme-dark input.input,
body.theme-dark textarea.textarea {
    color: #ffffff !important;
}

/* Inputs y selects */
body.theme-dark input.input,
body.theme-dark textarea.textarea,
body.theme-dark .select select {
    background-color: #2c343c !important;
    border-color: #444c55 !important;
}

/* Placeholder */
body.theme-dark input.input::placeholder,
body.theme-dark textarea.textarea::placeholder {
    color: #cdd3d8 !important;
}

/* Labels */
body.theme-dark .label {
    color: #ffffff !important;
}

/* Select flechita + textos */
body.theme-dark .select select {
    background-color: #2c343c !important;
    color: #ffffff !important;
}

/* Flecha del select en modo oscuro */
body.theme-dark .select:not(.is-multiple)::after {
    border-color: #cbd5e1;
}
body.theme-dark .select:hover:not(.is-multiple)::after {
    border-color: #ffffff;
}

/* Mensajes de error */
body.theme-dark .help.is-danger {
    color: #ffb3b3 !important;
}

/* Notificaciones de error en modo oscuro: texto oscuro sobre fondo claro para contraste */
body.theme-dark .notification.is-danger.is-light {
    color: #3a0c0c !important;
    background-color: #ffd8d8 !important;
}
body.theme-dark .notification.is-danger.is-light strong {
    color: #3a0c0c !important;
}



/* ===================== TABLAS EN MODO OSCURO ===================== */
body.theme-dark table.table {
    background-color: #1b232c;
    color: #f5f5f5;
}

body.theme-dark table.table thead th {
    background-color: #222a33;
    color: #f5f5f5;
    border-color: #2f3842;
}

body.theme-dark table.table tbody tr {
    border-color: #2f3842;
}

/* Rayado en modo oscuro */
body.theme-dark table.table.is-striped tbody tr:nth-child(odd) {
    background-color: #181f27;
}

/* Hover en modo oscuro */
body.theme-dark table.table.is-hoverable tbody tr:hover {
    background-color: #2a333d;
}

/* Hover en modo claro (para que se note más) */
body:not(.theme-dark) table.table.is-hoverable tbody tr:hover {
    background-color: #f4f6fa;
}

/* Filas marcadas con has-background-danger-light en modo oscuro: que no sea blanco */
body.theme-dark .has-background-danger-light {
    background-color: #3b1f24 !important;  /* rojo oscuro */
    color: #ffe5e5 !important;
}


/* ============ FESTIVOS EXPORTAR ============ */

/* Hacer los labels "clicables" tipo tarjetas */
.festivos-export .export-field label.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

/* Texto del label en modo claro */
.festivos-export .export-field label.checkbox span {
    color: #363636;
}

/* Hover en modo CLARO: fondo gris suave, texto oscuro */
body:not(.theme-dark) .festivos-export .export-field label.checkbox:hover {
    background: #f2f2f2;
}
body:not(.theme-dark) .festivos-export .export-field label.checkbox:hover span {
    color: #111111;
}

/* MODO OSCURO: texto claro por defecto */
body.theme-dark .festivos-export .export-field label.checkbox span {
    color: var(--text-main); /* el mismo que usas para el resto del texto */
}

/* Hover en modo OSCURO: fondo gris-azulado, texto sigue claro */
body.theme-dark .festivos-export .export-field label.checkbox:hover {
    background: #283139; /* mismo tono que usas en otros hover dark */
}
body.theme-dark .festivos-export .export-field label.checkbox:hover span {
    color: #ffffff;
}

.coord-event { font-size: 0.85rem; line-height: 1.2; }
.coord-event-title { font-weight: 700; color: #111; }
.coord-event-meta { font-size: 0.78rem; opacity: 0.95; color: #111; }
.coord-event-esp { font-size: 0.78rem; color: #111; }
.fc-event-main { color: #111; }
.fc .coord-event * { color: #111; }
.modal-card-head {
    color: #111;
}
.modal-card-head .modal-card-title {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    width: 100%;
}
.fc .fc-timegrid-event-harness {
    margin-bottom: 3px;
}
.fc .fc-timegrid-event {
    overflow: hidden;
}

/* Icono de calendario visible en modo claro */
body:not(.theme-dark) input[type="date"]::-webkit-calendar-picker-indicator {
    filter: none;
    opacity: 0.7;
}

.password-toggle {
    cursor: pointer;
    color: #4a4a4a;
}
body.theme-dark .password-toggle {
    color: #ffffff;
}
.coord-rules {
    color: #111;
}
body.theme-dark .coord-rules {
    background: #1f2a33;
    color: #e8ecf0;
}
body.theme-dark .coord-rules strong {
    color: #ffffff;
}

.avatar-pill {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    overflow: hidden;
    background: #e3e3e3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.avatar-pill img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.avatar-fallback {
    color: #666;
}

.vac-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}
.vac-month {
    background: rgba(255,255,255,0.6);
    border-radius: 8px;
    padding: 0.75rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.vac-month-name {
    text-transform: capitalize;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.vac-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 3px;
}
.vac-week-header span {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #666;
    text-align: center;
}
.vac-day {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    width: 28px;
    margin: 0 auto;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #111;
    cursor: default;
}
.vac-day[data-tip] { cursor: zoom-in; }
.vac-day.is-muted { color: #b6b6b6; }
.vac-day.is-festivo { background: #ff4d6a; color: #fff; }
.vac-day.is-vac { color: #fff; }
.vac-day.is-vac-vacaciones { background: #1abc9c; }
.vac-day.is-vac-baja { background: #ff9f43; }
.vac-day.is-vac-libre { background: #6c5ce7; }
.vac-day.is-vac-multi { background: #409eff; }
.vac-day.is-festivo.is-vac,
.vac-day.is-festivo.is-vac-vacaciones,
.vac-day.is-festivo.is-vac-baja,
.vac-day.is-festivo.is-vac-libre,
.vac-day.is-festivo.is-vac-multi {
    background: #ff4d6a !important;
    color: #fff !important;
}
.vac-day-tooltip {
    position: fixed;
    background: #1f2a33;
    color: #fff;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    z-index: 2000;
    max-width: 240px;
    pointer-events: none;
}
.vac-day-tooltip:after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -6px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #1f2a33;
}
body.theme-dark .vac-day-tooltip { background: #111a22; }
body.theme-dark .vac-day-tooltip:after { border-top-color: #111a22; }
.vac-day.is-today { border: 2px solid #409eff; }
.vac-day[title]:hover {
    position: relative;
}
.vac-legend {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.vac-legend-wide {
    margin-bottom: 1rem;
}
.vac-legend-footer {
    margin-top: 1rem;
}
.vac-legend-wide .vac-legend {
    margin-top: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
}
.vac-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: default;
}
.vac-legend-item[data-tipo] { cursor: pointer; }
.vac-legend-item.is-active {
    background: rgba(64, 158, 255, 0.12);
    border-radius: 6px;
    padding: 4px 8px;
}
.dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    display: inline-block;
}
.dot.today { border: 2px solid #409eff; }
.dot.vac { background: #1abc9c; }
.dot.vacaciones { background: #1abc9c; }
.dot.baja { background: #ff9f43; }
.dot.libre { background: #6c5ce7; }
.dot.fest { background: #ff4d6a; }
body.theme-dark .vac-month { background: #1f2a33; }
body.theme-dark .vac-day { color: #e8ecf0; }
body.theme-dark .vac-day.is-muted { color: #6b7a88; }

.vac-pro-panel { max-height: 80vh; overflow-y: auto; }
.vac-pro-item + .vac-pro-item { border-top: 1px solid #e9e9e9; padding-top: 0.75rem; margin-top: 0.75rem; }
.vac-pro-name { font-weight: 700; margin-bottom: 0.35rem; }
.vac-pro-list { list-style: none; padding-left: 0; margin: 0; display: grid; gap: 0.3rem; }
.vac-pro-row { display: grid; grid-template-columns: auto 1fr auto; gap: 0.5rem; align-items: center; }
.vac-pro-range { font-size: 0.9rem; color: #444; }
.vac-pro-type { font-size: 0.85rem; font-weight: 600; color: #111; }
.vac-chip { width: 12px; height: 12px; border-radius: 999px; display: inline-block; }
.vac-chip-vacaciones { background: #1abc9c; }
.vac-chip-baja { background: #ff9f43; }
.vac-chip-libre { background: #6c5ce7; }
.vac-chip-multi { background: #409eff; }
body.theme-dark .vac-pro-panel { background: #1f2a33; }
body.theme-dark .vac-pro-item + .vac-pro-item { border-top-color: #2f3b46; }
body.theme-dark .vac-pro-range { color: #cdd7e2; }
body.theme-dark .vac-pro-type { color: #ffffff; }

.sort-link {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}
.sort-icon {
    margin-left: 6px;
    font-size: 0.85em;
}
.text-arrabal {
    color: var(--arrabal-orange);
}

.coord-event { font-size: 0.85rem; line-height: 1.2; }
.coord-event-title { font-weight: 700; }
.coord-event-meta { font-size: 0.78rem; opacity: 0.9; }
.coord-event-esp { font-size: 0.78rem; }
.modal-card-head {
    color: #111;
}
.fc .fc-timegrid-event-harness {
    margin-bottom: 3px;
}
.fc .fc-timegrid-event {
    overflow: hidden;
}


body.theme-dark  strong.ztxt-blue {color:#296fa8 !important;}

.checkbox:hover, .radio:hover {
   color: var(--arrabal-orange)
}


/* Estilo del icono del input date en modo oscuro */
html.dark input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);      /* Lo convierte de negro a blanco */
    opacity: 0.8;
}


@media (prefers-color-scheme: dark) {
    input[type="date"]::-webkit-calendar-picker-indicator {
        filter: invert(1);
        opacity: 0.8;
    }
}

/* Sidebar: swap logos on collapse */
.app-sidebar-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.app-sidebar-logo-full {
    display: block;
    max-width: 200px;
}
.app-sidebar-logo-icon {
    display: none;
    width: 44px;
    height: 35px;
    margin-left: -10px;
}
.app-sidebar-logo img.app-sidebar-logo-icon {
    height: 35px;
    margin-left: -10px;
}
body.sidebar-collapsed .app-sidebar-logo-full {
    display: none;
}
body.sidebar-collapsed .app-sidebar-logo-icon {
    display: block;
}
body:not(.sidebar-collapsed) .app-sidebar-logo-icon {
    display: none;
}
body:not(.sidebar-collapsed) .app-sidebar-logo-full {
    display: block;
}
