/* =========================================================
   RESET BÁSICO
========================================================= */

/* Marca: verde principal + azul acento (combinación recomendada) */
:root {
    --soc-green-primary: #006d4e;
    --soc-blue-accent: #0064a6;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    color: #1F2933;
    background-color: #f5f7f6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #006d4e;
}

.soc-card-title,
.soc-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #006d4e;
}

label,
.soc-label {
    font-size: 12px;
    font-weight: 500;
    color: #6B7280;
}

.soc-text-muted {
    color: #6B7280;
}

* {
    box-sizing: border-box;
}

/* =========================================================
   LAYOUT PRINCIPAL
========================================================= */

.soc-layout {
    height: 100vh;
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr;
    min-width: 0;
}

/* Cuando el sidebar está cerrado (clase en un hijo), primera columna 0 y el contenido ocupa todo */
.soc-layout:has(.soc-sidebar-column-closed) {
    grid-template-columns: 0fr 1fr;
}

/* Forzar que el primer hijo del grid (wrapper del sidebar) pueda colapsar a 0 */
.soc-layout > .soc-sidebar-wrapper {
    min-width: 0;
    overflow: hidden;
}
/* =========================================================
   SIDEBAR
========================================================= */

.soc-sidebar {
    width: 200px;
    background-color: #006d4e;
    color: white;
    display: flex;
    flex-direction: column;
    padding: 20px 15px;
    transition: width 0.3s ease;
    scrollbar-width: thin;
    scrollbar-color: #4ea98a #006d4e;
}
.soc-sidebar::-webkit-scrollbar {
    width: 8px;
}
.soc-sidebar::-webkit-scrollbar-track {
    background: #006d4e;
}
.soc-sidebar::-webkit-scrollbar-thumb {
    background-color: #4ea98a;
    border-radius: 6px;
}
.soc-sidebar::-webkit-scrollbar-thumb:hover {
    background-color: #6cc4a6;
}

    /* SIDEBAR COLAPSADO */
.soc-sidebar.collapsed {
     width: 60px !important;
     min-width: 60px !important;
     padding: 20px 8px;
}
.soc-sidebar.collapsed .menu-text {
     display: none;
}
.soc-sidebar.collapsed .soc-menu a {
     justify-content: center;
}

/* Estado colapsado */
.soc-layout.collapsed .soc-sidebar {
    width: 70px;
}

/* Botón toggle */
.soc-toggle {
    font-size: 22px;
    cursor: pointer;
    margin-bottom: 25px;   
    margin-left: auto;
}

/* Usuario */
.soc-user {
    text-align: center;
    margin-bottom: 30px;
}

    .soc-user img {
        width: 70px;
        height: 70px;
        border-radius: 50%;
        margin-bottom: 10px;
    }

/* Ocultar usuario cuando colapsa */
.soc-layout.collapsed .soc-user {
    display: none;
}

/* =========================================================
   MENÚ
========================================================= */

.soc-menu {
    flex: 1;
}

    .soc-menu a {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px;
        border-radius: 8px;
        color: white;
        text-decoration: none;
        margin-bottom: 10px;
        transition: background 0.2s ease;
    }

        .soc-menu a:hover {
            background-color: #004d38;
        }

/* Ocultar texto cuando colapsa */
.soc-layout.collapsed .menu-text {
    display: none;
}

/* Centrar iconos cuando colapsa */
.soc-layout.collapsed .soc-menu a {
    justify-content: center;
}

/* =========================================================
   ÁREA PRINCIPAL
========================================================= */



/* =========================================================
   HEADER
========================================================= */

.soc-header {
    position: relative;
    /* Por encima de .soc-main-content (mismo padre flex): si no, el Body se pinta encima y el popover de alertas queda debajo de grids, tarjetas, etc. */
    z-index: 1048;
    min-height: 72px;
    height: auto;
    padding: 10px 0;
    background-color: white;
    display: flex;
    align-items: center;
    box-shadow: 0 3px 6px rgba(0,0,0,0.08);
    border-bottom: 2px solid #e0e0e0;
}

/* Cuando hay un dialog modal o un toast visible, el header cede su stacking context. */
body:has(.e-dialog.e-popup-open[aria-modal="true"]) .soc-header,
body:has(.soc-pdf-viewer-dialog.e-popup-open) .soc-header,
body:has(.e-toast-show) .soc-header {
    z-index: auto !important;
}

/* Logo a la izquierda */
.soc-header-left {
    position: absolute;
    left: 30px;
}

.soc-logo-img {
    height: 50px;
    width: auto;
}

/* Logo imagen del header (SOC Líderes en Asesoría Financiera) - reducido para no encimar con título */
.soc-header-logo-img {
    height: 52px;
    width: auto;
    max-width: 320px;
    object-fit: contain;
    display: block;
}

/* Logo personalizado del broker — mismas dimensiones, permite mayor ancho si el logo es apaisado */
.soc-header-logo-broker {
    max-width: 200px;
}

/* CRM centrado real */
.soc-header-center {
    width: 100%;
    text-align: center;
}

    .soc-header-center h2,
    .soc-header-center .soc-page-title {
        margin: 0;
        font-size: 24px;
        font-weight: bold;
        color: #006d4e;
    }

/* Derecha: campana arriba; rol y cerrar sesión en renglón abajo */
.soc-header-right {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    color: #006d4e;
    font-size: 14px;
}

.soc-header-right-row1 {
    display: flex;
    align-items: center;
    position: relative;
}

