/* =========================================================
   iWorkWeb - site.css
   Tema: blanco / azul eléctrico / gris metálico / blanco
   ========================================================= */


/* =========================================================
   1) Base del template (ASP.NET default)
   ========================================================= */

html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

/* Form-floating (template) */
.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}


/* =========================================================
   2) Tokens (variables) del tema
   ========================================================= */

:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --text: #0b1220;
    --text-muted: #5b6675;
    --primary: #3E9CC3; /* azul eléctrico */
    --primary-hover: #348FB5;
    --metal: #abb8c3; /* gris metálico */
    --border: rgba(171, 184, 195, 0.45);
    --shadow: rgba(171, 184, 195, 0.28);
    --ring: rgba(79, 175, 214, 0.35);
}


/* =========================================================
   3) Base global (tipografía, fondo, enlaces)
   ========================================================= */

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);

    /* Layout vertical para empujar el footer abajo */
    display: flex;
    flex-direction: column;
}

/* Contenedor principal que crece y ocupa el espacio libre */
.app-main-wrap {
    flex: 1 0 auto;
    width: 100%;
}

a {
    color: var(--primary);
}

    a:hover {
        color: var(--primary-hover);
    }

    a.navbar-brand {
        white-space: normal;
        text-align: center;
        word-break: break-word;
    }

.text-muted {
    color: var(--text-muted) !important;
}

/* Bordes Bootstrap */
.border,
.border-top,
.border-bottom,
.border-start,
.border-end {
    border-color: var(--border) !important;
}

/* Separadores */
hr {
    border: none;
    border-top: 1px solid var(--border);
    opacity: 1;
}


/* =========================================================
   4) Navbar (barra superior azul)
   ========================================================= */

.app-navbar {
    background: var(--primary) !important;
    border-bottom: none;
    box-shadow: 0 6px 18px rgba(79, 175, 214, 0.45);
}

    /* Brand y links */
    .app-navbar .navbar-brand,
    .app-navbar .nav-link {
        color: #ffffff !important;
    }

        /* Hover/active */
        .app-navbar .nav-link:hover,
        .app-navbar .nav-link.active {
            color: rgba(255, 255, 255, 0.85) !important;
        }

    /* Badge dentro del navbar (instalación) */
    .app-navbar .app-badge {
        background: rgba(255, 255, 255, 0.15) !important;
        color: #ffffff !important;
        border: 1px solid rgba(255, 255, 255, 0.25) !important;
    }

/* Badge informativo */
.app-badge-light {
    background: rgba(171, 184, 195, 0.18);
    color: var(--text);
    border: 1px solid var(--border);
    font-weight: 500;
}

/* Toggler (hamburguesa) en blanco */
.app-navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
}

.app-navbar .navbar-toggler-icon {
    filter: brightness(0) invert(1);
}

/* Bloque de instalación en navbar:
   nombre actual + acción secundaria en una sola zona clicable */
.app-installation-link-block {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    white-space: nowrap;
    transition: background-color 0.18s ease, opacity 0.18s ease;
}

    /* Hover suave para indicar que todo el bloque es interactivo */
    .app-installation-link-block:hover {
        background: rgba(255, 255, 255, 0.12);
    }

/* Nombre visible de la instalación */
.app-installation-name {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    font-weight: 600;
    line-height: 1.2;
}

/* Texto auxiliar a la derecha del nombre */
.app-installation-action {
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.2;
}

/* Estados de foco accesibles para navegación con teclado */
.app-installation-link-block:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.1rem rgba(255,255,255,0.55), 0 0 0 0.25rem var(--ring);
}

/* Botón del menú de cuenta con icono + flecha bien alineados */
.navbar-account-btn {
    display: inline-flex; /* Alinea icono y flecha en la misma fila */
    align-items: center; /* Centrado vertical */
    gap: 0.35rem; /* Separación entre icono y flecha */
    line-height: 1;
    padding-inline: 0.6rem;
}

    /* El SVG no debe ser block, para no romper la línea */
    .navbar-account-btn svg {
        display: inline-block;
        flex: 0 0 auto;
    }

    /* Ajuste fino de la flecha nativa de Bootstrap */
    .navbar-account-btn.dropdown-toggle::after {
        margin-left: 0.1rem;
        vertical-align: 0;
    }

