/* ==========================================================================
   LABORATORIO CLÍNICO LOS ÁNGELES - TEMA CORPORATIVO Y NAVEGACIÓN ESTANDARIZADA
   Inspirado en https://lablosangeles.net
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

:root {
    /* Paleta Oficial Lab Los Ángeles - Inspirada en el Aqua (#1aa8c9) de las Alas del Isotipo */
    --la-primary: #1aa8c9;
    --la-primary-hover: #1594b2;
    --la-primary-dark: #0d5668;
    --la-primary-deep: #083b47;
    --la-primary-light: #e6f7fa;
    --la-accent: #00e5ff;
    --la-cyan: #1aa8c9;
    --la-indigo: #0d5668;
    
    /* Superficies y Fondos */
    --la-bg: #f8fafc;
    --la-bg-alt: #f1f5f9;
    --la-surface: #ffffff;
    --la-surface-hover: #f8fafc;
    --la-border: #e2e8f0;
    --la-border-light: #f1f5f9;
    
    /* Textos */
    --la-text: #0f172a;
    --la-text-secondary: #334155;
    --la-text-muted: #64748b;
    --la-text-light: #94a3b8;
    
    /* Estados */
    --la-success: #10b981;
    --la-success-light: #d1fae5;
    --la-warning: #f59e0b;
    --la-warning-light: #fef3c7;
    --la-danger: #ef4444;
    --la-danger-light: #fee2e2;
    --la-info: #0284c7;
    --la-info-light: #e0f2fe;

    /* Sombras y Elevaciones */
    --la-shadow-xs: 0 1px 2px rgba(3, 4, 94, 0.04);
    --la-shadow-sm: 0 2px 6px rgba(3, 4, 94, 0.06);
    --la-shadow-md: 0 4px 15px rgba(3, 4, 94, 0.08);
    --la-shadow-lg: 0 10px 25px rgba(3, 4, 94, 0.12);
    --la-shadow-xl: 0 20px 40px rgba(3, 4, 94, 0.15);

    /* Radios */
    --la-radius-sm: 8px;
    --la-radius-md: 12px;
    --la-radius-lg: 16px;
    --la-radius-xl: 24px;
    --la-radius-full: 9999px;

    /* Tipografías */
    --la-font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --la-font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==========================================================================
   RESETEOS Y BASE GENERAL
   ========================================================================== */
body {
    font-family: var(--la-font-body);
    background-color: var(--la-bg);
    color: var(--la-text);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--la-font-heading);
    letter-spacing: -0.02em;
    color: var(--la-primary-dark);
}

/* ==========================================================================
   BARRA DE NAVEGACIÓN SUPERIOR ESTANDARIZADA (NAVBAR GLOBAL)
   ========================================================================== */
.la-navbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    background: linear-gradient(90deg, #1aa8c9 0%, #0e7289 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 4px 20px rgba(14, 114, 137, 0.22) !important;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    height: 64px;
    box-sizing: border-box;
    color: #ffffff !important;
}

.la-navbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.la-navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #ffffff !important;
    transition: opacity 0.2s ease;
}

.la-navbar-brand:hover {
    opacity: 0.9;
}

.la-navbar-logo-badge {
    background: #ffffff !important;
    padding: 3px 8px !important;
    border-radius: 10px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), 0 0 10px rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    flex-shrink: 0 !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.la-navbar-brand:hover .la-navbar-logo-badge {
    transform: scale(1.04) !important;
    box-shadow: 0 3px 12px rgba(0, 229, 255, 0.4) !important;
}

.la-navbar-logo {
    height: 38px !important;
    max-height: 38px !important;
    width: auto !important;
    object-fit: contain !important;
    display: block !important;
}

.la-navbar-info {
    display: flex;
    flex-direction: column;
}

.la-navbar-company {
    font-family: var(--la-font-heading);
    font-weight: 800;
    font-size: 1.05rem;
    color: #ffffff !important;
    line-height: 1.2;
}