.soc-header-right-row2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
}

.soc-header-alert-btn {
    position: relative;
    margin-right: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: #444;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.soc-header-alert-icon {
    width: 22px;
    height: 22px;
    display: block;
}

.soc-header-alert-btn:hover {
    color: #006d4e;
}

.soc-header-alert-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background-color: #e53935;
    color: #fff;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
    font-weight: 600;
}

.soc-header-alert-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    max-height: 70vh;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    padding: 8px 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

.soc-header-alert-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: min(400px, 60vh);
    overflow-y: scroll;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

.soc-header-alert-item {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #eef1f0;
}

.soc-header-alert-item-row {
    display: flex;
    align-items: stretch;
    gap: 0;
}

.soc-header-alert-item-btn {
    flex: 1;
    min-width: 0;
    text-align: left;
    padding: 8px 8px 8px 12px;
    background: none;
    border: none;
    cursor: pointer;
}

.soc-header-alert-dismiss {
    flex-shrink: 0;
    width: 36px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid #eef1f0;
}

.soc-header-alert-dismiss:hover:not(:disabled) {
    background-color: #fef2f2;
    color: #b91c1c;
}

.soc-header-alert-dismiss:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.soc-header-alert-item-btn:hover {
    background-color: #f5f7f9;
}

.soc-header-alert-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #004d38;
    margin-bottom: 2px;
}

.soc-header-alert-item-meta {
    font-size: 0.75rem;
    color: #666;
}

.soc-header-alert-empty {
    padding: 10px 12px;
    font-size: 0.85rem;
    color: #666;
}

.soc-header-alert-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-top: 1px solid #e0e5e4;
    background-color: #f0f4f3;
}

.soc-header-alert-footer-btn {
    flex: 1;
    min-width: 120px;
    padding: 10px 8px;
    border: none;
    background: transparent;
    font-size: 0.8rem;
    text-align: center;
    cursor: pointer;
    color: #006d4e;
    font-weight: 500;
}

.soc-header-alert-footer-btn:hover:not(:disabled) {
    background-color: #e0ece8;
}

.soc-header-alert-footer-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.soc-header-alert-footer .soc-header-alert-viewall {
    border-right: 1px solid #d8e0dd;
}

.soc-header-alert-markall {
    color: #047857;
}

.soc-opportunity-subtitle {
    align-self: center;
    font-size: 0.9rem;
    color: #006d4e;
    font-weight: 600;
}

.soc-header-role {
    font-weight: 600;
}

.soc-header-user {
    color: #008f63;
}

/* Rol + zona (Director de Zona): segunda línea para no quedar fuera de vista en header estrecho */
.soc-header-user-block {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    max-width: min(280px, 55vw);
    line-height: 1.25;
}

.soc-header-user-block .soc-header-user {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.soc-header-zone {
    display: block;
    color: #008f63;
    font-size: 0.92em;
    font-weight: 600;
    word-break: break-word;
    max-width: 100%;
}

.soc-header-logout-form {
    margin: 0;
    display: inline-block;
}

.soc-header-logout-btn {
    background: none;
    border: none;
    color: #006d4e;
    font-size: inherit;
    cursor: pointer;
    padding: 2px 6px;
    text-decoration: underline;
}

.soc-header-logout-btn:hover {
    color: #004d38;
}

/* Marca y eslogan */
.soc-header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.soc-logo-text {
    font-weight: bold;
    font-size: 1.5rem;
    color: #006d4e;
}

.soc-header-divider {
    width: 1px;
    height: 24px;
    background-color: #ccc;
}

.soc-header-slogan {
    font-size: 0.85rem;
    color: #888;
}

/* =========================================================
   CONTENIDO
========================================================= */

.soc-content {
    flex: 1;
    overflow-y: visible; /* solo vertical */
    overflow-x: visible;
}
/* =========================================================
   BOTONES Y LINKS GENERALES
========================================================= */

a {
    text-decoration: none;
}

.btn-primary {
    background-color: #006d4e;
    border-color: #006d4e;
    color: white;
}

    .btn-primary:hover {
        background-color: #004d38;
        border-color: #004d38;
    }

/* =========================================================
   RESPONSIVE (opcional pero recomendable)
========================================================= */

.e-dropdown-popup {
    z-index: 99999 !important;
}

/* Asegurar que el texto de las opciones de los dropdowns sea visible */
.e-dropdown-popup .e-list-item,
.e-dropdown-popup .e-list-item * {
    color: #333 !important;
}
.e-dropdown-popup .e-list-item.e-item-focus,
.e-dropdown-popup .e-list-item.e-active {
    color: #333 !important;
}
.e-dropdown-popup .e-list-item.e-item-focus *,
.e-dropdown-popup .e-list-item.e-active * {
    color: #333 !important;
}

/* Texto del valor seleccionado visible en el input del dropdown */
.e-dropdownlist .e-input-group input.e-input,
.e-dropdownlist .e-input-group .e-input-group-icon + .e-input,
.e-dropdownlist .e-input-group .e-input-value {
    color: #333 !important;
}
.e-ddl.e-input-group input.e-input {
    color: #333 !important;
}

html, body {
    overflow: visible !important;
}

.soc-layout, .soc-main, .soc-content {
    overflow: visible !important;
}

.e-popup,
.e-dropdown-popup {
    z-index: 999999 !important;
}

/* =========================================================
   SIDEBAR SYNFUSION (menú desde RoleNavigationItems)
========================================================= */

/* Sidebar en flujo del documento: empuja el contenido en vez de superponerse */
.soc-sidebar-wrapper {
    display: flex;
    min-width: 0;
    height: 100vh;
    overflow: hidden;
}

/* Cuando el sidebar está cerrado, el wrapper no ocupa espacio */
.soc-sidebar-wrapper:has(.soc-sidebar-column-closed) {
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
}

.soc-sidebar-column {
    width: 260px;
    min-width: 260px;
    overflow: hidden;
    transition: width 0.3s ease, min-width 0.3s ease;
    flex-shrink: 0;
    height: 100vh;
    background-color: #006d4e;
}

.soc-sidebar-column-closed {
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    overflow: hidden !important;
}

/* El contenido interno no debe forzar ancho cuando la columna está cerrada */
.soc-sidebar-column-closed .soc-sf-sidebar,
.soc-sidebar-column-closed .soc-sf-sidebar.e-sidebar {
    width: 0 !important;
    min-width: 0 !important;
    overflow: hidden !important;
}

/* Backdrop solo en móvil: en escritorio no debe tapar el contenido ni bloquear clics */
/* top/left + 100vw/100vh en vez de inset:0 para cubrir el viewport completo en Android Chrome */
.soc-sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1040;
    background: rgba(0, 0, 0, 0.35);
    cursor: pointer;
    touch-action: manipulation;
    pointer-events: none;
    display: none;
}

