/* ===========================
   ESTILO 1: EMP�TICO - PALETA DE COLORES CORPORATIVOS
   =========================== */

/* 
   GU�A DE COLORES:
   - PREMIUM: #236479 (Azul oscuro profesional)
   - AMOR: #5B9EA5 (Azul turquesa c�lido)
   - ECOL�GICO: #9AC44B (Verde vibrante)
   - ECO-FRIENDLY: #D4D76C (Amarillo verdoso suave)
   - AMIGO: #CC5C1D (Naranja c�lido)
   - B�SICO: #DDA628 (Amarillo dorado)
   - ESPECIAL: #C79218 (Dorado premium)
   
   Para cambiar el color principal del estilo, modifica las variables CSS:
   --color-primary, --color-secondary, --color-accent
*/

:root {
    /* Colores principales del tema */
    --color-primary: #236479; /* PREMIUM - Color principal */
    --color-secondary: #5B9EA5; /* AMOR - Color secundario */
    --color-accent: #9AC44B; /* ECOL�GICO - Acento */
    --color-warm: #CC5C1D; /* AMIGO - C�lido */
    --color-highlight: #DDA628; /* B�SICO - Destacado */
    --color-premium: #C79218; /* ESPECIAL - Premium */
    --color-soft: #D4D76C; /* ECO-FRIENDLY - Suave */
    /* Colores de texto */
    --text-primary: #2c3e50;
    --text-secondary: #666;
    --text-light: #999;
    /* Colores de fondo */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-hover: #f0f4f5;
    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(35, 100, 121, 0.1);
    --shadow-md: 0 4px 12px rgba(35, 100, 121, 0.15);
    --shadow-lg: 0 8px 24px rgba(35, 100, 121, 0.2);
    /* Bordes */
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --border-color: #e5e7eb;
    /* Tipograf�a */
    --font-family: 'Nunito', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Sidebar */
    --sidebar-width: 280px;
}

/* ===========================
   RESET Y BASE
   =========================== */
.estilo1-container {
    font-family: var(--font-family);
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    min-height: 100vh;
}

/* ===========================
   LAYOUT - SIDEBAR VERTICAL
   =========================== */
.estilo1-layout {
    display: flex;
    min-height: 100vh;
}

.estilo1-sidebar {
    width: 280px;
    background: linear-gradient(180deg, #236479 0%, #1a4d5e 100%);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    overflow: visible;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.25);
    transition: width 0.3s ease;
}

.estilo1-sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    flex-shrink: 0;
}

.estilo1-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #FFFFFF !important;
    text-decoration: none;
}

    .estilo1-logo:hover {
        color: #FFFFFF !important;
    }

.estilo1-logo-icon {
    width: 56px;
    height: 56px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

    .estilo1-logo-icon svg {
        width: 32px;
        height: 32px;
        fill: currentColor;
    }

.estilo1-logo-text {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.estilo1-logo-name {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: white !important;
}

.estilo1-badge {
    background: var(--color-accent);
    color: white;
    padding: 0.3rem 0.7rem;
    border-radius: 14px;
    font-size: 0.75rem;
    font-weight: 700;
    align-self: flex-start;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.estilo1-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem 0;
    background: transparent;
}

    /* Scrollbar personalizada */
    .estilo1-sidebar-nav::-webkit-scrollbar {
        width: 6px;
    }

    .estilo1-sidebar-nav::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
    }

    .estilo1-sidebar-nav::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 3px;
    }

        .estilo1-sidebar-nav::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.3);
        }

.estilo1-sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.15);
}

.estilo1-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.estilo1-nav-item {
    position: relative;
}

    .estilo1-nav-item + .estilo1-nav-item {
        margin-top: 0.25rem;
    }

.estilo1-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    margin: 0.25rem 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    font-size: 0.95rem;
    border: none;
    background: none;
    width: calc(100% - 1.5rem);
    text-align: left;
    border-radius: 10px;
}

    .estilo1-nav-link span {
        flex: 1;
    }

    .estilo1-nav-link svg {
        flex-shrink: 0;
    }

    .estilo1-nav-link:hover {
        background: rgba(255, 255, 255, 0.12);
        color: #FFFFFF;
        transform: translateX(4px);
    }

    .estilo1-nav-link.active {
        background: rgba(154, 196, 75, 0.2);
        color: #FFFFFF;
        font-weight: 600;
        border-left: 4px solid var(--color-accent);
        box-shadow: 0 4px 12px rgba(154, 196, 75, 0.15);
    }

