﻿/* Evitar overflow horizontal global */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Paleta/gradiente de marca unificado para sidebar y barra superior */
:root{
    --brand-grad-angle: 135deg;
    --brand-c1: #1a73b8;   /* azul profundo */
    --brand-c2: #1a73b8;   /* azul intermedio para suavizar */
    --brand-c3: #9fd4ff;   /* azul claro */
    --brand-gradient: linear-gradient(var(--brand-grad-angle), var(--brand-c1) 0%, var(--brand-c2) 45%, var(--brand-c3) 100%);
}

/* Sidebar y layout general para degradado azul cielo a azul marino y área de trabajo blanco/hueso */
body {
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #e3f6ff 0%, #b3e0ff 60%, #eaf6ff 100%);
}

.layout-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 290px;
    /* Oscuro en la esquina superior izquierda a claro en la esquina inferior derecha */
    background: var(--brand-gradient);
    color: #222;
    padding: 0;
    box-shadow: 2px 0 8px rgba(0,0,0,0.04);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    /* Columna: logo y opciones fijas arriba; el acordeón de menús ocupa el resto con su PROPIA barra de desplazamiento.
       Así la página nunca se desplaza por culpa del menú. */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform .25s ease;
}

/* Scroll vertical propio del menú: solo aparece si las opciones no caben en la altura de la ventana */
.sidebar .sidebar-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    padding-bottom: .75rem;
}

/* Logo + marca plegables: recuperan el espacio para ver más menú */
.sidebar .sidebar-brand {
    flex: 0 0 auto;
    overflow: hidden;
    max-height: 600px;
    transition: max-height .25s ease, opacity .2s ease;
}
body.brand-collapsed .sidebar .sidebar-brand { max-height: 0; opacity: 0; }
.sidebar .brand-toggle {
    flex: 0 0 auto;
    align-self: center;
    border: 0;
    background: rgba(255,255,255,.18);
    color: #fff;
    border-radius: 999px;
    width: 34px; height: 18px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .8rem; line-height: 1;
    margin: .15rem 0 .35rem;
    cursor: pointer;
}
    .sidebar .brand-toggle:hover { background: rgba(255,255,255,.32); }
    .sidebar .brand-toggle i { transition: transform .25s ease; }
body.brand-collapsed .sidebar .brand-toggle i { transform: rotate(180deg); }

/* Menú lateral minimizado: amplía el área de trabajo */
body.sidebar-collapsed .sidebar { transform: translateX(-100%); }
body.sidebar-collapsed .main-content { margin-left: 0 !important; width: 100% !important; }
/* Con el menú oculto la barra superior queda pegada al borde: separar el botón ☰ para que se vea completo */
body.sidebar-collapsed .sidebar-toggle { margin-left: .9rem; }
.main-content { transition: margin-left .25s ease, width .25s ease; }
.sidebar-toggle {
    border: 0; background: transparent; color: #fff;
    font-size: 1.35rem; line-height: 1; padding: .2rem .45rem; border-radius: .4rem;
}
    .sidebar-toggle:hover { background: rgba(255,255,255,.18); }

.sidebar .sidebar-scroll::-webkit-scrollbar {
    width: 8px;
}

.sidebar .sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,.15);
    border-radius: 6px;
}