.soc-sidebar-column {
    position: relative;
    z-index: 1050;
}

.soc-sidebar-column .soc-sf-sidebar {
    width: 260px;
    min-width: 260px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    visibility: visible !important;
    opacity: 1 !important;
    color: #ffffff !important;
    background-color: #006d4e !important;
}

.soc-sidebar-column .soc-sidebar-header,
.soc-sidebar-column .soc-menu-container {
    visibility: visible !important;
    opacity: 1 !important;
}

.soc-sidebar-open-btn {
    position: fixed;
    left: 0;
    top: 14px;
    z-index: 1100;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 0 8px 8px 0;
    background-color: #006d4e;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 0 8px rgba(0,0,0,0.15);
}

.soc-sidebar-open-btn:hover {
    background-color: #004d38;
}

/* Fondo verde y texto blanco en todo el sidebar Syncfusion */
.soc-sf-sidebar.e-sidebar,
.soc-sf-sidebar.e-sidebar .e-sidebar-content,
.soc-sidebar-wrapper .e-sidebar {
    background-color: #006d4e !important;
    color: white !important;
}

.soc-sf-sidebar {
    color: white !important;
}

.soc-sf-sidebar .e-menu-item a,
.soc-sf-sidebar .e-menu-item span,
.soc-sf-sidebar input,
.soc-sf-sidebar label {
    color: white !important;
}

.soc-sidebar-header {
    padding: 16px;
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.soc-sidebar-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: white;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
    border-radius: 4px;
    z-index: 1060;
}

.soc-sidebar-close:hover {
    background-color: rgba(255,255,255,0.15);
}

.soc-sidebar-header .soc-user {
    margin-bottom: 0;
    text-align: left;
}

.soc-user-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.soc-user-main-text {
    min-width: 0;
}

.soc-user-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.soc-user-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 0%;
    transform: none;
    transform-origin: center;
    background: rgba(0, 0, 0, 0.18);
}

.soc-user-avatar-photo {
    width: 100%;
    height: 100%;
    background-size: 100% auto;
    background-repeat: no-repeat;
    background-position: center center;
}

.soc-user-avatar-fallback {
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
}

.soc-user-label,
.soc-user-name,
.soc-user-broker,
.soc-sidebar-header,
.soc-sidebar-header * {
    color: white !important;
}

.soc-user-label {
    font-size: 12px;
    opacity: 0.9;
}

.soc-user-name {
    display: block;
    font-size: 14px;
    line-height: 1.2;
    word-break: break-word;
}

.soc-user-broker {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 0 4px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    opacity: 1;
    word-break: break-word;
}

/* Rol (y zona) debajo de la razón comercial en el encabezado del sidebar */
.soc-sidebar-role {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    width: 100%;
    text-align: left !important;
    align-self: stretch;
}

.soc-sidebar-header .soc-header-user-block {
    align-items: flex-start;
    text-align: left !important;
    max-width: 100%;
}

.soc-sidebar-header .soc-header-user,
.soc-sidebar-header .soc-header-zone {
    color: rgba(255, 255, 255, 0.95) !important;
    display: block;
    width: 100%;
    text-align: left !important;
    font-weight: 600;
    line-height: 1.35;
}

.soc-sidebar-header .soc-header-user {
    font-size: 11px;
}

.soc-sidebar-header .soc-header-zone {
    font-size: 10px;
    font-weight: 500;
    opacity: 0.95;
}

.soc-menu-container {
    padding: 12px 0;
    flex: 1;
    overflow-y: auto;
}

.soc-menu-empty,
.soc-menu-loading {
    padding: 16px;
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    margin: 0;
}