/* Header de grupo (COMERCIAL, OPERACIONES, etc.) */
.estilo1-nav-group-header {
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.75);
    padding: 1rem 1.5rem;
}

    .estilo1-nav-group-header:hover {
        background: rgba(255, 255, 255, 0.1);
        color: rgba(255, 255, 255, 0.95);
    }

    .estilo1-nav-group-header.active {
        background: rgba(154, 196, 75, 0.15);
        color: #FFFFFF;
        font-weight: 700;
    }

/* Iconos en sublinks */
.sublink-icon {
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* Dropdown animations */
.estilo1-nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 0;
}

    .estilo1-nav-submenu.active {
        max-height: 1000px;
    }

.estilo1-nav-sublink {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem 0.75rem 3rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

    .estilo1-nav-sublink:hover {
        background: rgba(255, 255, 255, 0.12);
        color: #FFFFFF;
        transform: translateX(2px);
    }

    .estilo1-nav-sublink.active {
        background: rgba(221, 166, 40, 0.15);
        color: #FFFFFF;
        font-weight: 600;
        border-left: 3px solid var(--color-highlight);
    }

.estilo1-dropdown-icon {
    margin-left: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

    .estilo1-dropdown-icon.open {
        transform: rotate(180deg);
    }

/* ===========================
   MAIN CONTENT
   =========================== */
.estilo1-main {
    margin-left: 280px;
    flex: 1;
    transition: margin-left 0.3s ease;
    min-height: 100vh;
    padding: 2.5rem 3rem;
    background: var(--bg-secondary);
}

.estilo1-container-content {
    max-width: 1400px;
    margin: 0 auto;
}

/* ===========================
   PAGE HEADERS Y T�TULOS
   =========================== */
.estilo1-main > h1,
.estilo1-main > h2 {
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.estilo1-main > p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ===========================
   CARDS
   =========================== */
.estilo1-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease;
    margin-bottom: 1.5rem;
}

    .estilo1-card:hover {
        box-shadow: var(--shadow-md);
    }

    /* Header dentro de cards (ej: "Filtros y Acciones") */
    .estilo1-card > h3:first-child,
    .estilo1-card > h4:first-child {
        color: var(--color-primary);
        margin: 0 0 1.5rem 0;
        font-size: 1.15rem;
        font-weight: 700;
        display: inline-block;
    }

    /* Si hay un bot�n junto al t�tulo del card (fallback antiguo) */
    .estilo1-card > h3 + .estilo1-btn,
    .estilo1-card > h4 + .estilo1-btn {
        float: right;
        margin-top: -0.5rem;
    }

/* Contenedor flexible para t�tulo + bot�n en misma l�nea */
.estilo1-card-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.estilo1-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.estilo1-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
}

.estilo1-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* ===========================
   BUTTONS
   =========================== */
.estilo1-btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    white-space: nowrap;
}

.estilo1-btn-primary {
    background: var(--color-primary);
    color: white;
}

    .estilo1-btn-primary:hover {
        background: var(--color-secondary);
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

.estilo1-btn-accent {
    background: var(--color-accent);
    color: white;
}

    .estilo1-btn-accent:hover {
        background: #88b340;
        transform: translateY(-2px);
    }

.estilo1-btn-warm {
    background: var(--color-warm);
    color: white;
}

    .estilo1-btn-warm:hover {
        background: #b54e19;
        transform: translateY(-2px);
    }

.estilo1-btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

    .estilo1-btn-outline:hover {
        background: var(--color-primary);
        color: white;
    }

.estilo1-btn:disabled,
.estilo1-btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
    transform: none !important;
    box-shadow: none !important;
}

/* ===========================
   FORMS
   =========================== */
.estilo1-form-group {
    margin-bottom: 1rem;
}

.estilo1-input,
.estilo1-select,
.estilo1-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: var(--font-family);
}

    .estilo1-input:focus,
    .estilo1-select:focus,
    .estilo1-textarea:focus {
        outline: none;
        border-color: var(--color-primary);
        box-shadow: 0 0 0 3px rgba(35, 100, 121, 0.1);
    }

.estilo1-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ===========================
   TABLES
   =========================== */