.sidebar .sidebar-scroll:hover::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,.28);
}

    .sidebar .sidebar-header {
        /* Misma proporción que el título del login: una sola línea, más liviano */
        font-size: 1.1rem;
        font-weight: 600;
        padding: 0.375rem 0.5rem 0.25rem 0.5rem;
        letter-spacing: 0;
        white-space: nowrap;
        color: #fff;
    }

    .sidebar .accordion-button {
        background: none;
        color: #222;
        font-weight: 600;
        font-size: 1rem;
        box-shadow: none;
    }

        .sidebar .accordion-button:not(.collapsed) {
            background: rgba(255,255,255,0.08);
            color: #005c97;
        }

    .sidebar .accordion-item {
        background: transparent;
        border: none;
    }

    .sidebar ul {
        list-style: none;
        padding: 0 0 0 1.5rem;
        margin: 0;
    }

        .sidebar ul li {
            margin-bottom: 0.3rem;
        }

            /* Ícono en su propia columna: si el texto ocupa dos líneas, la segunda queda alineada con la primera */
            .sidebar ul li a {
                color: #222;
                text-decoration: none;
                display: flex;
                align-items: baseline;
                padding: 0.4rem 0.8rem;
                border-radius: 4px;
                transition: background 0.2s, color 0.2s;
                font-weight: 500;
            }

                .sidebar ul li a.active,
                .sidebar ul li a:hover {
                    background: rgba(0,92,151,0.10);
                    color: #005c97;
                }

            .sidebar ul li a > i.bi:first-child {
                flex: 0 0 1.25rem;
                text-align: center;
            }

        /* Título de una familia de opciones (Ubicación, Personas…) con su línea separadora */
        .sidebar ul li.sidebar-familia {
            display: flex;
            align-items: center;
            gap: .5rem;
            margin: .7rem .8rem .2rem 0;
            font-size: .72rem;
            font-weight: 700;
            letter-spacing: .06em;
            text-transform: uppercase;
            color: rgba(0, 0, 0, .55);
        }

            .sidebar ul li.sidebar-familia::after {
                content: "";
                flex: 1;
                border-top: 1px solid rgba(0, 0, 0, .18);
            }

    /* Opciones del consultorio actual: submenú bajo su nombre (Datos, Equipo → Profesionales / Asistentes, ...) */
    .sidebar ul.sidebar-sub {
        padding-left: 1rem;
        margin-top: .2rem;
    }

        .sidebar ul.sidebar-sub li a {
            font-weight: 400;
            font-size: .93rem;
            padding: .3rem .7rem;
        }

    .sidebar .sidebar-subtitle {
        display: block;
        padding: .3rem .7rem;
        font-size: .93rem;
        font-weight: 500;
        color: #222;
    }

/* Brand logo in sidebar (bigger, less white) */
.brand-logo-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    padding: .05rem 0 .075rem 0; /* bottom -50% */
}

    .brand-logo-wrap::before {
        content: "";
        position: absolute;
        inset: 0 5px; /* -15% vs 6px */
        background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.90) 0%, rgba(255, 255, 255, 0.75) 38%, rgba(159, 212, 255, 0.45) 68%, rgba(0, 92, 151, 0.28) 100% );
        filter: blur(10px); /* -15% vs 12px */
        border-radius: 19px; /* -15% vs 22px */
        pointer-events: none;
        z-index: 0;
    }

.brand-logo {
    /* Caja cuadrada fija: cualquier logo (de la plataforma o de un consultorio, cuadrado, ancho o alto)
       se ajusta adentro sin deformarse ni ocupar todo el menú */
    width: 210px;
    height: 210px;
    object-fit: contain;
    background: transparent;
    padding: 0;
    border-radius: 0;
    filter: drop-shadow(0 0 2px rgba(255,255,255,.9)) drop-shadow(0 1px 1px rgba(0,0,0,.10));
    position: relative;
    z-index: 1;
}

/* Language menu */
.lang-switcher {
    padding-top: .15rem;
    padding-bottom: .35rem;
}
 /* -30% vs .5rem de p-2 */
.lang-toggle {
    padding: .15rem .4rem;
    font-size: .75rem;
    color: #000 !important;
    border-color: rgba(255,255,255,.6);
    background-color: rgba(255,255,255,.85);
}
/* Forzar mismo tamaño mini también dentro del sidebar (por si Bootstrap o herencia aumentan) */
.sidebar .lang-menu .dropdown-toggle.lang-toggle {
    font-size: .75rem !important;
    padding: .15rem .4rem !important;
    line-height: 1.1;
}

.lang-menu .dropdown-menu {
    --bs-dropdown-item-padding-y: .2rem;
    --bs-dropdown-item-padding-x: .5rem;
    font-size: .75rem;
    min-width: 8rem;
}

.flag-icon {
    width: 12px;
    height: 9px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 1px rgba(0,0,0,.4);
}

/* Main content: ancho compensado por sidebar fixed para evitar overflow */
.main-content {
    flex: 0 0 auto; /* no crecer para no sumar al margin-left */
    margin-left: 290px;
    width: calc(100% - 290px);
    background: linear-gradient(135deg, #fafdff 0%, #e3f6ff 100%);
    min-height: 100vh;
    padding: 3.5rem 3.5rem 2.5rem 3.5rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative; /* para anclar la marca de agua global */
}

    /* Marca de agua del área de trabajo (fondo detrás de las páginas) */
    .main-content::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: url('/images/brand/FondoWorkerArea.png');
        background-repeat: no-repeat;
        background-position: center;
        background-size: cover; /* cubrir TODO el área de trabajo sin repetir */
        opacity: 0.12; /* bajada para resaltar transparencia */
        pointer-events: none;
        z-index: 0; /* detrás del contenido */
    }

    /* Centrado del área de trabajo */
    .main-content main#mainContent {
        min-height: calc(100vh - 140px);
        display: flex;
        flex-direction: column;
    }