/* Menú HTML del sidebar (sustituye SfMenu para evitar removeChild/circuit) */
.soc-nav-html {
    padding: 0;
    margin: 0;
}
.soc-nav-html .soc-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.soc-nav-html .soc-nav-item {
    margin: 0;
    padding: 0;
}
.soc-nav-html .soc-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #fff !important;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}
.soc-nav-badge {
    margin-left: auto;
    background: #fff;
    color: #006d4e;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}
.soc-nav-html .soc-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff !important;
}
.soc-nav-html .soc-nav-label {
    cursor: pointer;
    font-weight: 600;
}
.soc-nav-html .soc-nav-sub {
    list-style: none;
    margin: 0;
    padding: 0 0 0 8px;
    border-left: 1px solid rgba(255,255,255,0.3);
    margin-left: 16px;
}
.soc-nav-html .soc-nav-sub .soc-nav-link {
    padding: 8px 12px;
    font-size: 13px;
}
.soc-nav-html .soc-nav-item-has-children > .soc-nav-label {
    margin-bottom: 4px;
}
.soc-nav-html .e-icons {
    flex-shrink: 0;
    color: #fff !important;
}

/* Asegurar que los iconos Bootstrap (bi) también se vean en blanco y alineados */
.soc-nav-html .bi {
    flex-shrink: 0;
    font-size: 18px;
    color: #ffffff !important;
}

/* Chevron de agrupación */
.soc-nav-html .soc-nav-chevron {
    margin-left: auto;
    font-size: 16px;
    line-height: 1;
    opacity: 0.7;
    transition: transform 0.2s ease;
    transform: rotate(0deg);
}
.soc-nav-html .soc-nav-label-open .soc-nav-chevron {
    transform: rotate(90deg);
}

/* Ítem activo (página actual) */
.soc-nav-html .soc-nav-link-active {
    background-color: rgba(255, 255, 255, 0.22);
    border-radius: 4px;
}
.soc-nav-html .soc-nav-link-active:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* =========================================================
   ICONOS DEL MENÚ (CRM) - SOLO CONTORNO BLANCO
   Usar en NavigationItems.Icon, por ejemplo:
   - "soc-icon soc-icon-inicio"
   - "soc-icon soc-icon-admin"
   - "soc-icon soc-icon-bancos"
========================================================= */

.soc-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 1.5px solid #ffffff;
    border-radius: 4px;
    color: #ffffff;
    box-sizing: border-box;
}

.soc-icon::before {
    display: inline-block;
    line-height: 1;
    font-size: 11px;
}

/* Inicio / Dashboard */
.soc-icon-inicio::before {
    content: "I";
}

/* Administración / Configuración */
.soc-icon-admin::before {
    content: "A";
}

/* Bancos */
.soc-icon-bancos::before {
    content: "$";
}

/* Contactos / Clientes */
.soc-icon-contactos::before,
.soc-icon-clientes::before {
    content: "C";
}

/* Oportunidades / Ventas */
.soc-icon-oportunidades::before {
    content: "O";
}

/* Agenda / Calendario */
.soc-icon-agenda::before {
    content: "A";
}

/* Reportes / Informes */
.soc-icon-reportes::before {
    content: "R";
}

/* Menú Syncfusion dentro del sidebar - tema verde (por si se vuelve a usar) */
.soc-sf-sidebar .soc-nav-menu.e-menu-wrapper,
.soc-sf-sidebar .e-menu-wrapper {
    background: transparent !important;
    border: none !important;
}

.soc-sf-sidebar .e-menu-item,
.soc-sf-sidebar .e-menu-item .e-menu-url {
    color: white !important;
}

.soc-sf-sidebar .e-menu-item.e-focused,
.soc-sf-sidebar .e-menu-item:hover,
.soc-sf-sidebar .e-menu-item.e-active {
    background-color: #004d38 !important;
    color: white !important;
}

.soc-sf-sidebar .e-menu-icon {
    color: white !important;
}

.soc-sf-sidebar .e-menu-item .e-caret {
    color: white !important;
}

/* Asegurar íconos y flechas del menú en blanco */
.soc-sf-sidebar .e-icons,
.soc-sf-sidebar .e-menu-icon,
.soc-sf-sidebar .e-caret,
.soc-sf-sidebar svg,
.soc-sf-sidebar .e-menu-item .e-menu-text {
    color: white !important;
    fill: white !important;
}

/* Submenú (popup): por encima del sidebar (z-index 1100 > sidebar 1050) y mismo estilo verde */
.soc-sf-sidebar .e-menu-popup,
.soc-sf-sidebar .e-menu-popup .e-menu-item,
.e-menu-popup,
.e-menu-popup .e-menu-item,
.e-menu-container.e-menu-popup {
    z-index: 1100 !important;
}
.soc-sf-sidebar .e-menu-popup,
.soc-sf-sidebar .e-menu-popup .e-menu-item,
.e-menu-popup,
.e-menu-popup .e-menu-item {
    background-color: #006d4e !important;
    color: #fff !important;
}
.soc-sf-sidebar .e-menu-popup .e-menu-item .e-menu-url,
.soc-sf-sidebar .e-menu-popup .e-menu-item .e-menu-text,
.soc-sf-sidebar .e-menu-popup .e-menu-item .e-menu-icon,
.e-menu-popup .e-menu-item .e-menu-url,
.e-menu-popup .e-menu-item .e-menu-text,
.e-menu-popup .e-menu-item .e-menu-icon {
    background-color: transparent !important;
    color: #fff !important;
    fill: #fff !important;
}
.soc-sf-sidebar .e-menu-popup .e-menu-item:hover,
.soc-sf-sidebar .e-menu-popup .e-menu-item:hover .e-menu-url,
.e-menu-popup .e-menu-item:hover,
.e-menu-popup .e-menu-item:hover .e-menu-url {
    background-color: rgba(255,255,255,0.15) !important;
    color: #fff !important;
}
.soc-sf-sidebar .e-menu-popup .e-menu-item.e-selected .e-menu-url,
.e-menu-popup .e-menu-item.e-selected .e-menu-url {
    background-color: rgba(255,255,255,0.2) !important;
    color: #fff !important;
}
/* Sidebar fondo principal */
.soc-sf-sidebar.e-sidebar {
    background-color: #006d4e !important;
    color: #ffffff !important;
}