/* Contenedor para que la tabla rellene y pueda hacer scroll horizontal si es necesario */
.estilo1-table-container {
    width: 100%;
    overflow-x: auto;
}

.estilo1-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

    .estilo1-table thead {
        background: var(--color-primary);
        color: white;
    }

    .estilo1-table th,
    .estilo1-table td {
        padding: 1rem;
        text-align: left;
        border-bottom: 1px solid var(--border-color);
    }

    .estilo1-table tbody tr:hover {
        background: var(--bg-hover);
    }

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

/* Botones de acci�n en tabla */
.estilo1-action-btn {
    padding: 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

    .estilo1-action-btn:hover {
        background: var(--bg-secondary);
    }

.estilo1-action-edit {
    color: var(--color-warm);
}

.estilo1-action-delete {
    color: #e74c3c;
}

.estilo1-table-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.estilo1-table .suc-cell {
    position: relative;
    display: inline-block;
    outline: none;
}

    .estilo1-table .suc-cell:focus {
        box-shadow: 0 0 0 2px rgba(2,136,209,.25);
        border-radius: 8px;
    }

.estilo1-table .suc-tooltip {
    display: none !important;
    position: absolute;
    z-index: 50;
    left: 0;
    top: calc(100% + .35rem);
    max-width: 320px;
    padding: .5rem .65rem;
    border-radius: 10px;
    background: #1f2937;
    color: #fff;
    font-size: .85rem;
    line-height: 1.2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
    white-space: normal;
}

.estilo1-table .suc-cell:hover .suc-tooltip,
.estilo1-table .suc-cell:focus .suc-tooltip {
    display: block !important;
}

/* ===========================
   MODAL
   =========================== */
.estilo1-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

.estilo1-modal-overlay-alert {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2100;
    padding: 1rem;
}

.estilo1-modal {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.estilo1-modal-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: #ffffff;
}

.estilo1-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.estilo1-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #ffffff;
}

    .estilo1-modal-close:hover {
        opacity: 0.8;
    }

.estilo1-modal-body {
    padding: 1.5rem;
}

.estilo1-modal-footer {
    padding: 1.5rem;
    border-top: 2px solid var(--bg-secondary);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* ===========================
   GRID
   =========================== */
.estilo1-grid {
    display: grid;
    gap: 1.5rem;
}

.estilo1-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.estilo1-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.estilo1-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Grid espec�fico para filtros: ocupa todo el ancho y es responsive */
.estilo1-grid-filtros {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem 1.5rem;
    width: 100%;
}

/* ===========================
   ALERTAS / NOTIFICACIONES
   =========================== */
.estilo1-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.estilo1-alert-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.85);
    color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7);
}

.estilo1-alert-content {
    flex: 1;
}

.estilo1-alert-title {
    margin: 0 0 0.15rem 0;
    font-weight: 700;
    font-size: 0.98rem;
}

.estilo1-alert-message {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.estilo1-alert-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    margin-left: 0.5rem;
    padding: 0.1rem 0.25rem;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease;
}

    .estilo1-alert-close:hover {
        background: rgba(0, 0, 0, 0.05);
        color: var(--text-primary);
    }

.estilo1-alert-info {
    background: linear-gradient(135deg, rgba(91, 158, 165, 0.08), rgba(255, 255, 255, 1));
    border-color: rgba(91, 158, 165, 0.35);
}

    .estilo1-alert-info .estilo1-alert-icon {
        color: var(--color-secondary);
    }

.estilo1-alert-success {
    background: linear-gradient(135deg, rgba(154, 196, 75, 0.10), rgba(255, 255, 255, 1));
    border-color: rgba(154, 196, 75, 0.45);
}

    .estilo1-alert-success .estilo1-alert-icon {
        color: var(--color-accent);
    }

.estilo1-alert-warning {
    background: linear-gradient(135deg, rgba(221, 166, 40, 0.10), rgba(255, 255, 255, 1));
    border-color: rgba(221, 166, 40, 0.45);
}

    .estilo1-alert-warning .estilo1-alert-icon {
        color: var(--color-highlight);
    }

.estilo1-alert-error {
    background: linear-gradient(135deg, rgba(204, 92, 29, 0.10), rgba(255, 255, 255, 1));
    border-color: rgba(204, 92, 29, 0.50);
}

    .estilo1-alert-error .estilo1-alert-icon {
        color: var(--color-warm);
    }

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    background-color: var(--color-primary);
    color: white;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
    cursor: help;
    vertical-align: middle;
}