.work-area-frame.work-area-responsive {
    margin-left: auto;
    margin-right: auto;
}

/* Contenedor que centra verticalmente cuando el contenido es corto */
.center-vert {
    margin-top: auto;
    margin-bottom: auto;
}

/* Área de trabajo enmarcada y elegante */
.work-area-frame {
    width: 100%;
    max-width: 1100px;
    min-height: 500px;
    background: rgba(255,255,255,0.92);
    border-radius: 22px;
    box-shadow: 0 8px 32px 0 rgba(0,92,151,0.10), 0 1.5px 8px 0 rgba(0,92,151,0.08);
    border: 1.5px solid #e3f6ff;
    padding: 2.5rem 2.5rem 2rem 2.5rem;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    transition: box-shadow 0.2s;
    box-sizing: border-box; /* evita overflow por padding al usar width:100% */
    position: relative; /* mantiene compatibilidad con capas internas si se necesitaran */
    overflow: hidden;
}

    .work-area-frame:hover {
        box-shadow: 0 12px 40px 0 rgba(0,92,151,0.16), 0 2px 12px 0 rgba(0,92,151,0.10);
    }

    /* --- Modo transparente opcional para que el contenido flote sobre el fondo --- */
    .work-area-frame.transparent {
        background: transparent !important;
        border-color: transparent !important;
        box-shadow: none;
    }

        .work-area-frame.transparent:hover {
            box-shadow: none;
        }

        .work-area-frame.transparent .table-container {
            background: transparent !important;
        }

        .work-area-frame.transparent .table thead th {
            background: transparent !important;
        }
    /* NUEVO: Estilos unificados para transparencia (alias y utilidades) */
    /* Alias estandar: .frame--transparent; mantener compatibilidad con .transparent */
    .work-area-frame.frame--transparent {
        background: transparent !important;
        border-color: transparent !important;
        box-shadow: none;
    }

        .work-area-frame.frame--transparent:hover {
            box-shadow: none;
        }

        .work-area-frame.frame--transparent .table,
        .work-area-frame.transparent .table {
            --bs-table-bg: transparent;
            --bs-table-striped-bg: transparent;
            --bs-table-hover-bg: rgba(255, 255, 255, 0.06);
            --bs-table-border-color: rgba(0, 0, 0, 0.12);
        }

        .work-area-frame.frame--transparent thead,
        .work-area-frame.frame--transparent thead th,
        .work-area-frame.transparent thead,
        .work-area-frame.transparent thead th {
            background-color: transparent !important;
        }

        .work-area-frame.frame--transparent .table-container,
        .work-area-frame.transparent .table-container {
            background: transparent !important;
        }
    /* Variante translúcida para formularios: mejor contraste */
    .work-area-frame.frame--translucent {
        background: rgba(255, 255, 255, 0.88) !important;
        border-color: rgba(227, 246, 255, 0.60) !important;
        box-shadow: 0 8px 24px rgba(0, 92, 151, 0.08), 0 1.5px 6px rgba(0, 92, 151, 0.06) !important;
    }

    /* Bisel 3D con fondo transparente */
    .work-area-frame.frame--edge3d {
        background: transparent !important;
        border-color: rgba(255,255,255,0.65) !important; /* borde claro visible */
        border-width: 1.5px;
        box-shadow: 0 12px 28px rgba(0,0,0,0.14), 0 3px 10px rgba(0,0,0,0.08), /* elevación */
                    inset 0 1px 0 rgba(255,255,255,0.55), inset 0 -1px 2px rgba(0,0,0,0.06); /* bisel interno */
    }

    /* Variante efecto vidrio: no usada ahora, conservada por si se requiere */
    .work-area-frame.frame--glass {
        background: rgba(255, 255, 255, 0) !important; /* totalmente transparente */
        border-color: transparent !important;
        box-shadow: none !important;
        -webkit-backdrop-filter: blur(18px) brightness(1.00) saturate(105%);
        backdrop-filter: blur(18px) brightness(1.00) saturate(105%);
    }