.la-navbar-module {
    font-family: var(--la-font-body);
    font-weight: 700;
    font-size: 0.72rem;
    color: #00e5ff !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.la-navbar-module-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00e5ff;
    box-shadow: 0 0 8px #00e5ff;
}

.la-navbar-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.la-navbar-badge-sede {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(0, 229, 255, 0.35) !important;
    color: #ffffff !important;
    font-family: var(--la-font-body);
    font-size: 0.84rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: var(--la-radius-full);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.la-navbar-badge-sede i {
    color: #00e5ff;
}

.la-navbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* BOTÓN ESTANDARIZADO DE REGRESO AL DASHBOARD */
.la-btn-panel {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: #ffffff !important;
    color: #0e7289 !important;
    text-decoration: none !important;
    font-family: var(--la-font-body) !important;
    font-weight: 800 !important;
    font-size: 0.84rem !important;
    padding: 7px 18px !important;
    border-radius: var(--la-radius-full) !important;
    border: 1px solid #ffffff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15) !important;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
    white-space: nowrap !important;
    cursor: pointer !important;
}

.la-btn-panel:hover {
    transform: translateY(-1px) !important;
    background: #e6f7fa !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2) !important;
    color: #0e7289 !important;
}

.la-btn-panel:active {
    transform: translateY(0) !important;
}

.la-btn-panel i {
    font-size: 0.95rem;
    color: #ffffff;
}

/* Badge de usuario en Navbar */
.la-user-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.84rem;
    padding: 6px 14px;
    border-radius: var(--la-radius-full);
}

.la-user-badge i {
    color: #00e5ff;
}

.la-btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
    border: 1px solid rgba(239, 68, 68, 0.35) !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 0.84rem;
    padding: 7px 16px;
    border-radius: var(--la-radius-full);
    transition: all 0.2s ease;
}

.la-btn-logout:hover {
    background: rgba(239, 68, 68, 0.3) !important;
    transform: translateY(-1px);
    color: #ffffff !important;
    border-color: #ef4444 !important;
}

/* ==========================================================================
   ARQUITECTURA EN 'L' CORPORATIVA - SIDEBAR LATERAL & CONTENIDO
   ========================================================================== */
.la-app-layout {
    display: flex !important;
    min-height: 100vh !important;
    width: 100% !important;
    background: #f8fafc !important;
}

.la-sidebar {
    width: 260px !important;
    background: linear-gradient(180deg, #1aa8c9 0%, #094756 100%) !important;
    color: #ffffff !important;
    display: flex !important;
    flex-direction: column !important;
    flex-shrink: 0 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.15) !important;
    position: fixed !important;
    top: 64px !important;
    left: 0 !important;
    bottom: 0 !important;
    height: calc(100vh - 64px) !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    z-index: 1030 !important;
    box-shadow: 4px 0 24px rgba(14, 114, 137, 0.22) !important;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.la-sidebar::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.la-sidebar.collapsed {
    transform: translateX(-260px) !important;
}

.la-main-area {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: calc(100vh - 64px) !important;
    margin-top: 64px !important;
    margin-left: 260px !important;
    width: calc(100% - 260px) !important;
    box-sizing: border-box !important;
    transition: margin-left 0.3s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    background: #f8fafc !important;
}

.la-main-area.sidebar-collapsed {
    margin-left: 0 !important;
    width: 100% !important;
}

@media (max-width: 992px) {
    .la-sidebar {
        top: 64px !important;
        transform: translateX(-280px) !important;
    }
    .la-sidebar.open {
        transform: translateX(0) !important;
    }
    .la-main-area {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* ==========================================================================
   TARJETAS Y CONTENEDORES CORPORATIVOS
   ========================================================================== */
.la-card {
    background: var(--la-surface);
    border-radius: var(--la-radius-lg);
    border: 1px solid var(--la-border);
    box-shadow: var(--la-shadow-sm);
    padding: 24px;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.la-card:hover {
    box-shadow: var(--la-shadow-md);
    border-color: rgba(0, 119, 182, 0.2);
}

.la-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--la-border);
}

.la-card-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--la-primary-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==========================================================================
   TABLAS ESTANDARIZADAS
   ========================================================================== */
.la-table-wrapper {
    background: var(--la-surface);
    border-radius: var(--la-radius-lg);
    border: 1px solid var(--la-border);
    box-shadow: var(--la-shadow-sm);
    overflow: hidden;
}

.la-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
    text-align: left;
}

.la-table thead th {
    background: #f8fafc;
    color: var(--la-text-secondary);
    font-family: var(--la-font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 14px 18px;
    border-bottom: 2px solid var(--la-border);
    white-space: nowrap;
}

.la-table tbody tr {
    transition: background-color 0.15s ease;
}

.la-table tbody tr:hover {
    background-color: #f8fafc;
}

.la-table tbody td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--la-border-light);
    color: var(--la-text);
    vertical-align: middle;
}