/* Texto general dentro del sidebar */
.soc-sf-sidebar .e-menu,
.soc-sf-sidebar .e-menu .e-menu-item,
.soc-sf-sidebar .e-menu .e-menu-item .e-menu-text {
    color: #ffffff !important;
    background-color: transparent !important;
}

    /* Hover del menú */
    .soc-sf-sidebar .e-menu .e-menu-item:hover {
        background-color: rgba(255, 255, 255, 0.15) !important;
    }

    /* Item activo */
    .soc-sf-sidebar .e-menu .e-menu-item.e-selected {
        background-color: rgba(255, 255, 255, 0.25) !important;
        color: #ffffff !important;
    }

/* Header superior */
.soc-sidebar-header {
    background-color: #006d4e;
    color: #ffffff;
}

/* Botón cerrar */
.soc-sidebar-close {
    color: #ffffff;
}
/* Fondo real del sidebar */
.soc-sf-sidebar,
.soc-sf-sidebar.e-sidebar,
.soc-sf-sidebar .e-sidebar,
.soc-sf-sidebar .e-sidebar-content {
    background-color: #006d4e !important;
    color: #ffffff !important;
    scrollbar-width: thin;
    scrollbar-color: #4ea98a #006d4e;
}
.soc-sf-sidebar .e-sidebar-content::-webkit-scrollbar {
    width: 8px;
}
.soc-sf-sidebar .e-sidebar-content::-webkit-scrollbar-track {
    background: #006d4e;
}
.soc-sf-sidebar .e-sidebar-content::-webkit-scrollbar-thumb {
    background-color: #4ea98a;
    border-radius: 6px;
}
.soc-sf-sidebar .e-sidebar-content::-webkit-scrollbar-thumb:hover {
    background-color: #6cc4a6;
}

    /* Fondo del menú interno */
    .soc-sf-sidebar .e-menu {
        background-color: #006d4e !important;
    }

        /* Items del menú */
        .soc-sf-sidebar .e-menu .e-menu-item {
            background-color: transparent !important;
            color: #ffffff !important;
        }

        /* Texto del menú */
        .soc-sf-sidebar .e-menu .e-menu-text {
            color: #ffffff !important;
        }

        /* Hover */
        .soc-sf-sidebar .e-menu .e-menu-item:hover {
            background-color: rgba(255,255,255,0.15) !important;
        }

        /* Seleccionado */
        .soc-sf-sidebar .e-menu .e-menu-item.e-selected {
            background-color: rgba(255,255,255,0.25) !important;
        }
        /* Quitar fondo gris del item seleccionado */
        .soc-sf-sidebar .e-menu .e-menu-item.e-selected,
        .soc-sf-sidebar .e-menu .e-menu-item.e-focused,
        .soc-sf-sidebar .e-menu .e-menu-item.e-active {
            background-color: rgba(255,255,255,0.20) !important;
            color: #ffffff !important;
        }

        /* Quitar fondo gris por defecto */
        .soc-sf-sidebar .e-menu .e-menu-item {
            background-color: transparent !important;
        }

            /* Hover elegante */
            .soc-sf-sidebar .e-menu .e-menu-item:hover {
                background-color: rgba(255,255,255,0.15) !important;
            }

/* Desactivar overlay completamente */
.e-sidebar-overlay,
.e-backdrop {
    display: none !important;
    background: transparent !important;
}

/* Quitar fondo del anchor interno */
.soc-sf-sidebar .e-menu-item .e-menu-url {
    background-color: transparent !important;
    color: #ffffff !important;
}

/* Quitar fondo del wrapper interno */
.soc-sf-sidebar .e-menu-item .e-anchor-wrap {
    background-color: transparent !important;
}

/* Forzar item seleccionado */
.soc-sf-sidebar .e-menu-item.e-selected .e-menu-url,
.soc-sf-sidebar .e-menu-item.e-active .e-menu-url {
    background-color: rgba(255,255,255,0.20) !important;
    color: #ffffff !important;
}

/* Hover real */
.soc-sf-sidebar .e-menu-item:hover .e-menu-url {
    background-color: rgba(255,255,255,0.15) !important;
    color: #ffffff !important;
}
/* Fondo base completo */
.soc-sf-sidebar .e-menu-parent.e-vertical {
    background-color: #006d4e !important;
}

    /* Quitar fondo gris real */
    .soc-sf-sidebar .e-menu-parent.e-vertical .e-menu-item {
        background-color: transparent !important;
    }

        /* Quitar gris del anchor */
        .soc-sf-sidebar .e-menu-parent.e-vertical .e-menu-item .e-menu-url {
            background-color: transparent !important;
            color: #ffffff !important;
        }

        /* Hover */
        .soc-sf-sidebar .e-menu-parent.e-vertical .e-menu-item:hover,
        .soc-sf-sidebar .e-menu-parent.e-vertical .e-menu-item:hover .e-menu-url {
            background-color: rgba(255,255,255,0.15) !important;
            color: #ffffff !important;
        }

        /* Seleccionado */
        .soc-sf-sidebar .e-menu-parent.e-vertical .e-menu-item.e-selected,
        .soc-sf-sidebar .e-menu-parent.e-vertical .e-menu-item.e-selected .e-menu-url {
            background-color: rgba(255,255,255,0.25) !important;
            color: #ffffff !important;
        }