/* ===========================
   UTILITIES
   =========================== */
.estilo1-mb-1 {
    margin-bottom: 0.5rem;
}

.estilo1-mb-2 {
    margin-bottom: 1rem;
}

.estilo1-mb-3 {
    margin-bottom: 1.5rem;
}

.estilo1-mb-4 {
    margin-bottom: 2rem;
}

.estilo1-mt-1 {
    margin-top: 0.5rem;
}

.estilo1-mt-2 {
    margin-top: 1rem;
}

.estilo1-mt-3 {
    margin-top: 1.5rem;
}

.estilo1-mt-4 {
    margin-top: 2rem;
}

.estilo1-text-center {
    text-align: center;
}

.estilo1-text-right {
    text-align: right;
}

.estilo1-text-left {
    text-align: left;
}

/* Clearfix para floats */
.estilo1-clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* ===========================
   SIDEBAR COLLAPSE
   =========================== */

.sidebar-toggle-btn {
    position: absolute;
    right: -14px;
    top: 80px;
    z-index: 200;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-primary);
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    line-height: 1;
    padding: 0;
    transition: background 0.2s, box-shadow 0.2s;
}

.sidebar-toggle-btn:hover {
    background: var(--color-secondary);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

/* Collapsed state — sidebar width */
.estilo1-sidebar.sidebar-collapsed {
    width: 64px;
}

/* Collapsed state — main content offset */
.estilo1-main.sidebar-collapsed {
    margin-left: 64px;
}

/* Hide text and non-icon elements when collapsed */
.estilo1-sidebar.sidebar-collapsed .estilo1-logo-text,
.estilo1-sidebar.sidebar-collapsed .sidebar-sucursal-badge,
.estilo1-sidebar.sidebar-collapsed .nav-admin-label,
.estilo1-sidebar.sidebar-collapsed .estilo1-nav-link > span,
.estilo1-sidebar.sidebar-collapsed .estilo1-dropdown-icon,
.estilo1-sidebar.sidebar-collapsed .estilo1-nav-submenu,
.estilo1-sidebar.sidebar-collapsed .nav-section-divider {
    display: none !important;
}

/* Center logo icon when collapsed */
.estilo1-sidebar.sidebar-collapsed .estilo1-logo {
    justify-content: center;
}

.estilo1-sidebar.sidebar-collapsed .estilo1-logo-icon {
    width: 42px;
    height: 42px;
}

.estilo1-sidebar.sidebar-collapsed .estilo1-logo-icon svg {
    width: 22px;
    height: 22px;
}

/* Center nav links when collapsed */
.estilo1-sidebar.sidebar-collapsed .estilo1-nav-link {
    justify-content: center;
    padding: 0.85rem 0.25rem;
    margin: 0.2rem 0.25rem;
    width: calc(100% - 0.5rem);
    gap: 0;
}

/* ===========================
   RESPONSIVE
   =========================== */
@media (max-width: 1024px) {
    .estilo1-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

        .estilo1-sidebar.active {
            transform: translateX(0);
        }

    .estilo1-main {
        margin-left: 0;
        padding: 1.5rem 1rem;
    }

    .estilo1-grid-3,
    .estilo1-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .estilo1-main {
        padding: 1rem;
    }

    .estilo1-grid-2,
    .estilo1-grid-3,
    .estilo1-grid-4,
    .estilo1-grid-filtros {
        grid-template-columns: 1fr;
    }

    /* Botones que est�n flotando, ponerlos en bloque */
    .estilo1-card > h3 + .estilo1-btn,
    .estilo1-card > h4 + .estilo1-btn {
        float: none;
        display: block;
        margin-top: 1rem;
        width: 100%;
    }
}

/* Header de card con t�tulo y bot�n de acci�n */
.estilo1-card-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

    .estilo1-card-header-actions h3,
    .estilo1-card-header-actions h4 {
        margin: 0;
        color: var(--color-primary);
        font-size: 1.15rem;
        font-weight: 700;
    }




/* ===========================
   AJUSTES PARA MODAL DE PRECIOS
   =========================== */

.estilo1-modal .estilo1-table-container {
    width: 100%;
    overflow-x: auto;
    margin: 0;
    padding: 0;
}

.estilo1-modal .estilo1-table {
    width: 100% !important;
    margin: 0;
}

    .estilo1-modal .estilo1-table table {
        width: 100% !important;
        table-layout: auto;
    }

.estilo1-modal-body {
    overflow-x: auto;
    padding: 1.5rem;
}

/* Asegurar que inputs dentro de celdas no se desborden */
.estilo1-modal .estilo1-table input.estilo1-input {
    min-width: 80px;
}



/* Modal de error sobre el modal principal de recetas */
.estilo1-modal-overlay-alert {
    z-index: 2100 !important;
}

/* ===========================
   SELECTOR DE �REA DE TRABAJO
   =========================== */

/* Contenedor principal */
.selector-area-container {
    max-width: 1600px;
    margin: 0 auto;
}

/* Header del selector */
.selector-area-header {
    text-align: center;
    margin-bottom: 3rem;
}

.selector-area-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.selector-area-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Grid de cards */
.selector-area-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Card individual */
.selector-area-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

    .selector-area-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
        border-color: var(--color-primary);
    }