/* Utilidad para filas transparentes en tablas */
.table tr.row--transparent,
.table tr.transparent {
    background-color: transparent !important;
    --bs-table-accent-bg: transparent !important;
}

.table-hover tbody tr.row--transparent:hover,
.table-hover tbody tr.transparent:hover {
    background-color: rgba(255, 255, 255, 0.06) !important;
}

/* Icon-only buttons (ghost style) */
.icon-btn {
    --btn-fg: #0b5ed7;
    --btn-ring: rgba(11,94,215,.15);
    --btn-border: rgba(11,94,215,.15);
    --btn-bg: rgba(255,255,255,.65);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid var(--btn-border);
    background: var(--btn-bg);
    color: var(--btn-fg);
    box-shadow: 0 2px 6px rgba(0,0,0,.04);
    transition: background .2s, border-color .2s, transform .15s, box-shadow .2s;
}

    .icon-btn:hover {
        background: rgba(11,94,215,.08);
        border-color: rgba(11,94,215,.35);
        transform: translateY(-1px);
    }

    .icon-btn:focus {
        outline: 0;
        box-shadow: 0 0 0 .25rem var(--btn-ring);
    }

    .icon-btn i {
        font-size: 1rem;
        line-height: 1;
    }

.icon-btn-primary {
    --btn-fg: #0b5ed7;
    --btn-ring: rgba(11,94,215,.15);
    --btn-border: rgba(11,94,215,.2);
}

.icon-btn-success {
    --btn-fg: #198754;
    --btn-ring: rgba(25,135,84,.15);
    --btn-border: rgba(25,135,84,.2);
}

.icon-btn-muted {
    --btn-fg: #6c757d;
    --btn-ring: rgba(108,117,125,.15);
    --btn-border: rgba(108,117,125,.25);
}

/* Compact spacing inside action groups */
.action-group {
    display: inline-flex;
    gap: .35rem;
}

/* Pagination icons alignment */
.pagination .page-link i {
    vertical-align: middle;
}

/* --- Round glossy icon buttons --- */
.round-btn {
    --size: 34px;
    --bg1: #0d6efd; /* base */
    --bg2: #0a58ca; /* darker */
    --ring: rgba(13, 110, 253, .25);
    width: var(--size);
    height: var(--size);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,.08);
    color: #fff;
    background: radial-gradient(120% 120% at 30% 20%, rgba(255,255,255,.7) 0%, rgba(255,255,255,.15) 35%, rgba(255,255,255,0) 36%), linear-gradient(180deg, var(--bg1) 0%, var(--bg2) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 2px 8px rgba(0,0,0,.12);
    transition: transform .12s ease, box-shadow .2s ease, filter .2s ease;
}

    .round-btn i {
        font-size: 1rem;
        line-height: 1;
    }

    .round-btn:hover {
        transform: translateY(-1px);
        filter: brightness(1.03);
    }

    .round-btn:active {
        transform: translateY(0);
        filter: brightness(.97);
    }

    .round-btn:focus {
        outline: 0;
        box-shadow: 0 0 0 .25rem var(--ring);
    }

.round-btn--blue {
    --bg1: #2d7efb;
    --bg2: #0a58ca;
    --ring: rgba(13,110,253,.25);
}

.round-btn--red {
    --bg1: #ff475a;
    --bg2: #b02a37;
    --ring: rgba(220,53,69,.25);
}

.round-btn--green {
    --bg1: #37c084;
    --bg2: #198754;
    --ring: rgba(25,135,84,.25);
}

.round-btn--gray {
    --bg1: #c9ced6;
    --bg2: #8b95a1;
    --ring: rgba(108,117,125,.25);
    color: #fff;
}

/* Espaciado entre acciones redondas */
.action-group {
    display: inline-flex;
    gap: .45rem;
}

@media (max-width: 900px) {
    .sidebar {
        width: 200px;
    }

    .main-content {
        margin-left: 200px;
        width: calc(100% - 200px);
        padding: 1rem;
    }

    .work-area-frame {
        padding: 1.2rem;
    }
}

@media (max-width: 600px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 0.5rem;
    }

    .work-area-frame {
        padding: 0.5rem;
    }
}