.soc-main {
    position: relative;
    min-width: 0;
    min-height: 0;
    transition: margin 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Área de contenido: ocupa todo el espacio disponible (grid ya asigna 1fr al main) */
.soc-main-content {
    flex: 1 1 0%;
    min-width: 0;
    min-height: 0;
    position: relative;
    z-index: 0;
    overflow: auto;
    overflow-anchor: none;
    display: flex;
    flex-direction: column;
}

/* Cuando hay un modal abierto, elevar .soc-main-content por encima de header (1048)
   y sidebar (1050) para que el backdrop y el dialog queden por delante de todo.
   :has() detecta automáticamente la presencia del backdrop sin necesidad de JS. */
body:has(.soc-kpi-detail-modal-backdrop) .soc-main-content,
body.soc-modal-open .soc-main-content {
    z-index: 1060 !important;
}

/* Que el contenido de la página (Body) ocupe el espacio y sea visible */
.soc-main-content > * {
    flex: 1 1 auto;
    min-height: 0;
    display: block;
}

/* Páginas que deben mantener el contenido arriba (no centrado al abrir modal o con poco contenido) */
.soc-main-content > .soc-page-content-top {
    flex: 0 1 auto;
    align-self: flex-start;
    width: 100%;
}

/* =========================================================
   PÁGINA DE LOGIN - Estilo empresarial #006d4e + animaciones
========================================================= */

@keyframes soc-login-fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes soc-login-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(6px, -8px) scale(1.02); }
    66% { transform: translate(-4px, 4px) scale(0.98); }
}

@keyframes soc-login-shine {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes soc-login-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.soc-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #004d38 0%, #006d4e 40%, #008066 100%);
    background-size: 200% 200%;
    animation: soc-login-bgShift 12s ease infinite;
}

@keyframes soc-login-bgShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.soc-login-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.soc-login-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    animation: soc-login-float 8s ease-in-out infinite;
}

.soc-login-shape-1 {
    width: 140px;
    height: 140px;
    top: calc(50% - 220px);
    left: calc(100% - 310px);
    transform: translateX(-50%);
    animation-delay: 0s;
}

.soc-login-shape-2 {
    width: 140px;
    height: 140px;
    top: calc(50% - 100px);
    left: calc(100% - 310px - 140px);
    transform: translateX(-50%);
    animation-delay: -2s;
}

.soc-login-shape-3 {
    width: 140px;
    height: 140px;
    top: calc(50% - 100px);
    left: calc(100% - 310px + 140px);
    transform: translateX(-50%);
    animation-delay: -4s;
}

.soc-login-shape-4 {
    width: 140px;
    height: 140px;
    top: 50%;
    left: calc(100% - 370px);
    transform: translate(-50%, -50%);
    animation-delay: -1s;
}

.soc-login-shape-5 {
    width: 140px;
    height: 140px;
    top: calc(50% + 100px);
    left: calc(100% - 310px - 140px);
    transform: translateX(-50%);
    animation-delay: -3s;
}

.soc-login-shape-6 {
    width: 140px;
    height: 140px;
    top: calc(50% + 100px);
    left: calc(100% - 310px + 140px);
    transform: translateX(-50%);
    animation-delay: -5s;
}

.soc-login-shape-7 {
    width: 140px;
    height: 140px;
    top: calc(50% + 220px);
    left: calc(100% - 310px);
    transform: translateX(-50%);
    animation-delay: -6s;
}

.soc-login-cluster {
    position: absolute;
}

.soc-login-cluster .soc-login-shape {
    position: absolute;
}

/* Patrón de 7 esferas relativo al centro del cluster */
.soc-login-cluster .soc-login-shape-1 { top: -180px; left: 0; }
.soc-login-cluster .soc-login-shape-2 { top: -80px;  left: -140px; }
.soc-login-cluster .soc-login-shape-3 { top: -80px;  left: 140px; }
.soc-login-cluster .soc-login-shape-4 { top: 0;      left: -70px; }
.soc-login-cluster .soc-login-shape-5 { top: 80px;   left: -140px; }
.soc-login-cluster .soc-login-shape-6 { top: 80px;   left: 140px; }
.soc-login-cluster .soc-login-shape-7 { top: 180px;  left: 0; }

/* Posiciones de los clusters en la pantalla */
.soc-login-cluster-1 {
    top: 50%;
    left: 65%;
    transform: translate(-50%, -50%);
}

.soc-login-cluster-2 {
    top: 18%;
    left: 25%;
    transform: translate(-50%, -50%) scale(0.8);
}

.soc-login-cluster-3 {
    top: 82%;
    left: 30%;
    transform: translate(-50%, -50%) scale(0.9);
}

.soc-login-cluster-4 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.75);
}

.soc-login-shape-1,
.soc-login-shape-2,
.soc-login-shape-3,
.soc-login-shape-5,
.soc-login-shape-6,
.soc-login-shape-7 {
    animation: soc-login-cluster-side 6s ease-in-out infinite;
}

.soc-login-shape-8 {
    width: 260px;
    height: 260px;
    top: 5%;
    left: -80px;
    animation-delay: -1s;
}

.soc-login-shape-9 {
    width: 180px;
    height: 180px;
    top: 55%;
    left: 8%;
    animation-delay: -3s;
}

