/* ========== RESPONSIVE ====================================================== */
/* Resoluciones recomendadas:
Tablet (1024 x 768 px) Landscape.
Laptop 1 (1280 x 800 px) Landscape.
Laptop 2 (1600 x 900 px) Landscape.
Laptop 3 (1920 x 1200 px) Landscape.
*/
/* ============================================================================ */

/* ===============================
   RESET BÁSICO
================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===============================
   HTML / BODY
================================ */
html,
body {
    height: 100%;
    font-size: 16px; /* base clara para rem */
}

/* ===============================
   CONTENEDOR PRINCIPAL
================================ */
.contenedor_plantilla {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===============================
   USUARIO
================================ */
.user-container {
    display: flex;
    align-items: center;
    position: relative;

    /* Margen fluido 1024 → 1920 */
    margin-inline-start: clamp(0.1rem, 0.4vw, 0.35rem);
    margin-inline-end: clamp(0.75rem, 1.2vw, 1.25rem);
}

.user-menu-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 0;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    padding: 0.25rem 0.1rem;
}

.user-name {
    width: auto;

    /* Ancho mínimo escalable */
    min-width: clamp(5rem, 6vw, 5.75rem);

    font-family: Verdana, sans-serif;

    /* Tamaño de fuente fluido */
    font-size: clamp(0.625rem, 0.9vw, 0.75rem); /* 10px → 12px */

    text-align: center;
    vertical-align: middle;
    color: white;
}

.user-menu-caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 0.65rem;
    height: 0.65rem;
    margin-left: -0.25rem;
    color: #ffffff;
    font-size: 0;
    line-height: 1;
}

.user-menu-caret::before {
    content: "";
    width: 0.42rem;
    height: 0.42rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
}

.user-menu-trigger:hover .user-menu-caret,
.user-menu-trigger:focus .user-menu-caret,
.user-container.is-open .user-menu-caret {
    color: #ffffff;
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    z-index: 150;
    display: none;
    min-width: 10rem;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 0.35rem;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.22);
}

.user-container.is-open .user-menu-dropdown {
    display: block;
}

.user-menu-link {
    display: block;
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 0;
    background: transparent;
    color: #1f2937;
    font-family: Verdana, sans-serif;
    font-size: 0.78rem;
    line-height: 1.25;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.user-menu-link:hover,
.user-menu-link:focus {
    background: #f3f4f6;
    color: #0f766e;
    outline: none;
}

.obra-lock-toast {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1600;
    max-width: min(26rem, calc(100vw - 2rem));
    padding: 0.85rem 1rem;
    border: 1px solid rgba(187, 143, 32, 0.35);
    border-radius: 0.85rem;
    background: linear-gradient(180deg, #fff9e8 0%, #fff3cf 100%);
    box-shadow: 0 1rem 2rem rgba(56, 42, 11, 0.16);
    color: #7a4b00;
    font-family: "Poppins", sans-serif;
    font-size: 0.84rem;
    line-height: 1.45;
    opacity: 0;
    pointer-events: none;
    transform: translateY(0.5rem);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.obra-lock-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}