/* Header del card (icono + badge) */
.selector-area-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.selector-area-card .icono {
    font-size: 3rem;
    line-height: 1;
}

/* Badges de urgencia */
.selector-area-card .badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    min-width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.badge-urgente {
    background: #e74c3c;
    animation: pulse 2s ease-in-out infinite;
}

.badge-importante {
    background: #f39c12;
}

.badge-normal {
    background: #f1c40f;
}

.badge-bajo {
    background: #27ae60;
}

/* Animaci�n pulse para badges urgentes */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* T�tulo del card */
.selector-area-card .card-titulo {
    color: var(--color-primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

/* Descripci�n del card */
.selector-area-card .card-descripcion {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0 0 1rem 0;
    line-height: 1.4;
}

/* L�nea divisoria */
.selector-area-card .card-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1rem 0;
}

/* Detalles de tareas */
.selector-area-card .card-detalles {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.selector-area-card .detalle-item {
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.5;
}

    .selector-area-card .detalle-item span {
        display: block;
    }

/* Loading state */
.selector-area-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .selector-area-title {
        font-size: 1.75rem;
    }

    .selector-area-subtitle {
        font-size: 1rem;
    }

    .selector-area-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .selector-area-card .card-titulo {
        font-size: 1.25rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .selector-area-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .selector-area-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===========================
   GRUPOS DE MEN� (�REAS)
   =========================== */

/* Header de grupo (COMERCIAL, OPERACIONES, etc.) */
.estilo1-nav-group-header {
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.75);
    padding: 1rem 1.5rem;
}

    .estilo1-nav-group-header:hover {
        background: rgba(255, 255, 255, 0.1);
        color: rgba(255, 255, 255, 0.95);
    }

    .estilo1-nav-group-header.active {
        background: rgba(154, 196, 75, 0.15);
        color: #FFFFFF;
        font-weight: 700;
    }

/* Iconos en sublinks */
.sublink-icon {
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* Dropdown animations */
.estilo1-nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 0;
}

    .estilo1-nav-submenu.active {
        max-height: 1000px;
    }

.estilo1-nav-sublink {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem 0.75rem 3rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

    .estilo1-nav-sublink:hover {
        background: rgba(255, 255, 255, 0.12);
        color: #FFFFFF;
        transform: translateX(2px);
    }

    .estilo1-nav-sublink.active {
        background: rgba(221, 166, 40, 0.15);
        color: #FFFFFF;
        font-weight: 600;
        border-left: 3px solid var(--color-highlight);
    }

.estilo1-dropdown-icon {
    margin-left: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

    .estilo1-dropdown-icon.open {
        transform: rotate(180deg);
    }


.nav-section-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
    margin: 1.25rem 1rem 0.5rem 1rem;
    border-radius: 999px;
}

.nav-section-title {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.35rem;
}

/* ===========================
   SELECTOR MULTI-SUCURSAL
   =========================== */

/* Selector de sucursales (arriba del header) */
.sucursales-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, rgba(35, 100, 121, 0.08), rgba(91, 158, 165, 0.08));
    border: 2px solid rgba(35, 100, 121, 0.15);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
}

    .sucursales-selector svg {
        color: var(--color-primary);
    }

    .sucursales-selector label {
        font-weight: 600;
        color: var(--text-primary);
        margin: 0;
        white-space: nowrap;
    }

.sucursal-select {
    flex: 1;
    padding: 0.65rem 1rem;
    border: 2px solid rgba(35, 100, 121, 0.2);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .sucursal-select:focus {
        outline: none;
        border-color: var(--color-primary);
        box-shadow: 0 0 0 3px rgba(35, 100, 121, 0.1);
    }

    .sucursal-select:hover {
        border-color: var(--color-secondary);
    }

/* Grid bloqueado cuando no hay sucursal seleccionada */
.selector-area-bloqueado {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

    .selector-area-bloqueado svg {
        color: var(--text-light);
        margin-bottom: 1.5rem;
    }

    .selector-area-bloqueado h3 {
        color: var(--text-primary);
        font-size: 1.5rem;
        font-weight: 700;
        margin: 0 0 0.5rem 0;
    }

    .selector-area-bloqueado p {
        color: var(--text-secondary);
        font-size: 1rem;
        margin: 0;
    }

/* Cards habilitadas vs deshabilitadas */
.selector-area-card.habilitada {
    cursor: pointer;
}

    .selector-area-card.habilitada:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
        border-color: var(--color-accent);
    }

.selector-area-card.deshabilitada {
    opacity: 0.65;
    cursor: not-allowed;
    filter: grayscale(40%);
}

    .selector-area-card.deshabilitada:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
        border-color: transparent;
    }

/* Candado overlay para cards deshabilitadas */
.candado-overlay {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 1.8rem;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

    .candado-overlay svg {
        width: 1.2rem;
        height: 1.2rem;
        color: var(--text-light);
    }

/* Responsive para selector de sucursales */
@media (max-width: 768px) {
    .sucursales-selector {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

        .sucursales-selector > div {
            flex-direction: column;
            align-items: flex-start !important;
        }

    .sucursal-select {
        width: 100%;
    }
}



.servicios-grid {
    /* Desktop: 3 columnas */
    grid-template-columns: repeat(3, 1fr);
}

/* Tablet: 2 columnas */
@media (max-width: 950px) {
    .servicios-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Mobile: 1 columna */
@media (max-width: 650px) {
    .servicios-grid {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }

        .servicios-grid label {
            padding: 0.75rem !important;
            min-height: 48px !important;
        }

        .servicios-grid span {
            font-size: 0.9rem !important;
        }
}

/* Mobile peque�o: ajustes adicionales */
@media (max-width: 480px) {
    .servicios-grid {
        max-height: 200px !important;
    }
}

/* ===========================
   Login
   =========================== */

.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #236479 0%, #5B9EA5 50%, #9AC44B 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 100%;
    padding: 3rem;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #236479 0%, #5B9EA5 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 16px rgba(35, 100, 121, 0.3);
}

.login-logo svg {
    color: white;
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    color: #236479;
    margin: 0 0 0.5rem 0;
}

.login-subtitle {
    color: #5B9EA5;
    font-size: 1.1rem;
    font-weight: 400;
    margin: 0;
}

.login-welcome {
    background: linear-gradient(135deg, #D4D76C 0%, #9AC44B 100%);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
    font-weight: 600;
}

.login-form-group {
    margin-bottom: 1.5rem;
}

.login-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.login-input {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Nunito', sans-serif;
    transition: all 0.3s ease;
}

.login-input:focus {
    outline: none;
    border-color: #5B9EA5;
    box-shadow: 0 0 0 4px rgba(91, 158, 165, 0.1);
}

.login-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #236479 0%, #5B9EA5 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(35, 100, 121, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(35, 100, 121, 0.4);
}

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

.login-btn-secondary {
    width: 100%;
    padding: 1rem;
    background: white;
    color: #236479;
    border: 2px solid #236479;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.login-btn-secondary:hover {
    background: #f0f7f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(35, 100, 121, 0.15);
}

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

.login-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: #999;
}

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

.login-divider span {
    padding: 0 1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: #666;
}

.login-footer a {
    color: #236479;
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .login-card {
        padding: 2rem 1.5rem;
    }

    .login-title {
        font-size: 1.5rem;
    }
}

/* Acceso */
.login-error {
    background: #fee;
    border: 2px solid #fcc;
    color: #c33;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.login-error svg {
    flex-shrink: 0;
}

.login-input:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}