@keyframes soc-login-cluster-side {
    0%, 100% {
        transform: translateX(-50%) scale(0.85);
    }
    40%, 60% {
        transform: translateX(-50%) scale(1.05);
    }
}

.soc-login-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255,255,255,0.1);
    padding: 40px 36px;
    animation: soc-login-fadeUp 0.6s ease-out;
}

.soc-login-brand {
    text-align: center;
    margin-bottom: 24px;
}

.soc-login-logo {
    display: inline-block;
    font-size: 2.25rem;
    font-weight: 800;
    color: #006d4e;
    letter-spacing: -0.02em;
    animation: soc-login-fadeUp 0.5s ease-out 0.1s both;
}
.soc-login-logo-img {
    display: inline-block;
    max-width: 280px;
    width: 100%;
    height: auto;
    animation: soc-login-fadeUp 0.5s ease-out 0.1s both;
}

.soc-login-tagline {
    margin: 4px 0 0;
    font-size: 0.8rem;
    color: #64748b;
    animation: soc-login-fadeUp 0.5s ease-out 0.15s both;
}

.soc-login-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #006d4e;
    margin: 0 0 24px;
    animation: soc-login-fadeUp 0.5s ease-out 0.2s both;
    outline: none;
    user-select: none;
}

.soc-login-title:focus {
    outline: none;
    box-shadow: none;
}

.soc-login-form {
    animation: soc-login-fadeUp 0.5s ease-out 0.25s both;
}

.soc-login-validation {
    color: #dc2626;
    font-size: 0.875rem;
    margin-bottom: 16px;
    list-style: none;
    padding: 0;
}

.soc-login-field {
    position: relative;
    margin-bottom: 20px;
}

.soc-login-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.soc-login-input:hover {
    background: #fff;
    border-color: #cbd5e1;
}

.soc-login-input:focus {
    outline: none;
    border-color: #006d4e;
    box-shadow: 0 0 0 4px rgba(0, 109, 78, 0.15);
    background: #fff;
}

.soc-login-label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: #64748b;
    pointer-events: none;
    transition: transform 0.2s ease, font-size 0.2s ease, color 0.2s ease;
}

.soc-login-input:focus ~ .soc-login-label,
.soc-login-input:not(:placeholder-shown) ~ .soc-login-label {
    transform: translateY(-32px) scale(0.85);
    font-size: 0.75rem;
    color: #006d4e;
}

.soc-login-input::placeholder {
    color: transparent;
}

.soc-login-error {
    display: block;
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 4px;
}

.soc-login-options {
    margin-bottom: 20px;
}

.soc-login-remember {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #475569;
    cursor: pointer;
}

.soc-login-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #006d4e;
    cursor: pointer;
}

.soc-login-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    background: #006d4e;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
}

.soc-login-btn:hover {
    background: #005a40;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 109, 78, 0.35);
}

.soc-login-btn:active {
    transform: translateY(0);
}

.soc-login-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0 16px;
    color: #94a3b8;
    font-size: 0.85rem;
}

.soc-login-divider::before,
.soc-login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.soc-login-passkey {
    text-align: center;
    margin-bottom: 24px;
}