/* Solo el icono de puerta en rojo */
.account-door-icon {
    color: #b02a37; /* Rojo oscuro */
}


/* =========================================================
   5) Botones (Bootstrap)
   ========================================================= */

.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}

    .btn-primary:hover {
        background-color: var(--primary-hover) !important;
        border-color: var(--primary-hover) !important;
    }

.btn-outline-primary {
    color: var(--primary) !important;
    border-color: rgba(0, 102, 255, 0.35) !important;
}

    .btn-outline-primary:hover {
        background-color: rgba(0, 102, 255, 0.08) !important;
    }

/* Secondary (metálico) */
.btn-outline-secondary {
    color: var(--text) !important;
    border-color: var(--border) !important;
}

    .btn-outline-secondary:hover {
        background: rgba(154, 163, 173, 0.12) !important;
        border-color: rgba(154, 163, 173, 0.55) !important;
    }

/* Focus ring consistente */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--ring);
}

.app-btn-pdf:hover {
    border-color: rgba(200, 30, 30, 0.45) !important;
}

.app-btn-excel:hover {
    border-color: rgba(34, 150, 83, 0.45) !important;
}


/* =========================================================
   6) Botones dentro de la navbar (azul)
      - Solo el botón que abre el dropdown (Cuenta)
      - Evita texto blanco dentro del menú desplegable
   ========================================================= */

.app-navbar .btn-outline-secondary,
.app-navbar .btn-outline-primary {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.6) !important;
}

    .app-navbar .btn-outline-secondary:hover,
    .app-navbar .btn-outline-primary:hover {
        background: rgba(255, 255, 255, 0.15) !important;
        border-color: #fff !important;
    }

/* Reset dentro del dropdown */
.app-navbar .dropdown-menu .btn-outline-secondary,
.app-navbar .dropdown-menu .btn-outline-primary {
    color: var(--text) !important;
    border-color: var(--border) !important;
}

    .app-navbar .dropdown-menu .btn-outline-secondary:hover,
    .app-navbar .dropdown-menu .btn-outline-primary:hover {
        background: rgba(154, 163, 173, 0.12) !important;
        border-color: rgba(154, 163, 173, 0.55) !important;
    }


/* =========================================================
   7) Cards / contenedores
   ========================================================= */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 8px 24px var(--shadow);
    border-radius: 12px;
}

/* Cabeceras de card */
.app-card-header {
    background: rgba(171, 184, 195, 0.22);
    border-bottom: 1px solid var(--border);
}


/* =========================================================
   8) Formularios / Inputs
   ========================================================= */