/* Barra superior del área de trabajo (flush con el borde superior y el sidebar) */
.work-topbar {
    position: relative;
    /* Compensa el padding del contenedor principal para que quede pegada a los bordes */
    margin-top: -3.7rem; /* igual al padding-top de .main-content en desktop */
    left: -0.5rem;       /* igual al padding-left de .main-content en desktop */
    width: calc(100% + 7rem); /* padding-left + padding-right */
    height: 50px;
    background: var(--brand-gradient);
    border: 1px solid rgba(255,255,255,.45);
    border-left: 0; /* evitar costura con el sidebar */
    box-shadow: 0 2px 6px rgba(0,0,0,.10); /* brillo interno removido para uniformidad */
    border-radius: 0 0 8px 8px; /* arriba cuadrado para que pegue, abajo redondeado */
    /* Sobre el fondo (::before) y sobre el contenido (#contentRegion 10, #alertsRegion 20): su menú desplegable
       debe quedar encima de los botones de la página */
    z-index: 30;
    margin-bottom: 2rem;
}

    /* Ajuste visual del dropdown de seguridad para tipografía similar al menú principal */
    .work-topbar .dropdown-menu {
        font-size: 1rem; /* igual a .sidebar .accordion-button */
    }

    .work-topbar .dropdown-item {
        color: #222;              /* igual al sidebar */
        font-size: 1rem;
        font-weight: 500;
    }

    .work-topbar .dropdown-item:hover,
    .work-topbar .dropdown-item:focus {
        color: #005c97;           /* igual al hover del sidebar */
        background: rgba(0,92,151,0.10);
    }

@media (max-width: 900px) {
    .work-topbar {
        margin-top: -1rem;  /* igual al padding-top de .main-content en este breakpoint */
        left: -1rem;        /* igual al padding-left */
        width: calc(100% + 2rem);
    }
}

@media (max-width: 600px) {
    .work-topbar {
        margin-top: -0.5rem; /* igual al padding-top */
        left: -0.5rem;       /* igual al padding-left */
        width: calc(100% + 1rem);
    }
}

/* Resaltar combos (select) con contorno azul al enfocar */
.form-select:focus {
    outline: 0 !important;
    border-color: #86b7fe !important; /* azul borde */
    box-shadow: 0 0 0 .25rem rgba(13,110,253,.25) !important; /* anillo azul */
    background-color: #fff; /* asegurar contraste */
}

/* Opcional: mismo radio que inputs */
.form-select {
    border-radius: 12px;
}

/* Estilo específico para los select del UbicacionPicker: solo cuando tienen foco */
[data-ubipicker] .form-select {
    border-radius: 16px;           /* forma redondeada como la imagen */
    min-width: 280px;              /* ancho base en desktop */
    width: 100%;                   /* crecer dentro de su columna */
    max-width: 100%;
    box-shadow: none;              /* sin anillos por defecto */
    transition: box-shadow .15s ease, border-color .15s ease;
}

@media (max-width: 768px) {
    [data-ubipicker] .form-select {
        min-width: 0;             /* permitir contraerse en móviles */
        width: 100%;
    }
}

[data-ubipicker] .form-select:focus {
    outline: 0 !important;
    border-color: #2d8cff !important; 
    /* doble contorno azul separado por blanco, solo en foco */
    box-shadow: 0 0 0 3px #ffffff,                 /* separador blanco */
                0 0 0 6px rgba(45,140,255,.85) !important; /* contorno azul exterior */
}

/* ===== Nombre de la marca Mental-Psico (menú lateral y login) =====
   Colores del logo (morado y verde azulado) sobre una tarjeta blanca translúcida,
   para que se lean bien sobre el fondo azul. */
.brand-text {
    position: relative;
    display: inline-block;
    text-align: center;
    padding: .55rem 1rem .6rem;
    line-height: 1.15;
    max-width: 100%;
}
    /* Fondo difuminado (mismo resplandor del logo): se funde con el del logo en vez de una tarjeta plana */
    .brand-text::before {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse at center, rgba(255,255,255,.92) 0%, rgba(255,255,255,.80) 45%, rgba(159,212,255,.45) 75%, rgba(0,92,151,.0) 100%);
        filter: blur(10px);
        border-radius: 19px;
        pointer-events: none;
        z-index: 0;
    }
    .brand-text > * { position: relative; z-index: 1; }