.soc-login-passkey-btn {
    background: none;
    border: none;
    color: #006d4e;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

.soc-login-passkey-btn:hover {
    color: #004d38;
}

.soc-login-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    justify-content: center;
    margin-bottom: 20px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.soc-login-link {
    color: #006d4e;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

/* ──────────────────────────────────────────────────────────────
   Login con código OTP
   ────────────────────────────────────────────────────────────── */
.soc-login-btn-outline {
    display: block;
    text-align: center;
    text-decoration: none;
    background: transparent;
    color: #006d4e;
    border: 2px solid #006d4e;
    margin-top: 8px;
}

.soc-login-btn-outline:hover {
    background: #f0faf6;
    box-shadow: none;
    transform: none;
}

.soc-login-subtitle {
    color: #64748b;
    font-size: 0.92rem;
    margin: -8px 0 20px;
    line-height: 1.5;
}

.soc-otp-channel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.soc-otp-channel-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 500;
    color: #475569;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.soc-otp-channel-btn i {
    font-size: 1.6rem;
    color: #94a3b8;
    transition: color 0.2s ease;
}

.soc-otp-channel-btn:hover,
.soc-otp-channel-btn.active {
    border-color: #006d4e;
    background: #f0faf6;
    color: #006d4e;
}

.soc-otp-channel-btn:hover i,
.soc-otp-channel-btn.active i {
    color: #006d4e;
}

.soc-otp-input {
    text-align: center;
    font-size: 1.8rem;
    letter-spacing: 12px;
    font-weight: 700;
}

.soc-otp-back-btn {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.88rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    padding: 8px 0;
    margin-top: 4px;
    transition: color 0.2s ease;
}

.soc-otp-back-btn:hover {
    color: #006d4e;
}

.soc-otp-back-btn-center {
    margin-top: 8px;
}

.soc-spinner-sm {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.soc-login-link:hover {
    color: #004d38;
    text-decoration: underline;
}

.soc-login-external {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.soc-login-external-title {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0 0 12px;
}

.soc-login-external a,
.soc-login-external button {
    color: #006d4e !important;
}

/* =========================================================
   RESPONSIVE - MÓVIL (todas las páginas)
========================================================= */

@media (max-width: 768px) {
    /* En móvil: una sola columna; ignorar :has(closed) para que el main siempre tenga espacio */
    .soc-layout {
        grid-template-columns: 1fr !important;
        grid-template-rows: 1fr !important;
        min-width: 0;
        height: 100vh;
    }

    /* Sidebar siempre overlay: no ocupa espacio en el grid, no tapa el main cuando está cerrado */
    .soc-layout > .soc-sidebar-wrapper {
        grid-column: 1;
        grid-row: 1;
        position: fixed !important;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 1050;
        width: 0 !important;
        min-width: 0 !important;
        max-width: 0 !important;
        transition: width 0.2s ease, box-shadow 0.2s ease;
        pointer-events: none;
    }

    .soc-layout > .soc-sidebar-wrapper:has(.soc-sidebar-column:not(.soc-sidebar-column-closed)) {
        width: 280px !important;
        max-width: 85vw !important;
        box-shadow: 4px 0 20px rgba(0,0,0,0.2);
        pointer-events: auto;
        overflow: visible !important;
    }

    .soc-layout > .soc-sidebar-wrapper > * {
        pointer-events: auto;
    }

    /* En móvil sí mostrar el backdrop para cerrar menú al tocar fuera */
    .soc-sidebar-backdrop {
        display: block !important;
        pointer-events: auto !important;
    }

    /* Main siempre en (1,1) y siempre con tamaño completo de viewport */
    .soc-layout > .soc-main {
        grid-column: 1;
        grid-row: 1;
        width: 100% !important;
        max-width: 100vw !important;
        min-height: 100vh !important;
        height: 100vh !important;
    }

    .soc-layout > .soc-sidebar-wrapper:has(.soc-sidebar-column:not(.soc-sidebar-column-closed)) .soc-sidebar-column {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    .soc-main {
        margin-left: 0 !important;
        min-width: 0;
        width: 100%;
        min-height: 100vh;
        height: 100%;
        display: flex;
        flex-direction: column;
        position: relative;
        z-index: 1;
    }

    .soc-main-content {
        flex: 1 1 auto;
        min-height: 0;
        padding: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        max-width: 100vw;
    }

    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .soc-layout, .soc-main {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .soc-header {
        height: auto;
        min-height: 48px;
        max-height: none;
        padding: 6px 10px 8px;
        flex-wrap: nowrap;
        gap: 6px;
        align-items: center;
    }

    .soc-header-left,
    .soc-header-center,
    .soc-header-right {
        position: static;
        left: auto;
        right: auto;
    }

    .soc-header-left {
        width: auto;
        flex-shrink: 0;
        order: 1;
    }

    .soc-header-center {
        flex: 1;
        min-width: 0;
        order: 2;
        text-align: center;
        padding: 0 4px;
    }

    .soc-header-center .soc-page-title,
    .soc-header-center h2 {
        font-size: 0.95rem;
        line-height: 1.2;
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .soc-header-right {
        width: auto;
        flex-shrink: 0;
        order: 3;
        justify-content: flex-end;
        flex-wrap: nowrap;
        flex-direction: column;
        gap: 4px;
        font-size: 11px;
        transform: none;
    }

    .soc-header-right-row2 {
        flex-wrap: wrap;
        justify-content: flex-end;
        row-gap: 4px;
    }

    .soc-header-user-block {
        max-width: min(320px, 72vw);
    }

    .soc-header-zone {
        font-size: 10px;
    }

    .soc-header-alert-btn {
        margin-right: 0;
        font-size: 18px;
    }

    .soc-header-slogan {
        display: none;
    }

    .soc-header-divider {
        display: none;
    }

    .soc-logo-text {
        font-size: 1.1rem;
    }

    .soc-header-logo-img {
        height: 54px;
        max-width: 330px;
    }

    .soc-sidebar-open-btn {
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
        left: 0;
        top: 12px;
    }

    .crm-form-wrapper {
        padding: 16px 12px;
    }

    .crm-card {
        width: 100%;
        max-width: 100%;
    }

    .crm-card-body,
    .crm-card-header {
        padding: 16px;
    }

    .soc-login-page {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .soc-header {
        min-height: 44px;
        max-height: 48px;
        padding: 4px 8px 6px;
    }

    .soc-header-center .soc-page-title,
    .soc-header-center h2 {
        font-size: 0.85rem;
    }

    .soc-header-right {
        font-size: 10px;
    }

    .soc-header-logout-btn {
        padding: 2px 6px;
        font-size: 10px;
    }

    .soc-logo-text {
        font-size: 1rem;
    }

    .soc-header-logo-img {
        height: 48px;
        max-width: 270px;
    }

    .crm-form-wrapper {
        padding: 12px 10px;
    }
}

/* =========================================================
   GRID TENANTS: Detail Template (sucursales)
========================================================= */

.soc-detail-sucursales {
    padding: 1rem 1.5rem 1rem 2.5rem;
    background-color: #f8faf9;
    border-left: 3px solid #006d4e;
}

.soc-detail-sucursales-header {
    margin-bottom: 0.75rem;
}

.soc-detail-sucursales-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #006d4e;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.soc-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.soc-detail-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    background-color: #e8f0ee;
    color: #333;
    font-weight: 600;
    border-bottom: 1px solid #d0ddd8;
}

.soc-detail-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #eee;
}

.soc-detail-table tbody tr:hover {
    background-color: #f0f5f3;
}

.soc-detail-sin-sucursales {
    padding: 1rem 2.5rem;
    color: #888;
    font-size: 0.875rem;
    font-style: italic;
}