.form-control {
    background-color: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

    .form-control::placeholder {
        color: rgba(91, 102, 117, 0.75);
    }

.form-select {
    background-color: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

input:-webkit-autofill {
    -webkit-text-fill-color: var(--text);
    -webkit-box-shadow: 0 0 0px 1000px var(--surface) inset;
    box-shadow: 0 0 0px 1000px var(--surface) inset;
}


/* =========================================================
   9) Dropdowns
   ========================================================= */

.dropdown-menu {
    border: 1px solid var(--border);
    box-shadow: 0 12px 28px var(--shadow);
    border-radius: 12px;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(79, 175, 214, 0.15);
}

.dropdown-item.active,
.dropdown-item:active {
    background: rgba(79, 175, 214, 0.20);
    color: var(--text);
}


/* =========================================================
   10) Footer
   ========================================================= */

.footer {
    background: var(--surface);
    border-top: 1px solid var(--border) !important;
    color: var(--text-muted) !important;

    /* Footer sticky clásico */
    position: static;
    width: 100%;
    white-space: normal;
    line-height: 1.5;
    padding: 1rem 0 2rem;
    margin-top: auto;
    flex-shrink: 0;
}


/* =========================================================
   11) Página de error
   ========================================================= */

.error-badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    background: #c81e1e;
    box-shadow: 0 8px 24px rgba(200, 30, 30, 0.18);
}

details > summary {
    cursor: pointer;
}


/* =========================================================
   12) Validaciones (jquery-validate / unobtrusive)
   ========================================================= */

.field-validation-error,
.validation-summary-errors {
    color: #c81e1e;
    font-size: 0.9rem;
}

.input-validation-error,
.form-control.input-validation-error,
.form-select.input-validation-error {
    border-color: #c81e1e !important;
    box-shadow: 0 0 0 0.25rem rgba(200, 30, 30, 0.15) !important;
}

    .input-validation-error:focus,
    .form-control.input-validation-error:focus,
    .form-select.input-validation-error:focus {
        border-color: #c81e1e !important;
        box-shadow: 0 0 0 0.25rem rgba(200, 30, 30, 0.18) !important;
    }

.validation-summary-errors ul {
    margin-bottom: 0;
    padding-left: 1rem;
}


/* =========================================================
   13) Listados / Tablas
   ========================================================= */

.app-search {
    min-width: 280px;
}

.table {
    color: var(--text);
}

/* Hover de filas */
.table-hover > tbody > tr:hover > * {
    background-color: rgba(154, 163, 173, 0.14);
}

/* Encabezado metálico */
.app-thead th {
    background: rgba(154, 163, 173, 0.22);
    color: var(--text);
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}

/* Celdas */
.table > :not(caption) > * > * {
    border-bottom-color: var(--border);
    padding: 0.75rem 1rem;
}

/* Más margen en extremos */
.table th:first-child,
.table td:first-child {
    padding-left: 1.5rem;
}

.table th:last-child,
.table td:last-child {
    padding-right: 1.5rem;
}

/* Badges dentro de tablas */
.badge.bg-primary {
    background-color: var(--primary) !important;
}

.badge.bg-secondary {
    background-color: rgba(154, 163, 173, 0.35) !important;
    color: var(--text) !important;
    border: 1px solid var(--border);
}

.badge.bg-danger {
    background-color: #c81e1e !important;
}

.badge.bg-warning {
    background: rgba(171, 184, 195, 0.25) !important;
    border: 1px solid var(--border);
}

    .badge.bg-warning.text-dark {
        color: var(--text) !important;
    }

/* Separador por día en historial */
.app-day-header {
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}


/* =========================================================
   14) Modales
   ========================================================= */

.modal-content {
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 28px var(--shadow);
}

.modal-header {
    border-bottom: 1px solid var(--border);
    background: rgba(171, 184, 195, 0.12);
}

.modal-footer {
    border-top: 1px solid var(--border);
}


/* =========================================================
   15) Menú principal / fichaje
   ========================================================= */

.main-shell {
    padding: 0.35rem 0 1.5rem;
}

/* Cabecera superior del menú principal */
.main-hero {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.7rem 1.2rem;
    margin-bottom: 0.5rem !important;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
}

.main-greeting {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1;
}

.main-eyebrow,
.section-eyebrow,
.main-installation-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
}

.main-title,
.section-title {
    font-weight: 700;
    color: var(--text);
}

.main-subtitle {
    color: var(--text-muted);
    max-width: 60rem;
}

.main-installation-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.compact-alert {
    margin-bottom: 0.5rem;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}

/* Tabs del menú principal:
   más discretas y menos agresivas visualmente */
.main-tabs {
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.4rem !important;
}

    .main-tabs .nav-link {
        min-width: 180px;
        min-height: auto;
        border-radius: 1rem;
        padding: 0.55rem 0.9rem;
        background: #ffffff;
        color: var(--text);
        border: 1px solid var(--border);
        box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    }

        .main-tabs .nav-link.active {
            background: rgba(62, 156, 195, 0.14);
            border-color: rgba(62, 156, 195, 0.55);
            color: var(--text);
        }

    .main-tabs .tab-description {
        margin-top: 0.1rem;
        font-size: 0.8rem;
        line-height: 1.2;
    }

.tab-description {
    margin-top: 0.1rem;
    font-size: 0.8rem;
    opacity: 0.8;
}