.brand-text__name {
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: .5px;
    white-space: nowrap;
}
/* Holos: degradado de las tres dimensiones del logo (biológica, psicológica, social) */
.brand-text__app {
    background: linear-gradient(90deg, #0d9488 0%, #6d28d9 55%, #f0645a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 4px;
}
/* Consultorio: su nombre (puede ser largo: se ajusta en varias líneas) */
.brand-text__name--consultorio {
    color: #3b2a6b;
    white-space: normal;
    font-size: 1.05rem !important;
    letter-spacing: .2px;
}
.brand-text__sub {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-top: .1rem;
    color: #5b5b6b;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
}
    .brand-text__sub::before, .brand-text__sub::after {
        content: "";
        flex: 1;
        height: 1px;
        background: linear-gradient(90deg, transparent, #9a8fb0);
    }
    .brand-text__sub::after { background: linear-gradient(90deg, #9a8fb0, transparent); }
.brand-text__tagline {
    margin-top: .2rem;
    color: #4a4a5a;
    font-size: .72rem;
    font-style: italic;
}
/* Menú lateral: un poco más compacto */
.sidebar .brand-text { margin: -.6rem .6rem .25rem; } /* sube un poco para que los dos resplandores se mezclen */
.sidebar .brand-text__name { font-size: 1.2rem; }
/* ὅλος es el nombre principal; HOLOS va debajo, pequeño, como lectura */
.brand-text__app--grc { font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif; font-weight: 700; font-size: 1.3em; letter-spacing: 1px; }
.brand-text__latin { color: #1e3a5f; font-size: .62rem; font-weight: 700; letter-spacing: 5px; margin-top: -.1rem; }
/* Bienvenida del inicio */
.home-welcome { padding: 2.5rem 1rem 1rem; }
.home-welcome__intro { font-size: 1.35rem; color: #3b4a63; font-weight: 500; }
.home-welcome__brand { font-size: 4.2rem; line-height: 1.1; margin: .1rem 0 0; }
.home-welcome__latin { color: #1e3a5f; font-weight: 700; letter-spacing: 8px; font-size: .95rem; margin-top: -.2rem; }
.home-welcome__sub { color: #5b5b6b; font-weight: 600; letter-spacing: 4px; text-transform: uppercase; font-size: .8rem; margin-top: .35rem; }
.home-welcome__hint { color: #6c757d; margin-top: 1.6rem; font-size: 1.05rem; }
/* Pie de página: la marca en griego con el mismo degradado */
.footer-brand { font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif; font-weight: 700; background: linear-gradient(90deg, #0d9488 0%, #6d28d9 55%, #f0645a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* "en ὅλος" bajo el nombre del consultorio: sin mayúsculas forzadas, ὅλος con su estilo de marca */
.brand-text__sub--in { text-transform: none; letter-spacing: 1px; font-size: .8rem; }
.brand-text__app--mini { font-size: 1.15rem; letter-spacing: .5px; }

/* Bloqueo clínico por inactividad (ADR-003 C3): tapa toda la pantalla mientras se va a desbloquear */
.bloqueo-clinico__velo { position: fixed; inset: 0; z-index: 7000; display: flex; align-items: center; justify-content: center;
    background: rgba(240, 246, 255, .97); backdrop-filter: blur(12px); }
.bloqueo-clinico__caja { font-size: 1.1rem; color: #1e3a5f; background: #fff; padding: 1rem 1.5rem; border-radius: 12px;
    box-shadow: 0 .5rem 1.5rem rgba(0,0,0,.12); }

/* Agenda (ADR-006): semana, cupos y citas por estado */
.agenda-semana { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; }
.agenda-dia { background: #fff; border: 1px solid #dee2e6; border-radius: .75rem; padding: .5rem; min-height: 8rem; }
.agenda-dia--hoy { border-color: #0d6efd; box-shadow: 0 0 0 2px rgba(13,110,253,.15); }
.agenda-dia--festivo { background: #fff8e6; }
.agenda-dia__titulo { font-weight: 600; text-align: center; margin-bottom: .35rem; }
.agenda-cupo { font-size: .85rem; border: 1px solid #b6d4fe; background: #e7f1ff; border-radius: .5rem; padding: .1rem .4rem; margin-bottom: .25rem; }
.agenda-cupo__sitio { font-size: .7rem; color: #495057; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agenda-bloqueo { font-size: .8rem; background: #f8d7da; color: #842029; border-radius: .5rem; padding: .1rem .4rem; margin-bottom: .25rem; }
@media (max-width: 768px) { .agenda-semana { grid-template-columns: 1fr; } .agenda-dia { min-height: auto; } }
.agenda-cupo { display: block; color: inherit; text-decoration: none; }
.agenda-cupo:hover { background: #cfe2ff; }
.agenda-cita { display: block; font-size: .8rem; border-radius: .5rem; padding: .15rem .4rem; margin-bottom: .25rem; text-decoration: none; color: #212529; border-left: 4px solid #6c757d; background: #f1f3f5; }
.agenda-cita:hover { filter: brightness(.95); }
.agenda-cita__nombre { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.agenda-estado--solicitada { border-left-color: #fd7e14; background: #fff3e6; }
.agenda-estado--confirmada { border-left-color: #198754; background: #e8f5ee; }
.agenda-estado--atendida { border-left-color: #0d6efd; background: #e7f1ff; }
.agenda-estado--cancelada, .agenda-estado--noasistio { border-left-color: #adb5bd; background: #f8f9fa; color: #6c757d; }
/* Tachado solo en el bloque de la semana (la cita ya no ocupa); no en la etiqueta del detalle */
.agenda-cita.agenda-estado--cancelada { text-decoration: line-through; }
.badge.agenda-estado { color: #212529; border-left: 4px solid; font-weight: 600; }
.agenda-franja { font-size: .75rem; color: #495057; border: 1px dashed #ced4da; border-radius: .5rem; padding: .1rem .4rem; margin-bottom: .25rem; }
.agenda-ocupacion { margin-bottom: .35rem; }
.agenda-ocupacion__barra { height: 6px; background: #e9ecef; border-radius: 3px; overflow: hidden; }
.agenda-ocupacion__barra span { display: block; height: 100%; background: #198754; }
.agenda-ocupacion__texto { font-size: .7rem; color: #6c757d; text-align: center; }
.agenda-hueco { display: inline-block; font-size: .85rem; border: 1px solid #b6d4fe; background: #e7f1ff; border-radius: .5rem; padding: .15rem .5rem; margin: 0 .25rem .25rem 0; color: inherit; text-decoration: none; }
.agenda-hueco:hover, .agenda-hueco--elegido { background: #0d6efd; color: #fff; border-color: #0d6efd; }

/* Página pública (ADR-007) */
body.publico { background: #f4f8fc; min-height: 100vh; display: flex; flex-direction: column; }
body.publico main { flex: 1; position: relative; }
/* Misma marca de agua del área de trabajo: el directorio y los enlaces del consultante se ven del sitio */
body.publico main::before {
    content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background: url('/images/brand/FondoWorkerArea.png') no-repeat center / cover; opacity: 0.12;
}
body.publico main > * { position: relative; z-index: 1; }
.publico__barra { background: linear-gradient(135deg, #1a73b8 0%, #1a73b8 45%, #9fd4ff 100%); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.publico__marca { display: flex; align-items: center; gap: .6rem; color: #fff; }
.publico__marca img { height: 44px; width: auto; }
.publico__nombre { display: block; font-size: 1.5rem; font-weight: 700; line-height: 1; }
.publico__lema { display: block; font-size: .75rem; opacity: .9; }
.publico__pie { color: #6c757d; }
.directorio-tarjeta { background: #fff; border-radius: 16px; box-shadow: 0 4px 16px rgba(0,0,0,.06); padding: 1.25rem; height: 100%; display: flex; flex-direction: column; }
.directorio-foto { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: #e7f1ff; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; color: #1a73b8; flex: 0 0 auto; }
.directorio-chip { display: inline-block; font-size: .75rem; background: #e7f1ff; color: #0a58ca; border-radius: 999px; padding: .1rem .6rem; margin: 0 .25rem .25rem 0; }
.directorio-presentacion { max-height: 4.5em; overflow: hidden; color: #495057; }
.directorio-paso { background: #fff; border-radius: 16px; box-shadow: 0 4px 16px rgba(0,0,0,.05); padding: 1.25rem; margin-bottom: 1rem; }
.directorio-paso__titulo { font-weight: 600; margin-bottom: .75rem; }
.directorio-paso__num { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #1a73b8; color: #fff; font-size: .85rem; margin-right: .5rem; }
.directorio-opcion { flex: 1 1 220px; display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: 1.25rem; border: 2px solid #cfe2ff; border-radius: 14px; text-decoration: none; color: #0a58ca; background: #f8fbff; }
.directorio-opcion i { font-size: 2rem; }
.directorio-opcion span { font-weight: 600; font-size: 1.1rem; }
.directorio-opcion small { color: #6c757d; text-align: center; }
.directorio-opcion:hover, .directorio-opcion--elegida { border-color: #0d6efd; background: #e7f1ff; }
.directorio-soporte { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid #dee2e6; }

/* Horarios libres por año-mes y día (directorio y "Nueva cita") */
.huecos-mes { font-weight: 600; font-size: .9rem; color: #1a73b8; border-bottom: 1px solid #dee2e6; margin: .75rem 0 .4rem; padding-bottom: .15rem; }
.huecos-mes:first-child { margin-top: 0; }
.huecos-dia { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: .5rem; }
.huecos-dia__fecha { flex: 0 0 3rem; text-align: center; line-height: 1.05; }
.huecos-dia__numero { display: block; font-size: 1.35rem; font-weight: 700; }
.huecos-dia__nombre { display: block; font-size: .75rem; color: #6c757d; }
.huecos-dia__horas { display: flex; flex-wrap: wrap; gap: .35rem; flex: 1; }
.huecos-dia__horas .agenda-hueco { margin: 0; }

/* Punto de color del consultorio en el menú (mismo color que en la agenda) */
.consultorio-color { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; vertical-align: middle; }

/* Panel flotante de la consulta en atención (ADR-005): no bloquea la aplicación; solo se pliega */
/* Formato de la consulta: centrado en el área de trabajo (descontando el menú lateral), ancho y con alto estable
   para que no cambie de tamaño al pasar de pestaña o de página. Plegado conserva solo la cabecera. */
:root { --cp-menu: 290px; }
@media (max-width: 900px) { :root { --cp-menu: 200px; } }
body.sidebar-collapsed { --cp-menu: 0px; }
.consulta-panel { position: fixed; bottom: 1rem; z-index: 6500; background: #fff;
    width: min(644px, calc(100vw - var(--cp-menu) - 2rem));
    left: calc(var(--cp-menu) + (100vw - var(--cp-menu)) / 2); transform: translateX(-50%);
    height: min(820px, calc(100vh - 2rem));
    border-radius: 14px; box-shadow: 0 16px 48px rgba(15, 40, 80, .35); border: 1px solid #c9d8ec; display: flex; flex-direction: column; }
.consulta-panel--plegado { height: auto; }
.consulta-panel--aviso { padding: .75rem 1rem; font-size: .9rem; color: #7a4b00; background: #fff8e6; border-color: #f0d28a; }
.consulta-panel__cabecera { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .55rem .8rem;
    background: linear-gradient(135deg, #1f5fa8, #2e86de); color: #fff; border-radius: 13px 13px 0 0; font-size: .9rem; }
.consulta-panel--plegado .consulta-panel__cabecera { border-radius: 13px; }
.consulta-panel__boton { color: #fff; background: rgba(255, 255, 255, .18); border: 0; border-radius: 50%; width: 28px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.consulta-panel__boton:hover { background: rgba(255, 255, 255, .32); color: #fff; }
.consulta-panel__cuerpo { padding: .6rem .8rem .8rem; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.consulta-panel--plegado .consulta-panel__cuerpo { display: none; }
.consulta-panel__campos textarea { resize: vertical; }
.consulta-panel__pregunta { border-bottom: 1px dashed rgba(0, 0, 0, .1); padding-bottom: .5rem; }
.consulta-panel__cancelar summary { cursor: pointer; }
.consulta-panel__velo { position: fixed; inset: 0; z-index: 7100; display: flex; align-items: center; justify-content: center;
    background: rgba(230, 238, 248, .97); }
.historia-texto { white-space: pre-wrap; }
@media print { .consulta-panel { display: none; } }

/* Símbolo de marca junto a ὅλος (fuera del degradado del nombre) */
.brand-reg { font-size: .45em; font-weight: 600; color: #5b5b6b; margin-left: 1px; vertical-align: super; line-height: 0; -webkit-text-fill-color: #5b5b6b; }