.la-table tbody tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   INPUTS Y CONTROLES DE FORMULARIO
   ========================================================================== */
.la-input, input[type="text"].la-input, input[type="search"].la-input, select.la-input {
    width: 100%;
    font-family: var(--la-font-body);
    font-size: 0.9rem;
    color: var(--la-text);
    background: #ffffff;
    border: 1.5px solid var(--la-border);
    border-radius: var(--la-radius-md);
    padding: 10px 14px;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.la-input:focus, input[type="text"].la-input:focus, select.la-input:focus {
    border-color: var(--la-primary);
    box-shadow: 0 0 0 3px rgba(0, 119, 182, 0.15);
    background: #ffffff;
}

/* ==========================================================================
   BOTONES
   ========================================================================== */
.la-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--la-font-body);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 10px 20px;
    border-radius: var(--la-radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.la-btn-primary {
    background: var(--la-primary);
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 119, 182, 0.25);
}

.la-btn-primary:hover {
    background: var(--la-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 119, 182, 0.35);
}

.la-btn-soft {
    background: #f1f5f9;
    color: var(--la-text-secondary) !important;
    border: 1px solid var(--la-border);
}

.la-btn-soft:hover {
    background: #e2e8f0;
    color: var(--la-text) !important;
}

.la-btn-success {
    background: var(--la-success);
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.la-btn-success:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 768px) {
    .la-navbar {
        padding: 8px 16px;
    }
    .la-navbar-company {
        font-size: 0.95rem;
    }
    .la-navbar-module {
        display: none;
    }
    .la-navbar-center {
        display: none;
    }
    .la-btn-panel span {
        display: none;
    }
    .la-btn-panel {
        padding: 8px 12px !important;
    }
}

/* ==========================================================================
   BARRA LATERAL (SIDEBAR CORPORATIVO LAB LOS ÁNGELES - ESTILO MOCKUP)
   ========================================================================== */
.la-app-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.la-sidebar {
    width: 270px;
    background: linear-gradient(180deg, #03045e 0%, #021844 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    height: 100vh;
    box-sizing: border-box;
    overflow-y: auto;
    z-index: 1030;
    box-shadow: 4px 0 24px rgba(3, 4, 94, 0.18);
    transition: all 0.3s ease;
}

.la-sidebar-header {
    padding: 22px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.15);
}