.tab-panel {
    border-radius: 1.25rem;
    overflow: hidden;
}

    .tab-panel .card-body {
        padding: 1rem !important;
    }


@media (min-width: 992px) {
    .tab-panel .card-body {
        padding: 1.35rem !important;
    }
}

/* Badge "Trabajando" */
.badge-trabajando {
    background-color: #0F766E;
    color: #fff;
}

/* Punto de usuario activo */
.status-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    vertical-align: middle;
}

.status-dot-active {
    background-color: #198754;
}

/* Estado de fichaje */
.status-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.6rem 1rem;
    font-weight: 700;
    font-size: 0.95rem;
}

.status-working {
    background: #f0fdfa;
    color: #0F766E;
    border: 1px solid #99f6e4;
}

.status-resting {
    background: #fffbeb;
    color: #D97706;
    border: 1px solid #fde68a;
}

/* Formulario del fichaje */
.punch-info-block {
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.punch-form {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.55rem;
    height: 100%;
}

.punch-field {
    margin-bottom: 0.55rem;
}

    .punch-field .form-label {
        margin-bottom: 0.35rem;
    }

    .punch-field .form-text {
        margin-top: 0.25rem;
        margin-bottom: 0;
        line-height: 1.25;
    }

/* Textarea de comentario junto al botón */
.punch-comment {
    border-radius: 1rem;
    resize: vertical;
    min-height: 84px;
}

/* Botón principal de fichaje:
   debe ser el protagonista visual de la pantalla */
.punch-button {
    width: 100%;
    max-width: 600px;
    min-height: 240px;
    margin-left: auto;
    margin-right: auto;
    border: 0;
    border-radius: 1.25rem;
    color: #ffffff;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.20);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    padding: 1.5rem;
    text-align: center;
}

    .punch-button:hover:not(:disabled) {
        transform: translateY(-3px) scale(1.01);
        box-shadow: 0 28px 55px rgba(15, 23, 42, 0.24);
    }

    .punch-button:disabled {
        opacity: 0.82;
        cursor: wait;
    }

/* Variante entrada */
.punch-button-entry {
    background: linear-gradient(135deg, #0a5954 0%, #0F766E 55%, #14a99a 100%);
}

/* Variante salida */
.punch-button-exit {
    background: linear-gradient(135deg, #a85c05 0%, #D97706 55%, #f59e0b 100%);
}

/* Textos internos del botón */
.punch-button-main {
    font-size: clamp(1.5rem, 2.4vw, 2.25rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    line-height: 1.05;
}

.punch-button-sub {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.95;
}

/* Mensaje específico del bloque motivo/comentario */
.punch-validation-message {
    padding-top: 0.35rem;
    border-top: 1px solid var(--border);
}

/* Estado informativo de geolocalización/envío */
.geo-status {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-top: 0.35rem;
}


/* =========================================================
   16) Responsive
   ========================================================= */

@media (max-width: 991.98px) {
    .main-hero {
        flex-direction: column;
        align-items: start;
    }

    .punch-button {
        max-width: none;
        min-height: 180px;
    }

    .app-installation-link-block {
        margin-top: 0.5rem;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

/* =========================================================
   17) Selección de instalación
   ========================================================= */

.form-text {
    color: var(--text-muted);
}

/* Acción secundaria destructiva en la pantalla de selección.
   Visualmente parece un texto/enlace rojo, pero sigue siendo un submit POST. */
.installation-exit-zone {
    margin-top: 1.1rem;
    text-align: center;
}

.installation-exit-button {
    appearance: none;
    background: none;
    border: 0;
    padding: 0;
    color: #b02a37;
    font-size: 0.95rem;
    line-height: 1.2;
    text-decoration: none;
}

    .installation-exit-button:hover {
        color: #842029;
        text-decoration: underline;
    }

    .installation-exit-button:focus-visible {
        outline: none;
        border-radius: 0.35rem;
        box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(176, 42, 55, 0.22);
    }


/* =========================================================
   18) Login / mostrar-ocultar contraseña
   ========================================================= */

/* Contenedor relativo para poder posicionar el botón del "ojito"
   dentro del campo sin romper el layout del formulario */
.password-toggle-group {
    position: relative;
}

/* Dejamos espacio a la derecha para que el texto no quede
   debajo del botón */
.password-toggle-input {
    padding-right: 3rem;
}

/* Botón del ojito:
   - va superpuesto dentro del input
   - no parece un botón primario, sino una acción auxiliar */
.password-toggle-button {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 999px;
    transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

    /* Hover suave para indicar interactividad */
    .password-toggle-button:hover {
        color: var(--text);
        background: rgba(171, 184, 195, 0.14);
    }

    /* Foco accesible para teclado */
    .password-toggle-button:focus-visible {
        outline: none;
        box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--ring);
    }

/* Tamaño homogéneo de ambos iconos */
.password-toggle-icon {
    width: 1.1rem;
    height: 1.1rem;
    flex: 0 0 auto;
}

/* Ajuste visual cuando el input de contraseña lleva error
   de validación: mantenemos coherencia cromática */
.input-validation-error + .password-toggle-button,
.form-control.input-validation-error + .password-toggle-button {
    color: #c81e1e;
}


/* =========================================================
   Drawer de perfil de usuario (posición fija, disponible
   en todas las páginas desde el botón avatar del navbar)
   ========================================================= */

.profile-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.2);
    z-index: 1037;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}

    .profile-drawer-backdrop.open {
        opacity: 1;
        pointer-events: auto;
    }

.profile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 400px;
    background: var(--surface);
    border-left: 1px solid var(--border);
    box-shadow: -8px 0 28px var(--shadow);
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1038;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

    .profile-drawer.open {
        transform: translateX(0);
    }

@media (max-width: 767px) {
    .profile-drawer {
        width: 100%;
        border-left: none;
    }
}

.profile-drawer-header {
    padding: 1rem 1.1rem 0.85rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.profile-drawer-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1rem 1.1rem;
}

.profile-drawer-footer {
    flex-shrink: 0;
    padding: 0.8rem 1.1rem;
    border-top: 1px solid var(--border);
}

.profile-drawer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(62, 156, 195, 0.14);
    border: 2px solid rgba(62, 156, 195, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--primary);
    flex-shrink: 0;
}

/* Botón avatar del navbar (icono de persona) */
.navbar-avatar-btn {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.15s;
}

    .navbar-avatar-btn:hover,
    .navbar-avatar-btn:focus-visible {
        background: rgba(255, 255, 255, 0.3);
        outline: none;
    }

/* ── Avatar genérico: foto o iniciales ──────────────────────
   Usado en todos los drawers (perfil y portal).
   ─────────────────────────────────────────────────────────── */
.user-avatar {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(62, 156, 195, 0.14);
    border: 2px solid rgba(62, 156, 195, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.user-avatar-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    opacity: 0.7;
}

/* Variante editable: hover muestra overlay de cámara */
.user-avatar-editable {
    cursor: pointer;
    background: none;
    padding: 0;
}

.user-avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.18s;
    border-radius: 50%;
}

    .user-avatar-editable:hover .user-avatar-overlay,
    .user-avatar-editable:focus-visible .user-avatar-overlay {
        opacity: 1;
    }


/* =========================================================
   20) Banner de aviso de cookies
   ========================================================= */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 16px var(--shadow);
    padding: 0.7rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

    .cookie-banner.cookie-banner-hidden {
        transform: translateY(100%);
        opacity: 0;
        pointer-events: none;
    }

.cookie-banner-text {
    flex: 1;
    margin: 0;
    line-height: 1.45;
}

.cookie-banner a {
    color: var(--primary);
    text-decoration: underline;
}

    .cookie-banner a:hover {
        color: var(--primary-hover);
    }

.cookie-banner-btn {
    flex-shrink: 0;
    padding: 0.35rem 1.1rem;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    border: none;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease;
}

    .cookie-banner-btn:hover {
        background: var(--primary-hover);
    }

    .cookie-banner-btn:focus-visible {
        outline: none;
        box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--ring);
    }