.la-sidebar-logo {
    height: 44px;
    max-height: 44px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

.la-sidebar-brand-text {
    display: flex;
    flex-direction: column;
}

.la-sidebar-brand-title {
    font-family: var(--la-font-heading);
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.la-sidebar-brand-sub {
    font-size: 0.7rem;
    color: var(--la-accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.la-sidebar-menu {
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.la-sidebar-section-title {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
    padding: 12px 14px 4px;
    font-weight: 800;
}

.la-sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    color: rgba(255, 255, 255, 0.82) !important;
    text-decoration: none !important;
    font-family: var(--la-font-body);
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.22s ease;
    border: 1px solid transparent;
}

.la-sidebar-link i {
    width: 22px;
    font-size: 1.1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
    transition: all 0.2s ease;
}

.la-sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff !important;
    transform: translateX(4px);
}

.la-sidebar-link:hover i {
    color: var(--la-accent);
}

.la-sidebar-link.active {
    background: rgba(0, 229, 255, 0.12);
    color: #ffffff !important;
    border: 1px solid rgba(0, 229, 255, 0.35);
    box-shadow: 0 4px 16px rgba(0, 229, 255, 0.16);
}

.la-sidebar-link.active i {
    color: var(--la-accent);
}

.la-sidebar-footer {
    padding: 14px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.18);
}

.la-sidebar-link-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    color: #fca5a5 !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 0.86rem;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    transition: all 0.2s ease;
}

.la-sidebar-link-logout:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #ffffff !important;
    transform: translateY(-1px);
}

.la-main-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at top right, #f0f9ff, #e0f2f7, #f8fafc);
    background-attachment: fixed;
    min-height: 100vh;
}

/* Quick Action Cards en el Panel */
.la-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.la-quick-card {
    background: #ffffff;
    border: 1px solid var(--la-border);
    border-radius: var(--la-radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none !important;
    color: var(--la-text) !important;
    box-shadow: var(--la-shadow-xs);
    transition: all 0.25s ease;
}

.la-quick-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--la-shadow-md);
    border-color: rgba(0, 119, 182, 0.25);
}

.la-quick-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--la-primary-light);
    color: var(--la-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.la-quick-card:hover .la-quick-icon {
    background: var(--la-primary);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 119, 182, 0.3);
}

.la-quick-info {
    display: flex;
    flex-direction: column;
}

.la-quick-title {
    font-family: var(--la-font-heading);
    font-weight: 700;
    font-size: 1rem;
    color: var(--la-primary-dark);
}

.la-quick-desc {
    font-size: 0.78rem;
    color: var(--la-text-muted);
}

/* Botones y Drawer Responsive para Sidebar */
.la-sidebar-toggle-btn {
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--la-primary-dark);
    font-size: 1.25rem;
    padding: 6px 10px;
    border-radius: var(--la-radius-md);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.la-sidebar-toggle-btn:hover {
    background: var(--la-primary-light);
    color: var(--la-primary);
}

.la-sidebar-close-btn {
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    font-size: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    margin-left: auto;
    transition: background-color 0.2s ease;
}

.la-sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

.la-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(3, 4, 94, 0.55);
    backdrop-filter: blur(4px);
    z-index: 1035;
}

@media (max-width: 992px) {
    .la-sidebar-toggle-btn {
        display: inline-flex;
    }

    .la-sidebar-close-btn {
        display: inline-flex;
    }

    .la-sidebar {
        position: fixed;
        left: -300px;
        top: 0;
        bottom: 0;
        height: 100vh;
        z-index: 1040;
        transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .la-sidebar.open {
        left: 0;
    }

    .la-sidebar-overlay.active {
        display: block;
    }
}

/* Transición fluida del contenido principal al colapsar el menú lateral en todos los módulos */
.la-main-area {
    transition: margin-left 0.3s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.la-main-area.sidebar-collapsed {
    margin-left: 0 !important;
    width: 100% !important;
}

.la-main-area > .main-container,
.la-main-area > .container,
.la-main-area > .quote-container,
.la-main-area > .form-container,
.la-main-area > .hero-panel,
.la-main-area > .formulario-card,
.la-main-area > .cabecera-contenido,
.la-main-area > .contenedor-tabla,
.la-main-area > .barra-superior {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.la-main-area > .formulario-card {
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 1280px !important;
    width: min(calc(100% - 64px), 1280px) !important;
}

.la-main-area.sidebar-collapsed > .formulario-card {
    max-width: 1380px !important;
    width: min(calc(100% - 64px), 1380px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}


